1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,384847,722935,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("4095076492192fa54e211cb0feee73db4df89057ee",t.callServer,void 0,t.findSourceMapURL,"recommendAction");e.s(["recommendAction",0,n],384847);let r=(0,t.createServerReference)("4061442e0f8031f90e8b602ad300770a5d7a8918de",t.callServer,void 0,t.findSourceMapURL,"unrecommendAction");e.s(["unrecommendAction",0,r],722935)},929092,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("403bc75fc7064ed961d489c1f3cb802a5b8b6c9489",t.callServer,void 0,t.findSourceMapURL,"publishPostToBsky");e.s(["publishPostToBsky",0,n])},935927,e=>{"use strict";e.s(["DefaultPublicationHomepage",()=>p,"PublicationPostItem",()=>m]);var t=e.i(843476),n=e.i(500932),r=e.i(790711),i=e.i(459124),a=e.i(615184),o=e.i(899169),s=e.i(124670),l=e.i(566312),c=e.i(250209),u=e.i(630090),d=e.i(981633),h=e.i(209195);let p=e=>{let o,p,m,f,g,y,b,v,x,k,w,C=(0,n.c)(42),{record:S,publication:E,did:T,profile:I,showPageBackground:D,fakePosts:N,posts:A}=e,_=!!E.publication_newsletter_settings?.enabled;C[0]!==E.publication_pages?(o=(0,u.publishedNavPages)(E.publication_pages),C[0]=E.publication_pages,C[1]=o):o=C[1];let P=o;C[2]!==N||C[3]!==A?(p=N?[]:(0,h.sortPostsForList)(A??[]),C[2]=N,C[3]=A,C[4]=p):p=C[4];let M=p,R=S?.theme?.headingFont,L=S?.theme?.bodyFont;C[5]!==R||C[6]!==L?(m=(0,t.jsx)(a.FontLoader,{headingFontId:R,bodyFontId:L}),C[5]=R,C[6]=L,C[7]=m):m=C[7];let j=!!D;C[8]!==T||C[9]!==S?(f=S?.icon?(0,s.blobRefToSrc)(S.icon.ref,T):void 0,C[8]=T,C[9]=S,C[10]=f):f=C[10];let O=S?.theme;C[11]!==T||C[12]!==O?(g=(0,l.wordmarkFromTheme)(O,T),C[11]=T,C[12]=O,C[13]=g):g=C[13],C[14]!==E?(y=(0,c.getPublicationURL)(E),C[14]=E,C[15]=y):y=C[15];let B=S?.theme?.pageWidth,F=S?.url,H=S?.name??E.name,U=S?.description;return C[16]!==_||C[17]!==E.uri||C[18]!==F||C[19]!==H||C[20]!==U?(b={publicationUri:E.uri,publicationUrl:F,publicationName:H,publicationDescription:U,newsletterMode:_},C[16]=_,C[17]=E.uri,C[18]=F,C[19]=H,C[20]=U,C[21]=b):b=C[21],C[22]!==I?(v=I?(0,t.jsx)(i.PublicationAuthor,{did:I.did,displayName:I.displayName,handle:I.handle}):void 0,C[22]=I,C[23]=v):v=C[23],C[24]!==N||C[25]!==M||C[26]!==E||C[27]!==S?(x=(0,t.jsx)(d.PublicationPostsList,{publication:E,publicationRecord:S,posts:M,fakePosts:N,className:"px-3 sm:px-4"}),C[24]=N,C[25]=M,C[26]=E,C[27]=S,C[28]=x):x=C[28],C[29]!==P||C[30]!==y||C[31]!==B||C[32]!==b||C[33]!==v||C[34]!==x||C[35]!==j||C[36]!==f||C[37]!==g?(k=(0,t.jsx)(r.PublicationHomeLayout,{showPageBackground:j,iconUrl:f,wordmark:g,navPages:P,publicationUrl:y,activePath:"/",pageWidth:B,subscribe:b,author:v,children:x}),C[29]=P,C[30]=y,C[31]=B,C[32]=b,C[33]=v,C[34]=x,C[35]=j,C[36]=f,C[37]=g,C[38]=k):k=C[38],C[39]!==k||C[40]!==m?(w=(0,t.jsxs)(t.Fragment,{children:[m,k]}),C[39]=k,C[40]=m,C[41]=w):w=C[41],w};function m(e){let r,i,a,s,l,c,u,d,h,p,m,f,g=(0,n.c)(32);g[0]!==e.title?(r=e.title&&(0,t.jsx)("h2",{className:"text-primary text-[1.125em]",children:e.title}),g[0]=e.title,g[1]=r):r=g[1],g[2]!==e.description?(i=(0,t.jsx)("p",{className:"italic text-secondary line-clamp-3",children:e.description}),g[2]=e.description,g[3]=i):i=g[3],g[4]!==r||g[5]!==i?(a=(0,t.jsxs)(t.Fragment,{children:[r,i]}),g[4]=r,g[5]=i,g[6]=a):a=g[6];let y=a,b=void 0!==e.author&&null!==e.author,v=void 0!==e.date&&null!==e.date;return g[7]!==y||g[8]!==e.href?(s=e.href?(0,t.jsx)(o.SpeedyLink,{href:e.href,className:"publishedPost no-underline! flex flex-col",children:y}):(0,t.jsx)("div",{className:"publishedPost no-underline! flex flex-col",children:y}),g[7]=y,g[8]=e.href,g[9]=s):s=g[9],g[10]!==b||g[11]!==e.author?(l=b&&(0,t.jsx)("span",{children:e.author}),g[10]=b,g[11]=e.author,g[12]=l):l=g[12],g[13]!==b||g[14]!==v?(c=b&&v&&(0,t.jsx)("span",{children:"|"}),g[13]=b,g[14]=v,g[15]=c):c=g[15],g[16]!==v||g[17]!==e.date?(u=v&&(0,t.jsx)("span",{children:e.date}),g[16]=v,g[17]=e.date,g[18]=u):u=g[18],g[19]!==l||g[20]!==c||g[21]!==u?(d=(0,t.jsxs)("p",{className:"text-sm text-tertiary flex gap-1 items-center",children:[l,c,u]}),g[19]=l,g[20]=c,g[21]=u,g[22]=d):d=g[22],g[23]!==e.interactions||g[24]!==d?(h=(0,t.jsxs)("div",{className:"justify-between w-full text-sm text-tertiary flex gap-1 flex-wrap pt-2 items-center",children:[d,e.interactions]}),g[23]=e.interactions,g[24]=d,g[25]=h):h=g[25],g[26]!==s||g[27]!==h?(p=(0,t.jsxs)("div",{className:"flex w-full grow flex-col ",children:[s,h]}),g[26]=s,g[27]=h,g[28]=p):p=g[28],g[29]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("hr",{className:"last:hidden border-border-light"}),g[29]=m):m=g[29],g[30]!==p?(f=(0,t.jsxs)(t.Fragment,{children:[p,m]}),g[30]=p,g[31]=f):f=g[31],f}},906065,e=>{"use strict";e.s(["PaginatedPublicationPostsList",()=>x],906065);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(59992),a=e.i(981633),o=e.i(784192),s=e.i(814649),l=e.i(386834),c=e.i(791676),u=e.i(133564),d=e.i(133643),h=e.i(779521),p=e.i(209195),m=e.i(226810);let f=[{value:"latest",label:"Latest"},{value:"oldest",label:"Oldest"},{value:"top",label:"Top"}];function g(e){let i,a,s,l,h,p,g,v=(0,n.c)(30),{controls:x,index:k,state:w,setState:C}=e,[S,E]=(0,r.useState)(!1);v[0]!==C||v[1]!==w?(i=()=>{E(!1),C({...w,search:""})},v[0]=C,v[1]=w,v[2]=i):i=v[2];let T=i;v[3]!==T||v[4]!==x.search||v[5]!==S||v[6]!==C||v[7]!==w?(a=x.search&&(0,t.jsxs)("label",{className:`readerSearch border border-transparent focus-within:border-border rounded-lg py-0! px-0 focus-within:
1px-[6px]! transition-[padding] duration-100 ease-out grow min-w-0 items-center gap-2 text-secondary ${S?"flex":"hidden sm:flex"}`,children:[(0,t.jsx)(m.SearchTiny,{className:"shrink-0 text-tertiary"}),(0,t.jsx)(o.Input,{autoFocus:S,className:"appearance-none! bg-transparent grow min-w-0 py-1! outline-none! text-primary",placeholder:"Search postsâ¦",value:w.search,autoComplete:"off",onKeyDown:e=>{e.stopPropagation(),"Escape"===e.key&&S&&T()},onChange:e=>C({...w,search:e.target.value})},S?"open":"closed"),(w.search||S)&&(0,t.jsx)("button",{type:"button","aria-label":S?"Close search":"Clear search",className:"shrink-0 text-tertiary hover:text-accent-contrast",onClick:T,children:(0,t.jsx)(u.CloseTiny,{})})]}),v[3]=T,v[4]=x.search,v[5]=S,v[6]=C,v[7]=w,v[8]=a):a=v[8],v[9]!==x.search||v[10]!==S||v[11]!==w?(s=x.search&&!S&&(0,t.jsx)("button",{type:"button","aria-label":"Search posts",className:`sm:hidden shrink-0 ${w.search?"text-accent-contrast":"text-tertiary hover:text-accent-contrast"}`,onClick:()=>E(!0),children:(0,t.jsx)(d.SearchSmall,{})}),v[9]=x.search,v[10]=S,v[11]=w,v[12]=s):s=v[12];let I=`readerFilterAndSort ml-auto gap-3 items-center ${!x.tagFilter&&!x.sort?"hidden":S?"hidden sm:flex":"flex"} ${x.search?"flex-row":"flex-row-reverse"}`;return v[13]!==x.tagFilter||v[14]!==k||v[15]!==C||v[16]!==w?(l=x.tagFilter&&(0,t.jsx)(b,{index:k,tags:w.tags,setTags:e=>C({...w,tags:e})}),v[13]=x.tagFilter,v[14]=k,v[15]=C,v[16]=w,v[17]=l):l=v[17],v[18]!==x.sort||v[19]!==C||v[20]!==w?(h=x.sort&&(0,t.jsx)(c.ToggleGroup,{background:"light",className:"readerSort shrink-0",optionClassName:"whitespace-nowrap",value:w.sort,options:f,onChange:e=>C({...w,sort:e})}),v[18]=x.sort,v[19]=C,v[20]=w,v[21]=h):h=v[21],v[22]!==I||v[23]!==l||v[24]!==h?(p=(0,t.jsxs)("div",{className:I,children:[l,h]}),v[22]=I,v[23]=l,v[24]=h,v[25]=p):p=v[25],v[26]!==a||v[27]!==s||v[28]!==p?(g=(0,t.jsxs)("div",{className:"postsListReaderControls flex flex-row items-center gap-6 w-full pb-2",onMouseDown:y,children:[a,s,p]}),v[26]=a,v[27]=s,v[28]=p,v[29]=g):g=v[29],g}function y(e){return e.stopPropagation()}let b=({index:e,tags:n,setTags:i})=>{let a=(0,r.useMemo)(()=>(0,p.tagCountsForIndex)(e),[e]);return(0,t.jsx)(s.Popover,{asChild:!0,align:"end",className:"readerTagFilter max-w-xs max-h-64 overflow-y-auto",trigger:(0,t.jsxs)("button",{type:"button","aria-label":n.length?`Filtering by tags: ${n.join(", ")}`:"Filter by tag",className:`shrink-0 flex items-center gap-1 ${n.length?"text-accent-contrast font-bold":"text-tertiary hover:text-accent-contrast"}`,children:[(0,t.jsx)(h.TagSmall,{}),n.length>0&&(0,t.jsx)("span",{className:"text-sm ",children:n.length})]}),children:0===a.length?(0,t.jsx)("div",{className:"text-tertiary italic text-sm",children:"no tags yet"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 text-primary",children:a.map(({tag:e,count:r})=>{let a=n.includes(e);return(0,t.jsx)(l.Tag,{name:e,selected:a,count:r,onClick:()=>i(a?n.filter(t=>t!==e):[...n,e])},e)})})})},v={search:"",tags:[],sort:"latest"};function x(e){let o,s,l,c,u,d,h,m,f,y,b,x,S,E=(0,n.c)(43),{publication:T,publicationRecord:I,uris:D,index:N,knownPosts:A,loadBatch:_,view:P,highlightFirstPost:M,limit:R,readerControls:L,emptyState:j,className:O,disableLinks:B,pageWidth:F}=e,[H,U]=(0,r.useState)(v),z=(0,i.useDebouncedValue)(H.search,200),$=!!L?.search,V=!!L?.tagFilter,q=!!L?.sort;e:{let e;if(!N){let e;E[0]!==D?(e=D??[],E[0]=D,E[1]=e):e=E[1],o=e;break e}let t=$?z:"",n=V?H.tags:null,r=q?H.sort:"latest";E[2]!==N||E[3]!==t||E[4]!==n||E[5]!==r?(e=(0,p.readerControlledUris)(N,{search:t,tags:n,sort:r}),E[2]=N,E[3]=t,E[4]=n,E[5]=r,E[6]=e):e=E[6],o=e}let G=o;E[7]!==R||E[8]!==G?(s=R&&R>0?G.slice(0,R):G,E[7]=R,E[8]=G,E[9]=s):s=E[9];let W=s,K=`${z} 2${H.tags.join(",")} 3${H.sort}`;E[10]!==K?(l={filterKey:K,pages:1},E[10]=K,E[11]=l):l=E[11];let[Y,Z]=(0,r.useState)(l),X=Y.filterKey===K?Y.pages:1,Q=W.slice(0,X*p.POSTS_LIST_PAGE_SIZE),J=W.length>Q.length;E[12]!==A?(u=new Map(A.map(C)),E[12]=A,E[13]=u):u=E[13],c=u;let[ee,et]=(0,r.useState)(w);E[14]!==ee||E[15]!==c||E[16]!==_?(d=e=>c.get(e)??(_?ee.get(e):null),E[14]=ee,E[15]=c,E[16]=_,E[17]=d):d=E[17];let en=d,er=[],ei=[];for(let e of Q){let t=en(e);void 0===t?ei.push(e):t&&0===ei.length&&er.push(t)}let ea=ei.length>0;E[18]===Symbol.for("react.memo_cache_sentinel")?(h=new Set,E[18]=h):h=E[18];let eo=(0,r.useRef)(h),[es,el]=(0,r.useState)(0),ec=ei.join(" ");E[19]!==_||E[20]!==ec||E[21]!==et?(m=()=>{if(!_||!ec)return;let e=ec.split(" ").filter(e=>!eo.current.has(e)).slice(0,p.POSTS_LIST_PAGE_SIZE);if(0!==e.length){for(let t of e)eo.current.add(t);_(e).then(t=>{et(n=>{let r=new Map(n);for(let n of e)r.set(n,t.find(e=>e.uri===n)??null);return r})}).catch(()=>{setTimeout(()=>el(k),2e3)}).finally(()=>{for(let t of e)eo.current.delete(t)})}},E[19]=_,E[20]=ec,E[21]=et,E[22]=m):m=E[22],E[23]!==_||E[24]!==ec||E[25]!==es?(f=[_,ec,es],E[23]=_,E[24]=ec,E[25]=es,E[26]=f):f=E[26],(0,r.useEffect)(m,f);let eu=(0,r.useRef)(null);if(E[27]!==K||E[28]!==J||E[29]!==ea||E[30]!==X?(y=()=>{let e=eu.current;if(!e||!J||ea)return;let t=new IntersectionObserver(e=>{let[t]=e;t.isIntersecting&&Z({filterKey:K,pages:X+1})},{threshold:.1});return t.observe(e),()=>t.disconnect()},b=[J,ea,K,X],E[27]=K,E[28]=J,E[29]=ea,E[30]=X,E[31]=y,E[32]=b):(y=E[31],b=E[32]),(0,r.useEffect)(y,b),0===(N??D??[]).length){let e;return E[33]!==j?(e=(0,t.jsx)(t.Fragment,{children:j}),E[33]=j,E[34]=e):e=E[34],e}let ed=`relative w-full py-2 ${O??""}`;E[35]!==N||E[36]!==L||E[37]!==H?(x=L&&N&&(0,t.jsx)(g,{controls:L,index:N,state:H,setState:U}),E[35]=N,E[36]=L,E[37]=H,E[38]=x):x=E[38];let eh=0===W.length?(0,t.jsx)("div",{className:"text-center text-tertiary italic py-4",children:"No posts match"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{"aria-busy":ea||void 0,children:(0,t.jsx)(a.PublicationPostsList,{publication:T,publicationRecord:I,posts:er,view:void 0===P?"medium":P,highlightFirstPost:void 0!==M&&M,disableLinks:void 0!==B&&B,pageWidth:F})}
3),(0,t.jsx)("div",{ref:eu,className:"absolute bottom-[1200px] left-0 w-full h-px pointer-events-none","aria-hidden":"true"}),ea&&(0,t.jsx)("div",{className:"text-center text-tertiary py-4",children:"Loading more posts..."})]});return E[39]!==ed||E[40]!==x||E[41]!==eh?(S=(0,t.jsxs)("div",{className:ed,children:[x,eh]}),E[39]=ed,E[40]=x,E[41]=eh,E[42]=S):S=E[42],S}function k(e){return e+1}function w(){return new Map}function C(e){return[e.uri,e]}},459124,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(732849);e.s(["PublicationAuthor",0,e=>{let i,a,o,s=(0,n.c)(8);return s[0]!==e.displayName?(i=(0,t.jsxs)("strong",{children:["by ",e.displayName]}),s[0]=e.displayName,s[1]=i):i=s[1],s[2]!==e.handle||s[3]!==i?(a=(0,t.jsxs)("span",{className:"hover:text-accent-contrast",children:[i," @",e.handle]}),s[2]=e.handle,s[3]=i,s[4]=a):a=s[4],s[5]!==e.did||s[6]!==a?(o=(0,t.jsx)("p",{className:"italic text-tertiary sm:text-base text-sm",children:(0,t.jsx)(r.ProfilePopover,{didOrHandle:e.did,trigger:a})}),s[5]=e.did,s[6]=a,s[7]=o):o=s[7],o}])},377515,453843,378259,469182,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(634622),i=e.i(368408),a=e.i(814649),o=e.i(853915),s=e.i(271645),l=e.i(618566),c=e.i(44729),u=e.i(467592),d=e.i(870370),h=e.i(99245),p=e.i(784192),m=e.i(899169),f=e.i(750590);function g(){let e,r,i,a,o,g,v,x,k,w,C,S,E,T,I,D,N,A,_,P,M=(0,n.c)(48),{src:R,width:L,pageWidth:j,setImage:O,setWidth:B,remove:F}=function(){let e,t,r,i,a=(0,n.c)(18),{rep:o,undoManager:s,rootEntity:l}=(0,u.useReplicache)(),c=(0,u.useEntity)(l,"theme/wordmark-image"),h=(0,u.useEntity)(l,"theme/wordmark-width"),p=(0,u.useEntity)(l,"theme/page-width")?.data.value||624,m=c?.data.src??null,f=h?.data.value??null;a[0]!==o||a[1]!==l||a[2]!==s||a[3]!==f?(e=async e=>{o&&await s.withUndoGroup(async()=>{await (0,d.addImage)(e,o,{entityID:l,attribute:"theme/wordmark-image"}),null==f&&await o.mutate.assertFact({entity:l,attribute:"theme/wordmark-width",data:{type:"number",value:200}})})},a[0]=o,a[1]=l,a[2]=s,a[3]=f,a[4]=e):e=a[4];let g=e;a[5]!==o?.mutate||a[6]!==l?(t=e=>{o?.mutate.assertFact({entity:l,attribute:"theme/wordmark-width",data:{type:"number",value:e}})},a[5]=o?.mutate,a[6]=l,a[7]=t):t=a[7];let y=t;a[8]!==o?.mutate||a[9]!==l?(r=async()=>{await o?.mutate.retractAttribute({entity:l,attribute:["theme/wordmark-image","theme/wordmark-width"]})},a[8]=o?.mutate,a[9]=l,a[10]=r):r=a[10];let b=r;return a[11]!==p||a[12]!==b||a[13]!==g||a[14]!==y||a[15]!==m||a[16]!==f?(i={src:m,width:f,pageWidth:p,setImage:g,setWidth:y,remove:b},a[11]=p,a[12]=b,a[13]=g,a[14]=y,a[15]=m,a[16]=f,a[17]=i):i=a[17],i}(),H=(0,l.useParams)(),U=R?"wordmark":"logo",z=(0,s.useRef)(null),$=L??200,[V,q]=(0,s.useState)($);M[0]!==$?(e=()=>q($),r=[$],M[0]=$,M[1]=e,M[2]=r):(e=M[1],r=M[2]),(0,s.useEffect)(e,r),M[3]!==j||M[4]!==B||M[5]!==$?(i=e=>{let t=isNaN(e)?$:Math.max(40,Math.min(j,e));q(t),B(t)},M[3]=j,M[4]=B,M[5]=$,M[6]=i):i=M[6];let G=i;M[7]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("h3",{className:"font-bold text-primary",children:"Header Options"}),M[7]=a):a=M[7];let W="logo"===U;M[8]!==F?(o=e=>{e.currentTarget.checked&&F()},M[8]=F,M[9]=o):o=M[9],M[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)("div",{className:"font-bold text-primary",children:"Use Logo and Publication Name"}),M[10]=g):g=M[10],M[11]!==U?(v="wordmark"===U&&(0,t.jsx)("div",{className:"text-sm font-normal text-tertiary",children:"Still appears in links and previews of this publication"}),M[11]=U,M[12]=v):v=M[12],M[13]!==v?(x=(0,t.jsxs)("div",{className:"flex flex-col leading-snug",children:[g,v]}),M[13]=v,M[14]=x):x=M[14],M[15]!==W||M[16]!==o||M[17]!==x?(k=(0,t.jsx)(h.Radio,{type:"radio",id:"wordmark-mode-logo",name:"wordmark-mode",value:"logo",checked:W,onChange:o,children:x}),M[15]=W,M[16]=o,M[17]=x,M[18]=k):k=M[18];let K=`/lish/${H.did}/${H.publication}/dashboard/settings`;M[19]!==K?(w=(0,t.jsxs)("div",{className:"pl-5 text-sm font-normal text-tertiary",children:["Change the logo and name in"," ",(0,t.jsx)(m.SpeedyLink,{className:"text-accent-contrast",href:K,children:"settings"})]}),M[19]=K,M[20]=w):w=M[20],M[21]!==w||M[22]!==k?(C=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[k,w]}),M[21]=w,M[22]=k,M[23]=C):C=M[23],M[24]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)("hr",{className:"border-0 border-t border-border-light"}),M[24]=S):S=M[24];let Y="wordmark"===U;return M[25]===Symbol.for("react.memo_cache_sentinel")?(E=e=>{e.currentTarget.checked&&z.current?.click()},M[25]=E):E=M[25],M[26]===Symbol.for("react.memo_cache_sentinel")?(T=(0,t.jsxs)("div",{className:"font-bold text-primary flex flex-col w-full",children:["Use Wordmark",(0,t.jsx)("div",{className:"text-sm font-normal text-tertiary!",children:"A styled image of your publication name to show on the homepage"})]}
3),M[26]=T):T=M[26],M[27]!==Y?(I=(0,t.jsx)(h.Radio,{type:"radio",id:"wordmark-mode-wordmark",name:"wordmark-mode",value:"wordmark",checked:Y,onChange:E,children:T}),M[27]=Y,M[28]=I):I=M[28],M[29]!==F||M[30]!==R?(D=R&&(0,t.jsx)("button",{type:"button",className:"shrink-0 text-accent-contrast",onClick:F,children:"Remove"}),M[29]=F,M[30]=R,M[31]=D):D=M[31],M[32]!==I||M[33]!==D?(N=(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[I,D]}),M[32]=I,M[33]=D,M[34]=N):N=M[34],M[35]!==G||M[36]!==V||M[37]!==j||M[38]!==O||M[39]!==B||M[40]!==R?(A=(0,t.jsx)("div",{className:"flex flex-col gap-2 pl-5",children:R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex items-center justify-center rounded-md border border-border-light bg-bg-page p-2",children:(0,t.jsx)("img",{src:R,alt:"Wordmark preview",className:"h-auto object-contain",style:{width:`${V}px`,maxWidth:"100%"}})}),(0,t.jsxs)("div",{className:"flex flex-col ",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center text-secondary",children:["Max width",(0,t.jsxs)("div",{className:"flex font-normal text-tertiary",children:[(0,t.jsx)(p.Input,{type:"number",className:"w-10 text-right appearance-none bg-transparent",max:j,min:40,value:V,onChange:e=>q(parseInt(e.currentTarget.value)),onKeyDown:e=>{("Enter"===e.key||"Escape"===e.key)&&(e.preventDefault(),G(V))},onBlur:()=>G(V)}),"px"]})]}),(0,t.jsxs)(c.Root,{className:"relative flex items-center select-none touch-none w-full h-fit px-1",value:[V],max:j,min:40,step:5,onValueChange:e=>q(e[0]),onValueCommit:e=>B(e[0]),children:[(0,t.jsx)(c.Track,{className:"bg-border relative grow rounded-full h-[3px] my-2",children:(0,t.jsx)(c.Range,{className:"absolute bg-accent-contrast rounded-full h-full"})}),(0,t.jsx)(c.Thumb,{className:"flex w-4 h-4 rounded-full border-2 border-white bg-accent-contrast shadow-[0_0_0_1px_rgb(var(--border))] cursor-pointer","aria-label":"Wordmark max width"})]})]})]}):(0,t.jsxs)("label",{className:"group/wordmark-upload flex items-center justify-center gap-2 h-[104px] w-full rounded-lg border border-dashed border-border bg-[var(--accent-light)] cursor-pointer text-tertiary hover:font-bold hover:text-accent-contrast hover:border-accent-contrast",onMouseDown:b,onDragOver:y,onDrop:e=>{e.preventDefault(),e.stopPropagation();let t=e.dataTransfer.files?.[0];t?.type.startsWith("image/")&&O(t)},children:[(0,t.jsx)(f.BlockImageSmall,{className:"shrink-0 text-border group-hover/wordmark-upload:text-accent-contrast"}),"Upload Wordmark",(0,t.jsx)("input",{ref:z,type:"file",accept:"image/*",className:"hidden",onChange:e=>{let t=e.target.files?.[0];t&&O(t),e.currentTarget.value=""}})]})}),M[35]=G,M[36]=V,M[37]=j,M[38]=O,M[39]=B,M[40]=R,M[41]=A):A=M[41],M[42]!==N||M[43]!==A?(_=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[N,A]}),M[42]=N,M[43]=A,M[44]=_):_=M[44],M[45]!==C||M[46]!==_?(P=(0,t.jsxs)("div",{className:"wordmarkEditor flex flex-col gap-3 w-xs text-primary",children:[a,C,S,_]}),M[45]=C,M[46]=_,M[47]=P):P=M[47],P}function y(e){e.preventDefault(),e.stopPropagation()}function b(e){return e.preventDefault()}function v(e){let r,i,a=(0,n.c)(9),o=e.alt||"",s=e.wordmark.aspectRatio?.width,l=e.wordmark.aspectRatio?.height,c=`pubHeaderWordmark mx-auto h-auto object-contain ${e.className||""}`,u=e.wordmark.width?`${e.wordmark.width}px`:"auto";return a[0]!==u?(r={width:u,maxWidth:"100%"},a[0]=u,a[1]=r):r=a[1],a[2]!==e.wordmark.src||a[3]!==o||a[4]!==s||a[5]!==l||a[6]!==c||a[7]!==r?(i=(0,t.jsx)("img",{src:e.wordmark.src,alt:o,width:s,height:l,className:c,style:r}),a[2]=e.wordmark.src,a[3]=o,a[4]=s,a[5]=l,a[6]=c,a[7]=r,a[8]=i):i=a[8],i}function x(e){return!!e&&/^https?:\/\//i.test(e.trim())}function k(e){let r,i=(0,n.c)(8),a=`block px-1 pt-1 pb-0.5 text-sm font-bold text-inherit no-underline! select-none border-b-3 ${e.active?"border-accent-contrast":"border-transparent"}`;if(e.external){let n,r=`flex gap-1 items-center ${a}`;return i[0]!==e.children||i[1]!==e.href||i[2]!==r?(n=(0,t.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:r,children:e.children}),i[0]=e.children,i[1]=e.href,i[2]=r,i[3]=n):n=i[3],n}return i[4]!==a||i[5]!==e.children||i[6]!==e.href?(r=(0,t.jsx)(m.SpeedyLink,{href:e.href,className:a,children:e.children}),i[4]=a,i[5]=e.children,i[6]=e.href,i[7]=r):r=i[7],r}function w(e){let t,r,i,a=(0,n.c)(5),o=(0,s.useRef)(null),[l,c]=(0,s.use
3State)(0);return a[0]!==e?(t=()=>{if(e)return void c(1);let t=o.current;if(!t)return;let n=t.closest(".publicationScrollContainer");if(!n)return;let r=()=>{let e=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=e.top-r.top+n.scrollTop-8;c(i<=0?1:Math.min(1,Math.max(0,n.scrollTop/i)))};return r(),n.addEventListener("scroll",r,{passive:!0}),()=>n.removeEventListener("scroll",r)},r=[e],a[0]=e,a[1]=t,a[2]=r):(t=a[1],r=a[2]),(0,s.useEffect)(t,r),a[3]!==l?(i={navRef:o,bgOpacity:l},a[3]=l,a[4]=i):i=a[4],i}e.s(["NewPublicationHeader",0,function(e){let s,l,c,u,d,h=(0,n.c)(16);return h[0]!==e.iconUrl||h[1]!==e.subscribe?.publicationName||h[2]!==e.wordmark?(s=e.wordmark?(0,t.jsx)("h1",{className:"contents",children:(0,t.jsx)(v,{wordmark:e.wordmark,alt:e.subscribe?.publicationName})}):(0,t.jsxs)(t.Fragment,{children:[e.iconUrl&&(0,t.jsx)(r.PubIcon,{className:"sm:w-8! sm:h-8! sm:mt-1 w-12! h-12! mx-auto",icon:e.iconUrl,pubName:e.subscribe?.publicationName}),(0,t.jsx)("h1",{className:"sm:text-xl text-[1.5rem] text-accent-contrast sm:text-left text-center leading-snug",children:e.subscribe?.publicationName})]}),h[0]=e.iconUrl,h[1]=e.subscribe?.publicationName,h[2]=e.wordmark,h[3]=s):s=h[3],h[4]!==e.edit?(l=e.edit&&(0,t.jsx)("div",{className:"absolute -top-2 -left-3",children:(0,t.jsx)(a.Popover,{className:"pb-3!",trigger:(0,t.jsx)("div",{"aria-label":"Edit publication header",className:" p-1 rounded-full bg-accent-1 text-accent-2 border border-accent-2",children:(0,t.jsx)(o.EditTiny,{})}),children:(0,t.jsx)(g,{})})}),h[4]=e.edit,h[5]=l):l=h[5],h[6]!==s||h[7]!==l?(c=(0,t.jsx)("div",{className:"mx-auto",children:(0,t.jsxs)("div",{className:"publicationName relative flex sm:flex-row flex-col items-start justify-center sm:gap-3 gap-1",children:[s,l]})}),h[6]=s,h[7]=l,h[8]=c):c=h[8],h[9]!==e.edit||h[10]!==e.hideSubscribeInHeader||h[11]!==e.subscribe?(u=e.subscribe&&(0,t.jsx)("div",{className:` 4 ${e.hideSubscribeInHeader&&"sm:hidden pb-2"} 5 ${e.edit&&"pointer-events-none"} 6 block max-w-full w-fit mx-auto px-3 sm:px-0`,children:(0,t.jsx)(i.SubscribeInput,{...e.subscribe,source:{placement:"pub_header"}})}),h[9]=e.edit,h[10]=e.hideSubscribeInHeader,h[11]=e.subscribe,h[12]=u):u=h[12],h[13]!==c||h[14]!==u?(d=(0,t.jsxs)("div",{className:"group/wordmark publicationHeader flex flex-col gap-2 sm:px-4 px-3 sm:pt-10 sm:pb-3 pt-6 pb-0 ",children:[c,u]}),h[13]=c,h[14]=u,h[15]=d):d=h[15],d},"PublicationHeader",0,function(e){let r,a,o,s,l,c,u,d,h,p,m=(0,n.c)(29),f=e.variant??"stacked";m[0]!==e.iconUrl||m[1]!==f?(r=e.iconUrl?(0,t.jsx)("div",{className:`pubHeaderIcon shrink-0 rounded-full w-12 h-12 ${"stacked"===f?" mx-auto":""}`,style:{backgroundImage:`url(${e.iconUrl})`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"}}):null,m[0]=e.iconUrl,m[1]=f,m[2]=r):r=m[2];let g=r,y=`pubHeaderTitle text-accent-contrast text-xl${"stacked"===f?" pt-1":""}`;m[3]!==e.publicationName||m[4]!==y?(a=(0,t.jsx)("h1",{className:y,children:e.publicationName}),m[3]=e.publicationName,m[4]=y,m[5]=a):a=m[5];let b=a;return m[6]!==f?(o="stacked"===f?{paddingTop:"calc(4px - 4px * var(--header-shrink, 0))"}:null,m[6]=f,m[7]=o):o=m[7],m[8]!==o?(s={paddingBottom:"calc(32px - 32px * var(--header-shrink, 0))",...o},m[8]=o,m[9]=s):s=m[9],m[10]!==g||m[11]!==e.publicationName||m[12]!==e.wordmark||m[13]!==b||m[14]!==f?(l=e.wordmark?(0,t.jsx)("h1",{className:"contents",children:(0,t.jsx)(v,{wordmark:e.wordmark,alt:e.publicationName})}):"inline"===f?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[g,b]}):(0,t.jsxs)(t.Fragment,{children:[g,b]}),m[10]=g,m[11]=e.publicationName,m[12]=e.wordmark,m[13]=b,m[14]=f,m[15]=l):l=m[15],m[16]===Symbol.for("react.memo_cache_sentinel")?(c={maxHeight:"calc((1 - var(--header-shrink, 0)) * 400px)",opacity:"calc(1 - var(--header-shrink, 0))"},m[16]=c):c=m[16],m[17]!==e.description?(u=e.description&&(0,t.jsx)("p",{className:"sm:text-lg text-secondary",children:e.description}),m[17]=e.description,m[18]=u):u=m[18],m[19]!==e.subscribe?(d=e.subscribe&&(0,t.jsx)("div",{className:"pt-4 pb-1 px-3",children:(0,t.jsx)("div",{className:"max-w-sm mx-auto w-fit",children:(0,t.jsx)(i.SubscribeInput,{...e.subscribe,source:{placement:"pub_header"}})})}),m[19]=e.subscribe,m[20]=d):d=m[20],m[21]!==e.author||m[22]!==u||m[23]!==d?(h=(0,t.jsxs)("div",{className:"overflow-hidden",style:c,children:[u,e.author,d]}),m[21]=e.author,m[22]=u,m[23]=d,m[24]=h):h=m[24],m[25]!==s||m[26]!==l||m[27]!==h?(p=(0,t.jsxs)("div",{className:"publicationTitleHeader flex flex-col w-full text-center justify-center",style:s,children:[l,h]}),m[25]=s,m[26]=l,m[27]=h,m[28]=p):p=m[28],p}
6],377515),e.s(["isExternalLink",0,x,"normalizeExternalLink",0,function(e){let t,n=e.trim();if(!n)return null;try{t=new URL(n)}catch{return null}return"http:"!==t.protocol&&"https:"!==t.protocol?null:t.toString()}],453843),e.s(["useNavBackgroundFade",0,w],378259);var C=e.i(213459);function S(e){return e.path}e.s(["PublicationNav",0,function(e){let r,a,o,s,l,c,u,d,h,p,m,f,g,y=(0,n.c)(41),b=!e.showPageBackground,{navRef:v,bgOpacity:E}=w(b);if(0===e.pages.length)return null;let T=e.pages;if(y[0]!==E||y[1]!==b||y[2]!==v||y[3]!==e.activePath||y[4]!==e.pages||y[5]!==e.publicationUrl){u=Symbol.for("react.early_return_sentinel");e:{let n,i=[...T].sort((e,t)=>e.sort_order===t.sort_order?e.id-t.id:e.sort_order>t.sort_order?1:-1).filter(S);if(!(i.length>1)){let e;y[13]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"border-b border-border-light mt-6 w-full sm:max-w-[calc(var(--page-width-units)+.75rem)] mx-auto "}),y[13]=e):e=y[13],u=e;break e}s=v,l=`publicationPagesNav z-10 shrink-0 sticky mx-1 sm:mx-2 ${b?"pt-3 bg-bg-page top-0 ":"top-2 rounded-md "}`,y[14]!==E||y[15]!==b?(c=!b&&(0,t.jsx)("div",{className:"absolute inset-0 -z-10 light-container pointer-events-none",style:{opacity:E}}),y[14]=E,y[15]=b,y[16]=c):c=y[16],o=`flex items-center justify-between gap-3 w-full sm:max-w-(--page-width-units) mx-auto ${b?"px-4":"px-2"}`,r="pubPageTabs flex items-center gap-4 min-w-0 overflow-x-auto pt-1 pb-5 -mb-5",y[17]!==e.activePath||y[18]!==e.publicationUrl?(n=n=>{let r=x(n.path),i="/"===n.path?"":n.path,a=r?n.path:`${e.publicationUrl}${i}`,o=!r&&e.activePath===n.path;return(0,t.jsx)("div",{className:`shrink-0 ${o?"text-accent-contrast":"text-tertiary hover:text-secondary"}`,children:(0,t.jsxs)(k,{href:a,external:r,active:o,children:[n.title||n.path," ",r&&(0,t.jsx)(C.ExternalLinkTiny,{})]})},n.id)},y[17]=e.activePath,y[18]=e.publicationUrl,y[19]=n):n=y[19],a=i.map(n)}y[0]=E,y[1]=b,y[2]=v,y[3]=e.activePath,y[4]=e.pages,y[5]=e.publicationUrl,y[6]=r,y[7]=a,y[8]=o,y[9]=s,y[10]=l,y[11]=c,y[12]=u}else r=y[6],a=y[7],o=y[8],s=y[9],l=y[10],c=y[11],u=y[12];return u!==Symbol.for("react.early_return_sentinel")?u:(y[20]!==r||y[21]!==a?(d=(0,t.jsx)("div",{className:r,children:a}),y[20]=r,y[21]=a,y[22]=d):d=y[22],y[23]!==e.hideSubscribeInHeader||y[24]!==e.subscribe?(h=e.subscribe&&e.hideSubscribeInHeader&&(0,t.jsx)("div",{className:"sm:flex hidden justify-end min-w-40 shrink-0",children:(0,t.jsx)(i.SubscribeButton,{...e.subscribe,source:{placement:"pub_nav"}})}),y[23]=e.hideSubscribeInHeader,y[24]=e.subscribe,y[25]=h):h=y[25],y[26]!==o||y[27]!==d||y[28]!==h?(p=(0,t.jsxs)("div",{className:o,children:[d,h]}),y[26]=o,y[27]=d,y[28]=h,y[29]=p):p=y[29],y[30]!==E||y[31]!==b?(m=b?void 0:{opacity:1-E},y[30]=E,y[31]=b,y[32]=m):m=y[32],y[33]!==m?(f=(0,t.jsx)("div",{className:"border-b border-border-light",style:m}),y[33]=m,y[34]=f):f=y[34],y[35]!==p||y[36]!==f||y[37]!==s||y[38]!==l||y[39]!==c?(g=(0,t.jsxs)("nav",{ref:s,className:l,children:[c,p,f]}),y[35]=p,y[36]=f,y[37]=s,y[38]=l,y[39]=c,y[40]=g):g=y[40],g)}],469182)},790711,731313,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(379343),i=e.i(377515),a=e.i(469182),o=e.i(279490),s=e.i(899169),l=e.i(271645),c=e.i(864293);function u(e){let r,i,a,o=(0,n.c)(5),s=(0,l.useRef)(null);o[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{let e=s.current,t=(0,c.nearestScroller)(e);if(!e||!t)return;let n=t.querySelector(".publicationPagesNav"),r=()=>{let r=parseFloat(getComputedStyle(t).paddingTop)||0,i=n?(parseFloat(getComputedStyle(n).top)||0)+n.offsetHeight:0,a=parseFloat(getComputedStyle(e).getPropertyValue("--canvas-sticky-bottom"))||0;e.style.setProperty("--canvas-nav-bottom",`${i}px`),e.style.setProperty("--canvas-viewport-height",`${t.clientHeight-r-i-a}px`)};r();let i=new ResizeObserver(r);return i.observe(t),n&&i.observe(n),()=>i.disconnect()},i=[],o[0]=r,o[1]=i):(r=o[0],i=o[1]),(0,l.useLayoutEffect)(r,i);let u=`canvasPageArea relative w-full ${e.className??""}`;return o[2]!==e.children||o[3]!==u?(a=(0,t.jsx)("div",{ref:s,className:u,children:e.children}),o[2]=e.children,o[3]=u,o[4]=a):a=o[4],a}e.s(["CanvasOverlay",0,function(e){let r,i=(0,n.c)(5),{pageScroll:a}=(0,c.useCanvasZoomEngine)();if(!a){let n;return i[0]!==e.children?(n=(0,t.jsx)(t.Fragment,{children:e.children}),i[0]=e.children,i[1]=n):n=i[1],n}let o=`canvasOverlay sticky w-full h-0 z-20 ${"top"===e.edge?"canvasOverlayTop":"canvasOverlayBottom"}`;return i[2]!==e.children||i[3]!==o?(r=(0,t.jsx)("div",{className:o,children:e.children}),i[2]=e.children,i[3]=o,i[4]=r):r=i[4],r},"CanvasPageArea",0,u],731313),e.s(["PublicationHomeLayout",0,function(e){let l,c,d,h,p,m,f=(0,n.c)(31),{ref:g}=(0,r.usePreserveScroll)(e.subscribe.publicationUri),y=e.navPages.length>0,b=e.pageWidth&&e.pageWidth<480,v=e.navPages.length>1&&!b;f[0]!==y||f[1]!==v||f[2]!==e.activePath||f[3]!==e.author||f[4]!==e.iconUrl||f[5]!==e.navPages||f[6]!==e.publicationUrl||f[7]!==e.showPageBackgroun
6d||f[8]!==e.subscribe||f[9]!==e.wordmark?(l=y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)("div",{className:"sm:max-w-(--page-width-units) mx-auto ",children:(0,t.jsx)(i.NewPublicationHeader,{iconUrl:e.iconUrl,wordmark:e.wordmark,description:e.subscribe.publicationDescription,hasNav:e.navPages.length>1,subscribe:e.subscribe,hideSubscribeInHeader:v})})}),(0,t.jsx)(a.PublicationNav,{publicationUrl:e.publicationUrl,pages:e.navPages,activePath:e.activePath,showPageBackground:e.showPageBackground,subscribe:e.subscribe,hideSubscribeInHeader:v})]}):(0,t.jsx)("div",{className:"pubFullHeader shrink-0",children:(0,t.jsx)("div",{className:"sm:max-w-(--page-width-units) w-full mx-auto px-3 sm:px-4 pt-5",children:(0,t.jsx)(i.PublicationHeader,{variant:"stacked",iconUrl:e.iconUrl,publicationName:e.subscribe.publicationName,description:e.subscribe.publicationDescription,author:e.author,subscribe:e.subscribe})})}),f[0]=y,f[1]=v,f[2]=e.activePath,f[3]=e.author,f[4]=e.iconUrl,f[5]=e.navPages,f[6]=e.publicationUrl,f[7]=e.showPageBackground,f[8]=e.subscribe,f[9]=e.wordmark,f[10]=l):l=f[10];let x=l;f[11]!==e.subscribe.publicationUri?(c=(0,t.jsx)(o.SubscribeSuccessPrefetch,{publicationUri:e.subscribe.publicationUri}),f[11]=e.subscribe.publicationUri,f[12]=c):c=f[12],f[13]!==e.canvasPage||f[14]!==e.children||f[15]!==e.showPageBackground?(d=e.canvasPage?(0,t.jsx)(u,{className:`publicationContent sm:max-w-(--page-width-units) mx-auto flex flex-col items-center ${e.showPageBackground?"":"pt-3"}`,children:e.children}):(0,t.jsx)("main",{className:"publicationContent sm:max-w-(--page-width-units) w-full mx-auto pb-5 px-1",children:e.children}),f[13]=e.canvasPage,f[14]=e.children,f[15]=e.showPageBackground,f[16]=d):d=f[16];let k=`${e.publicationUrl.replace(/\/+$/,"")}/archive`;f[17]!==k?(h=(0,t.jsx)("div",{className:"pubFooter text-center pb-4 hidden",children:(0,t.jsx)(s.SpeedyLink,{href:k,className:"text-sm text-tertiary hover:text-accent-contrast",children:"Archive"})}),f[17]=k,f[18]=h):h=f[18],f[19]!==x||f[20]!==c||f[21]!==d||f[22]!==h?(p=(0,t.jsxs)(t.Fragment,{children:[c,x,d,h]}),f[19]=x,f[20]=c,f[21]=d,f[22]=h,f[23]=p):p=f[23];let w=p;if(e.showPageBackground){let n,r=`pubContentScroll publicationScrollContainer overflow-auto h-full bg-[rgba(var(--bg-page),var(--bg-page-alpha))] border border-border rounded-lg flex flex-col max-w-full w-[10000px] ${e.canvasPage?"no-scrollbar":""}`;return f[24]!==w||f[25]!==g||f[26]!==r?(n=(0,t.jsx)("div",{className:"pubWrapper flex flex-col sm:py-6 h-full max-w-(--page-width-units) mx-auto px-0 py-2",children:(0,t.jsx)("div",{ref:g,className:r,children:w})}),f[24]=w,f[25]=g,f[26]=r,f[27]=n):n=f[27],n}return f[28]!==w||f[29]!==g?(m=(0,t.jsx)("div",{ref:g,className:"pubWrapper publicationScrollContainer flex flex-col sm:pb-6 h-full w-full overflow-y-scroll",children:w}),f[28]=w,f[29]=g,f[30]=m):m=f[30],m}],790711)},875981,514085,191544,114366,927895,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(74863);let i=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.70897 3.77456C4.70897 1.95705 6.18235 0.483673 7.99985 0.483673C9.81736 0.483673 11.2907 1.95705 11.2907 3.77456V6.51831H11.3262C12.1546 6.51831 12.8262 7.18988 12.8262 8.01831V11.9686C12.8262 13.3493 11.7069 14.4686 10.3262 14.4686H5.67381C4.2931 14.4686 3.17381 13.3493 3.17381 11.9686V8.01831C3.17381 7.18988 3.84538 6.51831 4.67381 6.51831H9.94074V3.77456C9.94074 2.70264 9.07178 1.83367 7.99985 1.83367C6.92793 1.83367 6.05897 2.70264 6.05897 3.77456V4.81478C6.05897 5.18757 5.75676 5.48978 5.38397 5.48978C5.01117 5.48978 4.70897 5.18757 4.70897 4.81478V3.77456ZM9.16404 9.56763C9.16404 10.0186 8.90767 10.4096 8.53272 10.603L8.69629 12.3362C8.71013 12.4829 8.59475 12.6097 8.4474 12.6097H7.55751C7.4084 12.6097 7.29244 12.48 7.30908 12.3318L7.50126 10.6199C7.10776 10.4332 6.83567 10.0322 6.83567 9.56763C6.83567 8.92467 7.3569 8.40344 7.99986 8.40344C8.64282 8.40344 9.16404 8.92467 9.16404 9.56763ZM2.99672 2.30807C2.78926 2.12583 2.47334 2.14627 2.29109 2.35374C2.10885 2.5612 2.12929 2.87712 2.33675 3.05937L3.30592 3.91072C3.51339 4.09297 3.82931 4.07253 4.01155 3.86506C4.1938 3.6576 4.17335 3.34168 3.96589 3.15943L2.99672 2.30807ZM0.346848 3.98126C0.426769 3.71693 0.705835 3.56744 0.970159 3.64736L2.98538 4.25669C3.24971 4.33661 3.39919 4.61567 3.31927 4.88C3.23935 5.14432 2.96029 5.29381 2.69596 5.21389L0.68074 4.60457C0.416415 4.52465 0.266927 4.24558 0.346848 3.98126ZM1.36125 5.86881C1.08858 5.91246 0.902922 6.16889 0.946575 6.44156C0.99
60227 6.71423 1.24666 6.89988 1.51933 6.85623L2.79161 6.65255C3.06428 6.6089 3.24993 6.35247 3.20628 6.0798C3.16263 5.80713 2.9062 5.62147 2.63353 5.66512L1.36125 5.86881Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};var a=e.i(545850),o=e.i(192506);function s(e){let s,l=(0,n.c)(2),{membership:c}=(0,a.useViewerSubscription)(e.publicationUri);if((0,o.membershipUnlocksGatedPost)(c,e.gatePolicy)){let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"membersBadge group absolute top-2.5 right-2.5 z-[1] pointer-events-none rounded-full h-5 px-0.5 flex items-center gap-1 bg-transparent text-border",children:(0,t.jsx)(i,{className:"shrink-0"})}),l[0]=e):e=l[0],e}return l[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)("div",{className:"membersBadge group absolute top-2.5 right-2.5 z-[1] pointer-events-none rounded-full h-5 px-0.5 flex items-center gap-1 bg-accent-1 text-accent-2",children:(0,t.jsx)(r.LockTiny,{className:"shrink-0 "})}),l[1]=s):s=l[1],s}function l(e){let r,i,a,o,s,l=(0,n.c)(17),{author:c,date:u,interactions:d,textClassName:h,compact:p}=e,m=null!=c,f=null!=u,g=`metaRow text-sm flex sm:flex-row flex-col sm:gap-2 gap-1 sm:items-center w-full text-tertiary relative z-[2] ${h} ${p&&"sm:gap-1! sm:flex-col! sm:items-start"}`;return l[0]!==c||l[1]!==m?(r=m&&(0,t.jsx)("div",{className:"truncate min-w-0",children:c}),l[0]=c,l[1]=m,l[2]=r):r=l[2],l[3]!==u||l[4]!==m||l[5]!==f?(i=f&&(0,t.jsxs)(t.Fragment,{children:[m&&(0,t.jsx)("span",{className:"shrink-0","aria-hidden":!0,children:"·"}),(0,t.jsx)("span",{className:"whitespace-nowrap shrink-0",children:u})]}),l[3]=u,l[4]=m,l[5]=f,l[6]=i):i=l[6],l[7]!==r||l[8]!==i?(a=(0,t.jsxs)("div",{className:"authorDate text-tertiary flex gap-2 items-center min-w-0",children:[r,i]}),l[7]=r,l[8]=i,l[9]=a):a=l[9],l[10]!==p||l[11]!==d?(o=d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:`shrink-0 sm:block hidden ${p&&"sm:hidden"}`,"aria-hidden":!0,children:"·"}),(0,t.jsx)("div",{className:"shrink-0",children:d})]}),l[10]=p,l[11]=d,l[12]=o):o=l[12],l[13]!==g||l[14]!==a||l[15]!==o?(s=(0,t.jsxs)("div",{className:g,children:[a,o]}),l[13]=g,l[14]=a,l[15]=o,l[16]=s):s=l[16],s}var c=e.i(899169);function u(e){let r,i=(0,n.c)(7),{href:a,title:o,onClick:s}=e;if(a){let e,n;return i[0]!==o?(e=o&&(0,t.jsx)("span",{className:"sr-only",children:o}),i[0]=o,i[1]=e):e=i[1],i[2]!==a||i[3]!==s||i[4]!==e?(n=(0,t.jsx)(c.SpeedyLink,{href:a,onClick:s,className:"publishedPostLink absolute inset-0 z-[1]",children:e}),i[2]=a,i[3]=s,i[4]=e,i[5]=n):n=i[5],n}return i[6]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"publishedPostLink absolute inset-0"}),i[6]=r):r=i[6],r}function d(e){let r,i,a=(0,n.c)(7),o=`postItemCover relative overflow-hidden ${e.className||""}`,s=`absolute inset-0 w-full h-full object-cover ${e.locked?"blur-[4px] scale-110":""}`;return a[0]!==e.alt||a[1]!==e.src||a[2]!==s?(r=(0,t.jsx)("img",{src:e.src,alt:e.alt,className:s}),a[0]=e.alt,a[1]=e.src,a[2]=s,a[3]=r):r=a[3],a[4]!==o||a[5]!==r?(i=(0,t.jsx)("div",{className:o,children:r}),a[4]=o,a[5]=r,a[6]=i):i=a[6],i}e.s(["PublicationPostItemSmall",0,function(e){let r,i,a,o,c=(0,n.c)(19),d=`postLinkSmall relative flex w-full grow flex-col py-2 ${e.inList?"px-0":"px-3"}`;return c[0]!==e.href||c[1]!==e.onClick||c[2]!==e.title?(r=(0,t.jsx)(u,{href:e.href,title:e.title,onClick:e.onClick}),c[0]=e.href,c[1]=e.onClick,c[2]=e.title,c[3]=r):r=c[3],c[4]!==e.gatePolicy||c[5]!==e.membersOnly||c[6]!==e.publicationUri||c[7]!==e.title?(i=e.title&&(0,t.jsxs)("h2",{className:"text-primary leading-snug text-[1.125em]",children:[e.title,e.membersOnly&&(0,t.jsx)(s,{publicationUri:e.publicationUri,gatePolicy:e.gatePolicy})]}),c[4]=e.gatePolicy,c[5]=e.membersOnly,c[6]=e.publicationUri,c[7]=e.title,c[8]=i):i=c[8],c[9]!==e.author||c[10]!==e.date||c[11]!==e.interactions?(a=(0,t.jsx)(l,{author:e.author,date:e.date,interactions:e.interactions,textClassName:"text-sm"}),c[9]=e.author,c[10]=e.date,c[11]=e.interactions,c[12]=a):a=c[12],c[13]!==e.pubInfo||c[14]!==d||c[15]!==r||c[16]!==i||c[17]!==a?(o=(0,t.jsxs)("div",{className:d,children:[r,e.pubInfo,i,a]}),c[13]=e.pubInfo,c[14]=d,c[15]=r,c[16]=i,c[17]=a,c[18]=o):o=c[18],o}],514085);var h=e.i(271645);function p(e){let t=getComputedStyle(e),n=parseFloat(t.lineHeight);return Number.isFinite(n)?n:1.2*parseFloat(t.fontSize)}function m(e,t){e.style.display="-webkit-box",e.style.setProperty("-webkit-box-orient","vertical"),e.style.overflow="hidden",e.style.webkitLineClamp=String(t)}function f(...e){let t=(0,h.useRef)(null),n=(0,h.useRef)(null),r=(0,h.useRef)(null);return(0,h.useEffect)(()=>{let e=t.current;if(!e)return;let i=()=>{let t=n.current,i=r.current;t&&m(t,"unset"),i&&m(i,"unset");let a=e.clientHeight;if(a<=0)return;let o=0;if(t){let e=p(t),n=Math.max(1,Math.min(Math.round(t.scrollHeight/e),Math.floor(a/e)));m(t,n),o=n*e}if(!i)return;let s=p(i);if(s<=0)return;let l=Math.min(3,Math.max(0,Math.floor((a-o-(t?(parseFloat(getComputedStyle(e).rowGap)||0)+(parseFloat(getComputedStyle(i).marginTop)||0):0))/s)));0===l?i.style.display="none":m(i,l)};i();let a=e.clientWidth,o=new ResizeObserver(()=>{e.clientWidth!==a&&(a=e.clientWidth,i())});o.observe(e);let s=!1;return document.fonts?.ready.then(()=>{s||i()}),()=>{s=!0,o.disconnect()}},e),{boxRef:t,titleRef:n,descriptionRef:r}}e.s(["PublicationPostItemMedium",0,function(e){let r,i,c,h,p,m,g,y,b,v,x,k=(0,n.c)(43),w=!!e.coverImageSrc,{membership:C}=(0,a.useViewerSubscription)(e.publicationUri),S=!!e.membersOnly&&!(0,o.membershipUnlocksGatedPost)(C,e.gatePolicy),{boxRef:E,titleRef:T,descriptionRef:I}=f(e.title,e.description,w);k[0]!==e.href||k[1]!==e.onClick||k[2]!==e.title?(r=(0,t.jsx)(u,{href:e.href,title:e.title,onClick:e.onClick}),k[0]=e.href,k[1]=e.onClick,k[2]=e.title,k[3]=r):r=k[3];let D=`postItemInfo flex w-full grow flex-col justify-between min-w-0 py-2 ${e.inList?"":"px-3 py-2"} ${e.inList&&!w?"pr-0":"pr-3"}`,N=e.pubInfo&&e.pubInfo;return k[4]!==e.gatePolicy||k[5]!==e.membersOnly||k[6]!==e.publicationUri?(i=e.membersOnly&&(0,t.jsx)(s,{publicationUri:e.publicationUri,gatePolicy:e.gatePolicy}),k[4]=e.gatePolicy,k[5]=e.membersOnly,k[6]=e.publicationUri,k[7]=i):i=k[7],k[8]!==e.title||k[9]!==T?(c=e.title&&(0,t.jsx)("h2",{ref:T,className:"postTitle text-primary leading-snug line-clamp-2 text-[1.125em]",children:e.title}),k[8]=e.title,k[9]=T,k[10]=c):c=k[10],k[11]!==I||k[12]!==e.description?(h=(0,t.jsx)("p",{ref:I,className:"postDescription text-secondary line-clamp-3 mt-1",children:e.description}),k[11]=I,k[12]=e.description,k[13]=h):h=k[13],k[14]!==E||k[15]!==c||k[16]!==h?(p=(0,t.jsxs)("div",{ref:E,className:"postTitleAndDescription flex flex-col overflow-hidden grow min-h-0 ",children:[c,h]}),k[14]=E,k[15]=c,k[16]=h,k[17]=p):p=k[17],k[18]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("div",{className:"spacer sm:h-2 h-1 w-full"}),k[18]=m):m=k[18],k[19]!==e.author||k[20]!==e.date||k[21]!==e.interactions?(g=(0,t.jsx)(l,{author:e.author,date:e.date,interactions:e.interactions,textClassName:"text-sm sm:flex"}),k[19]=e.author,k[20]=e.date,k[21]=e.interactions,k[22]=g):g=k[22],k[23]!==D||k[24]!==N||k[25]!==i||k[26]!==p||k[27]!==g?(y=(0,t.jsxs)("div",{className:D,children:[N,i,p,m,g]}),k[23]=D,k[24]=N,k[25]=i,k[26]=p,k[27]=g,k[28]=y):y=k[28],k[29]!==w||k[30]!==S||k[31]!==e.coverImageAlt||k[32]!==e.coverImageSrc||k[33]!==e.inList||k[34]!==e.pubInfo||k[35
6]!==e.title?(b=w&&(0,t.jsx)("div",{className:`self-start shrink-0 w-24 sm:w-36 ${!e.inList?"border-l sm:border-border-light border-transparent sm:p-0 pt-2":"p-2"} ${e.pubInfo&&"sm:mt-0 mt-[21px] sm:mr-0 mr-3"}`,children:(0,t.jsx)(d,{src:e.coverImageSrc,alt:e.coverImageAlt||e.title||"",locked:S,className:`w-full aspect-square rounded-md ${!e.inList&&"sm:rounded-none"}`})}),k[29]=w,k[30]=S,k[31]=e.coverImageAlt,k[32]=e.coverImageSrc,k[33]=e.inList,k[34]=e.pubInfo,k[35]=e.title,k[36]=b):b=k[36],k[37]!==b||k[38]!==y?(v=(0,t.jsxs)("div",{className:"postItemContent flex w-full items-stretch sm:max-h-36",children:[y,b]}),k[37]=b,k[38]=y,k[39]=v):v=k[39],k[40]!==r||k[41]!==v?(x=(0,t.jsxs)("div",{className:"postItemMedium relative flex w-full flex-col",children:[r,v]}),k[40]=r,k[41]=v,k[42]=x):x=k[42],x}],191544),e.s(["PublicationPostItemLarge",0,function(e){let r,i,c,h,p,m,g,y,b,v,x=(0,n.c)(45),k=!!e.coverImageSrc,w=(e.pageWidth??0)>=768,{membership:C}=(0,a.useViewerSubscription)(e.publicationUri),S=!!e.membersOnly&&!(0,o.membershipUnlocksGatedPost)(C,e.gatePolicy),{boxRef:E,titleRef:T,descriptionRef:I}=f(e.title,e.description,k,w),D=`postLinkLarge relative flex flex-col w-full items-stretch ${w?"sm:flex-row sm:max-h-[254px]":""} `;x[0]!==e.href||x[1]!==e.onClick||x[2]!==e.title?(r=(0,t.jsx)(u,{href:e.href,title:e.title,onClick:e.onClick}),x[0]=e.href,x[1]=e.onClick,x[2]=e.title,x[3]=r):r=x[3],x[4]!==k||x[5]!==S||x[6]!==e.coverImageAlt||x[7]!==e.coverImageSrc||x[8]!==e.inList||x[9]!==e.title||x[10]!==w?(i=k&&(0,t.jsx)(d,{src:e.coverImageSrc,alt:e.coverImageAlt||e.title||"",locked:S,className:`shrink-0 ${e.inList?"rounded-md":" border-b border-border-light rounded-none!"} ${w?"sm:h-[254px] aspect-[3/2] sm:border-transparent ":"w-full h-auto aspect-[1.91/1]"} `}),x[4]=k,x[5]=S,x[6]=e.coverImageAlt,x[7]=e.coverImageSrc,x[8]=e.inList,x[9]=e.title,x[10]=w,x[11]=i):i=x[11];let N=`relative flex flex-col grow pt-2 ${e.inList?k&&w?"sm:py-2 sm:px-4":"px-0 py-2":"px-3 py-2"}`;x[12]!==e.gatePolicy||x[13]!==e.membersOnly||x[14]!==e.publicationUri?(c=e.membersOnly&&(0,t.jsx)(s,{publicationUri:e.publicationUri,gatePolicy:e.gatePolicy}),x[12]=e.gatePolicy,x[13]=e.membersOnly,x[14]=e.publicationUri,x[15]=c):c=x[15],x[16]!==e.title||x[17]!==T||x[18]!==w?(h=e.title&&(0,t.jsx)("h2",{ref:T,className:`text-primary leading-snug text-lg line-clamp-2 ${w?"sm:text-xl ":"text-[1.125em]"}`,children:e.title}),x[16]=e.title,x[17]=T,x[18]=w,x[19]=h):h=x[19];let A=`text-secondary line-clamp-3 text-base mb-1 ${w?"sm:text-lg ":""}`;return x[20]!==I||x[21]!==e.description||x[22]!==A?(p=(0,t.jsx)("p",{ref:I,className:A,children:e.description}),x[20]=I,x[21]=e.description,x[22]=A,x[23]=p):p=x[23],x[24]!==E||x[25]!==h||x[26]!==p?(m=(0,t.jsxs)("div",{ref:E,className:"postTitleAndContent flex flex-col gap-1 grow min-h-0 overflow-clip",children:[h,p]}),x[24]=E,x[25]=h,x[26]=p,x[27]=m):m=x[27],x[28]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)("div",{className:"spacer h-2 w-full"}),x[28]=g):g=x[28],x[29]!==e.author||x[30]!==e.date||x[31]!==e.interactions||x[32]!==w?(y=(0,t.jsx)(l,{compact:w,author:e.author,date:e.date,interactions:e.interactions}),x[29]=e.author,x[30]=e.date,x[31]=e.interactions,x[32]=w,x[33]=y):y=x[33],x[34]!==e.pubInfo||x[35]!==y||x[36]!==N||x[37]!==c||x[38]!==m?(b=(0,t.jsxs)("div",{className:N,children:[e.pubInfo,c,m,g,y]}),x[34]=e.pubInfo,x[35]=y,x[36]=N,x[37]=c,x[38]=m,x[39]=b):b=x[39],x[40]!==D||x[41]!==r||x[42]!==b||x[43]!==i?(v=(0,t.jsxs)("div",{className:D,children:[r,i,b]}),x[40]=D,x[41]=r,x[42]=b,x[43]=i,x[44]=v):v=x[44],v}],114366),e.s([],875981),e.s(["getFirstParagraph",0,function(e){let t=e.content;if(!t||!("pages"in t))return;let n=t.pages;if(!n?.[0])return;let r=n[0];if("blocks"in r)for(let e of r.blocks){let t=e.block;if(t?.$type==="pub.leaflet.blocks.text"&&t.plaintext)return t.plaintext}}],927895)},152318,96040,e=>{"use strict";e.s(["ChapterGrid",()=>c,"ChapterShelf",()=>s],152318);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(899169),a=e.i(74863),o=e.i(981633);function s(e){let r,i,a,s=(0,n.c)(15),{publication:c,publicationRecord:u,cards:d,latestPost:h,highlightLatest:p,showPageCount:m,disableLinks:f,className:g}=e,y=void 0!==p&&p,b=void 0===m||m,v=void 0!==f&&f,x=`relative w-full ${g??""}`;s[0]!==v||s[1]!==y||s[2]!==h||s[3]!==c||s[4]!==u?(r=y&&h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-sm uppercase font-bold text-tertiary pb-1",children:"Latest"}),(0,t.jsx)("div",{className:"block-border hover:outline-border!",children:(0,t.jsx)(o.PublicationPostsList,{inList:!1,publication:c,publicationRecord:u,posts:[h],view:"medium",disableLinks:v})}),(0,t.jsx)("hr",{className:"border-border-light my-4"})]}),s[0]=v,s[1]=y,s[2]=h,s[3]=c,s[4]=u,s[5]=r):r=s[5];let k=u?.theme?.pageWidth;return s[6]!==d||s[7]!==v||s[8]!==b||s[9]!==k?(i=(0,t.jsx)(l,{cards:d,pageWidth:k,showPageCount:b,disableLinks:v}),s[6]=d,s[7]=v,s[8]=b,s[9]=k,s[10]=i):i=s[10],s[11]!==x||s[12]!==r||s[13]!==i?(a=(0,t.jsxs)("div",{className:x,children:[r,i]}),s[11]=x,s[12]=r,s[13]=i,s[14]=a):a=s[14],a}function l(e){let r,i,a=(0,n.c)(10),{cards:o,pageWidth:s,showPageCount:l,disableLinks:d}=e,h=void 0===l||l,p=void 0!==d&&d;if(a[0]!==o||a[1]!==p||a[2]!==h){let e;a[4]!==p||a[5]!==h?(e=e=>(0,t.jsx)(u,{card:e,showPageCount:h,disableLinks:p},e.key),a[4]=p,a[5]=h,a[6]=e):e=a[6],r=o.map(e),a[0]=o,a[1]=p,a[2]=h,a[3]=r}else r=a[3];return a[7]!==s||a[8]!==r?(i=(0,t.jsx)(c,{pageWidth:s,children:r}),a[7]=s,a[8]=r,a[9]=i):i=a[9],i}function c(e){let i,a,o,s,l=(0,n.c)(7),{pageWidth:c,children:u}=e,d=(0,r.useRef)(null),[h,p]=(0,r.useState)(null);l[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(e=>{p(e[0].contentRect.width)});return t.observe(e),()=>t.disconnect()},a=[],l[0]=i,l[1]=a):(i=l[0],a=l[1]),(0,r.useEffect)(i,a);
6let m=Math.max(1,Math.ceil(((h??c??624)-1+24)/264)),f=`repeat(${m}, minmax(0, 1fr))`;return l[2]!==f?(o={display:"grid",gridTemplateColumns:f},l[2]=f,l[3]=o):o=l[3],l[4]!==u||l[5]!==o?(s=(0,t.jsx)("div",{ref:d,className:"publicationPostChapterList gap-3 sm:gap-6 w-full",style:o,children:u}),l[4]=u,l[5]=o,l[6]=s):s=l[6],s}function u(e){let r,o,s,l,c,u,d,h,p=(0,n.c)(24),{card:m,showPageCount:f,disableLinks:g}=e,y=`chapterCover relative w-full aspect-2/3 overflow-hidden block-border ${g?"":" hover:outline-border!"}`;p[0]!==m.coverImageSrc||p[1]!==m.label?(r=m.coverImageSrc?(0,t.jsx)("img",{src:m.coverImageSrc,alt:"",loading:"lazy",decoding:"async",className:"w-full h-full object-cover"}):(0,t.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 flex items-center justify-center text-center p-3 bg-[var(--color-bg-light)] text-tertiary max-w-full w-[1000px]",children:m.label}),p[0]=m.coverImageSrc,p[1]=m.label,p[2]=r):r=p[2],p[3]!==m.membersOnly?(o=m.membersOnly&&(0,t.jsx)("div",{"aria-label":"Contains member only content",className:"absolute top-1.5 right-1.5 bg-accent-1 text-accent-2 rounded-full h-5 w-5 flex items-center justify-center",children:(0,t.jsx)(a.LockTiny,{})}),p[3]=m.membersOnly,p[4]=o):o=p[4],p[5]!==y||p[6]!==r||p[7]!==o?(s=(0,t.jsxs)("div",{className:y,children:[r,o]}),p[5]=y,p[6]=r,p[7]=o,p[8]=s):s=p[8],p[9]!==m.label?(l=(0,t.jsx)("div",{className:"chapterTitle text-primary font-bold leading-snug line-clamp-2",children:m.label}),p[9]=m.label,p[10]=l):l=p[10],p[11]!==m.pageCount||p[12]!==f?(c=f&&(0,t.jsxs)("div",{className:"chapterPageCount text-tertiary text-sm leading-snug pt-0.5",children:[m.pageCount," page",m.pageCount>1&&"s"]}),p[11]=m.pageCount,p[12]=f,p[13]=c):c=p[13],p[14]!==l||p[15]!==c?(u=(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[l,c]}),p[14]=l,p[15]=c,p[16]=u):u=p[16],p[17]!==s||p[18]!==u?(d=(0,t.jsxs)(t.Fragment,{children:[s,u]}),p[17]=s,p[18]=u,p[19]=d):d=p[19];let b=d;return p[20]!==m.href||p[21]!==b||p[22]!==g?(h=(0,t.jsx)(t.Fragment,{children:g?(0,t.jsx)("div",{className:"chapterItem group flex flex-col gap-2 no-underline! text-primary min-w-0 w-full",children:b}):(0,t.jsx)(i.SpeedyLink,{href:m.href,className:"chapterItem group flex flex-col gap-2 no-underline! text-primary min-w-0 w-full",children:b})}),p[20]=m.href,p[21]=b,p[22]=g,p[23]=h):h=p[23],h}var d=e.i(95187);let h=(0,d.createServerReference)("40faeab29035f48e1bf7308cba833c234bc7306f8d",d.callServer,void 0,d.findSourceMapURL,"getPostsByUris");e.s(["getPostsByUris",0,h],96040)},981633,251670,e=>{"use strict";e.s(["PublicationPostsList",()=>x],981633);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(593302),a=e.i(250209),o=e.i(229770),s=e.i(935927);e.i(875981);var l=e.i(514085),c=e.i(191544),u=e.i(114366),d=e.i(465477),h=e.i(927895),p=e.i(192506),m=e.i(124670),f=e.i(921598),g=e.i(425481),y=e.i(314192),b=e.i(615405);function v(e){try{return new i.AtUri(e).host}catch{return null}}function x(e){let s,y,b,x,w,C,S,E=(0,n.c)(25),{publication:T,publicationRecord:I,posts:D,fakePosts:N,view:A,highlightFirstPost:_,className:P,inList:M,disableLinks:R,pageWidth:L}=e,j=void 0===A?"medium":A,O=void 0!==_&&_,B=void 0!==R&&R,F=L??I?.theme?.pageWidth;if(E[0]!==D){for(let e of(y=new Set,D??[])){if(e.bylineProfiles)continue;let t=v(e.uri);if(t)for(let n of(0,g.getBylineDids)(e.record,t))y.add(n)}E[0]=D,E[1]=y}else y=E[1];E[2]!==y?(b=Array.from(y),E[2]=y,E[3]=b):b=E[3],s=b;let{data:H}=(0,f.useContributorProfiles)(s);if(E[4]!==D||E[5]!==H){let e,t;E[7]!==H?(e=H??{},E[7]=H,E[8]=e):e=E[8];let n=new Map(Object.entries(e));for(let e of(w=new Map,E[9]!==D?(t=D??[],E[9]=D,E[10]=t):t=E[10],t)){let t=e.bylineProfiles;if(!t){let r=v(e.uri);t=r?(0,g.toBylineProfiles)((0,g.getBylineDids)(e.record,r),n):[]}w.set(e.uri,(0,g.formatBylineProfiles)(t))}E[4]=D,E[5]=H,E[6]=w}else w=E[6];x=w;let U=`publicationPostList w-full flex flex-col gap-2 ${P}`;return E[11]!==x||E[12]!==B||E[13]!==F||E[14]!==N||E[15]!==O||E[16]!==M||E[17]!==D||E[18]!==T||E[19]!==I||E[20]!==j?(C=N?N.map(k):D?.map((e,n)=>{let s=e.record,f=e.mentionsCount,g=I?.preferences?.showComments===!1?0:e.commentsCount,y=e.recommendsCount,b=s.tags||[],v=(0,a.getDocumentURL)(s,e.uri,T),k=s.publishedAt?(0,t.jsx)(d.LocalizedDate,{dateString:s.publishedAt,omitYear:!0,options:{year:"2-digit",month:"short",day:"numeric"}}):void 0,w=(0,t.jsx)(o.InteractionPreview,{postRecord:s,quotesCount:f,commentsCount:g,recommendsCount:y,documentUri:e.uri,tags:b,pubUri:T.uri,publication:I||void 0,postUrl:v,showComments:I?.preferences?.showComments!==!1,showMentions:I?.preferences?.showMentions!==!1,showRecommends:I?.preferences?.showRecommends!==!1}),C=e.membersOnly?(0,p.getGatedPostPolicy)(s):null,S=O&&0===n?"large":"small"===j?"small":"medium",E=new i.AtUri(e.uri).host,D=s.coverImage?(0,m.blobRefToSrc)(s.coverImage.ref,E,void 0,{width:"large"===S?m.COVER_THUMBNAIL_WIDTH.large:m.COVER_THUMBNAIL_WIDTH.medium}):void 0;return"large"===S?(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)(u.PublicationPostItemLarge,{inList:M??!0,href:B?void 0:v,membersOnly:e.membersOnly,publicationUri:T.uri,gatePolicy:C,title:s.title,de
6scription:s.description||(0,h.getFirstParagraph)(s),author:x.get(e.uri),date:k,interactions:w,coverImageSrc:D,coverImageAlt:s.title,pageWidth:F}),(0,t.jsx)("hr",{className:"last:hidden border-border-light"})]},e.uri):"small"===S?(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)(l.PublicationPostItemSmall,{inList:M??!0,href:B?void 0:v,membersOnly:e.membersOnly,publicationUri:T.uri,gatePolicy:C,title:s.title,author:x.get(e.uri),date:k,interactions:w}),(0,t.jsx)("hr",{className:"last:hidden border-border-light"})]},e.uri):(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)(c.PublicationPostItemMedium,{inList:M??!0,href:B?void 0:v,membersOnly:e.membersOnly,publicationUri:T.uri,gatePolicy:C,title:s.title,description:s.description||(0,h.getFirstParagraph)(s),author:x.get(e.uri),date:k,interactions:w,coverImageSrc:D,coverImageAlt:s.title}),(0,t.jsx)("hr",{className:"last:hidden border-border-light"})]},e.uri)}),E[11]=x,E[12]=B,E[13]=F,E[14]=N,E[15]=O,E[16]=M,E[17]=D,E[18]=T,E[19]=I,E[20]=j,E[21]=C):C=E[21],E[22]!==U||E[23]!==C?(S=(0,t.jsx)("div",{className:U,children:C}),E[22]=U,E[23]=C,E[24]=S):S=E[24],S}function k(e,n){return(0,t.jsx)(s.PublicationPostItem,{title:e.title,description:e.description,date:e.date},n)}e.s(["buildPublicationPosts",0,function(e){return(e??[]).map(e=>{if(!e.documents)return null;let t=(0,y.normalizeDocumentRecord)(e.documents.data,e.documents.uri);if(!t)return null;if(e.members_only){let e=(0,b.getDocumentPages)(t);e&&(0,p.truncatePagesAtMembersDelimiter)(e)}return{uri:e.documents.uri,record:t,commentsCount:e.documents.comments_on_documents?.[0]?.count||0,mentionsCount:e.documents.document_mentions_in_bsky?.[0]?.count||0,recommendsCount:e.documents.recommends_on_documents?.[0]?.count||0,membersOnly:e.members_only??!1}}).filter(e=>null!==e)}],251670)},760297,785892,361838,785395,e=>{"use strict";let t,n,r,i;var a,o=e.i(843476),s=e.i(500932),l=e.i(271645),c=e.i(945546),u=e.i(991966),d=e.i(227118);function h(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function p(e,t){return e&&t?.[e?.toLowerCase()]||e}async function m(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function f(e){return!e||["plaintext","txt","text","plain"].includes(e)}function g(e){return"ansi"===e||f(e)}function y(e){return"none"===e}function b(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function v(e,t=!1){let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||""):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}let x="light-dark()",k=["color","background-color"];function w(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&u.FontStyle.Italic&&(t["font-style"]="italic"),e.fontStyle&u.FontStyle.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&u.FontStyle.Underline&&n.push("underline"),e.fontStyle&u.FontStyle.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function C(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let S=new WeakMap;function E(e,t){S.set(e,t)}function T(e){return S.get(e)}class I{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new I(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,u.INITIAL])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let n,r;return t=this._stacks[e],n=[],r=new Set,!function e(t){if(r.has(t))return;r.add(t);let i=t?.nameScopesList?.scopeName;i&&n.push(i),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let D=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){var n;let r,i=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new c.ShikiError(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...a.indexToPos(e),offset:e}}{let t=a.lines[e.line];if(void 0===t)throw new c.ShikiError(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${a.lines.length}`);if(e.character<0||e.character>t.length)throw new c.ShikiError(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,offset:a.posToIndex(e.line,e.character)}}},a={lines:r=v(n=t.source,!0).map(([e])=>e),indexToPos:function(e){if(e===n.length)return{line:r.length-1,character:r[r.length-1].length};let t=e,i=0;for(let e of r){if(t<e.length)break;t-=e.length,i++}return{line:i,character:t}},posToIndex:function(e,t){let n=0;for(let t=0;t<e;t++)n+=r[t].length;return n+t}},o=(t.options.decorations||[]).map(e=>({...e,start:i(e.start),end:i(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new c.ShikiError(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;
6if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new c.ShikiError(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(o),e.set(t.meta,{decorations:o,converter:a,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){let n;if(!this.options.decorations?.length)return;let r=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);return(n=Array.from(r instanceof Set?r:new Set(r)).sort((e,t)=>e-t)).length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let r=0,i=[];for(let n of t)n>r&&i.push({...e,content:e.content.slice(r,n),offset:e.offset+r}),r=n;return r<e.content.length&&i.push({...e,content:e.content.slice(r),offset:e.offset+r}),i})):e},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new c.ShikiError(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let o=r[e],s="",l=-1,u=-1;if(0===t&&(l=0),0===n&&(u=0),n===1/0&&(u=o.children.length),-1===l||-1===u)for(let e=0;e<o.children.length;e++)s+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(o.children[e]),-1===l&&s.length===t&&(l=e+1),-1===u&&s.length===n&&(u=e+1);if(-1===l)throw new c.ShikiError(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===u)throw new c.ShikiError(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let d=o.children.slice(l,u);if(i.alwaysWrap||d.length!==o.children.length)if(i.alwaysWrap||1!==d.length||"element"!==d[0].type){let e={type:"element",tagName:"span",properties:{},children:d};a(e,i,"wrapper"),o.children.splice(l,d.length,e)}else a(d[0],i,"token");else a(o,i,"line")}function a(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&b(e,t.properties.class),e=i(e,n)||e}let o=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<n.line;i++)o.unshift(()=>{var t;r[t=i]=a(r[t],e,"line")});i(n.line,0,n.character,e)}}o.forEach(e=>e())}}}()];function N(e){return[...e.transformers||[],...D]}var A=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],_={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function P(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var M={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function R(e,t,n={}){var r,i,a,o,s;let l,d,{lang:m="text",theme:g=e.getLoadedThemes()[0]}=n;if(f(m)||y(g))return v(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:b,colorMap:x}=e.setTheme(g);if("ansi"===m){let e,r,i,a,o,s,l;return e=h(b,n),r=v(t),i=function(e=M){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(r){switch(r.type){case"named":return e[r.name];case"rgb":return n(r.rgb);case"table":var i;return i=r.index,function(){if(t)return t;t=[];for(let n=0;n<A.length;n++)t.push(e[A[n]]);let r=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)t.push(n([r[e],r[i],r[a]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(n([i,i,i]));return t}()[i]}}}}(Object.fromEntries(A.map(e=>[e,b.colors?.[`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`]]))),a=null,o=null,s=new Set,l={parse(e){let t=[],n=0;do{let r=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),i=r.sequence?e.substring(n,r.startPosition):e.substring(n);if(i.length>0&&t.push({value:i,foreground:a,background:o,decorations:new Set(s)}),r.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)_[r]&&t.push({type:"setDecoration",value:_[r]});
6else if(r<=29){let e=_[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:A[r-30]}});else if(38===r){let n=P(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:A[r-40]}});else if(48===r){let n=P(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:A[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:A[r-100+8]}})}return t}(r.sequence);for(let t of e)"resetAll"===t.type?(a=null,o=null,s.clear()):"resetForegroundColor"===t.type?a=null:"resetBackgroundColor"===t.type?o=null:"resetDecoration"===t.type&&s.delete(t.value);for(let t of e)"setForegroundColor"===t.type?a=t.value:"setBackgroundColor"===t.type?o=t.value:"setDecoration"===t.type&&s.add(t.value)}n=r.position}while(n<e.length)return t}},r.map(t=>l.parse(t[0]).map(n=>{let r,a;n.decorations.has("reverse")?(r=n.background?i.value(n.background):b.bg,a=n.foreground?i.value(n.foreground):b.fg):(r=n.foreground?i.value(n.foreground):b.fg,a=n.background?i.value(n.background):void 0),r=p(r,e),a=p(a,e),n.decorations.has("dim")&&(r=function(e){let t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){let e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}else if(t[2])return`#${t[1]}${t[2]}80`;else return`#${Array.from(t[1]).map(e=>`${e}${e}`).join("")}80`;let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(r));let o=u.FontStyle.None;return n.decorations.has("bold")&&(o|=u.FontStyle.Bold),n.decorations.has("italic")&&(o|=u.FontStyle.Italic),n.decorations.has("underline")&&(o|=u.FontStyle.Underline),n.decorations.has("strikethrough")&&(o|=u.FontStyle.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:a,fontStyle:o}}))}let k=e.getLanguage(m);if(n.grammarState){if(n.grammarState.lang!==k.name)throw new c.ShikiError(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${k.name}"`);if(!n.grammarState.themes.includes(b.name))throw new c.ShikiError(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${b.name}"`)}return l=L(r=t,i=k,a=b,o=x,s=n),d=new I(L(r,i,a,o,s).stateStack,i.name,a.name),E(l.tokens,d),l.tokens}function L(e,t,n,r,i){let a=h(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,l=v(e),d=i.grammarState?function(e,t){if(!(e instanceof I))throw new c.ShikiError("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,n.name)??u.INITIAL:null!=i.grammarContextCode?L(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:u.INITIAL,m=[],f=[];for(let e=0,c=l.length;e<c;e++){let c,h,[g,y]=l[e];if(""===g){m=[],f.push([]);continue}if(o>0&&g.length>=o){m=[],f.push([{content:g,offset:y,color:"",fontStyle:0}]);continue}i.includeExplanation&&(c=t.tokenizeLine(g,d,s).tokens,h=0);let b=t.tokenizeLine2(g,d,s),v=b.tokens.length/2;for(let e=0;e<v;e++){let t=b.tokens[2*e],o=e+1<v?b.tokens[2*e+2]:g.length;if(t===o)continue;let s=b.tokens[2*e+1],l=p(r[u.EncodedTokenMetadata.getForeground(s)],a),d=u.EncodedTokenMetadata.getFontStyle(s),f={content:g.substring(t,o),offset:y+t,color:l,fontStyle:d};if(i.includeExplanation){let e=[];
6if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}f.explanation=[];let r=0;for(;t+r<o;){let t=c[h],n=g.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:function(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(function(e,t,n){if(!j(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)j(e[r],n[i])&&(r-=1),i-=1;return -1===r}(e,t,n)){r.push(a);break}return r}(e,i,t.slice(0,r))}}return n}(e,t.scopes)}),h+=1}}m.push(f)}f.push(m),m=[],d=b.ruleStack}return{tokens:f,stateStack:d}}function j(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function O(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=R(e,t,{...n,theme:r.theme}),a=T(i);return{tokens:i,state:a,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),a=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:l,...c}=e[t][i];o.variants[r[n].color]=c}),o})),s=i[0].state?new I(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&E(o,s),o}function B(e,t,n){let r,i,a,o,s,l;if("themes"in n){let{defaultColor:u="light",cssVariablePrefix:d="--shiki-",colorsRendering:p="css-vars"}=n,m=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:+(t.color===u));if(0===m.length)throw new c.ShikiError("`themes` option must not be empty");let f=O(e,t,n);if(l=T(f),u&&x!==u&&!m.find(e=>e.color===u))throw new c.ShikiError(`\`themes\` option must contain the defaultColor key \`${u}\``);let g=m.map(t=>e.getTheme(t.theme)),y=m.map(e=>e.color);a=f.map(e=>e.map(e=>(function(e,t,n,r,i="css-vars"){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>w(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),l={},u=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;
6return n+t[e]+("color"===r?"":i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||"inherit";if(0===n&&r&&k.includes(a))if(r===x&&o.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new c.ShikiError('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let d=o[e][a]||"inherit",h=o[r][a]||"inherit";l[a]=`light-dark(${d}, ${h})`,"css-vars"===i&&(l[u(n,a)]=s)}else l[a]=s;else"css-vars"===i&&(l[u(n,a)]=s)}}),a.htmlStyle=l,a})(e,y,d,u,p))),l&&E(a,l);let b=m.map(e=>h(e.theme,n));i=F(m,g,b,d,u,"fg",p),r=F(m,g,b,d,u,"bg",p),o=`shiki-themes ${g.map(e=>e.name).join(" ")}`,s=u?void 0:[i,r].join(";")}else if("theme"in n){let s=h(n.theme,n);a=R(e,t,n);let c=e.getTheme(n.theme);r=p(c.bg,s),i=p(c.fg,s),o=c.name,l=T(a)}else throw new c.ShikiError("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:l}}function F(e,t,n,r,i,a,o){return e.map((s,l)=>{let u=p(t[l][a],n[l])||"inherit",d=`${r+s.color}${"bg"===a?"-bg":""}:${u}`;if(0===l&&i){if(i===x&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new c.ShikiError('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=p(t[r][a],n[r])||"inherit",s=p(t[i][a],n[i])||"inherit";return`light-dark(${o}, ${s});${d}`}return u}return"css-vars"===o?d:null}).filter(e=>!!e).join(";")}function H(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>H(e,t,n),codeToTokens:(t,n)=>B(e,t,n)}){let i=t;for(let e of N(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:l,rootStyle:c,grammarState:d}=B(e,i,n),{mergeWhitespaces:h=!0,mergeSameStyleTokens:p=!1}=n;!0===h?a=a.map(e=>{let t=[],n="",r=0;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&u.FontStyle.Underline||i.fontStyle&u.FontStyle.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r||(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=0,n=""):t.push(i)}),t}):"never"===h&&(a=a.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))),p&&(a=a.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=C(e.htmlStyle||w(e)),i=C(n.htmlStyle||w(n)),a=e.fontStyle&&(e.fontStyle&u.FontStyle.Underline||e.fontStyle&u.FontStyle.Strikethrough),o=n.fontStyle&&(n.fontStyle&u.FontStyle.Underline||n.fontStyle&u.FontStyle.Strikethrough);a||o||r!==i?t.push({...n}):e.content+=n.content}return t}));let m={...r,get source(){return i}};for(let e of N(n))a=e.tokens?.call(m,a)||a;return function(e,t,n,r=T(e)){let i=N(t),a=[],o={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,c={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...!1!==l&&null!=l?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([e])=>!e.startsWith("_")))},children:[]},u={type:"element",tagName:"code",properties:{},children:a},d=[],h={...n,structure:s,addClassToHast:b,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return u},get lines(){return d}};if(e.forEach((e,t)=>{t&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&a.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let a of e){let e={type:"element",tagName:"span",properties:{...a.htmlAttrs},children:[{type:"text",value:a.content}]},l=C(a.htmlStyle||w(a));for(let o of(l&&(e.properties.style=l),i))e=o?.span?.call(h,e,t+1,r,n,a)||e;"inline"===s?o.children.push(e):"classic"===s&&n.children.push(e),r+=a.content.length}if("classic"===s){for(let e of i)n=e?.line?.call(h,n,t+1)||n;d.push(n),a.push(n)}}),"classic"===s){for(let e of i)u=e?.code?.call(h,u)||u;for(let e of(c.children.push(u),i))c=e?.pre?.call(h,c)||c;o.children.push(c)}let p=o;for(let e of i)p=e?.root?.call(h,p)||p;return r&&E(p,r),p}(a,{...n,fg:o,bg:s,themeName:l,rootStyle:c},m,d)}let U=d.toHtml,z="__shiki_resolved";function $(e){if(e?.[z])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,z,{enumerable:!1,writable:!1,value:!0}),t}async function V(e){return Array.from(new Set((await Promise.all(e.filter(e=>!g(e)).map(async e=>await m(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function q(e){return(await Promise.all(e.map(async e=>
6y(e)?null:$(await m(e))))).filter(e=>!!e)}class G extends Error{constructor(e){super(e),this.name="ShikiError"}}class W extends u.Registry{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=$(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=u.Theme.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){let t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new G(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t&&t.embeddedLangs?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new G(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(let t of e.embeddedLangs)this._langGraph.set(t,this._langMap.get(t))}}class K{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let Y=0;async function Z(e){e.engine||function(e,t=3){if(!(t>3))if(1)console.trace(`[SHIKI DEPRECATE]: ${e}`);else throw Error(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([q(e.themes||[]),V(e.langs||[]),e.engine]);return function(e){let t;Y+=1,!1!==e.warnings&&Y>=10&&Y%10==0&&console.warn(`[Shiki] ${Y} instances have been created. Shiki is supposed to be used as a singleton, c
6onsider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new G("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map($),a=new W(new K(e.engine,r),i,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=a.getTheme(e);if(!t)throw new G(`Theme \`${e}\` not found, you may need to load it first`);return t}function s(...e){c(),a.loadLanguages(e.flat(1))}function l(...e){for(let t of(c(),e.flat(1)))a.loadTheme(t)}function c(){if(n)throw new G("Shiki instance has been disposed")}function u(){n||(n=!0,a.dispose(),Y-=1)}return{setTheme:function(e){c();let n=o(e);return t!==e&&(a.setTheme(n),t=e),{theme:n,colorMap:a.getColorMap()}},getTheme:o,getLanguage:function(e){c();let t=a.getGrammar("string"==typeof e?e:e.name);if(!t)throw new G(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),a.getLoadedThemes()},getLoadedLanguages:function(){return c(),a.getLoadedLanguages()},loadLanguage:async function(...e){return s(await V(e))},loadLanguageSync:s,loadTheme:async function(...e){return c(),l(await q(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}({...e,themes:t,langs:n,engine:r})}async function X(e){let t=await Z(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return T(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=r;if(f(i)||y(a))throw new c.ShikiError("Plain language does not have grammar state");if("ansi"===i)throw new c.ShikiError("ANSI language does not have grammar state");
6let{theme:o,colorMap:s}=t.setTheme(a),l=t.getLanguage(i);return new I(L(n,l,o,s,r).stateStack,l.name,o.name)})(t,...e),codeToTokensBase:(e,n)=>R(t,e,n),codeToTokensWithThemes:(e,n)=>O(t,e,n),codeToTokens:(e,n)=>B(t,e,n),codeToHast:(e,n)=>H(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>H(e,t,n),codeToTokens:(t,n)=>B(e,t,n)},i=U(H(e,t,n,r));for(let e of N(n))i=e.postprocess?.call(r,i,n)||i;return i})(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let Q=[{id:"abap",name:"ABAP",import:()=>e.A(516690)},{id:"actionscript-3",name:"ActionScript",import:()=>e.A(274435)},{id:"ada",name:"Ada",import:()=>e.A(796339)},{id:"angular-html",name:"Angular HTML",import:()=>e.A(196546)},{id:"angular-ts",name:"Angular TypeScript",import:()=>e.A(60308)},{id:"apache",name:"Apache Conf",import:()=>e.A(608734)},{id:"apex",name:"Apex",import:()=>e.A(902952)},{id:"apl",name:"APL",import:()=>e.A(814026)},{id:"applescript",name:"AppleScript",import:()=>e.A(210042)},{id:"ara",name:"Ara",import:()=>e.A(327701)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>e.A(864940)},{id:"asm",name:"Assembly",import:()=>e.A(581996)},{id:"astro",name:"Astro",import:()=>e.A(185223)},{id:"awk",name:"AWK",import:()=>e.A(577689)},{id:"ballerina",name:"Ballerina",import:()=>e.A(887861)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>e.A(769047)},{id:"beancount",name:"Beancount",import:()=>e.A(566005)},{id:"berry",name:"Berry",aliases:["be"],import:()=>e.A(64129)},{id:"bibtex",name:"BibTeX",import:()=>e.A(686785)},{id:"bicep",name:"Bicep",import:()=>e.A(234475)},{id:"blade",name:"Blade",import:()=>e.A(184291)},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>e.A(254810)},{id:"c",name:"C",import:()=>e.A(715630)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>e.A(928418)},{id:"cairo",name:"Cairo",import:()=>e.A(496018)},{id:"clarity",name:"Clarity",import:()=>e.A(268805)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>e.A(885670)},{id:"cmake",name:"CMake",import:()=>e.A(850277)},{id:"cobol",name:"COBOL",import:()=>e.A(608435)},{id:"codeowners",name:"CODEOWNERS",import:()=>e.A(677655)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>e.A(393919)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>e.A(499510)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>e.A(314583)},{id:"coq",name:"Coq",import:()=>e.A(138305)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>e.A(162895)},{id:"crystal",name:"Crystal",import:()=>e.A(715822)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>e.A(156548)},{id:"css",name:"CSS",import:()=>e.A(68853)},{id:"csv",name:"CSV",import:()=>e.A(508072)},{id:"cue",name:"CUE",import:()=>e.A(379420)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>e.A(901081)},{id:"d",name:"D",import:()=>e.A(732086)},{id:"dart",name:"Dart",import:()=>e.A(8814)},{id:"dax",name:"DAX",import:()=>e.A(706010)},{id:"desktop",name:"Desktop",import:()=>e.A(611671)},{id:"diff",name:"Diff",import:()=>e.A(499264)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>e.A(964927)},{id:"dotenv",name:"dotEnv",import:()=>e.A(86855)},{id:"dream-maker",name:"Dream Maker",import:()=>e.A(955357)},{id:"edge",name:"Edge",import:()=>e.A(40814)},{id:"elixir",name:"Elixir",import:()=>e.A(534593)},{id:"elm",name:"Elm",import:()=>e.A(80402)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>e.A(659962)},{id:"erb",name:"ERB",import:()=>e.A(655306)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>e.A(379291)},{id:"fennel",name:"Fennel",import:()=>e.A(56334)},{id:"fish",name:"Fish",import:()=>e.A(955953)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>e.A(372286)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>e.A(709599)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>e.A(417187)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>e.A(106583)},{id:"gdresource",name:"GDResource",import:()=>e.A(600350)},{id:"gdscript",name:"GDScript",import:()=>e.A(718592)},{id:"gdshader",name:"GDShader",import:()=>e.A(964292)},{id:"genie",name:"Genie",import:()=>e.A(251227)},{id:"gherkin",name:"Gherkin",import:()=>e.A(781674)},{id:"git-commit",name:"Git Commit Message",import:()=>e.A(765886)}
6,{id:"git-rebase",name:"Git Rebase Message",import:()=>e.A(643635)},{id:"gleam",name:"Gleam",import:()=>e.A(469752)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>e.A(220210)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>e.A(952204)},{id:"glsl",name:"GLSL",import:()=>e.A(615932)},{id:"gnuplot",name:"Gnuplot",import:()=>e.A(334810)},{id:"go",name:"Go",import:()=>e.A(518233)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>e.A(527502)},{id:"groovy",name:"Groovy",import:()=>e.A(783131)},{id:"hack",name:"Hack",import:()=>e.A(866363)},{id:"haml",name:"Ruby Haml",import:()=>e.A(936482)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>e.A(219104)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>e.A(982274)},{id:"haxe",name:"Haxe",import:()=>e.A(843593)},{id:"hcl",name:"HashiCorp HCL",import:()=>e.A(392582)},{id:"hjson",name:"Hjson",import:()=>e.A(32395)},{id:"hlsl",name:"HLSL",import:()=>e.A(336975)},{id:"html",name:"HTML",import:()=>e.A(615475)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>e.A(736812)},{id:"http",name:"HTTP",import:()=>e.A(65363)},{id:"hxml",name:"HXML",import:()=>e.A(412671)},{id:"hy",name:"Hy",import:()=>e.A(98975)},{id:"imba",name:"Imba",import:()=>e.A(221794)},{id:"ini",name:"INI",aliases:["properties"],import:()=>e.A(712237)},{id:"java",name:"Java",import:()=>e.A(25004)},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>e.A(792799)},{id:"jinja",name:"Jinja",import:()=>e.A(300535)},{id:"jison",name:"Jison",import:()=>e.A(299868)},{id:"json",name:"JSON",import:()=>e.A(692658)},{id:"json5",name:"JSON5",import:()=>e.A(145390)},{id:"jsonc",name:"JSON with Comments",import:()=>e.A(459901)},{id:"jsonl",name:"JSON Lines",import:()=>e.A(844018)},{id:"jsonnet",name:"Jsonnet",import:()=>e.A(932597)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>e.A(386493)},{id:"jsx",name:"JSX",import:()=>e.A(287672)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>e.A(148045)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>e.A(278014)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>e.A(511938)},{id:"latex",name:"LaTeX",import:()=>e.A(382697)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>e.A(106774)},{id:"less",name:"Less",import:()=>e.A(657069)},{id:"liquid",name:"Liquid",import:()=>e.A(133954)},{id:"llvm",name:"LLVM IR",import:()=>e.A(969445)},{id:"log",name:"Log file",import:()=>e.A(532210)},{id:"logo",name:"Logo",import:()=>e.A(917136)},{id:"lua",name:"Lua",import:()=>e.A(147287)},{id:"luau",name:"Luau",import:()=>e.A(298173)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>e.A(418877)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>e.A(159142)},{id:"marko",name:"Marko",import:()=>e.A(644609)},{id:"matlab",name:"MATLAB",import:()=>e.A(323845)},{id:"mdc",name:"MDC",import:()=>e.A(367535)},{id:"mdx",name:"MDX",import:()=>e.A(659189)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>e.A(457619)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>e.A(401626)},{id:"mojo",name:"Mojo",import:()=>e.A(524176)},{id:"move",name:"Move",import:()=>e.A(847969)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>e.A(755902)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>e.A(557638)},{id:"nginx",name:"Nginx",import:()=>e.A(47723)},{id:"nim",name:"Nim",import:()=>e.A(446820)},{id:"nix",name:"Nix",import:()=>e.A(565220)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>e.A(821908)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>e.A(798543)},{id:"objective-cpp",name:"Objective-C++",import:()=>e.A(953213)},{id:"ocaml",name:"OCaml",import:()=>e.A(357016)},{id:"pascal",name:"Pascal",import:()=>e.A(494584)},{id:"perl",name:"Perl",import:()=>e.A(590087)},{id:"php",name:"PHP",import:()=>e.A(753525)},{id:"plsql",name:"PL/SQL",import:()=>e.A(985641)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>e.A(215520)},{id:"polar",name:"Polar",import:()=>e.A(579736)},{id:"postcss",name:"PostCSS",import:()=>e.A(344743)},{id:"powerquery",name:"PowerQuery",import:()=>e.A(69901)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>e.A(849765)},{id:"prisma",name:"Prisma",import:()=>e.A(925840)},{id:"prolog",name:"Prolog",import:()=>e.A(678110)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>e.A(710002)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>e.A(753456)},{id:"puppet",name:"Puppet",import:()=>e.A(328116)},{id:"purescript",name:"PureScript",import:()=>e.A(762792)},{id:"python",name:"Python",aliases:["py"],import:()=>e.A(548436)},{id:"qml",name:"QML",import:()=>e.A(985774)},{id:"qmldir",name:"QML Directory",import:()=>e.A(822682)},{id:"qss",name:"Qt Style Sheets",import:()=>e.A(29273)},{id:"r",name:"R",import:()=>e.A(917431)},{id:"racket",name:"Racket",import:()=>e.A(127184)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>e.A(402999)}
6,{id:"razor",name:"ASP.NET Razor",import:()=>e.A(22510)},{id:"reg",name:"Windows Registry Script",import:()=>e.A(392914)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>e.A(864980)},{id:"rel",name:"Rel",import:()=>e.A(362249)},{id:"riscv",name:"RISC-V",import:()=>e.A(919686)},{id:"rst",name:"reStructuredText",import:()=>e.A(580357)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>e.A(660137)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>e.A(225837)},{id:"sas",name:"SAS",import:()=>e.A(559154)},{id:"sass",name:"Sass",import:()=>e.A(428160)},{id:"scala",name:"Scala",import:()=>e.A(679226)},{id:"scheme",name:"Scheme",import:()=>e.A(95554)},{id:"scss",name:"SCSS",import:()=>e.A(256229)},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>e.A(257294)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>e.A(287646)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>e.A(77876)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>e.A(702789)},{id:"smalltalk",name:"Smalltalk",import:()=>e.A(105404)},{id:"solidity",name:"Solidity",import:()=>e.A(664050)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>e.A(423766)},{id:"sparql",name:"SPARQL",import:()=>e.A(471095)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>e.A(713125)},{id:"sql",name:"SQL",import:()=>e.A(347760)},{id:"ssh-config",name:"SSH Config",import:()=>e.A(525380)},{id:"stata",name:"Stata",import:()=>e.A(927772)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>e.A(131592)},{id:"svelte",name:"Svelte",import:()=>e.A(209551)},{id:"swift",name:"Swift",import:()=>e.A(174099)},{id:"system-verilog",name:"SystemVerilog",import:()=>e.A(401250)},{id:"systemd",name:"Systemd Units",import:()=>e.A(944475)},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>e.A(600538)},{id:"tasl",name:"Tasl",import:()=>e.A(336651)},{id:"tcl",name:"Tcl",import:()=>e.A(709948)},{id:"templ",name:"Templ",import:()=>e.A(340336)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>e.A(508436)}
6,{id:"tex",name:"TeX",import:()=>e.A(155636)},{id:"toml",name:"TOML",import:()=>e.A(351979)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>e.A(65678)},{id:"tsv",name:"TSV",import:()=>e.A(841727)},{id:"tsx",name:"TSX",import:()=>e.A(557754)},{id:"turtle",name:"Turtle",import:()=>e.A(670454)},{id:"twig",name:"Twig",import:()=>e.A(670515)},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>e.A(48460)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>e.A(744538)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>e.A(963321)},{id:"v",name:"V",import:()=>e.A(43837)},{id:"vala",name:"Vala",import:()=>e.A(830536)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>e.A(785051)},{id:"verilog",name:"Verilog",import:()=>e.A(586017)},{id:"vhdl",name:"VHDL",import:()=>e.A(495694)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>e.A(404547)},{id:"vue",name:"Vue",import:()=>e.A(934329)},{id:"vue-html",name:"Vue HTML",import:()=>e.A(160550)},{id:"vue-vine",name:"Vue Vine",import:()=>e.A(109)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>e.A(834235)},{id:"wasm",name:"WebAssembly",import:()=>e.A(879931)},{id:"wenyan",name:"Wenyan",aliases:["æè¨"],import:()=>e.A(738463)},{id:"wgsl",name:"WGSL",import:()=>e.A(464547)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>e.A(74196)},{id:"wit",name:"WebAssembly Interface Types",import:()=>e.A(926245)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>e.A(998654)},{id:"xml",name:"XML",import:()=>e.A(160115)},{id:"xsl",name:"XSL",import:()=>e.A(656841)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>e.A(291412)},{id:"zenscript",name:"ZenScript",import:()=>e.A(441270)},{id:"zig",name:"Zig",import:()=>e.A(332344)}],J=Object.fromEntries(Q.map(e=>[e.id,e.import])),ee=Object.fromEntries(Q.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),et={...J,...ee};e.s(["bundledLanguages",0,et,"bundledLanguagesInfo",0,Q],785892);let en=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>e.A(252913)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>e.A(695208)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>e.A(952844)},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>e.A(872934)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>e.A(831036)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>e.A(423803)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>e.A(486330)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>e.A(381001)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>e.A(295735)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>e.A(902100)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>e.A(358172)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>e.A(775274)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>e.A(157811)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>e.A(514214)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>e.A(948353)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>e.A(640920)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>e.A(579755)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>e.A(805550)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>e.A(360233)},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>e.A(980721)},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>e.A(27266)},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>
6e.A(231214)},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>e.A(881110)},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>e.A(337683)},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>e.A(28130)},{id:"houston",displayName:"Houston",type:"dark",import:()=>e.A(677856)},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>e.A(194363)},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>e.A(448953)},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>e.A(711812)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>e.A(409732)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>e.A(930788)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>e.A(411374)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>e.A(769460)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>e.A(774478)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>e.A(49008)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>e.A(377952)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>e.A(820463)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>e.A(630169)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>e.A(777035)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>e.A(161439)},{id:"nord",displayName:"Nord",type:"dark",import:()=>e.A(467304)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>e.A(794497)},{id:"one-light",displayName:"One Light",type:"light",import:()=>e.A(353619)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>e.A(841717)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>e.A(703232)},{id:"red",displayName:"Red",type:"dark",import:()=>e.A(469411)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>e.A(359563)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>e.A(81356)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>e.A(291336)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>e.A(758732)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>e.A(505358)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>e.A(953493)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>e.A(767374)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>e.A(461630)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>e.A(135353)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>e.A(129817)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>e.A(666144)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>e.A(496740)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>e.A(896290)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>e.A(161379)}],er=Object.fromEntries(en.map(e=>[e.id,e.import]));e.s(["bundledThemes",0,er,"bundledThemesInfo",0,en],361838);var ei=e.i(467034);
6class ea extends Error{constructor(e){super(e),this.name="ShikiError"}}function eo(){return"u">typeof performance?performance.now():Date.now()}let es=(e,t)=>e+(t-e%t)%t;async function el(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let a="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function o(e,t){return e?function(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&a)return a.decode(e.subarray(t,i));let o="";for(;t<i;){let n=e[t++];if(!(128&n)){o+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){o+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)o+=String.fromCharCode(n);else{let e=n-65536;o+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return o}(r.HEAPU8,e,t):""}let s={emscripten_get_now:eo,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let a=r.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let r=1;r<=4;r*=2){let o=a*(1+.2/r);if(o=Math.min(o,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,es(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:s,wasi_snapshot_preview1:s});i((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=o}return await l(),r}var ec=Object.defineProperty,eu=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?ec(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n};let ed=null;class eh{constructor(e){eu(this,"utf16Length"),eu(this,"utf8Length"),eu(this,"utf16Value"),eu(this,"utf8Value"),eu(this,"utf16OffsetToUtf8"),eu(this,"utf8OffsetToUtf16");const t=e.length,n=eh._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const a=r?new Uint32Array(n+1):null;r&&(a[n]=t);const o=new Uint8Array(n);let s=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let c=l,u=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=(l-55296<<10)+65536|t-56320,u=!0)}r&&(i[n]=s,u&&(i[n+1]=s),c<=127?a[s+0]=n:c<=2047?(a[s+0]=n,a[s+1]=n):c<=65535?(a[s+0]=n,a[s+1]=n,a[s+2]=n):(a[s+0]=n,a[s+1]=n,a[s+2]=n,a[s+3]=n)),c<=127?o[s++]=c:(c<=2047?o[s++]=192|(1984&c)>>>6:(c<=65535?o[s++]=224|(61440&c)>>>12:(o[s++]=240|(1835008&c)>>>18,o[s++]=128|(258048&c)>>>12),o[s++]=128|(4032&c)>>>6),o[s++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let ep=class e{constructor(t){if(eu(this,"id",++e.LAST_ID),eu(this,"_onigBinding"),eu(this,"content"),eu(this,"utf16Length"),eu(this,"utf8Length"),eu(this,"utf16OffsetToUtf8"),eu(this,"utf8OffsetToUtf16"),eu(this,"ptr"),!ed)throw new ea("Must invoke loadWasm first.");this._onigBinding=ed,this.content=t;const n=new eh(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=ed.omalloc(1e4)),e._sharedPtrInUse=!0,ed.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(ed)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};eu(ep,"LAST_ID",0),eu(ep,"_sharedPtr",0),eu(ep,"_sharedPtrInUse",!1);class em{constructor(e){if(eu(this,"_onigBinding"),eu(this,"_ptr"),!ed)throw new ea("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new eh(e[r]);t[r]=i.createString(ed),n[r]=i.utf8Length}const r=ed.omalloc(4*e.length);ed.HEAPU32.set(t,r/4);const i=ed.omalloc(4*e.length);ed.HEAPU32.set(n,i/4);const a=ed.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)ed.ofree(t[n]);ed.ofree(i),ed.ofree(r),0===a&&function(e){throw new ea(e.UTF8ToString(e.getLastO
6nigError()))}(ed),this._onigBinding=ed,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new ep(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===a)return null;let o=i.HEAPU32,s=a/4,l=o[s++],c=o[s++],u=[];for(let t=0;t<c;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:u}}}function ef(e){return t=>WebAssembly.instantiate(e,t)}async function eg(e){return e&&await (t||(t=async function(){ed=await el(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var r,i,a,o;if(void 0!==n.data&&(n=n.data),r=n,"u">typeof Response&&r instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (a=n,e=>WebAssembly.instantiateStreaming(a,e))(t):await (o=n,async e=>{let t=await o.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=n,"u">typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==ei.Buffer&&ei.Buffer.isBuffer?.(i)||"u">typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"u">typeof Uint32Array&&i instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await ef(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await ef(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())),{createScanner:e=>new em(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new ep(e)}}let{codeToHtml:ey}=function(e,t){let n,r=async function(t={}){if(!n)return n=e({...t,themes:t.themes||[],langs:t.langs||[]});{let e=await n;return await Promise.all([e.loadTheme(...t.themes||[]),e.loadLanguage(...t.langs||[])]),e}};async function i(e,n){let i=await r({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)}),a=await t?.guessEmbeddedLanguages?.(e,n.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter:e=>r(e),codeToHtml:async(e,t)=>(await i(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await i(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await i(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await i(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await i(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await r({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}((n=(a={langs:et,themes:er,engine:()=>eg(e.A(514467))}).langs,r=a.themes,i=a.engine,async function(e){function t(t){if("string"==typeof t){if(g(t))return[];let r=n[t=e.langAlias?.[t]||t];if(!r)throw new c.ShikiError(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return r}return t}function a(e){if(y(e))return"none";if("string"==typeof e){let t=r[e];if(!t)throw new c.ShikiError(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>t(e)),l=await X({engine:e.engine??i(),...e,themes:o,langs:s});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(t)),loadTheme:(...e)=>l.loadTheme(...e.map(a)),getBundledLanguages:()=>n,getBundledThemes:()=>r}}),{guessEmbeddedLanguages:function(e,t,n){let r=new Set;for(let t of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(t[1]);for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(t[1]);for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(t[1]);if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}});e.s(["codeToHtml",0,ey],785395),e.s(["PubCodeBlock",0,function(e){let t,n,r,i=(0,s.c)(8),{block:a,prerenderedCode:c}=e,[u,d]=(0,l.useState)(c||null);i[0]!==a.language||i[1]!==a.plaintext||i[2]!==a.syntaxHighlightingTheme?(t=()=>{let e=Q.find(e=>e.id===a.language)?.id||"plaintext",t=en.find(e=>e.id===a.syntaxHighlightingTheme)?.id||"github-light";ey(a.plaintext,{lang:e,theme:t}).then(d)},i[0]=a.language,i[1]=a.plaintext,i[2]=a.syntaxHighlightingTheme,i[3]=t):t=i[3],i[4]!==a?(n=[a],i[4]=a,i[5]=n):n=i[5],(0,l.useLayoutEffect)(t,n);let h=u||"";return i[6]!==h?(r=(0,o.jsx)("div",{className:"w-full min-h-[42px] my-2 rounded-md border-border-light outline-border-light selected-outline",dangerouslySetInnerHTML:{__html:h}}),i[6]=h,i[7]=r):r=i[7],r}],760297)},861224,e=>{"use strict";e.s(["PubBlueskyPostBlock",()=>o]);var t=e.i(843476),n=e.i(593302);e.i(521747);var r=e.i(498911),i=e.i(612854),a=e.i(829971);let o=e=>{let o=e.post;switch(!0){case n.AppBskyFeedDefs.isBlockedPost(o)||n.AppBskyFeedDefs.isBlockedAuthor(o)||n.AppBskyFeedDefs.isNotFoundPost(o):return(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(r.PostNotAvailable,{})});case n.AppBskyFeedDefs.validatePostView(o).success:let s=(0,a.resolveBskyPostView)(o,e.view),l="publishedBskyPostBlock text-sm text-secondary block-border sm:px-3 sm:py-2 px-2 py-1 bg-bg-page mb-2 hover:border-accent-contrast!";if("media"===s.view)return(0,t.jsx)(i.BskyPostMediaContent,{post:o,media:s.media,parent:void 0,quoteEnabled:!0,replyEnabled:!0,className:l,clientHost:e.clientHost});return(0,t.jsx)(i.BskyPostContent,{post:o,parent:void 0,showBlueskyLink:!0,showEmbed:!0,avatarSize:"large",quoteEnabled:!0,replyEnabled:!0,className:l,clientHost:e.clientHost})}}},518765,510114,713136,490281,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(124670),a=e.i(320526),o=e.i(262219),s=e.i(464691),l=e.i(776818),c=e.i(59986),u=e.i(156478),d=e.i(724531);e.s(["PublishedImageGallery",0,function(e){let h,p,m,f,g,y,b,v,x=(0,n.c)(24),{block:k,did:w}=e;if(x[0]!==k.images||x[1]!==w){let e;x[3]!==w?(e=e=>({src:(0,i.blobRefToSrc)(e.image.ref,w,void 0,{width:i.POST_BODY_IMAGE_WIDTH}),fullSrc:(0,i.blobRefToSrc)(e.image.ref,w),mimeType:e.image.mimeType,videoSrc:"image/gif"===e.image.mimeType?(0,i.blobRefToSrc)(e.image.ref,w,void 0,{format:"mp4"}):void 0,alt:e.alt||"",width:e.aspectRatio.width,height:e.aspectRatio.height}),x[3]=w,x[4]=e):e=x[4],p=k.images.map(e),x[0]=k.images,x[1]=w,x[2]=p}else p=x[2];h=p;let[C,S]=(0,r.useState)(null),[E,T]=(0,r.useState)(!1);x[5]===Symbol.for("react.memo_cache_sentinel")?(m=(e,t)=>{T(!!t),S(e)},x[5]=m):m=x[5];let I=m,D=k.format??o.DEFAULT_FORMAT,N=k.gap??o.DEFAULT_GAP,A=k.maxWidth??o.DEFAULT_MAX_WIDTH;if(0===h.length)return null;x[6]!==h?(f=(e,n)=>(0,t.jsx)(s.GalleryImageItem,{image:h[e],onClick:()=>I(e),overlay:(0,t.jsx)(a.ReadOnlyAltText,{alt:h[e].alt,onSeeMore:()=>I(e,!0)}),...n}),x[6]=h,x[7]=f):f=x[7];let _=f;return x[8]!==D||x[9]!==N||x[10]!==h.length||x[11]!==A||x[12]!==_?(g="carousel"===D?(0,t.jsx)(u.ImageGalleryCarou
6sel,{count:h.length,renderItem:_}):"strip"===D?(0,t.jsx)(c.ImageGalleryStrip,{count:h.length,gap:N,renderItem:_}):(0,t.jsx)(l.ImageGalleryGrid,{count:h.length,gap:N,maxWidth:A,renderItem:_}),x[8]=D,x[9]=N,x[10]=h.length,x[11]=A,x[12]=_,x[13]=g):g=x[13],x[14]!==h?(y=e=>(0,t.jsx)(d.LightboxSlide,{image:h[e]}),x[14]=h,x[15]=y):y=x[15],x[16]!==h.length||x[17]!==E||x[18]!==C||x[19]!==y?(b=(0,t.jsx)(d.ImageGalleryLightbox,{count:h.length,index:C,altExpanded:E,onIndexChange:S,renderSlide:y}),x[16]=h.length,x[17]=E,x[18]=C,x[19]=y,x[20]=b):b=x[20],x[21]!==g||x[22]!==b?(v=(0,t.jsxs)("div",{className:"imageGalleryBlock w-full",children:[g,b]}),x[21]=g,x[22]=b,x[23]=v):v=x[23],v}],518765);var h=e.i(201274),p=e.i(864293),m=e.i(686358);function f(e){return e+1}e.s(["PublishedImageBlock",0,function(e){let i,o,s,l,c,u,d,g=(0,n.c)(37),[y,b]=(0,r.useState)(0),{decoding:v,className:x}=(0,p.useCanvasImage)(e.src,e.mimeType),k=0===y?e.src:`${e.src}${e.src.includes("?")?"&":"?"}reload=${y}`,{status:w,imgProps:C,reset:S}=(0,h.useImageLoadStatus)(k);g[0]!==e.displayWidth||g[1]!==e.isFullBleed?(i=!e.isFullBleed&&e.displayWidth?{width:e.displayWidth,maxWidth:"100%",height:"auto"}:void 0,g[0]=e.displayWidth,g[1]=e.isFullBleed,g[2]=i):i=g[2];let E=i,T=`${e.isFullBleed?"w-full border-none":"rounded-lg border border-transparent "} ${e.className??""}`,I=`relative ${e.isFullBleed?"w-full":"w-fit"} h-fit ${"error"===w?"min-w-40 min-h-24":""}`,D=`block ${e.isFullBleed?"w-full":"w-fit"} ${e.onOpenLightbox?"cursor-pointer":""}`,N=e.alt??"",A=`${T} ${x}`;return g[3]!==v||g[4]!==E||g[5]!==C||g[6]!==e.height||g[7]!==e.loading||g[8]!==e.width||g[9]!==k||g[10]!==N||g[11]!==A?(o=(0,t.jsx)("img",{...C,alt:N,loading:e.loading,decoding:v,height:e.height,width:e.width,className:A,src:k,style:E}),g[3]=v,g[4]=E,g[5]=C,g[6]=e.height,g[7]=e.loading,g[8]=e.width,g[9]=k,g[10]=N,g[11]=A,g[12]=o):o=g[12],g[13]!==E||g[14]!==T||g[15]!==e.alt||g[16]!==e.height||g[17]!==e.videoSrc||g[18]!==e.width||g[19]!==o?(s=(0,t.jsx)(m.AnimatedImageVideo,{videoSrc:e.videoSrc,alt:e.alt,width:e.width,height:e.height,className:T,style:E,children:o}),g[13]=E,g[14]=T,g[15]=e.alt,g[16]=e.height,g[17]=e.videoSrc,g[18]=e.width,g[19]=o,g[20]=s):s=g[20],g[21]!==e.onOpenLightbox||g[22]!==D||g[23]!==s?(l=(0,t.jsx)("button",{type:"button",className:D,onClick:e.onOpenLightbox,children:s}),g[21]=e.onOpenLightbox,g[22]=D,g[23]=s,g[24]=l):l=g[24],g[25]!==e.isFullBleed||g[26]!==S||g[27]!==w?(c="error"===w&&(0,t.jsx)(h.ImageErrorState,{message:"Something went wrong,",actionLabel:"reload?",onAction:()=>{S(),b(f)},className:e.isFullBleed?"rounded-none!":"rounded-lg!"}),g[25]=e.isFullBleed,g[26]=S,g[27]=w,g[28]=c):c=g[28],g[29]!==e.alt||g[30]!==e.onOpenAltInLightbox?(u=e.alt&&(0,t.jsx)(a.ReadOnlyAltText,{alt:e.alt,onSeeMore:e.onOpenAltInLightbox}),g[29]=e.alt,g[30]=e.onOpenAltInLightbox,g[31]=u):u=g[31],g[32]!==I||g[33]!==l||g[34]!==c||g[35]!==u?(d=(0,t.jsxs)("div",{className:I,children:[l,c,u]}),g[32]=I,g[33]=l,g[34]=c,g[35]=u,g[36]=d):d=g[36],d}],510114);var g=e.i(126479);e.i(859041);var y=e.i(26765),b=e.i(674931),b=b,v=e.i(365172),x=e.i(493306),k=e.i(680396);let w=(0,r.createContext)(null);e.s(["GlobalImageLightbox",0,function(e){let a,o,s,l,c,u=(0,n.c)(15),[h,p]=(0,r.useState)(null),{pages:m}=(0,g.useLeafletContent)();u[0]!==m||u[1]!==e.did?(a=(t,n,r)=>{var a;let o,s,l,c,u=t?m.find(e=>e.id===t):m[0],d=u?(a=e.did,o=(0,k.pageBlocksInOrder)(u).map(e=>e.block),s=[],l=e=>{let t=e.block;if(y.PubLeafletBlocksImage.isMain(t))s.push({cid:(0,i.blobRefCid)(t.image.ref),src:(0,i.blobRefToSrc)(t.image.ref,a,void 0,{width:i.POST_BODY_IMAGE_WIDTH}),fullSrc:(0,i.blobRefToSrc)(t.image.ref,a),alt:t.alt||"",width:t.aspectRatio?.width??0,height:t.aspectRatio?.height??0});else if(b.isMain(t))for(let e of t.images)s.push({cid:(0,i.blobRefCid)(e.image.ref),src:(0,i.blobRefToSrc)(e.image.ref,a,void 0,{width:i.POST_BODY_IMAGE_WIDTH}),fullSrc:(0,i.blobRefToSrc)(e.image.ref,a),alt:e.alt||"",width:e.aspectRatio.width,height:e.aspectRatio.height});else v.PubLeafletBlocksUnorderedList.isMain(t)?t.children.forEach(e=>c(e,!1)):x.PubLeafletBlocksOrderedList.isMain(t)&&t.children.forEac
6h(e=>c(e,!0))},c=(e,t)=>{l({block:e.content}),(e.children??[]).forEach(e=>c(e,t)),(t?e.unorderedListChildren?.children??[]:e.orderedListChildren?.children??[]).forEach(e=>c(e,!t))},o.forEach(e=>l(e)),s):[],h=d.findIndex(e=>e.cid===n);-1!==h&&p({images:d,index:h,altExpanded:r?.altExpanded})},u[0]=m,u[1]=e.did,u[2]=a):a=u[2];let f=a,C=h?.images.length??0,S=h?.index??null,E=h?.altExpanded;return u[3]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{null===e&&p(null)},u[3]=o):o=u[3],u[4]!==h?(s=e=>h?(0,t.jsx)(d.LightboxSlide,{image:h.images[e]}):null,u[4]=h,u[5]=s):s=u[5],u[6]!==C||u[7]!==S||u[8]!==E||u[9]!==s?(l=(0,t.jsx)(d.ImageGalleryLightbox,{count:C,index:S,altExpanded:E,onIndexChange:o,renderSlide:s}),u[6]=C,u[7]=S,u[8]=E,u[9]=s,u[10]=l):l=u[10],u[11]!==f||u[12]!==e.children||u[13]!==l?(c=(0,t.jsxs)(w.Provider,{value:f,children:[e.children,l]}),u[11]=f,u[12]=e.children,u[13]=l,u[14]=c):c=u[14],c},"useOpenImageLightbox",0,()=>(0,r.useContext)(w)],713136);var C=e.i(69278),S=e.i(806398),E=e.i(95187);let T=(0,E.createServerReference)("7079972c88ee506f167f1a076c8e057df376a9d54f",E.callServer,void 0,E.findSourceMapURL,"voteOnPublishedPoll");var I=e.i(814649),D=e.i(67180);let N=(0,E.createServerReference)("40b1a521df41bdffe6f791b1717adb6f67c663d52e",E.callServer,void 0,E.findSourceMapURL,"getVoterIdentities");var A=e.i(671473);let _=e=>{try{return e.option&&e.option.length>0?e.option[0]:null}catch{return null}},P=e=>{let r,i=(0,n.c)(5),a=e.selected?C.ButtonPrimary:C.ButtonSecondary;return i[0]!==a||i[1]!==e.disabled||i[2]!==e.onSelect||i[3]!==e.option.text?(r=(0,t.jsx)("div",{className:"flex gap-2 items-center",children:(0,t.jsx)(a,{className:"pollOption grow max-w-full flex",onClick:e.onSelect,disabled:e.disabled,children:e.option.text})}),i[0]=a,i[1]=e.disabled,i[2]=e.onSelect,i[3]=e.option.text,i[4]=r):r=i[4],r},M=e=>{let r,i,a,o,s=(0,n.c)(19);s[0]!==e.optimisticVote||s[1]!==e.pollData.atp_poll_votes?(r=e.optimisticVote?[...e.pollData.atp_poll_votes,{voter_did:e.optimisticVote.voter_did,record:{$type:"pub.leaflet.poll.vote",option:[e.optimisticVote.option]}}]:e.pollData.atp_poll_votes,s[0]=e.optimisticVote,s[1]=e.pollData.atp_poll_votes,s[2]=r):r=s[2];let l=r,c=l.length||0,u=e.pollData.record;if(s[3]!==l||s[4]!==u.options){let e;s[6]!==l?(e=(e,t)=>({...e,votes:l.filter(e=>_(e.record)==t.toString())}),s[6]=l,s[7]=e):e=s[7],i=Math.max(...u.options.map(e).map(j)),s[3]=l,s[4]=u.options,s[5]=i}else i=s[5];let d=i;if(s[8]!==l||s[9]!==d||s[10]!==u.options||s[11]!==c){let e;s[13]!==l||s[14]!==d||s[15]!==c?(e=(e,n)=>{let r=l.filter(e=>_(e.record)===n.toString()),i=c>0&&r.length===d;return(0,t.jsx)(L,{option:e,votes:r.length,voteRecords:r,totalVotes:c,winner:i},n)},s[13]=l,s[14]=d,s[15]=c,s[16]=e):e=s[16],a=u.options.map(e),s[8]=l,s[9]=d,s[10]=u.options,s[11]=c,s[12]=a}else a=s[12];return s[17]!==a?(o=(0,t.jsx)(t.Fragment,{children:a}),s[17]=a,s[18]=o):o=s[18],o},R=e=>{let[n,i]=(0,r.useState)([]),[a,o]=(0,r.useState)(!1),[s,l]=(0,r.useState)(!1),c=async()=>{if(!s&&e.voteRecords.length>0){o(!0),l(!0);try{let t=e.voteRecords.map(e=>e.voter_did),n=await N(t);i(n)}catch(e){console.error("Failed to fetch voter identities:",e)}finally{o(!1)}}};return(0,t.jsx)(I.Popover,{trigger:(0,t.jsx)("button",{className:"hover:underline cursor-pointer",disabled:0===e.votes,children:e.votes}),onOpenChange:c,className:"w-64 max-h-80",children:a?(0,t.jsx)("div",{className:"flex justify-center py-4",children:(0,t.jsx)("div",{className:"text-sm text-secondary",children:"Loading..."})}):(0,t.jsx)("div",{className:"flex flex-col gap-1 text-sm py-0.5",children:n.map(e=>(0,t.jsxs)("a",{href:`https://bsky.app/profile/${e.handle||e.did}`,target:"_blank",rel:"noopener noreferrer",className:"",children:["@",e.handle||e.did]},e.did))})})},L=e=>{let r,i,a,o,s,l,c,u,d=(0,n.c)(21),h=`pollResult relative grow py-0.5 px-2 border-accent-contrast rounded-md overflow-hidden ${e.winner?"font-bold border-2":"border"}`,p=`${(e.winner,"6px")} rgb(var(--bg-page))`;return d[0]!==p?(r={WebkitTextStroke:p,paintOrder:"stroke fill"},d[0]=p,d[1]=r):r=d[1],d[2]!==e.option.text?(i=(0,t.jsx)("div",{className:"grow max-w-full truncate",children:e.option.text}),d[2]=e.option.text,d[3]=i):i=d[3],d[4]!==e.voteRecords||d[5]!==e.votes?(a=(0,t.jsx)(R,{votes:e.votes,voteRecords:e.voteRecords}),d[4]=e.voteRecords,d[5]=e.votes,d[6]=a):a=d[6],d[7]!==r||d[8]!==i||d[9]!==a?(o=(0,t.jsxs)("div",{style:r,className:"pollResultContent text-accent-contrast relative flex gap-2 justify-between z-10",children:[i,a]}),d[7]=r,d[8]=i,d[9]=a,d[10]=o):o=d[10],d[11]!==e.totalVotes||d[12]!==e.votes?(s=(0,t.jsx)("div",{className:"bg-accent-contrast rounded-[2px] m-0.5",style:{maskImage:"var(--hatchSVG)",maskRepeat:"repeat repeat",...0===e.votes?{width:"4px"}:{flexBasis:`${e.votes/e.totalVotes*100}%`}}}),d[11]=e.totalVotes,d[12]=e.votes,d[13]=s):s=d[13],d[14]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("div",{}),d[14]=l):l=d[14],d[15]!==s?(c=(0,t.jsxs)("div",{className:"pollResultBG absolute bg-bg-page w-full top-0 bottom-0 left-0 right-0 flex flex-row z-0",children:[s,l]}),d[15]=s,d[16]=c):c=d[16],d[17]!==h||d[18]!==o||d[19]!==c?(u=(0,t.jsxs)("div",{className:h,children:[o,c]}),d[17]=h,d[18]=o,d[19]=c,d[20]=u):u=d[20],u};function j(e){return e.votes.length}e.s(["PublishedPollBlock",0,e=>{let{identity:n}=(0,S.useIdentityData)(),[i,a]=(0,r.useState)(null),[o,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(null),h=e.pollData.record,[p,m]=(0,r.useState)(!1);(0,r.useEffect)(()=>{m(!0)},[]);let f=async()=>
6{if(i&&n?.atp_did){s(!0),d({option:i,voter_did:n.atp_did}),c(!0);try{let t=await T(e.block.pollRef.uri,e.block.pollRef.cid,i);t.success||(console.error("Failed to vote:",t.error),d(null),c(!1))}catch(e){console.error("Failed to vote:",e),d(null),c(!1)}finally{s(!1)}}},g=!!n?.atp_did&&(!!e.pollData?.atp_poll_votes.find(e=>e.voter_did===n?.atp_did)||!!u);n?.atp_did&&e.pollData.uri.includes(n?.atp_did);let y=l||g,b=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[h.options.map((e,r)=>(0,t.jsx)(P,{option:e,optionIndex:r.toString(),selected:i===r.toString(),onSelect:()=>a(r.toString()),disabled:!n?.atp_did},r)),(0,t.jsxs)("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-between gap-2 items-center pt-2",children:[(0,t.jsx)("div",{className:"text-sm text-tertiary",children:"All votes are public"}),(0,t.jsxs)("div",{className:"flex sm:gap-3 sm:flex-row flex-col-reverse sm:justify-end justify-center gap-1 items-center",children:[(0,t.jsx)("button",{className:"w-fit font-bold text-accent-contrast",onClick:()=>c(!l),children:"See Results"}),n?.atp_did?(0,t.jsx)(C.ButtonPrimary,{className:"place-self-end",onClick:f,disabled:!i||o,children:o?"Votingâ¦":"Vote!"}):(0,t.jsx)(A.LoginModal,{asChild:!0,noEmailLogin:!0,trigger:(0,t.jsxs)(C.ButtonPrimary,{className:"place-self-center",children:[(0,t.jsx)(D.BlueskyTiny,{})," Login to vote"]})})]})]})]});return(0,t.jsx)("div",{className:`poll flex flex-col gap-2 p-3 w-full ${e.className} block-border`,style:{backgroundColor:"color-mix(in oklab, rgb(var(--accent-1)), rgb(var(--bg-page)) 85%)"},children:y?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(M,{pollData:e.pollData,hasVoted:g,setShowResults:c,optimisticVote:u}),!g&&(0,t.jsx)("div",{className:"flex justify-start",children:(0,t.jsx)("button",{className:"w-fit flex gap-2 items-center justify-start text-sm text-accent-contrast",onClick:()=>c(!1),children:"Back to Voting"})})]}):b})}],490281)},106251,67722,e=>{"use strict";e.s(["PublishedPageLinkBlock",()=>I],106251);var t=e.i(843476),n=e.i(500932),r=e.i(467592),i=e.i(271645),a=e.i(960622),o=e.i(685372),s=e.i(980205),l=e.i(890882);e.i(859041);var c=e.i(271264),u=e.i(270423),d=e.i(465082),h=e.i(510038),p=e.i(88891),m=e.i(603136),f=e.i(493306),g=e.i(43400),y=e.i(365172),b=e.i(974049),v=e.i(929495);function x(e,t){if(!e)return[];let n=t.isCanvas?[...e].sort(v.canvasBlockOrder):e,r=[];for(let e of n)for(let n of function* e(t){if(g.PubLeafletBlocksText.isMain(t)||c.PubLeafletBlocksHeader.isMain(t))yield t;else if(y.PubLeafletBlocksUnorderedList.isMain(t)||f.PubLeafletBlocksOrderedList.isMain(t))yield*function* t(n){for(let r of n){yield*e(r.content);let n=r.children??r.orderedListChildren?.children??r.unorderedListChildren?.children;n&&(yield*t(n))}}(t.children??[]);else if(b.PubLeafletPagesLinearDocument.isMain(t))for(let n of t.blocks??[])yield*e(n.block)}(e.block))if(r.push(n),r.length>=t.limit)return r;return r}var k=e.i(868679),w=e.i(768928),C=e.i(629683),S=e.i(269548);let E=e=>{if(!e)return null;if("pub.leaflet.theme.color#rgba"===e.$type){let{r:t,g:n,b:r,a:i}=e;return(0,w.parseColor)(`rgba(${t}, ${n}, ${r}, ${i/100})`)}if("pub.leaflet.theme.color#rgb"===e.$type){let{r:t,g:n,b:r}=e;return(0,w.parseColor)(`rgb(${t}, ${n}, ${r})`)}return null};function T(e){let r,i,a,o,s,l,c,u,d,h=(0,n.c)(24);if(!e.theme){let n;return h[0]!==e.children?(n=(0,t.jsx)(t.Fragment,{children:e.children}),h[0]=e.children,h[1]=n):n=h[1],n}if(h[2]!==e.theme.accentBackground||h[3]!==e.theme.accentText||h[4]!==e.theme.pageBackgroun
6d||h[5]!==e.theme.primary){let t=E(e.theme.pageBackground),n=E(e.theme.primary),u=E(e.theme.accentBackground),d=E(e.theme.accentText),p=t&&u&&d?[u,d].sort((e,n)=>{let r=(0,C.colorToString)(t,"rgb");return(0,S.compareColors)((0,C.colorToString)(n,"rgb"),r).distance-(0,S.compareColors)((0,C.colorToString)(e,"rgb"),r).distance})[0]:null;c="contents text-primary",r=u?(0,C.colorToString)(u,"rgb"):"var(--leaflet-accent-1)",i=d?(0,C.colorToString)(d,"rgb"):"var(--leaflet-accent-2)",a=p?(0,C.colorToString)(p,"rgb"):"var(--leaflet-accent-contrast)",o=t?(0,C.colorToString)(t,"rgb"):"var(--leaflet-bg-page)",s=t?t.getChannelValue("alpha"):"var(--leaflet-bg-page-alpha)",l=n?(0,C.colorToString)(n,"rgb"):"var(--leaflet-primary)",h[2]=e.theme.accentBackground,h[3]=e.theme.accentText,h[4]=e.theme.pageBackground,h[5]=e.theme.primary,h[6]=r,h[7]=i,h[8]=a,h[9]=o,h[10]=s,h[11]=l,h[12]=c}else r=h[6],i=h[7],a=h[8],o=h[9],s=h[10],l=h[11],c=h[12];h[13]!==r||h[14]!==i||h[15]!==a||h[16]!==o||h[17]!==s||h[18]!==l?(u={"--accent-1":r,"--accent-2":i,"--accent-contrast":a,"--bg-page":o,"--bg-page-alpha":s,"--primary":l},h[13]=r,h[14]=i,h[15]=a,h[16]=o,h[17]=s,h[18]=l,h[19]=u):u=h[19];let p=u;return h[20]!==e.children||h[21]!==c||h[22]!==p?(d=(0,t.jsx)("div",{className:c,style:p,children:e.children}),h[20]=e.children,h[21]=c,h[22]=p,h[23]=d):d=h[23],d}function I(e){let r,i,a,o,c,u,d,p=(0,n.c)(24),m=(0,h.usePostFrame)(),f=m.openPages.some(t=>"doc"===t.type&&t.id===e.pageId);p[0]!==e.blocks||p[1]!==e.isCanvas?(r=x(e.blocks,{isCanvas:e.isCanvas,limit:1}),p[0]=e.blocks,p[1]=e.isCanvas,p[2]=r):r=p[2];let[g]=r,y="compact"===(0,k.normalizePageLinkDisplay)(e.display),b=`w-full cursor-pointer 7 pageLinkBlockWrapper relative group/pageLinkBlock 8 bg-bg-page shadow-sm 9 flex overflow-clip 10 block-border 11 ${f&&"!border-tertiary"} 12 ${e.className} 13 `;p[3]!==m||p[4]!==e.pageId||p[5]!==e.parentPageId?(i=t=>{t.isDefaultPrevented()||t.shiftKey||(t.preventDefault(),t.stopPropagation(),m.openPage(e.parentPageId?{type:"doc",id:e.parentPageId}:void 0,{type:"doc",id:e.pageId}))},p[3]=m,p[4]=e.pageId,p[5]=e.parentPageId,p[6]=i):i=p[6];let v=`?page=${e.pageId}`,w=g?.plaintext||"Open page";return p[7]!==w?(a=(0,t.jsx)("span",{className:"sr-only",children:w}),p[7]=w,p[8]=a):a=p[8],p[9]!==v||p[10]!==a?(o=(0,t.jsx)("a",{href:v,className:"absolute inset-0",children:a}),p[9]=v,p[10]=a,p[11]=o):o=p[11],p[12]!==y||p[13]!==e||p[14]!==g?(c=y?(0,t.jsx)(D,{titleBlock:g,pageId:e.pageId,parentPageId:e.parentPageId}):e.isCanvas?(0,t.jsx)(l.CanvasLinkPreview,{children:(0,t.jsx)(s.CanvasBlocks,{blocks:e.blocks,background:e.canvasBackground,pattern:e.canvasPattern,did:e.did,pageId:e.pageId,bskyPostData:e.bskyPostData,standardSitePostData:e.standardSitePostData,pages:e.pages||[],pollData:[],preview:!0})}):(0,t.jsx)(N,{...e,blocks:e.blocks}),p[12]=y,p[13]=e,p[14]=g,p[15]=c):c=p[15],p[16]!==b||p[17]!==i||p[18]!==o||p[19]!==c?(u=(0,t.jsxs)("div",{className:b,onClick:i,children:[o,c]}),p[16]=b,p[17]=i,p[18]=o,p[19]=c,p[20]=u):u=p[20],p[21]!==e.theme||p[22]!==u?(d=(0,t.jsx)(T,{theme:e.theme,children:u}),p[21]=e.theme,p[22]=u,p[23]=d):d=p[23],d}function D(e){let r,i,a,o,s=(0,n.c)(11),{titleBlock:l}=e;return s[0]!==l?(r=c.PubLeafletBlocksHeader.isMain(l),s[0]=l,s[1]=r):r=s[1],s[2]!==l?(i=l&&(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:(0,t.jsx)(u.TextBlock,{facets:l.facets,plaintext:l.plaintext,index:[],preview:!0})}),s[2]=l,s[3]=i):i=s[3],s[4]!==e.pageId||s[5]!==e.parentPageId?(a=(0,t.jsx)(_,{pageId:e.pageId,parentPageId:e.parentPageId,inline:!0}),s[4]=e.pageId,s[5]=e.parentPageId,s[6]=a):a=s[6],s[7]!==r||s[8]!==i||s[9]!==a?(o=(0,t.jsx)(m.CompactPageLink,{isHeading:r,title:i,trailing:a}),s[7]=r,s[8]=i,s[9]=a,s[10]=o):o=s[10],o}function N(e){let r,i,a,o,s,l,c,d,h,p,m=(0,n.c)(26);m[0]!==e.blocks?(r=x(e.blocks,{limit:3}),m[0]=e.blocks,m[1]=r):r=m[1];let[f,g,y]=r;return m[2]===Symbol.for("react.memo_cache_sentinel")?(i={"--list-marker-width":"20px"},m[2]=i):i=m[2],m[3]!==f?(a=f&&(0,t.jsx)("div",{className:`pageBlockOne whitespace-pre-wrap outline-none resize-none align-top gap-2 ${"pub.leaflet.blocks.header"===f.$type?"font-bold":""}`,children:(0,t.jsx)(u.TextBlock,{facets:f.facets,plaintext:f.plaintext,index:[],preview:!0})}),m[3]=f,m[4]=a):a=m[4],m[5]!==g?(o=g&&(0,t.jsx)("div",{className:`pageBlockLineTwo whitespace-pre-wrap outline-none resize-none align-top gap-2 ${"pub.leaflet.blocks.header"===g.$type?"font-bold":""}`,children:(0,t.jsx)(u.TextBlock,{facets:g.facets,plaintext:g.plaintext,index:[],preview:!0})}),m[5]=g,m[6]=o):o=m[6],m[7]!==y?(s=y&&(0,t.jsx)("div",{className:`pageBlockLineThree whitespace-pre-wrap outline-none resize-none align-top gap-2 ${"pub.leaflet.blocks.header"===y.$type?"font-bold":""}`,children:(0,t.jsx)(u.TextBlock,{facets:y.facets,plaintext:y.plaintext,index:[],preview:!0})}),m[7]=y,m[8]=s):s=m[8],m[9]!==a||m[10]!==o||m[11]!==s?(l=(0,t.jsxs)("div",{className:"grow",children:[a,o,s]}),m[9]=a,m[10]=o,m[11]=s,m[12]=l):l=m[12],m[13]!==e.pageId||m[14]!==e.parentPageId?(c=(0,t.jsx)(_,{pageId:e.pageId,parentPageId:e.parentPageId}),m[13]=e.pageId,m[14]=e.parentPageId,m[15]=c):c=m[15],m[16]!==l||m[17]!==c?(d=(0,t.jsxs)("div",{className:"my-2 ml-3 grow min-w-0 text-sm bg-transparent overflow-clip flex flex-col ",children:[l,c]}),m[16]=l,m[17]=c,m[18]=d):d=m[18],m[19]!==e.blocks||m[20]!==e.did||m[21]!==e.preview?(h=!e.preview&&(0,t.jsx)(A,{blocks:e.blocks,did:e.did}),m[19]=e.blocks,m[20]=e.did,m[21]=e.preview,m[22]=h):h=m[22],m[23]!==d||m[24]!==h?(p=(0,t.jsx)("div",{style:i,className:` 14 w-full h-[104px] 15 `,children:(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"pageLinkBlockContent w-full flex overflow-clip cursor-pointer h-full",children:[d,h]})})}),m[23]=d,m[24]=h,m[25]=p):p=m[25],p}function A(e){let s,l,c,u,d,h,p,m,f,g=(0,n.c)(16),y=(0,i.useRef)(null);(0,r.useReplicache)();let b="var(--page-width-unitless)",v=(0,a.useCardBorderHidden)(),x=`pageLinkBlockPreview w-[120px] overflow-clip mx-3 mt-3 -mb-2 border rounded-md shrink-0 border-border-light flex flex-col gap-0.5 rotate-[4deg] origin-center ${v?"":"bg-bg-page"}`;return g[0]===Symbol.for("react.memo_cache_sentinel")?(s={width:`calc(1px * ${b})`,height:"calc(100vh - 64px)",transform:`scale(calc((120 / ${b} )))`,backgroundColor:"rgba(var(--bg-page), var(--bg-page-alpha))"},g[0]=s):s=g[0],g[1]!==v?(l=!v&&(0,t.jsx)("div",{className:`pageLinkBlockBackgroun
15d 16 absolute top-0 left-0 right-0 bottom-0 17 pointer-events-none 18 `}),g[1]=v,g[2]=l):l=g[2],g[3]===Symbol.for("react.memo_cache_sentinel")?(c=[],u=[],g[3]=c,g[4]=u):(c=g[3],u=g[4]),g[5]===Symbol.for("react.memo_cache_sentinel")?(d=[],h=[],g[5]=d,g[6]=h):(d=g[5],h=g[6]),g[7]!==e.blocks||g[8]!==e.did?(p=(0,t.jsx)(o.PostContent,{pollData:c,pages:u,did:e.did,blocks:e.blocks,preview:!0,bskyPostData:d,standardSitePostData:h}),g[7]=e.blocks,g[8]=e.did,g[9]=p):p=g[9],g[10]!==l||g[11]!==p?(m=(0,t.jsxs)("div",{className:"absolute top-0 left-0 origin-top-left pointer-events-none ",style:s,children:[l,p]}),g[10]=l,g[11]=p,g[12]=m):m=g[12],g[13]!==x||g[14]!==m?(f=(0,t.jsx)("div",{ref:y,className:x,children:m}),g[13]=x,g[14]=m,g[15]=f):f=g[15],f}e.s(["PublishedPageThemeProvider",0,T],67722);let _=e=>{let r,i,a,o,s,l=(0,n.c)(12),{commentsCountByPage:c,mentions:u}=(0,d.useDocument)(),m=(0,h.usePostFrame)(),f=c[e.pageId]??0,g=u.filter(t=>t.link.includes(e.pageId)).length;if(g+f===0)return null;let y=`flex gap-2 text-tertiary text-sm ${e.inline?"relative shrink-0":"absolute bottom-2 bg-bg-page"}`;l[0]!==m||l[1]!==e.pageId||l[2]!==e.parentPageId?(r=t=>{t.preventDefault(),t.stopPropagation(),m.openPage(e.parentPageId?{type:"doc",id:e.parentPageId}:void 0,{type:"doc",id:e.pageId}),m.openDiscussion("comments",e.pageId)},l[0]=m,l[1]=e.pageId,l[2]=e.parentPageId,l[3]=r):r=l[3],l[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("span",{className:"sr-only",children:"Page discussions"}),a=(0,t.jsx)(p.CommentTiny,{"aria-hidden":!0}),l[4]=i,l[5]=a):(i=l[4],a=l[5]);let b=f+g;return l[6]!==r||l[7]!==b?(o=(0,t.jsxs)("button",{className:"flex gap-1 items-center",onClick:r,children:[i,a," ",b," "]}),l[6]=r,l[7]=b,l[8]=o):o=l[8],l[9]!==y||l[10]!==o?(s=(0,t.jsx)("div",{className:y,children:o}),l[9]=y,l[10]=o,l[11]=s):s=l[11],s}},861808,607268,273318,945546,991966,e=>{"use strict";var t,n,r=e.i(843476),i=e.i(500932),a=e.i(716400);e.s(["StaticMathBlock",0,e=>{let t,n,o=(0,i.c)(4),{block:s}=e;o[0]!==s.tex?(t=a.default.renderToString(s.tex,{displayMode:!0,output:"html",throwOnError:!1}),o[0]=s.tex,o[1]=t):t=o[1];let l=t;return o[2]!==l?(n=(0,r.jsx)("div",{className:"math-block my-2",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:l}})}),o[2]=l,o[3]=n):n=o[3],n}],861808);var o=e.i(271645);let{PI:s}=Math,l=s+1e-4,c=.5,u=[1,1];function d(e,t,n,r=e=>e){return e*r(.5-t*(.5-n))}let{min:h}=Math;function p(e,t,n){let r=h(1,t/n);return h(1,e+(h(1,1-r)-e)*(.275*r))}function m(e,t){return[e[0]+t[0],e[1]+t[1]]}function f(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function g(e,t){return[e[0]-t[0],e[1]-t[1]]}function y(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function b(e,t){return[e[0]*t,e[1]*t]}function v(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function x(e){return[e[1],-e[0]]}function k(e,t){let n=t[0];return e[0]=t[1],e[1]=-n,e}function w(e,t){return e[0]*t[0]+e[1]*t[1]}function C(e,t){let n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function S(e){var t;return t=Math.hypot(e[0],e[1]),[e[0]/t,e[1]/t]}function E(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=e[0]-t[0],o=e[1]-t[1];return[a*i-o*r+t[0],a*r+o*i+t[1]]}function T(e,t,n,r){let i=Math.sin(r),a=Math.cos(r),o=t[0]-n[0],s=t[1]-n[1];return e[0]=o*a-s*i+n[0],e[1]=o*i+s*a+n[1],e}function I(e,t,n){return m(e,b(g(t,e),n))}let D=[0,0],N=[0,0],A=[0,0];function _(e,t,n){return!1===e||void 0===e?0:!0===e?Math.max(t,n):e}let P=[0,0];function M(e){return null!=e&&e>=0}function R(e,t={}){let{streamline:n=.5,size:r=16,last:i=!1}=t;if(0===e.length)return[];let a=.15+(1-n)*.85,o=Array.isArray(e[0])?e:e.map(({x:e,y:t,pressure:n=c})=>[e,t,n]);if(2===o.length){let e=o[1];o=o.slice(0,-1);for(let t=1;t<5;t++)o.push(I(o[0],e,t/4))}1===o.length&&(o=[...o,[...m(o[0],u),...o[0].slice(2)]]);let s=[{point:[o[0][0],o[0][1]],pressure:M(o[0][2])?o[0][2]:.25,vector:[...u],distance:0,runningLength:0}],l=!1,d=0,h=s[0],p=o.length-1;for(let e=1;e<o.length;e++){var f,g;let t=i&&e===p?[o[e][0],o[e][1]]:I(h.point,o[e],a);if(f=h.point,f[0]===t[0]&&f[1]===t[1])continue;let n=(g=h.point,Math.hypot(t[1]-g[1],t[0]-g[0]));
18if(d+=n,e<p&&!l){if(d<r)continue;l=!0}y(P,h.point,t),h={point:t,pressure:M(o[e][2])?o[e][2]:c,vector:S(P),distance:n,runningLength:d},s.push(h)}return s[0].vector=s[1]?.vector||[0,0],s}let L={primary:"rgb(var(--primary))",accent:"rgb(var(--accent-1))",tertiary:"color-mix(in oklab, rgb(var(--primary)), rgb(var(--bg-page)) 55%)"};function j(e){return/^#[0-9a-f]{3,8}$/i.test(e)?e:Object.hasOwn(L,e)?L[e]:"currentColor"}function O(e,t){let n=t/4,r=[];if(e.length<3)return r;r.push([e[0],e[1],e[2]]);let i=0;for(let t=3;t+2<e.length;t+=3){let a=e[t-3],o=e[t-2],s=e[t-1],l=e[t],c=e[t+1],u=e[t+2],d=Math.hypot(l-a,c-o),h=n-i;for(;h<=d;h+=n){let e=h/d;r.push([a+(l-a)*e,o+(c-o)*e,s+(u-s)*e])}i=d-(h-n)}let a=e.length,o=[e[a-3],e[a-2],e[a-1]],s=r[r.length-1];(s[0]!==o[0]||s[1]!==o[1])&&r.push(o);let l=[0];for(let e of r)l.push(l[l.length-1]+e[2]);return r.map(([e,t],n)=>{let i=Math.max(0,n-8),a=Math.min(r.length,n+8+1);return[e,t,(l[a]-l[i])/(a-i)/1e3]})}function B(e,t,n){if(e.length<3)return e;let r=new Uint8Array(e.length);r[0]=r[e.length-1]=1;let i=[[0,e.length-1]];for(;i.length;){let[a,o]=i.pop(),[s,l,c]=e[a],[u,d,h]=e[o],p=1,m=-1;for(let r=a+1;r<o;r++){let[i,a,o]=e[r],{t:f,distance:g}=G({x:i,y:a},{x:s,y:l},{x:u,y:d}),y=Math.max(g/t,Math.abs(o-(c+f*(h-c)))/n);y>p&&(p=y,m=r)}m<0||(r[m]=1,i.push([a,m],[m,o]))}return e.filter((e,t)=>r[t])}function F(e,t){return[O(e.points,e.size),{size:e.size,thinning:.6,smoothing:.5,streamline:.5,simulatePressure:!!e.simulatePressure,last:t}]}function H(e,t=!0){return function(e){let t=e.length;if(t<4)return"";let n=(e,t)=>((e+t)/2).toFixed(2),[r,i,a]=e,o=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${i[0].toFixed(2)},${i[1].toFixed(2)} ${n(i[0],a[0])},${n(i[1],a[1])} T`;for(let r=2;r<t-1;r++)o+=`${n(e[r][0],e[r+1][0])},${n(e[r][1],e[r+1][1])} `;return o+"Z"}(function(e,t={}){return function(e,t={}){var n,r;let{size:i=16,smoothing:a=.5,thinning:o=.5,simulatePressure:s=!0,easing:c=e=>e,start:u={},end:h={},last:I=!1}=t,{cap:P=!0,easing:M=e=>e*(2-e)}=u,{cap:R=!0,easing:L=e=>--e*e*e+1}=h;if(0===e.length||i<=0)return[];let j=e[e.length-1].runningLength,O=_(u.taper,i,j),B=_(h.taper,i,j),F=(i*a)**2,H=[],U=[],z=e.slice(0,10).reduce((e,t)=>{let n=t.pressure;return s&&(n=p(e,t.distance,i)),(e+n)/2},e[0].pressure),$=d(i,o,e[e.length-1].pressure,c),V,q=e[0].vector,G=e[0].point,W=G,K=G,Y=W,Z=!1;for(let t=0;t<e.length;t++){let{pressure:n}=e[t],{point:r,vector:a,distance:u,runningLength:h}=e[t],b=t===e.length-1;if(!b&&j-h<3)continue;o?(s&&(n=p(z,u,i)),$=d(i,o,n,c)):$=i/2,void 0===V&&(V=$),$=Math.max(.01,$*Math.min(h<O?M(h/O):1,j-h<B?L((j-h)/B):1));let x=(b?e[t]:e[t+1]).vector,S=b?1:w(a,x),E=0>w(a,q)&&!Z,I=null!==S&&S<0;if(E||I){k(D,q),v(D,D,$);for(let e=0;e<=1;e+=.07692307692307693)y(N,r,D),T(N,N,r,l*e),K=[N[0],N[1]],H.push(K),f(A,r,D),T(A,A,r,-(l*e)),Y=[A[0],A[1]],U.push(Y);G=K,W=Y,I&&(Z=!0);continue}if(Z=!1,b){k(D,a),v(D,D,$),H.push(g(r,D)),U.push(m(r,D));continue}(function(e,t,n,r){let i=n[0]-t[0],a=n[1]-t[1];e[0]=t[0]+i*r,e[1]=t[1]+a*r})(D,x,a,S),k(D,D),v(D,D,$),y(N,r,D),K=[N[0],N[1]],(t<=1||C(G,K)>F)&&(H.push(K),G=K),f(A,r,D),Y=[A[0],A[1]],(t<=1||C(W,Y)>F)&&(U.push(Y),W=Y),z=n,q=a}let X=[e[0].point[0],e[0].point[1]],Q=e.length>1?[e[e.length-1].point[0],e[e.length-1].point[1]]:m(e[0].point,[1,1]),J=[],ee=[];if(1===e.length){if(!(O||B)||I)return function(e,t){var n;let r=(n=S(x(g(e,m(e,[1,1])))),m(e,b(n,-t))),i=[],a=1/13;for(let t=a;t<=1;t+=a)i.push(E(r,e,2*l*t));return i}(X,V||$)}else{let t,i,a;O||B&&1===e.length||(P?J.push(...function(e,t){let n=[],r=1/13;for(let i=r;i<=1;i+=r)n.push(E(t,e,l*i));return n}(X,U[0])):J.push(...(i=b(t=g(H[0],U[0]),.5),a=b(t,.51),[g(X,i),g(X,a),m(X,a),m(X,i)])));let o=x([-(n=e[e.length-1].vector)[0],-n[1]]);B||O&&1===e.length?ee.push(Q):R?ee.push(...function(e,t,n){let r=[],i=m(e,b(t,n)),a=1/29;for(let t=a;t<1;t+=a)r.push(E(i,e,3*l*t));return r}(Q,o,$)):ee.push(m(Q,b(o,r=$)),m(Q,b(o,.99*r)),g(Q,b(o,.99*r)),g(Q,b(o,r)))}return H.concat(ee,U.reverse(),J)}(R(e,t),t)}(...F(e,t)))}function U(e){let t=e.points;if(t.length<3)return null;let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let e=0;e+2<t.length;e+=3)n=Math.min(n,t[e]),i=Math.max(i,t[e]),r=Math.min(r,t[e+1]),a=Math.max(a,t[e+1]);let o=Math.ceil(e.size/2)+1;return{x:Math.floor(n-o),y:Math.floor(r-o),width:Math.ceil(i-n+2*o),height:Math.ceil(a-r+2*o)}}function z(e){return(e.width-24)/e.viewBox.width}function $(e,t){let n=t*Math.PI/180,r=Math.cos(n),i=Math.sin(n);return{x:e.x*r-e.y*i,y:e.x*i+e.y*r}}function V(e){let{x:t,y:n,width:r,height:i}=e.viewBox,a=z(e);return{s:a,view:{x:t+r/2,y:n+i/2},frame:{x:e.position.x+e.width/2,y:e.position.y+12+a*i/2}}}function q(e,t){let{s:n,view:r,frame:i}
18=V(e),a=$({x:n*(t.x-r.x),y:n*(t.y-r.y)},e.rotation);return{x:i.x+a.x,y:i.y+a.y}}function G(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i,o=0===a?0:Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/a));return{t:o,distance:Math.hypot(e.x-(t.x+o*r),e.y-(t.y+o*i))}}function W(e){let t=0;for(let n=0;n+1<e.length;n+=2){let r=(n+2)%e.length;t+=e[n]*e[r+1]-e[r]*e[n+1]}return Math.abs(t)/2}function K(e){let t=e.points,n="";for(let e=0;e+1<t.length;e+=2)n+=`${0===e?"M":"L"}${t[e]},${t[e+1]}`;return n&&n+"Z"}function Y(e){return(0,r.jsx)(X,{stroke:e.stroke},e.id)}function Z(e){return(0,r.jsx)("path",{d:K(e.fill),fill:j(e.fill.color)},`fill-${e.id}`)}e.s(["DRAWING_PADDING",0,12,"INK_COLORS",0,[{value:"primary",label:"Primary"},{value:"accent",label:"Accent"},{value:"tertiary",label:"Tertiary"}],"INK_PRESSURE_SCALE",0,1e3,"INK_SIZES",0,[2,4,8],"INK_UNITS_PER_PX",0,4,"canvasToDrawing",0,function(e,t){let{s:n,view:r,frame:i}=V(e),a=$({x:t.x-i.x,y:t.y-i.y},-e.rotation);return{x:r.x+a.x/n,y:r.y+a.y/n}},"drawingFills",0,function(e){return e.flatMap(e=>e.stroke.fill?[{id:e.id,fill:e.stroke.fill}]:[]).sort((e,t)=>W(t.fill.points)-W(e.fill.points))},"drawingScale",0,z,"frameTopRight",0,function(e){let{x:t,y:n,width:r}=e.viewBox,i=12/z(e);return q(e,{x:t+r+i,y:n-i})},"inkColor",0,j,"inkFillPath",0,K,"inkSamples",0,O,"inkStrokePath",0,H,"loopAt",0,function(e,t){let n=null;for(let r of e){let e=U(r.stroke);if(!e||t.x<e.x||t.y<e.y||t.x>e.x+e.width||t.y>e.y+e.height)continue;let i=r.stroke.fill?[...r.stroke.fill.points]:function(e){let t=B(R(...F(e,!0)).map(e=>[e.point[0],e.point[1],0]),.1*e.size,1).map(([e,t])=>({x:e,y:t}));if(t.length<3)return null;let n=[0];for(let e=1;e<t.length;e++)n.push(n[e-1]+Math.hypot(t[e].x-t[e-1].x,t[e].y-t[e-1].y));let r=U(e),i=e.size+.1*Math.max(r.width,r.height),a=({index:e,t})=>n[e]+t*(n[e+1]-n[e]),o=null,s=(e,t)=>{let n=a(t)-a(e);n>=3*i&&(!o||n>o.span)&&(o={from:e,to:t,span:n})},l=t.length-2;for(let e=0;e<=l;e++){for(let n=e+2;n<=l;n++){let r=function(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,l=i*s-a*o;if(0===l)return null;let c=((n.x-e.x)*s-(n.y-e.y)*o)/l,u=((n.x-e.x)*a-(n.y-e.y)*i)/l;return c<0||c>1||u<0||u>1?null:{t:c,u}}(t[e],t[e+1],t[n],t[n+1]);r&&s({index:e,t:r.t},{index:n,t:r.u})}let n=G(t[0],t[e],t[e+1]);n.distance<=i&&s({index:0,t:0},{index:e,t:n.t});let r=G(t[l+1],t[e],t[e+1]);r.distance<=i&&s({index:e,t:r.t},{index:l,t:1})}if(!o)return null;let{from:c,to:u}=o,d=({index:e,t:n})=>({x:t[e].x+n*(t[e+1].x-t[e].x),y:t[e].y+n*(t[e+1].y-t[e].y)}),h=[d(c),...t.slice(c.index+1,u.index+1),d(u)],p=[];for(let e of h){let t=Math.round(e.x),n=Math.round(e.y),r=p.length;r>=2&&p[r-2]===t&&p[r-1]===n||p.push(t,n)}return p.length<6||0===W(p)?null:p}(r.stroke);if(!i||!function(e,t){let n=0;for(let r=0;r+1<e.length;r+=2){let i=(r+2)%e.length,a=e[r],o=e[r+1],s=e[i],l=e[i+1],c=(s-a)*(t.y-o)-(t.x-a)*(l-o);o<=t.y&&l>t.y&&c>0?n++:o>t.y&&l<=t.y&&c<0&&n--}return 0!==n}(i,t))continue;let a=W(i);(!n||a<n.area)&&(n={stroke:r,loop:i,area:a})}return n},"refitLayout",0,function(e,t){let n={...e,viewBox:t,width:z(e)*t.width+24,position:{x:0,y:0}},r=q(e,t),i=q(n,t);return n.position={x:r.x-i.x,y:r.y-i.y},n},"simplifySamples",0,B,"strokeBounds",0,U,"strokeHit",0,function(e,t,n){let r=e.points,i=n+e.size/2;for(let e=0;e+2<r.length;e+=3){let n={x:r[e],y:r[e+1]},a=e+5<r.length?{x:r[e+3],y:r[e+4]}:n;if(G(t,n,a).distance<=i)return!0}return!1},"unionBounds",0,function(e){let t=e.filter(e=>null!==e);if(!t.length)return null;let n=Math.min(...t.map(e=>e.x)),r=Math.min(...t.map(e=>e.y));return{x:n,y:r,width:Math.max(...t.map(e=>e.x+e.width))-n,height:Math.max(...t.map(e=>e.y+e.height))-r}}],607268);let X=(0,o.memo)(function(e){let t,n,a,o=(0,i.c)(8),s=!e.live;return o[0]!==e.stroke||o[1]!==s?(t=H(e.stroke,s),o[0]=e.stroke,o[1]=s,o[2]=t):t=o[2],o[3]!==e.stroke.color?(n=j(e.stroke.color),o[3]=e.stroke.color,o[4]=n):n=o[4],o[5]!==t||o[6]!==n?(a=(0,r.jsx)("path",{d:t,fill:n}),o[5]=t,o[6]=n,o[7]=a):a=o[7],a});e.s(["InkPath",0,X,"InkSvg",0,function(e){let t,n,a,o,s=(0,i.c)(11),{x:l,y:c,width:u,height:d}=e.viewBox,h=`${l} ${c} ${u} ${d}`,p=`${u} / ${d}`;return s[0]!==p?(t={aspectRatio:p},s[0]=p,s[1]=t):t=s[1],s[2]!==e.fills?(n=e.fills?.map(Z),s[2]=e.fills,s[3]=n):n=s[3],s[4]!==e.strokes?(a=e.strokes.map(Y),s[4]=e.strokes,s[5]=a):a=s[5],s[6]!==h||s[7]!==t||s[8]!==n||s[9]!==a?(o=(0,r.jsxs)("svg",{viewBox:h,overflow:"visible",className:"block w-full h-auto",style:t,children:[n,a]}),s[6]=h,s[7]=t,s[8]=n,s[9]=a,s[10]=o):o=s[10],o}
18],273318),e.s(["ShikiError",0,class extends Error{constructor(e){super(e),this.name="ShikiError"}}],945546);var Q=e.i(247167);function J(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var ee=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,et=class{static hasCaptures(e){return null!==e&&(ee.lastIndex=0,ee.test(e))}static replaceCaptures(e,t,n){return e.replace(ee,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function en(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){var i,a;let n=(i=e[r],i<(a=t[r])?-1:+(i>a));if(0!==n)return n}return 0}return n-r}function er(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ei(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ea=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},eo=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(a.scope)?a.scope:[""];let o=-1;if("string"==typeof a.settings.fontStyle){o=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let s=null;"string"==typeof a.settings.foreground&&er(a.settings.foreground)&&(s=a.settings.foreground);let l=null;"string"==typeof a.settings.background&&er(a.settings.background)&&(l=a.settings.background);for(let t=0,a=i.length;t<a;t++){let a=i[t].trim().split(" "),c=a[a.length-1],u=null;a.length>1&&(u=a.slice(0,a.length-1)).reverse(),n[r++]=new ec(c,u,e,o,s,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,r;let i=(n=e.scope,n<(r=t.scope)?-1:+(n>r));return 0!==i||0!==(i=en(e.parentScopes,t.parentScopes))?i:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let a=new ed(t),o=new el(n,a.getId(r),a.getId(i)),s=new em(new ep(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new eo(a,o,s)}(e,t)}_cachedMatchRoot=new ea(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var n,r;let a=t[i],o=!1;if(">"===a){if(i===t.length-1)return!1;a=t[++i],o=!0}for(;e&&(n=e.scopeName,!((r=a)===n||n.startsWith(r)&&"."===n[r.length]));){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new el(n.fontStyle,n.foreground,n.background):null}},es=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},el=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},ec=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},eu=((t=eu||{})[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t),ed=class{_isFrozen;_lastColorId;
18_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},eh=Object.freeze([]),ep=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||eh,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},em=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){let s,l,c;if(""===n)return void this._doInsertHere(t,r,i,a,o);let u=n.indexOf(".");-1===u?(s=n,l=""):(s=n.substring(0,u),l=n.substring(u+1)),this._children.hasOwnProperty(s)?c=this._children[s]:(c=new e(this._mainRule.clone(),ep.cloneArr(this._rulesWithParentScopes)),this._children[s]=c),c.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(0===en(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ep(e,t,n,r,i))}},ef=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,a,o,s){let l=e.getLanguageId(t),c=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),h=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(c=r),null!==i&&(u=+!!i),-1!==a&&(d=a),0!==o&&(h=o),0!==s&&(p=s),(l|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function eg(e,t){var n;let r,i,a=[],o=(n=e,i=(r=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!i)return null;let e=i[0];return i=r.exec(n),e}}),s=o.next();for(;null!==s;){let e=0;if(2===s.length&&":"===s.charAt(1)){switch(s.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=o.next()}let t=c();if(a.push({matcher:t,priority:e}),","!==s)break;s=o.next()}return a;function l(){if("-"===s){s=o.next();let e=l();return t=>!!e&&!e(t)}if("("===s){s=o.next();let e=function(){let e=[],t=c();for(;t&&(e.push(t),"|"===s||","===s);){do s=o.next();while("|"===s||","===s)t=c()}return t=>e.some(e=>e(t))}();return")"===s&&(s=o.next()),e}if(ey(s)){let e=[];do e.push(s),s=o.next();while(ey(s))return n=>t(e,n)}return null}function c(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function ey(e){return!!e&&!!e.match(/[\w\.:]+/)}var eb=((n=eb||{})[n.None=0]="None",n[n.NotBeginString=1]="NotBeginString",n[n.NotEndString=2]="NotEndString",n[n.NotBeginPosition=4]="NotBeginPosition",n[n.DebugCall=8]="DebugCall",n);function ev(e){"function"==typeof e.dispose&&e.dispose()}var ex=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ek=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ew=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},eC=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ex(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new ew;for(let n of e)!function(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof ex?eE({baseGrammar:a,selfGrammar:i},r):eS(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new ex(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof ex){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};
18function eS(e,t,n){t.repository&&t.repository[e]&&eT([t.repository[e]],t,n)}function eE(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&eT(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&eT(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function eT(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?J({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&eT(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=eP(i);switch(a.kind){case 0:eE({...t,selfGrammar:t.baseGrammar},n);break;case 1:eE(t,n);break;case 2:eS(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let r={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===a.kind?eS(a.ruleName,r,n):eE(r,n)}else 4===a.kind?n.add(new ek(a.scopeName,a.ruleName)):n.add(new ex(a.scopeName))}}}var eI=class{kind=0},eD=class{kind=1},eN=class{constructor(e){this.ruleName=e}kind=2},eA=class{constructor(e){this.scopeName=e}kind=3},e_=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};
18function eP(e){if("$base"===e)return new eI;if("$self"===e)return new eD;let t=e.indexOf("#");return -1===t?new eA(e):0===t?new eN(e.substring(1)):new e_(e.substring(0,t),e.substring(t+1))}var eM=/\\(\d+)/,eR=/\\(\d+)/g;Symbol("RuleId");var eL=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=et.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=et.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?et.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?et.replaceCaptures(this._contentName,e,t):this._contentName}},ej=class extends eL{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},eO=class extends eL{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new ez(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e$,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eB=class extends eL{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e$,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eF=class extends eL{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,l,c){super(e,t,n,r),this._begin=new ez(i,this.id),this.beginCaptures=a,this._end=new ez(o||"ï¿¿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new e$,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},eH=class extends eL{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,l){super(e,t,n,r),this._begin=new ez(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=ne
18w ez(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new e$,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new e$,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"ï¿¿"),this._cachedCompiledWhilePatterns}
18},eU=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ej(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new eO(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=J({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new eB(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new eH(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new eF(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if("$vscodeTextmateLocation"===a)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=eP(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,l=4===t.kind?t.ruleName:null,c=n.getExternalGrammar(a,r);if(c)if(l){let t=c.repository[l];t&&(s=e.getCompiledRuleId(t,n,c.repository))}else s=e.getCompiledRuleId(c.repository.$self,n,c.repository)}}else s=e.getCompiledRuleId(o,n,r);if(-1!==s){let e=n.getRule(s),t=!1;if((e instanceof eB||e instanceof eF||e instanceof eH)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ez=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(r.push(e.substring(n,a)),r.push("$(?!\\n)(?<!\\n)"),n=a+2):("A"===t||"G"===t)&&(i=!0),a++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=eM.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return eR.lastIndex=0,this.source.replace(eR,(e,t)=>ei(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],a=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,a[e]=n,o[e]=n,s[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="ï¿¿",a[e+1]="ï¿¿",o[e+1]="A",s[e+1]="A"):"G"===r?(i[e+1]="ï¿¿",a[e+1]="G",o[e+1]="ï¿¿",s[e+1]="G"):(i[e+1]=r,a[e+1]=r,o[e+1]=r,s[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},e$=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}
18push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new eV(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new eV(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},eV=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},eq=class{constructor(e,t){this.languageId=e,this.tokenType=t}},eG=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new eq(e,8),this._embeddedLanguagesMatcher=new eW(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new eq(0,0);_getBasicScopeAttributes=new ea(e=>new eq(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eW=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>ei(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==Q.default&&Q.default.env.VSCODE_TEXTMATE_DEBUG;var eK=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function eY(e,t,n,r,i,a,o,s){let l=t.content.length,c=!1,u=-1;if(o){let o=function(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof eH&&s.push({rule:n,stack:t})}for(let p=s.pop();p;p=s.pop()){var l,c,u,d,h;let{ruleScanner:s,findOptions:m}=(l=p.rule,c=e,u=p.stack.endRule,d=n,h=r===o,{ruleScanner:l.compileWhileAG(c,u,d,h),findOptions:0}),f=s.findNextMatchSync(t,r,m);if(f){if(-2!==f.ruleId){i=p.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(a.produce(p.stack,f.captureIndices[0].start),eX(e,t,n,p.stack,a,p.rule.whileCaptures,f.captureIndices),a.produce(p.stack,f.captureIndices[0].end),o=f.captureIndices[0].end,f.captureIndices[0].end>r&&(r=f.captureIndices[0].end,n=!1))}else{i=p.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!c;){if(0!==s&&Date.now()-d>s)return new eK(i,!0);!function(){let o=function(e,t,n,r,i,a){let o=function(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=eZ(i.getRule(e),e,i.endRule,n,r===a),l=o.findNextMatchSync(t,r,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,r,i,a),s=e.getInjections();if(0===s.length)return o;let l=function(e,t,n,r,i,a,o){let s,l=Number.MAX_VALUE,c=null,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,h=e.length;a<h;a++){let h=e[a];if(!h.matcher(d))continue;let{ruleScanner:p,findOptions:m}=eZ(t.getRule(h.ruleId),t,null,r,i===o),f=p.findNextMatchSync(n,i,m);if(!f)continue;let g=f.captureIndices[0].start;if(!(g>=l)&&(l=g,c=f.captureIndices,s=f.ruleId,u=h.priority,l===i))break}return c?{priorityMatch:-1===u,captureIndices:c,matchedRuleId:s}:null}(s,e,t,n,r,i,a);if(!l)return o;if(!o)return l;let c=o.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:o}(e,t,n,r,i,u);if(!o){a.produce(i,l),c=!0;return}let s=o.captureIndices,d=o.matchedRuleId,h=!!s&&s.length>0&&s[0].end>r;if(-1===d){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),eX(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!h&&d.getEnterPos()===r){i=d,a.produce(i,l),c=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),f=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===l,null,f,f),o instanceof eF){eX(e,t,n,i,a,o.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let r=o.getContentName(t.content,s),d=f.pushAttributed(r,e);if(i=i.withContentNameScopesList(d),o.endHasBackReferences&&(i=i.withEndRule(o.getEndWithResolvedBackReferences(t.content,s))),!h&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(o instanceof eH){eX(e,t,n,i,a,o.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let r=o.getContentName(t.content,s),d=f.pushAttributed(r,e);if(i=i.withContentNameScopesList(d),o.whileHasBackReferences&&(i=i.withEndRule(o.getWhileWithRes
18olvedBackReferences(t.content,s))),!h&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(eX(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!h){i=i.safePop(),a.produce(i,l),c=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}()}return new eK(i,!1)}function eZ(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function eX(e,t,n,r,i,a,o){if(0===a.length)return;let s=t.content,l=Math.min(a.length,o.length),c=[],u=o[0].end;for(let t=0;t<l;t++){let l=a[t];if(null===l)continue;let d=o[t];if(0===d.length)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,d.start):i.produce(r,d.start),l.retokenizeCapturedWithRuleId){let t=l.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(s,o),u=a.pushAttributed(c,e),h=r.push(l.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));eY(e,p,n&&0===d.start,d.start,h,i,!1,0),ev(p);continue}let h=l.getName(s,o);if(null!==h){let t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,e);c.push(new eQ(t,d.end))}}for(;c.length>0;
18)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eQ=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eJ(e,t,n,r,i){let a=eg(t,e1),o=eU.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function e1(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var e0=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new eG(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=e2(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of eg(e,e1))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)eJ(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&eJ(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=e2(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=eU.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==e3.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),a=ef.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?e4.createRootAndLookUpScopeName(o,a,this):e4.createRoot("unknown",a),t=new e3(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let a=this.createOnigString(e),o=a.content.length,s=new e6(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=eY(this,a,i,0,t,s,!0,r);return ev(a),{lineLength:o,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function e2(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=e(t[r]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let r in t)n[r]=e(t[r]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var e4=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=es.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new es(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new es(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}
18toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),ef.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},e3=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e4.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=e4.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,e4.fromExtension(r,n.contentNameScopesList))}},e5=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):eg(e,e1).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>eg(e,e1).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},e6=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>
180||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=ef.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=ef.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},e7=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,new e0(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},e8=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new e7(eo.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(eo.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new e5(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new eC(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},e9=e3.NULL;e.s(["EncodedTokenMetadata",0,ef,"FontStyle",0,eu,"INITIAL",0,e9,"Registry",0,e8,"Theme",0,eo],991966)},270423,e=>{"use strict";var t=e.i(843476),n=e.i(593302),r=e.i(271645),i=e.i(542271),a=e.i(10231);e.s(["TextBlock",0,function(e){let o=(0,i.useHighlight)(e.index,e.pageId),s=(0,r.useMemo)(()=>{if(e.preview)return e.facets;let t=[...Array.isArray(e.facets)?e.facets:[]];for(let r of o){let i=e.pageId?`${e.pageId}~${e.index.join(".")}_${r.startOffset||0}`:`${e.index.join(".")}_${r.startOffset||0}`;t=function(e,t,n){if(0===e.length)return[t];let r=[...e,t],i=new Set;for(let e of(i.add(0),i.add(n),r))i.add(e.index.byteStart),i.add(e.index.byteEnd);let a=Array.from(i).sort((e,t)=>
18e-t),o=[];for(let e=0;e<a.length-1;e++){let t=a[e],n=a[e+1],i=r.filter(e=>e.index.byteStart<=t&&e.index.byteEnd>t);if(i.length>0){let e=i.flatMap(e=>e.features);o.push({index:{byteStart:t,byteEnd:n},features:e})}}return o}(t,{index:{byteStart:r.startOffset?new n.UnicodeString(e.plaintext.slice(0,r.startOffset)).length:0,byteEnd:new n.UnicodeString(e.plaintext.slice(0,r.endOffset??void 0)).length},features:[{$type:"pub.leaflet.richtext.facet#highlight"},{$type:"pub.leaflet.richtext.facet#id",id:i}]},new n.UnicodeString(e.plaintext).length)}return t},[e.plaintext,e.facets,o,e.preview,e.pageId]);return(0,t.jsx)(a.BaseTextBlock,{...e,facets:s,footnoteIndexMap:e.footnoteIndexMap})}])},612854,e=>{"use strict";e.s(["BskyPostContent",()=>m,"BskyPostMediaContent",()=>g,"CompactBskyPostContent",()=>v,"PostInfo",()=>x]);var t=e.i(843476),n=e.i(500932),r=e.i(521747),i=e.i(145399),a=e.i(88891),o=e.i(46454),s=e.i(794866),l=e.i(253372),c=e.i(687065),u=e.i(645522),d=e.i(794900),h=e.i(732849),p=e.i(902057);function m(e){let a,o,c,d,h,m,g,y,v,k,w,C,S=(0,n.c)(50),{post:E,parent:T,avatarSize:I,showEmbed:D,compactEmbed:N,showBlueskyLink:A,showInteractions:_,quoteEnabled:P,replyEnabled:M,replyOnClick:R,clientHost:L,openThreadOnClick:j}=e,O=void 0===D||D,B=void 0!==N&&N,F=void 0===A||A,H=void 0===_||_,U=(0,s.useOpenThread)(),z=(0,l.useThreadPrefetchHandlers)(E.uri),$=E.record,V=E.uri.split("/")[4],q=`https://${void 0===L?"bsky.app":L}/profile/${E.author.handle}/post/${V}`,G=(void 0===j||j)&&((E.replyCount??0)>0||(E.quoteCount??0)>0);S[0]!==G||S[1]!==U||S[2]!==T||S[3]!==E.uri||S[4]!==z?(a=G&&(0,t.jsx)("button",{className:"absolute inset-0",...z,onClick:()=>{U(T,{type:"thread",uri:E.uri})}}),S[0]=G,S[1]=U,S[2]=T,S[3]=E.uri,S[4]=z,S[5]=a):a=S[5];let W=`flex gap-2 text-left w-full pointer-events-none ${e.className}`,K=E.author.displayName?E.author.displayName:E.author.handle,Y=(void 0===I?"medium":I)||"medium";S[6]!==E.author.avatar||S[7]!==Y||S[8]!==K?(o=(0,t.jsx)("div",{className:"flex flex-col items-start shrink-0 w-fit pointer-events-auto",children:(0,t.jsx)(u.Avatar,{src:E.author.avatar,displayName:K,size:Y})}),S[6]=E.author.avatar,S[7]=Y,S[8]=K,S[9]=o):o=S[9];let Z=`bskyPostContent flex flex-col grow text-left w-full min-w-0 ${"small"===e.avatarSize?"mt-0.5":"large"===e.avatarSize?"mt-2":"mt-1"}`;return S[10]===Symbol.for("react.memo_cache_sentinel")?(c={wordBreak:"break-word"},S[10]=c):c=S[10],S[11]!==E.author.displayName||S[12]!==E.author.handle||S[13]!==$.createdAt?(d=(0,t.jsx)(x,{displayName:E.author.displayName,handle:E.author.handle,createdAt:$.createdAt}),S[11]=E.author.displayName,S[12]=E.author.handle,S[13]=$.createdAt,S[14]=d):d=S[14],S[15]!==e.hasQuote?(h=e.hasQuote&&(0,t.jsx)(p.QuoteContent,{index:e.hasQuote?.index,did:e.hasQuote?.did,position:e.hasQuote?.position}),S[15]=e.hasQuote,S[16]=h):h=S[16],S[17]!==$?(m=(0,t.jsx)("div",{className:"bskyPostTextContent text-secondary mt-0.5",children:(0,t.jsx)(i.BlueskyRichText,{record:$})}),S[17]=$,S[18]=m):m=S[18],S[19]!==B||S[20]!==T||S[21]!==E.embed||S[22]!==O||S[23]!==q?(g=O&&E.embed&&(0,t.jsx)("div",{className:"bskyPostEmbedWrapper pointer-events-auto relative mt-2",onClick:f,children:(0,t.jsx)(r.BlueskyEmbed,{parent:T,embed:E.embed,compact:B,postUrl:q,className:"text-sm"})}),S[19]=B,S[20]=T,S[21]=E.embed,S[22]=O,S[23]=q,S[24]=g):g=S[24],S[25]!==h||S[26]!==m||S[27]!==g?(y=(0,t.jsxs)("div",{className:"bskyPostBody flex flex-col min-w-0 w-full",children:[h,m,g]}),S[25]=h,S[26]=m,S[27]=g,S[28]=y):y=S[28],S[29]!==T||S[30]!==E||S[31]!==P||S[32]!==M||S[33]!==R||S[34]!==F||S[35]!==H||S[36]!==q?(v=(0,t.jsx)(b,{post:E,parent:T,url:q,showBlueskyLink:F,showInteractions:H,quoteEnabled:P,replyEnabled:M,replyOnClick:R}),S[29]=T,S[30]=E,S[31]=P,S[32]=M,S[33]=R,S[34]=F,S[35]=H,S[36]=q,S[37]=v):v=S[37],S[38]!==Z||S[39]!==d||S[40]!==y||S[41]!==v?(k=(0,t.jsxs)("div",{className:Z,style:c,children:[d,y,v]}),S[38]=Z,S[39]=d,S[40]=y,S[41]=v,S[42]=k):k=S[42],S[43]!==o||S[44]!==k||S[45]!==W?(w=(0,t.jsxs)("div",{className:W,children:[o,k]}),S[43]=o,S[44]=k,S[45]=W,S[46]=w):w=S[46],S[47]!==w||S[48]!==a?(C=(0,t.jsxs)("div",{className:"bskyPost relative flex flex-col w-full ",children:[a,w]}),S[47]=w,S[48]=a,S[49]=C):C=S[49],C}function f(e){return e.stopPropagation()}function g(e){let i,a,o,c,u,d=(0,n.c)(23),{post:h,parent:p,clientHost:m,openThreadOnClick:f}=e,g=(0,s.useOpenThread)(),v=(0,l.useThreadPrefetchHandlers)(h.uri),x=h.uri.split("/")[4],k=`https://${void 0===m?"bsky.app":m}/profile/${h.author.handle}/post/${x}`,w=(void 0===f||f)&&((h.replyCount??0)>0||(h.quoteCount??0)>0);d[0]!==w||d[1]!==g||d[2]!==p||d[3]!==h.uri||d[4]!==v?(i=w&&(0,t.jsx)("button",{className:"absolute inset-0",...v,onClick:()=>{g(p,{type:"thread",uri:h.uri})}}),d[0]=w,d[1]=g,d[2]=p,d[3]=h.uri,d[4]=v,d[5]=i):i=d[5];let C=`flex flex-col w-full pointer-events-none ${e.className}`;return d[6]!==p||d[7]!==e.media||d[8]!==k?(a=(0,t.jsx)("div",{className:"bskyPostEmbedWrapper pointer-events-auto relative",onClick:y,children:(0,t.jsx)(r.BlueskyEmbed,{parent:p,embed:e.media,postUrl:k,className:"text-sm"})}),d[6]=p,d[7]=e.media,d[8]=k,d[9]=a):a=d[9],d[10]!==p||d[11]!==h||d[12]!==e.quoteEnabled||d[13]!==e.replyEnabled||d[14]!==k?(o=(0,t.jsx)(b,{post:h,parent:p,url:k,showBlueskyLink:!0,showInteractions:!0,quoteEnabled:e.quoteEnabled,replyEnabled:e.replyEnabled,handle:h.author.handle}),d[10]=p,d[11]=h,d[12]=e.quoteEnabled,d[13]=e.replyEnabled,d[14]=k,d[15]=o):o=d[15],d[16]!==C||d[17]!==a||d[18]!==o?(c=(0,t.jsxs)("div",{className:C,children:[a,o]}),d[16]=C,d[17]=a,d[18]=o,d[19]=c):c=d[19],d[20]!==i||d[21]!==c?(u=(0,t.jsxs)("div",{className:"bskyPost bskyPostMedia relative flex flex-col w-full",children:[i,c]}),d[20]=i,d[21]=c,d[22]=u):u=d[22],u}function y(e){return e.stopPropagation()}function b(e){let r,i,a,o,s,l=(0,n.c)(20),{post:u,showBlueskyLink:d,showInteractions:p}=e,m=(u.quoteCount??0)>0||(u.replyCount??0)>0;return d||p&&m?(l[0]!==u||l[1]!==e.parent||l[2]!==e.quoteEnabled||l[3]!==e.replyEnabled||l[4]!==e.replyOnClick||l[5]!==e.url||l[6]!==d||l[7]!==
18p?(r=p?(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(k,{post:u,parent:e.parent,replyEnabled:e.replyEnabled,replyOnClick:e.replyOnClick,quoteEnabled:e.quoteEnabled,showBlueskyLink:d,url:e.url})}):(0,t.jsx)("div",{}),l[0]=u,l[1]=e.parent,l[2]=e.quoteEnabled,l[3]=e.replyEnabled,l[4]=e.replyOnClick,l[5]=e.url,l[6]=d,l[7]=p,l[8]=r):r=l[8],l[9]!==e.handle?(i=e.handle&&(0,t.jsx)(h.ProfilePopover,{triggerClassName:"min-w-0 max-w-full",trigger:(0,t.jsxs)("div",{className:"text-xs text-tertiary truncate hover:underline",children:["@",e.handle]}),didOrHandle:e.handle}),l[9]=e.handle,l[10]=i):i=l[10],l[11]!==e.url||l[12]!==d?(a=d&&(0,t.jsx)("a",{className:"text-tertiary relative shrink-0 hover:text-accent-contrast",target:"_blank",href:e.url,children:(0,t.jsx)(c.BlueskyLinkTiny,{})}),l[11]=e.url,l[12]=d,l[13]=a):a=l[13],l[14]!==i||l[15]!==a?(o=(0,t.jsxs)("div",{className:"flex gap-3 items-center min-w-0",children:[i,a]}),l[14]=i,l[15]=a,l[16]=o):o=l[16],l[17]!==r||l[18]!==o?(s=(0,t.jsxs)("div",{className:"postCountsAndLink flex gap-2 items-center justify-between pointer-events-auto mt-2",children:[r,o]}),l[17]=r,l[18]=o,l[19]=s):s=l[19],s):null}function v(e){let r,a,o,c,d,h,p,m,f,g,y,b=(0,n.c)(46),{post:v,parent:w,quoteEnabled:C,replyEnabled:S,replyOnClick:E,clientHost:T}=e,I=(0,s.useOpenThread)(),D=(0,l.useThreadPrefetchHandlers)(v.uri),N=v.record,A=v.uri.split("/")[4],_=`https://${void 0===T?"bsky.app":T}/profile/${v.author.handle}/post/${A}`,P=(v.replyCount??0)>0||(v.quoteCount??0)>0;b[0]!==P||b[1]!==I||b[2]!==w||b[3]!==v.uri||b[4]!==D?(r=P&&(0,t.jsx)("button",{className:"absolute inset-0 ",...D,onClick:()=>{I(w,{type:"thread",uri:v.uri})}}),b[0]=P,b[1]=I,b[2]=w,b[3]=v.uri,b[4]=D,b[5]=r):r=b[5];let M=`flex gap-2 text-left w-full ${e.className}`;b[6]!==v.author.avatar||b[7]!==v.author.displayName?(a=(0,t.jsx)(u.Avatar,{src:v.author.avatar,displayName:v.author.displayName,size:"small"}),b[6]=v.author.avatar,b[7]=v.author.displayName,b[8]=a):a=b[8];let R=`bskyPostTextContent flex flex-col grow mt-0.5 text-left text-xs text-tertiary ${P?"":"cursor-default"}`;return b[9]!==P||b[10]!==D?(o=P?D:{},b[9]=P,b[10]=D,b[11]=o):o=b[11],b[12]!==P||b[13]!==I||b[14]!==w||b[15]!==v.uri?(c=P?()=>{I(w,{type:"thread",uri:v.uri})}:void 0,b[12]=P,b[13]=I,b[14]=w,b[15]=v.uri,b[16]=c):c=b[16],b[17]!==v.author.displayName||b[18]!==v.author.handle||b[19]!==N.createdAt?(d=(0,t.jsx)(x,{displayName:v.author.displayName,handle:v.author.handle,createdAt:N.createdAt,compact:!0}),b[17]=v.author.displayName,b[18]=v.author.handle,b[19]=N.createdAt,b[20]=d):d=b[20],b[21]!==N?(h=(0,t.jsx)("div",{className:"postContent flex flex-col gap-2 mt-0.5",children:(0,t.jsx)("div",{className:"line-clamp-3 text-tertiary text-xs",children:(0,t.jsx)(i.BlueskyRichText,{record:N})})}),b[21]=N,b[22]=h):h=b[22],b[23]!==R||b[24]!==o||b[25]!==c||b[26]!==d||b[27]!==h?(p=(0,t.jsxs)("button",{className:R,...o,onClick:c,children:[d,h]}),b[23]=R,b[24]=o,b[25]=c,b[26]=d,b[27]=h,b[28]=p):p=b[28],b[29]!==w||b[30]!==v||b[31]!==C||b[32]!==S||b[33]!==E||b[34]!==_?(m=v.quoteCount&&v.quoteCount>0||v.replyCount&&v.replyCount>0?(0,t.jsx)("div",{className:"postCountsAndLink flex gap-2 items-center justify-between mt-2",children:(0,t.jsx)(k,{post:v,parent:w,replyEnabled:S,replyOnClick:E,quoteEnabled:C,showBlueskyLink:!1,url:_})}):null,b[29]=w,b[30]=v,b[31]=C,b[32]=S,b[33]=E,b[34]=_,b[35]=m):m=b[35],b[36]!==m||b[37]!==p?(f=(0,t.jsxs)("div",{className:"flex flex-col min-w-0 w-full",children:[p,m]}),b[36]=m,b[37]=p,b[38]=f):f=b[38],b[39]!==f||b[40]!==M||b[41]!==a?(g=(0,t.jsxs)("div",{className:M,children:[a,f]}),b[39]=f,b[40]=M,b[41]=a,b[42]=g):g=b[42],b[43]!==r||b[44]!==g?(y=(0,t.jsxs)("div",{className:"bskyPost relative flex flex-col w-full",children:[r,g]}),b[43]=r,b[44]=g,b[45]=y):y=b[45],y}function x(e){let r,i,a,o,s,l,c,u,p=(0,n.c)(21),{displayName:m,handle:f,createdAt:g,compact:y}=e,b=void 0!==y&&y,v=m||f;p[0]!==v?(r=(0,t.jsx)("div",{className:"font-bold text-secondary truncate min-w-0",children:v}),p[0]=v,p[1]=r):r=p[1],p[2]!==b||p[3]!==m||p[4]!==f?(i=m&&(0,t.jsxs)("div",{className:`truncate min-w-0 shrink pointer-events-auto ${b?"text-xs":"text-sm"} text-tertiary hover:underline`,children:["@",f]}),p[2]=b,p[3]=m,p[4]=f,p[5]=i):i=p[5],p[6]!==r||p[7]!==i?(a=(0,t.jsxs)("div",{className:"flex gap-2 items-baseline min-w-0
18w-full",children:[r,i]}),p[6]=r,p[7]=i,p[8]=a):a=p[8],p[9]!==f||p[10]!==a?(o=(0,t.jsx)(h.ProfilePopover,{trigger:a,didOrHandle:f}),p[9]=f,p[10]=a,p[11]=o):o=p[11],p[12]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-border shrink-0"}),p[12]=s):s=p[12];let x=`${b?"text-xs":"text-sm"} text-tertiary shrink-0`;return p[13]!==g?(l=(0,d.timeAgo)(g,{compact:!0}),p[13]=g,p[14]=l):l=p[14],p[15]!==x||p[16]!==l?(c=(0,t.jsx)("div",{className:x,children:l}),p[15]=x,p[16]=l,p[17]=c):c=p[17],p[18]!==o||p[19]!==c?(u=(0,t.jsxs)("div",{className:"postInfo flex items-center gap-2 leading-tight w-full",children:[o,s,c]}),p[18]=o,p[19]=c,p[20]=u):u=p[20],u}function k(e){let r,i,s,c,u,d=(0,n.c)(18);d[0]!==e.post.replyCount?(r=null!=e.post.replyCount&&e.post.replyCount>0&&(0,t.jsxs)("div",{className:"postRepliesCount flex items-center gap-1 text-xs",children:[(0,t.jsx)(a.CommentTiny,{}),e.post.replyCount]}),d[0]=e.post.replyCount,d[1]=r):r=d[1];let h=r;d[2]!==e.post.quoteCount?(i=null!=e.post.quoteCount&&e.post.quoteCount>0&&(0,t.jsxs)("div",{className:"postQuoteCount flex items-center gap-1 text-xs",children:[(0,t.jsx)(o.QuoteTiny,{}),e.post.quoteCount]}),d[2]=e.post.quoteCount,d[3]=i):i=d[3];let p=i;return d[4]!==e.parent||d[5]!==e.post.uri||d[6]!==e.replyEnabled||d[7]!==e.replyOnClick||d[8]!==h?(s=h&&(e.replyEnabled?(0,t.jsx)(l.ThreadLink,{postUri:e.post.uri,parent:e.parent,className:"relative postRepliesLink hover:text-accent-contrast",onClick:e.replyOnClick,children:h}):h),d[4]=e.parent,d[5]=e.post.uri,d[6]=e.replyEnabled,d[7]=e.replyOnClick,d[8]=h,d[9]=s):s=d[9],d[10]!==e.parent||d[11]!==e.post.uri||d[12]!==e.quoteEnabled||d[13]!==p?(c=p&&(e.quoteEnabled?(0,t.jsx)(l.QuotesLink,{postUri:e.post.uri,parent:e.parent,className:"relative hover:text-accent-contrast",children:p}):p),d[10]=e.parent,d[11]=e.post.uri,d[12]=e.quoteEnabled,d[13]=p,d[14]=c):c=d[14],d[15]!==s||d[16]!==c?(u=(0,t.jsxs)("div",{className:"postCounts flex gap-2 items-center w-full text-tertiary mb-1",children:[s,c]}),d[15]=s,d[16]=c,d[17]=u):u=d[17],u}},980205,e=>{"use strict";e.s(["CanvasBlocks",()=>p]);var t=e.i(843476),n=e.i(271645),r=e.i(500932);e.i(859041);var i=e.i(974049),a=e.i(680396),o=e.i(929495),s=e.i(637777),l=e.i(216926),c=e.i(523995),u=e.i(213250),d=e.i(124670),h=e.i(685372);function p(e){let n,i,a,s,l,d,h,p,g=(0,r.c)(32);g[0]!==e?({blocks:i,size:l,background:n,pattern:a,contentWidth:d,...s}=e,g[0]=e,g[1]=n,g[2]=i,g[3]=a,g[4]=s,g[5]=l,g[6]=d):(n=g[1],i=g[2],a=g[3],s=g[4],l=g[5],d=g[6]);let y=void 0===d?c.CONTENT_WIDTH:d;g[7]!==i||g[8]!==y||g[9]!==l?(h=l??{width:y,height:(0,o.canvasContentHeight)(i)},g[7]=i,g[8]=y,g[9]=l,g[10]=h):h=g[10];let{width:b,height:v}=h;if(g[11]!==n||g[12]!==i||g[13]!==b||g[14]!==v||g[15]!==a||g[16]!==s||g[17]!==l){let e,r,c,d=[...i].sort(o.canvasBlockOrder),h=(0,o.canvasStackOrders)(d),y=l?v:"100%";g[19]!==b||g[20]!==v||g[21]!==y?(e={width:b,minHeight:v,height:y,contain:"size layout paint"},g[19]=b,g[20]=v,g[21]=y,g[22]=e):e=g[22];let x=l?"plain":"grid";g[23]!==n||g[24]!==a||g[25]!==s.did||g[26]!==x?(r=(0,t.jsx)(f,{did:s.did,background:n,pattern:a,defaultPattern:x}),g[23]=n,g[24]=a,g[25]=s.did,g[26]=x,g[27]=r):r=g[27],g[28]!==b||g[29]!==s||g[30]!==h?(c=(e,n)=>{let{x:r,y:i,width:a,rotation:o}=e;return(0,t.jsx)("div",{className:"absolute rounded-lg flex items-stretch origin-center p-3",style:{top:0,left:0,width:a,zIndex:h[n],transform:`translate(${(0,u.visibleCanvasX)(r,b)}px, ${i}px)${o?` rotate(${o}deg)`:""}`},children:(0,t.jsx)(m,{...s,canvasBlock:e,index:n,canvasWidth:s.preview?void 0:a})},n)},g[28]=b,g[29]=s,g[30]=h,g[31]=c):c=g[31],p=(0,t.jsxs)("div",{style:e,className:"relative",children:[r,d.map(c)]}),g[11]=n,g[12]=i,g[13]=b,g[14]=v,g[15]=a,g[16]=s,g[17]=l,g[18]=p}else p=g[18];return p}function m(e){let o,s,c,u,d,p,m,f=(0,r.c)(15);f[0]!==e?({canvasBlock:o,index:s,...c}=e,f[0]=e,f[1]=o,f[2]=s,f[3]=c):(o=f[1],s=f[2],c=f[3]),f[4]!==o.block?(u=i.PubLeafletPagesLinearDocument.isMain(o.block),f[4]=o.block,f[5]=u):u=f[5];let g=u;if(f[6]!==o||f[7]!==s||f[8]!==g||f[9]!==c){let e=(0,a.canvasBlockBlocks)(o,s);d=`${g?"flow-root w-full":"contents"} ${l.canvasBlockEdges}`,p=e.map((t,r)=>(0,n.createElement)(h.Block,{...c,key:r,block:t.block,index:t.index,previousBlock:e[r-1]?.block,nextBlock:e[r+1]?.block,isFirst:g&&0===r,isLast:g&&r===e.length-1})),f[6]=o,f[7]=s,f[8]=g,f[9]=c,f[10]=d,f[11]=p}else d=f[10],p=f[11];return f[12]!==d||f[13]!==p?(m=(0,t.jsx)("div",{className:d,children:p}),f[12]=d,f[13]=p,f[14]=m):m=f[14],m}let f=e=>{let n,i,a,o,l,c=(0,r.c)(12),{background:u}=e;c[0]===Symbol.for("react.memo_cache_sentinel")?(n=["grid","dot","plain"],c[0]=n):n=c[0],c[1]!==e.pattern?(i=n.find(t=>t===e.pattern),c[1]=e.pattern,c[2]=i):i=c[2];let h=i,p=u&&(0,d.blobRefToSrc)(u.image.ref,e.did),m=p?`url(${p})`:void 0,f=u?.width||500,g=p&&u?.opacity!==void 0?u.opacity/100:1;c[3]!==m||c[4]!==f||c[5]!==g?(a={backgroundImage:m,backgroundRepeat:"repeat",backgroundPosition:"center",backgroundSize:f,opacity:g},c[3]=m,c[4]=f,c[5]=g,c[6]=a):a=c[6];let y=h??e.defaultPattern;
18return c[7]!==y?(o=(0,t.jsx)(s.CanvasBackgroundPattern,{pattern:y}),c[7]=y,c[8]=o):o=c[8],c[9]!==a||c[10]!==o?(l=(0,t.jsx)("div",{className:"w-full h-full pointer-events-none",style:a,children:o}),c[9]=a,c[10]=o,c[11]=l):l=c[11],l}},385040,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("4028c6ed55201c560a97f5fcf29e6c30d4b69775e0",t.callServer,void 0,t.findSourceMapURL,"deleteComment");e.s(["deleteComment",0,n])},912383,e=>{"use strict";e.s(["CommentsDrawerContent",()=>D]);var t=e.i(843476),n=e.i(500932),r=e.i(770703),i=e.i(871040),a=e.i(806398);e.i(859041);var o=e.i(374942),s=e.i(10231),l=e.i(271645),c=e.i(381677),u=e.i(88891),d=e.i(681299),h=e.i(87592),p=e.i(853915),m=e.i(416504),f=e.i(69278),g=e.i(793610),y=e.i(410275),b=e.i(385040),v=e.i(593302),x=e.i(618566),k=e.i(902057),w=e.i(671473),C=e.i(612854),S=e.i(645522),E=e.i(124851);let T=(0,r.default)(()=>e.A(925684).then(e=>e.CommentBox),{loadableGenerated:{modules:[231399]},ssr:!1,loading:()=>(0,t.jsx)(I,{})}),I=()=>{let e,r=(0,n.c)(1);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex flex-col grow",children:[(0,t.jsx)("div",{className:"border input-with-border min-h-32 px-2 py-[6px]"}),(0,t.jsx)("div",{className:"pt-1 h-[30px]"})]}),r[0]=e):e=r[0],e};function D(e){let{identity:n,identityPending:r}=(0,a.useIdentityData)(),{localComments:o,deletedComments:s,editedComments:c,pageId:u}=(0,i.useInteractionState)(e.document_uri),d=e.pageId??u,h=(0,l.useMemo)(()=>{let t=e.comments.filter(e=>e.record?.onPage===d),n=new Set(t.map(e=>e.uri));return[...o.filter(e=>e.record?.onPage===d&&!n.has(e.uri)),...t].map(e=>s.includes(e.uri)&&!e.deleted?{...e,deleted:!0}:c[e.uri]?{...e,record:c[e.uri],edited:!0}:e)},[e.comments,o,s,c,d]),p=(0,l.useMemo)(()=>h.filter(e=>!e.record.reply&&A(e,h)).sort(N),[h]),m=(0,x.usePathname)(),f=(0,l.useMemo)(()=>{let e=new URL(m,window.location.origin);return e.searchParams.set("interactionDrawer","comments"),e.hash="commentsDrawer",e.toString()},[]);return(0,t.jsxs)("div",{id:"commentsDrawer",className:"flex flex-col gap-2 relative text-sm text-secondary",children:[!e.noCommentBox&&(0,t.jsxs)(t.Fragment,{children:[n?.atp_did?(0,t.jsx)(T,{doc_uri:e.document_uri,pageId:d}):r?(0,t.jsx)(I,{}):(0,t.jsxs)("div",{className:"w-full accent-container text-tertiary text-center italic p-3 gap-2",children:[(0,t.jsx)("span",{className:"text-accent-contrast font-bold",children:(0,t.jsx)(w.LoginModal,{noEmailLogin:!0,trigger:n?"Link":"Log in",redirectRoute:f})})," ",n?" ":"with ","an Atmosphere account to comment"]}),(0,t.jsx)("hr",{className:"border-border-light"})]}),(0,t.jsxs)("div",{className:"comments flex flex-col gap-4 sm:gap-6 py-2",children:[0===p.length&&(0,t.jsx)(E.EmptyState,{children:"No comments yetâ¦"}),p.map(n=>{let r=n.record;return(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(_,{pageId:d,profile:n.profile,document:e.document_uri,comment:n,record:r,comments:h}),(0,t.jsx)("hr",{className:"border-border last:hidden"})]},n.uri)})]})]})}let N=(e,t)=>new Date(t.record.createdAt).getTime()-new Date(e.record.createdAt).getTime();function A(e,t){return!e.deleted||t.some(n=>n.record.reply?.parent===e.uri&&A(n,t))}let _=e=>{let r,i,c,u,d,h,p,m,f,g,y=(0,n.c)(50),{identity:b}=(0,a.useIdentityData)(),x=!!b?.atp_did&&new v.AtUri(e.comment.uri).host===b.atp_did,[w,E]=(0,l.useState)(!1);if(e.comment.deleted){let n,r,i,a;return y[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("div",{className:"h-6 w-6 shrink-0 rounded-full bg-border-light"}),y[0]=n):n=y[0],y[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"italic text-tertiary pb-[4px]",children:"This comment has been deleted"}),y[1]=r):r=y[1],y[2]!==e.comment.uri||y[3]!==e.comments||y[4]!==e.document||y[5]!==e.pageId?(i=(0,t.jsxs)("div",{className:"min-w-0 w-full grow flex flex-col pt-1",children:[r,(0,t.jsx)(P,{pageId:e.pageId,comment_uri:e.comment.uri,comments:e.comments,document:e.document,canReply:!1})]}),y[2]=e.comment.uri,y[3]=e.comments,y[4]=e.document,y[5]=e.pageId,y[6]=i):i=y[6],y[7]!==e.comment.uri||y[8]!==i?(a=(0,t.jsxs)("div",{id:e.comment.uri,className:"comment flex gap-2 pointer-events-auto",children:[n,i]}),y[7]=e.comment.uri,y[8]=i,y[9]=a):a=y[9],a}let I=e.profile?.avatar||void 0,D=e.profile?.displayName?e.profile?.displayName:e.profile?.handle||void 0;
18y[10]!==I||y[11]!==D?(r=(0,t.jsx)(S.Avatar,{src:I,displayName:D,size:"medium"}),y[10]=I,y[11]=D,y[12]=r):r=y[12];let N=e.profile?.displayName,A=e.profile?.handle||"";return y[13]!==e.record.createdAt||y[14]!==N||y[15]!==A?(i=(0,t.jsx)(C.PostInfo,{displayName:N,handle:A,createdAt:e.record.createdAt,compact:!0}),y[13]=e.record.createdAt,y[14]=N,y[15]=A,y[16]=i):i=y[16],y[17]!==e.comment.edited?(c=e.comment.edited&&(0,t.jsx)("span",{className:"text-xs text-tertiary shrink-0",children:"edited"}),y[17]=e.comment.edited,y[18]=c):c=y[18],y[19]!==w||y[20]!==x||y[21]!==e.comment.uri||y[22]!==e.document?(u=x&&!w&&(0,t.jsx)(M,{uri:e.comment.uri,document:e.document,onEdit:()=>E(!0)}),y[19]=w,y[20]=x,y[21]=e.comment.uri,y[22]=e.document,y[23]=u):u=y[23],y[24]!==i||y[25]!==c||y[26]!==u?(d=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i,c,u]}),y[24]=i,y[25]=c,y[26]=u,y[27]=d):d=y[27],y[28]!==e.record.attachment?(h=e.record.attachment&&o.PubLeafletComment.isLinearDocumentQuote(e.record.attachment)&&(0,t.jsx)("div",{className:"my-2 ",children:(0,t.jsx)(k.QuoteContent,{index:-1,position:e.record.attachment.quote,did:new v.AtUri(e.record.attachment.document).host})}),y[28]=e.record.attachment,y[29]=h):h=y[29],y[30]!==w||y[31]!==e.comment.uri||y[32]!==e.document||y[33]!==e.pageId||y[34]!==e.record?(p=w?(0,t.jsx)(T,{className:"pt-1 pb-2",doc_uri:e.document,pageId:e.pageId,editing:{uri:e.comment.uri,record:e.record},autoFocus:!0,onCancel:()=>E(!1),onSubmit:()=>E(!1)}):(0,t.jsx)("pre",{style:{wordBreak:"break-word",fontFamily:"inherit"},className:"whitespace-pre-wrap text-secondary pb-[4px] ",children:(0,t.jsx)(s.BaseTextBlock,{index:[],plaintext:e.record.plaintext,facets:e.record.facets,ugcLinks:!0})},e.comment.uri),y[30]=w,y[31]=e.comment.uri,y[32]=e.document,y[33]=e.pageId,y[34]=e.record,y[35]=p):p=y[35],y[36]!==e.comment.uri||y[37]!==e.comments||y[38]!==e.document||y[39]!==e.pageId?(m=(0,t.jsx)(P,{pageId:e.pageId,comment_uri:e.comment.uri,comments:e.comments,document:e.document}),y[36]=e.comment.uri,y[37]=e.comments,y[38]=e.document,y[39]=e.pageId,y[40]=m):m=y[40],y[41]!==p||y[42]!==m||y[43]!==d||y[44]!==h?(f=(0,t.jsxs)("div",{className:"min-w-0 w-full grow flex flex-col pt-1",children:[d,h,p,m]}),y[41]=p,y[42]=m,y[43]=d,y[44]=h,y[45]=f):f=y[45],y[46]!==e.comment.uri||y[47]!==f||y[48]!==r?(g=(0,t.jsxs)("div",{id:e.comment.uri,className:"comment flex gap-2 pointer-events-auto",children:[r,f]}),y[46]=e.comment.uri,y[47]=f,y[48]=r,y[49]=g):g=y[49],g},P=e=>{let r,i=(0,n.c)(18),{identity:o}=(0,a.useIdentityData)(),s=!1!==e.canReply&&!!o?.atp_did,[d,h]=(0,l.useState)(!1),[p,m]=(0,l.useState)(!0);if(i[0]!==s||i[1]!==e.comment_uri||i[2]!==e.comments||i[3]!==e.document||i[4]!==e.pageId||i[5]!==p||i[6]!==d){var f,g;let n,a,o,l=(f=e.comment_uri,(g=e.comments).filter(e=>e.record.reply?.parent===f&&A(e,g)).sort(N)),y=(0!==l.length||s)&&(0,t.jsxs)("button",{className:"flex gap-1 items-center text-sm text-tertiary",onClick:()=>{m(!p),h(!1)},children:[(0,t.jsx)(u.CommentTiny,{className:"text-border"})," ",0!==l.length&&l.length]});i[8]!==s?(n=s&&(0,t.jsx)("button",{className:"text-accent-contrast text-sm",onClick:()=>{m(!0),h(!0)},children:"Reply"}),i[8]=s,i[9]=n):n=i[9],i[10]!==y||i[11]!==n?(a=(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[y,n]}),i[10]=y,i[11]=n,i[12]=a):a=i[12],i[13]!==e.comment_uri||i[14]!==e.document||i[15]!==e.pageId||i[16]!==d?(o=d&&(0,t.jsxs)("div",{className:"repliesWrapper flex w-full pt-1",children:[(0,t.jsx)("button",{className:"repliesCollapse mr-[14px] ml-[7px]",onClick:()=>{h(!1),m(!1)},children:(0,t.jsx)("div",{className:"bg-border-light w-[2px] h-full"})}),(0,t.jsx)(T,{className:"pt-3",pageId:e.pageId,doc_uri:e.document,replyTo:e.comment_uri,autoFocus:!0,onSubmit:()=>{h(!1)}})]}),i[13]=e.comment_uri,i[14]=e.document,i[15]=e.pageId,i[16]=d,i[17]=o):o=i[17],r=(0,t.jsxs)(t.Fragment,{children:[a,o,l.length>0&&(0,t.jsx)(c.CollapsibleReplies,{open:p,children:(0,t.jsxs)("div",{className:"repliesWrapper flex pt-1 relative",children:[(0,t.jsx)("div",{className:"-mr-[14px] ml-[7px] pointer-events-none",children:(0,t.jsx)("div",{className:"bg-border-light w-[2px] h-full"})}),(0,t.jsx)("button",{className:"repliesCollapse absolute top-0 bottom-0 left-0 w-[20px] z-10",onClick:()=>{h(!1),m(!1)}}),(0,t.jsx)("div",{className:"repliesContent flex flex-col gap-8 pt-4 w-full",children:l.map(n=>(0,t.jsx)(_,{pageId:e.pageId,document:e.document,comment:n,profile:n.profile,record:n.record,comments:e.comments},n.uri))})]})})]}),i[0]=s,i[1]=e.comment_uri,i[2]=e.comments,i[3]=e.document,i[4]=e.pageId,i[5]=p,i[6]=d,i[7]=r}else r=i[7];return r},M=e=>{let r,a,o,s=(0,n.c)(7),[c,u]=(0,l.useState)("menu"),[v,x]=(0,l.useState)(!1),k=(0,g.useToaster)();return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{e||u("menu")},s[0]=r):r=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("button",{className:"shrink-0 text-tertiary hover:text-accent-contrast","aria-label":"Comment options",children:(0,t.jsx)(d.MoreOptionsTiny,{})}),s[1]=a):a=s[1],s[2]!==v||s[3]!==e||s[4]!==c||s[5]!==k?(o=(0,t.jsx)(m.Menu,{asChild:!0,align:"end",onOpenChange:r,trigger:a,children:"menu"===c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(m.MenuItem,{onSelect:()=>e.onEdit(),children:[(0,t.jsx)(p.EditTiny,{}),"Edit Comment"]}),(0,t.jsxs)(m.MenuItem,{onSelect:e=>{e.preventDefault(),u("confirm")},children:[(0,t.jsx)(h.DeleteSmall,{}),"Delete Comment"]})]}):(0,t.jsxs)("div",{className:"flex flex-col justify-center p-2 text-center",children:[(0,t.jsx)("div",{className:"text-primary font-bold",children:"Delete this comment?"}),(0,t.jsx)("div",{className:"text-sm text-secondary",children:"Replies to it will stay visible."}),(0,t.jsxs)("div",{className:"flex gap-2 mx-auto items-center mt-2",children:[(0,t.jsx)(f.ButtonTertiary,{onClick:()=>u("menu"),children:"Nevermind"}),(0,t.jsx)(f.ButtonPrimary,{disabled:v,onClick:async()=>{x(!0);
18let n=await (0,b.deleteComment)({uri:e.uri});(x(!1),n.success)?(0,i.setInteractionState)(e.document,t=>({deletedComments:[...t.deletedComments,e.uri]})):k({content:(0,y.isOAuthSessionError)(n.error)?(0,t.jsx)(y.OAuthErrorMessage,{error:n.error}):"We couldn't delete this. Please try again!",type:"error"})},children:"Delete"})]})]})}),s[2]=v,s[3]=e,s[4]=c,s[5]=k,s[6]=o):o=s[6],o}},871040,e=>{"use strict";e.s(["ExpandedInteractions",()=>_,"Interactions",()=>A,"getQuoteCount",()=>M,"openDrawerThread",()=>T,"openInteractionDrawer",()=>S,"popDrawerThread",()=>D,"popDrawerThreadToRoot",()=>N,"pushDrawerThread",()=>I,"setInteractionState",()=>C,"toggleInteractionDrawer",()=>E,"useInteractionState",()=>w]);var t=e.i(843476),n=e.i(500932),r=e.i(174080),i=e.i(768834),a=e.i(517770),o=e.i(465082),s=e.i(899719),l=e.i(386834),c=e.i(902057),u=e.i(465218),d=e.i(853915),h=e.i(149753),p=e.i(238713),m=e.i(794866),f=e.i(658610),g=e.i(280190),y=e.i(250209),b=e.i(233801),v=e.i(510038);let x={drawerOpen:void 0,drawer:void 0,localComments:[],deletedComments:[],editedComments:{},commentBox:{quote:null},threadStack:[]},k=(0,i.create)(()=>({}));function w(e){let t,r=(0,n.c)(2);return r[0]!==e?(t=t=>t[e]?t[e]:x,r[0]=e,r[1]=t):t=r[1],k(t)}function C(e,t){k.setState(n=>{n[e]||(n[e]={...x});let r=n[e],i="function"==typeof t?t(r):t,a={...n,[e]:{...r,...i}};if(void 0!==i.drawerOpen||void 0!==i.drawer||void 0!==i.threadStack){let t=new URL(window.location.href),n=a[e];!0===n.drawerOpen||void 0===n.drawerOpen&&t.searchParams.has("interactionDrawer")?t.searchParams.set("interactionDrawer",(0,f.serializeDrawerParam)({drawer:n.drawer||"comments",threadStack:n.threadStack},e)):t.searchParams.delete("interactionDrawer"),window.history.replaceState({},"",t.toString())}return a})}function S(e,t,n){(0,r.flushSync)(()=>{C(t,{drawerOpen:!0,drawer:e,pageId:n,threadStack:[]})}),(0,s.scrollIntoView)("interaction-drawer")}function E(e,t,n){let r=k.getState()[t];r?.drawerOpen&&("comments"===r.drawer||"quotes"===r.drawer)&&r.pageId===n?C(t,{drawerOpen:!1}):S(e,t,n)}function T(e,t,n){(0,r.flushSync)(()=>{C(e,e=>({drawerOpen:!0,drawer:e.drawer??"comments",pageId:n,threadStack:[t]}))}),(0,s.scrollIntoView)("interaction-drawer")}function I(e,t){C(e,n=>{let r=n.threadStack;if(0===r.length){let t=(0,f.drawerThreadFromLocation)(e);t&&(r=[t])}let i=r[r.length-1];return i&&(0,m.sameDrawerThread)(i,t)?{}:{threadStack:[...r,t]}})}function D(e){C(e,e=>({threadStack:e.threadStack.slice(0,-1)}))}function N(e){C(e,{threadStack:[]})}let A=e=>{let r,i,a,s,l,u,d,f,b,x,k=(0,n.c)(39),{uri:w,quotesAndMentions:C,normalizedDocument:S,normalizedPublication:E,publication:T}=(0,o.useDocument)(),I=(0,v.usePostFrame)();k[0]!==w||k[1]!==S||k[2]!==E?(r=(0,y.getDocumentURL)(S,w,E),k[0]=w,k[1]=S,k[2]=E,k[3]=r):r=k[3];let D=r,N=e.showComments,A=e.showMentions&&e.quotesCount>0,_=N&&(e.commentsCount>0||!A)?"comments":"quotes";k[4]!==I||k[5]!==e.pageId?(a={push:t=>I.openThread(t,e.pageId)},k[4]=I,k[5]=e.pageId,k[6]=a):a=k[6],i=a,k[7]!==C?(s=()=>{C&&(0,c.prefetchQuotesData)(C)},k[7]=C,k[8]=s):s=k[8];let P=s,M=`flex gap-2 text-tertiary text-sm items-center ${e.className}`;k[9]!==w||k[10]!==e.recommendsCount||k[11]!==e.showRecommends||k[12]!==i?(l=!1===e.showRecommends?null:(0,t.jsx)(m.DrawerThreadContext.Provider,{value:i,children:(0,t.jsx)(h.RecommendButton,{documentUri:w,recommendsCount:e.recommendsCount})}),k[9]=w,k[10]=e.recommendsCount,k[11]=e.showRecommends,k[12]=i,k[13]=l):l=k[13],k[14]!==_||k[15]!==I||k[16]!==e.pageId?(u=()=>I.toggleDiscussion(_,e.pageId),k[14]=_,k[15]=I,k[16]=e.pageId,k[17]=u):u=k[17],k[18]!==w||k[19]!==P||k[20]!==D||k[21]!==e.commentsCount||k[22]!==e.quotesCount||k[23]!==e.showComments||k[24]!==e.showMentions||k[25]!==u?(d=(0,t.jsx)(p.DiscussionButton,{showWhenEmpty:!0,documentUri:w,commentsCount:e.commentsCount,quotesCount:e.quotesCount,showComments:e.showComments,showMentions:e.showMentions,postUrl:D,onPrefetch:P,onClick:u}),k[18]=w,k[19]=P,k[20]=D,k[21]=e.commentsCount,k[22]=e.quotesCount,k[23]=e.showComments,k[24]=e.showMentions,k[25]=u,k[26]=d):d=k[26],k[27]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)("div",{className:"h-full w-0 spacer"}),k[27]=f):f=k[27];let R=E||void 0,L=T?.uri;return k[28]!==w||k[29]!==S||k[30]!==D||k[31]!==L||k[32]!==R?(b=(0,t.jsx)(g.InteractionShareButton,{postRecord:S,postUrl:D,documentUri:w,publication:R,pubUri:L}),k[28]=w,k[29]=S,k[30]=D,k[31]=L,k[32]=R,k[33]=b):b=k[33],k[34]!==b||k[35]!==M||k[36]!==l||k[37]!==d?(x=(0,t.jsxs)("div",{className:M,children:[l,d,f,b]}),k[34]=b,k[35]=M,k[36]=l,k[37]=d,k[38]=x):x=k[38],x},_=e=>{let r,i,a,s,l,u,d,f,x=(0,n.c)(36),{uri:k,quotesAndMentions:w,normalizedDocument:C,normalizedPublication:S,publication:E}=(0,o.useDocument)(),T=(0,v.usePostFrame)();x[0]!==k||x[1]!==C||x[2]!==S?(r=(0,y.getDocumentURL)(C,k,S),x[0]=k,x[1]=C,x[2]=S,x[3]=r):r=x[3];let I=r;x[4]!==w?(i=()=>{w&&(0,c.prefetchQuotesData)(w)},x[4]=w,x[5]=i):i=x[5];let D=i,N=C.tags,A=N?.length||0,_=e.showComments,M=e.showMentions&&e.quotesCount>0,L=_&&(e.commentsCount>0||!M)?"comments":"quotes";x[6]!==T||x[7]!==e.pageId?(s={push:t=>T.openThread(t,e.pageId)},x[6]=T,x[7]=e.pageId,x[8]=s):s=x[8],a=s;
18let j=!(_||M)&&!e.showRecommends,O=`expandedInteractions text-tertiary px-3 sm:px-4 flex flex-col ${e.className}`;return x[9]!==a||x[10]!==A||x[11]!==N?(l=A>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"border-border-light mb-3"}),(0,t.jsx)(P,{tags:N,onTagClick:e=>a.push({type:"tag",tag:e})})]}),x[9]=a,x[10]=A,x[11]=N,x[12]=l):l=x[12],x[13]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)("hr",{className:"border-border-light mb-3 "}),x[13]=u):u=x[13],x[14]!==L||x[15]!==k||x[16]!==a||x[17]!==T||x[18]!==D||x[19]!==j||x[20]!==C||x[21]!==S||x[22]!==I||x[23]!==e.commentsCount||x[24]!==e.pageId||x[25]!==e.quotesCount||x[26]!==e.recommendsCount||x[27]!==e.showComments||x[28]!==e.showMentions||x[29]!==e.showRecommends||x[30]!==E?(d=(0,t.jsx)("div",{className:"expandedInteractions relative flex gap-4 justify-start font-bold mx-auto",children:j?(0,t.jsx)("div",{}):(0,t.jsxs)(m.DrawerThreadContext.Provider,{value:a,children:[!1===e.showRecommends?null:(0,t.jsx)(h.RecommendButton,{large:!0,documentUri:k,recommendsCount:e.recommendsCount}),(0,t.jsx)(p.DiscussionButton,{large:!0,showWhenEmpty:!0,documentUri:k,commentsCount:e.commentsCount,quotesCount:e.quotesCount,showComments:e.showComments,showMentions:e.showMentions,postUrl:I,onPrefetch:D,onClick:()=>T.toggleDiscussion(L,e.pageId)}),(0,t.jsx)(g.InteractionShareButton,{postRecord:C,postUrl:I,documentUri:k,publication:S||void 0,pubUri:E?.uri,trigger:(0,t.jsxs)("div",{className:"relative flex gap-1 items-center text-accent-contrast py-1 px-2 rounded-full border border-accent-contrast shrink-0 sm:hover:bg-accent-1 hover:text-accent-2",children:[(0,t.jsx)(b.ShareSmall,{className:"text-inherit"}),(0,t.jsx)("div",{className:"pr-1 text-base!",children:"Share"})]})}),(0,t.jsx)(R,{publication:E,documentUri:k})]})}),x[14]=L,x[15]=k,x[16]=a,x[17]=T,x[18]=D,x[19]=j,x[20]=C,x[21]=S,x[22]=I,x[23]=e.commentsCount,x[24]=e.pageId,x[25]=e.quotesCount,x[26]=e.recommendsCount,x[27]=e.showComments,x[28]=e.showMentions,x[29]=e.showRecommends,x[30]=E,x[31]=d):d=x[31],x[32]!==O||x[33]!==l||x[34]!==d?(f=(0,t.jsxs)("div",{className:O,children:[l,u,d]}),x[32]=O,x[33]=l,x[34]=d,x[35]=f):f=x[35],f},P=e=>{let r,i,a=(0,n.c)(7);if(e.tags){if(a[0]!==e.onTagClick||a[1]!==e.tags){let n;a[3]!==e.onTagClick?(n=(n,r)=>(0,t.jsx)(l.Tag,{name:n,onClick:e.onTagClick},r),a[3]=e.onTagClick,a[4]=n):n=a[4],r=e.tags.map(n),a[0]=e.onTagClick,a[1]=e.tags,a[2]=r}else r=a[2];return a[5]!==r?(i=(0,t.jsx)("div",{className:"flex gap-1 flex-wrap mb-3",role:"list","aria-label":"Tags",children:r}),a[5]=r,a[6]=i):i=a[6],i}};function M(e,t){var n,r;return n=e,(r=t)?n.filter(e=>!!e.link&&e.link.includes(r)).length:n.filter(e=>{if(!e.link)return!0;let t=new URL(e.link).pathname.split("/l-quote/")[1];if(!t)return!0;let n=(0,a.decodeQuotePosition)(t);return!n?.pageId}).length}let R=e=>{let r=(0,n.c)(4),i=(0,u.usePostEditLink)(e.documentUri,e.publication?.identity_did);if(i){let e,n,a;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(d.EditTiny,{}),n=(0,t.jsx)("span",{className:"hidden sm:inline",children:"Edit"}),r[0]=e,r[1]=n):(e=r[0],n=r[1]),r[2]!==i?(a=(0,t.jsxs)("a",{href:i,className:"absolute left-full ml-2 sm:ml-4 top-0 flex gap-2 items-center hover:!no-underline selected-outline px-2 py-0.5 bg-accent-1 text-accent-2 font-bold w-fit rounded-md !border-accent-1 !outline-accent-1 h-fit whitespace-nowrap",children:[e,n]}),r[2]=i,r[3]=a):a=r[3],a}return null}},902057,781616,685372,e=>{"use strict";e.s(["DiscussionDrawerContent",()=>eO,"QuoteContent",()=>eB,"prefetchQuotesData",()=>ej],902057);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(227086),a=e.i(593302);e.i(859041);var o=e.i(43400),s=e.i(365172),l=e.i(271264),c=e.i(734570),u=e.i(680396),d=e.i(465082),h=e.i(126479),p=e.i(517770),m=e.i(542271);e.s(["Block",()=>ed,"PostContent",()=>eu],685372);var f=e.i(216926),g=e.i(26765),y=e.i(493306),b=e.i(536116),v=e.i(813932),x=e.i(471747),k=e.i(486401),w=e.i(624111),C=e.i(906065),S=e.i(152318),E=e.i(209195),T=e.i(96040),I=e.i(124670),D=e.i(473840),N=e.i(364441),A=e.i(270423),_=e.i(861808),P=e.i(273318),M=e.i(760297),R=e.i(861224),L=e.i(132711),j=e.i(344290),O=e.i(850952),B=e.i(66016),F=e.i(106251),H=e.i(980205),U=e.i(67722),z=e.i(890882),$=e.i(320526),V=e.i(518765),q=e.i(510114),G=e.i(713136),W=e.i(490281),K=e.i(69278),Y=e.i(368408),Z=e.i(939904),X=e.i(489219);e.i(521747);var Q=e.i(498911),J=e.i(828517),ee=e.i(510038),et=e.i(503820),en=e.i(997779),er
18=e.i(750050),ei=e.i(138374),ea=e.i(788244);let eo=(0,r.createContext)(null),es=eo.Provider;function el(){return(0,r.useContext)(eo)}e.s(["PostHeaderBlockProvider",0,es,"usePostHeaderBlockData",0,el],781616);let ec={1:"font-bold leading-tight pb-1 [font-family:var(--theme-heading-font)]",2:"font-bold leading-tight pb-1 [font-family:var(--theme-heading-font)]",3:"font-bold leading-tight pb-1 [font-family:var(--theme-heading-font)]",4:"font-bold leading-snug pb-1 text-secondary [font-family:var(--theme-heading-font)]"};function eu(e){let r,i,a=(0,n.c)(16),{blocks:o,did:s,preview:l,className:c,prerenderedCodeBlocks:u,bskyPostData:d,standardSitePostData:h,pageId:p,pages:m,pollData:f,footnoteIndexMap:g,postsListData:y,standardSitePublicationData:b}=e,v=`postContent flow-root sm:px-4 px-3 sm:pt-3 pt-2 pb-0 ${c}`;return a[0]!==o||a[1]!==d||a[2]!==s||a[3]!==g||a[4]!==p||a[5]!==m||a[6]!==f||a[7]!==y||a[8]!==u||a[9]!==l||a[10]!==h||a[11]!==b?(r=o.map((e,n)=>(0,t.jsx)(ed,{pageId:p,pages:m,bskyPostData:d,standardSitePostData:h,standardSitePublicationData:b,block:e,did:s,previousBlock:o[n-1],nextBlock:o[n+1],index:[n],preview:l,prerenderedCodeBlocks:u,pollData:f,footnoteIndexMap:g,postsListData:y,isFirst:0===n,isLast:n===o.length-1},n)),a[0]=o,a[1]=d,a[2]=s,a[3]=g,a[4]=p,a[5]=m,a[6]=f,a[7]=y,a[8]=u,a[9]=l,a[10]=h,a[11]=b,a[12]=r):r=a[12],a[13]!==v||a[14]!==r?(i=(0,t.jsx)("div",{className:v,children:r}),a[13]=v,a[14]=r,a[15]=i):i=a[15],i}let ed=e=>{let r,i,a,o,s,c,u,h,p,m,y,v,N,_,P,j,B,J,ee,et,en,eo,es,eu,ed,em,ef,ey,ek,ew=(0,n.c)(151),{block:eT,did:eI,isList:eD,index:eN,preview:eA,previousBlock:e_,nextBlock:eP,prerenderedCodeBlocks:eM,bskyPostData:eR,standardSitePostData:eL,standardSitePublicationData:ej,pageId:eO,pages:eB,pollData:eF,footnoteIndexMap:eH,postsListData:eU,isFirst:ez,isLast:e$,canvasWidth:eV}=e,eq=(0,G.useOpenImageLightbox)(),eG=!!eq&&!eA,eW=(0,d.useDocumentOptional)(),eK=el(),eY=eW?.publication?.uri??null;ew[0]===Symbol.for("react.memo_cache_sentinel")?(r={scrollMarginTop:"4rem",scrollMarginBottom:"4rem",wordBreak:"break-word"},ew[0]=r):r=ew[0],ew[1]!==eN||ew[2]!==eO||ew[3]!==eA?(i=eA?void 0:eO?`${eO}~${eN.join(".")}`:eN.join("."),ew[1]=eN,ew[2]=eO,ew[3]=eA,ew[4]=i):i=ew[4],ew[5]!==eN?(a=eN.join("."),ew[5]=eN,ew[6]=a):a=ew[6],ew[7]!==eO||ew[8]!==i||ew[9]!==a?(o={style:r,id:i,"data-index":a,"data-page-id":eO},ew[7]=eO,ew[8]=i,ew[9]=a,ew[10]=o):o=ew[10];let eZ=o;ew[11]!==eT.alignment||ew[12]!==eT.block?(!(s="lex:pub.leaflet.pages.linearDocument#textAlignRight"===eT.alignment?"text-right justify-end":"lex:pub.leaflet.pages.linearDocument#textAlignCenter"===eT.alignment?"text-center justify-center":"lex:pub.leaflet.pages.linearDocument#textAlignJustify"===eT.alignment?"text-justify justify-start":"lex:pub.leaflet.pages.linearDocument#textAlignLeft"===eT.alignment?"text-left justify-start":void 0)&&(g.PubLeafletBlocksImage.isMain(eT.block)||k.PubLeafletBlocksButton.isMain(eT.block))&&(s="text-center justify-center"),ew[11]=eT.alignment,ew[12]=eT.block,ew[13]=s):s=ew[13];let eX=e_&&eg(e_.block),eQ=` 19 postBlockWrapper 20 ${(0,f.blockSpacingClassName)({kind:eg(eT.block),headingLevel:l.PubLeafletBlocksHeader.isMain(eT.block)?eT.block.level:void 0,previous:eX,isFirst:!!ez,isLast:!!e$,isListItem:eD})} 21 ${eD&&"isListItem"} 22 ${s} 23 `,eJ=eX&&"heading"!==eX&&"list"!==eX?"-mt-1":"";if(ew[14]!==eR||ew[15]!==eQ||ew[16]!==eI||ew[17]!==eO||ew[18]!==eB||ew[19]!==eL?(c=e=>{let n=e.id,r=eB.find(e=>e.id===n);if(!r)return;let i=b.PubLeafletPagesCanvas.isMain(r);return(0,t.jsx)(F.PublishedPageLinkBlock,{blocks:r.blocks,theme:r.theme,canvasBackground:i?r.background:void 0,canvasPattern:i?r.pattern:void 0,pageId:n,parentPageId:eO,did:eI,bskyPostData:eR,standardSitePostData:eL,isCanvas:i,pages:eB,className:eQ,display:e.display})},ew[14]=eR,ew[15]=eQ,ew[16]=eI,ew[17]=eO,ew[18]=eB,ew[19]=eL,ew[20]=c):c=ew[20],ew[21]!==eZ||ew[22]!==eR||ew[23]!==eQ||ew[24]!==eI||ew[25]!==eB||ew[26]!==eF||ew[27]!==eL?(u=e=>{let n=eB.find(t=>t.id===e.id);if(!b.PubLeafletPagesCanvas.isMain(n)||!n.width||!n.height)return;let r={width:n.width,height:n.height};return(0,t.jsx)(U.PublishedPageThemeProvider,{theme:n.theme,children:(0,t.jsxs)("div",{className:`relative ${eQ}`,...eZ,children:[(0,t.jsx)("div",{className:"w-full block-border overflow-clip bg-bg-page",children:(0,t.jsx)(z.ScaledCanvas,{size:r,alt:e.alt,children:(0,t.jsx)(H.CanvasBlocks,{blocks:n.blocks,background:n.background,pattern:n.pattern,size:r,did:eI,bskyPostData:eR,standardSitePostData:eL,pollData:eF,pages:eB,preview:!0})})}),e.alt&&(0,t.jsx)($.ReadOnlyAltText,{alt:e.alt})]})},e.id)},ew[21]=eZ,ew[22]=eR,ew[23]=eQ,ew[24]=eI,ew[25]=eB,ew[26]=eF,ew[27]=eL,ew[28]=u):u=ew[28],ew[29]!==eR||ew[30]!==eQ||ew[31]!==eO?(h=e=>{let n=e.postRef.uri,r=eR.find(e=>e.uri===n);return r?(0,t.jsx)(R.PubBlueskyPostBlock,{post:r,className:eQ,pageId:eO,clientHost:e.clientHost,view:e.view}):(0,t.jsx)(Q.PostNotAvailable,{})},ew[29]=eR,ew[30]=eQ,ew[31]=eO,ew[32]=h):h=ew[32],ew[33]!==eZ||ew[34]!==eQ||ew[35]!==eY||ew[36]!==eL?(p=e=>{let n=e.uri,r=eL.find(e=>e.uri===n);if(!r)return(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)("p",{className:"text-sm italic text-tertiary",children:"Post not found."})});let i="large"===e.size?"large":"small"===e.size?"small":"medium";return(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)("div",{className:"standardSitePostBlock block-border overflow-hidden w-full",children:(0,t.jsx)(O.PublicationThemeWrapper,{postRecord:r.record,pubRecord:r.publication?.record??void 0,enabled:!1!==e.showPublicationTheme,children:(0,t.jsx)("div",{className:"bg-bg-page",children:(0,t.jsx)(L.StandardSitePostItemView,{post:r,size:i,currentPublicationUri:eY})})})})})},ew[33]=eZ,ew[34]=eQ,ew[35]=eY,ew[36]=eL,ew[37]=p):p=ew[37],ew[38]!==eZ||ew[39]!==eQ||ew[40]!==ej?(m=e=>(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)(eh,{uri:e.ur
23i,showPublicationTheme:!1!==e.showPublicationTheme,initialData:ej?.find(t=>t.uri===e.uri)})}),ew[38]=eZ,ew[39]=eQ,ew[40]=ej,ew[41]=m):m=ew[41],ew[42]!==eO?(y=e=>(0,t.jsx)(ep,{url:e.url,html:e.html,height:e.height,aspectRatio:e.aspectRatio,pageId:eO}),v=e=>(0,t.jsx)(ep,{html:e.html,height:e.height,aspectRatio:e.aspectRatio,pageId:eO}),ew[42]=eO,ew[43]=y,ew[44]=v):(y=ew[43],v=ew[44]),ew[45]!==eQ||ew[46]!==eW?.membersOnly?.gated?(N=()=>eW?.membersOnly?.gated?(0,t.jsx)("div",{className:eQ,children:(0,t.jsx)(er.MembersOnlyPaywall,{})}):null,ew[45]=eQ,ew[46]=eW?.membersOnly?.gated,ew[47]=N):N=ew[47],ew[48]!==eZ||ew[49]!==eQ||ew[50]!==eW?(_=()=>eW?.publication?.uri?(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)(Y.SubscribePanel,{publicationUri:eW.publication.uri,publicationUrl:eW.normalizedPublication?.url,source:{placement:"signup_block"},publicationName:eW.normalizedPublication?.name??eW.publication.name,publicationDescription:eW.normalizedPublication?.description,newsletterMode:eW.publication.newsletterMode})}):null,ew[48]=eZ,ew[49]=eQ,ew[50]=eW,ew[51]=_):_=ew[51],ew[52]!==eK?(P=e=>eK?(0,t.jsx)("div",{className:"postHeaderBlock w-full bg-bg-page block-border p-0!",children:(0,t.jsx)(ea.PostHeader,{data:eK.data,profile:eK.profile,contributors:eK.contributors,preferences:eK.preferences,compact:e.compact})}):null,ew[52]=eK,ew[53]=P):P=ew[53],ew[54]!==eZ||ew[55]!==eQ||ew[56]!==eY?(j=e=>eY?(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)(ei.PublishedRecommendedPubs,{publicationUri:eY,compact:e.compact})}):null,ew[54]=eZ,ew[55]=eQ,ew[56]=eY,ew[57]=j):j=ew[57],ew[58]!==eZ||ew[59]!==eQ||ew[60]!==eU?(B=e=>{if(!eU)return null;let n=(0,E.resolvePostsListView)(e.view),r=(0,E.postsListFilterKey)(e.filterByTags),i=eU.initialByFilter[r];return i?"chapter"===n?(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)(S.ChapterShelf,{publication:eU.publication,publicationRecord:eU.publicationRecord,cards:i.chapters??[],latestPost:i.latestPost,highlightLatest:!!e.highlightFirstPost,showPageCount:e.showPageCount??!0})}):(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)(C.PaginatedPublicationPostsList,{publication:eU.publication,publicationRecord:eU.publicationRecord,uris:i.uris,index:i.index,knownPosts:i.initialPosts,loadBatch:T.getPostsByUris,view:n,highlightFirstPost:!!e.highlightFirstPost,limit:e.limit,readerControls:(0,E.resolveReaderControls)(e)})}):null},ew[58]=eZ,ew[59]=eQ,ew[60]=eU,ew[61]=B):B=ew[61],ew[62]!==eQ||ew[63]!==eF?(J=e=>{let{cid:n,uri:r}=e.pollRef,i=eF.find(e=>e.uri===r&&e.cid===n);return i?(0,t.jsx)(W.PublishedPollBlock,{block:e,className:eQ,pollData:i}):null},ew[62]=eQ,ew[63]=eF,ew[64]=J):J=ew[64],ew[65]!==s||ew[66]!==eT.alignment||ew[67]!==eZ||ew[68]!==eQ?(ee=e=>{let n="lex:pub.leaflet.pages.linearDocument#textAlignJustify"===eT.alignment;return(0,t.jsx)("div",{className:`flex ${s} ${eQ}`,...eZ,children:(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:n?"w-full":void 0,children:(0,t.jsx)(K.ButtonPrimary,{role:"link",type:"submit",fullWidth:n,children:e.text})})})},ew[65]=s,ew[66]=eT.alignment,ew[67]=eZ,ew[68]=eQ,ew[69]=ee):ee=ew[69],ew[70]!==eR||ew[71]!==eQ||ew[72]!==eI||ew[73]!==eH||ew[74]!==eN||ew[75]!==eJ||ew[76]!==eO||ew[77]!==eB||ew[78]!==eF||ew[79]!==eL||ew[80]!==ej?(et=e=>(0,t.jsx)("ul",{className:`pb-2 ${eJ}`,children:e.children.map((e,n)=>(0,t.jsx)(eb,{pollData:eF,pages:eB,bskyPostData:eR,standardSitePostData:eL,standardSitePublicationData:ej,index:[...eN,n],item:e,did:eI,className:eQ,pageId:eO,footnoteIndexMap:eH},n))}),en=e=>(0,t.jsx)("ol",{className:`pb-2 ${eJ}`,start:e.startIndex||1,children:e.children.map((n,r)=>(0,t.jsx)(ev,{pollData:eF,pages:eB,bskyPostData:eR,standardSitePostData:eL,standardSitePublicationData:ej,index:[...eN,r],item:n,did:eI,className:eQ,pageId:eO,startIndex:e.startIndex||1,footnoteIndexMap:eH},r))}),ew[70]=eR,ew[71]=eQ,ew[72]=eI,ew[73]=eH,ew[74]=eN,ew[75]=eJ,ew[76]=eO,ew[77]=eB,ew[78]=eF,ew[79]=eL,ew[80]=ej,ew[81]=et,ew[82]=en):(et=ew[81],en=ew[82]),ew[83]!==eN||ew[84]!==eO||ew[85]!==eB||ew[86]!==eM?(eo=e=>{let n=eO&&eO!==eB[0]?.id?eO:"",r=eM?.get(`${n}:${eN.join(".")}`);return(0,t.jsx)(M.PubCodeBlock,{block:e,prerenderedCode:r})},ew[83]=eN,ew[84]=eO,ew[85]=eB,ew[86]=eM,ew[87]=eo):eo=ew[87],ew[88]!==eZ||ew[89]!==eQ||ew[90]!==eI?(es=e=>(0,t.jsxs)("a",{...eZ,href:e.src,target:"_blank",className:` 24 ${eQ} 25 externalLinkBlock flex relative group/linkBlock 26 h-[104px] w-full bg-bg-page overflow-hidden text-primary hover:no-underline no-underline 27 hover:border-accent-contrast shadow-sm 28 block-border 29 `,children:[(0,t.jsx)("div",{className:"pt-2 pb-2 px-3 grow min-w-0",children:(0,t.jsxs)("div",{className:"flex flex-col w-full min-w-0 h-full grow ",children:[(0,t.jsx)("div",{className:"linkBlockTitle bg-transparent -mb-0.5 border-none font-bold outline-hidden resize-none align-top border h-[24px] line-clamp-1",style:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-all"},children:e.title}),(0,t.jsx)("div",{className:"linkBlockDescription text-sm bg-transparent border-none outline-hidden resize-none align-top grow line-clamp-2",children:e.description}),(0,t.jsx)("div",{style:{wordBreak:"break-word"}
29,className:"min-w-0 w-full line-clamp-1 text-xs italic group-hover/linkBlock:text-accent-contrast text-tertiary",children:e.src})]})}),e.previewImage&&(0,t.jsx)("div",{className:"imagePreview w-[120px] m-2 -mb-2 bg-cover shrink-0 rounded-t-md border border-border rotate-[4deg] origin-center relative",style:{backgroundImage:`url(${(0,I.blobRefToSrc)(e.previewImage?.ref,eI,void 0,{width:360})})`,backgroundPosition:"center"}})]}),ew[88]=eZ,ew[89]=eQ,ew[90]=eI,ew[91]=es):es=ew[91],ew[92]!==s||ew[93]!==eZ||ew[94]!==eG||ew[95]!==eV||ew[96]!==eQ||ew[97]!==eI||ew[98]!==ez||ew[99]!==e$||ew[100]!==eP||ew[101]!==eq||ew[102]!==eO||ew[103]!==e_?(eu=e=>{let n=(0,I.blobRefToSrc)(e.image.ref,eI,void 0,{width:eV?(0,D.snapToImageWidth)(Math.ceil(2*eV)):I.POST_BODY_IMAGE_WIDTH}),r=(0,I.blobRefCid)(e.image.ref),i="image/gif"===e.image.mimeType?(0,I.blobRefToSrc)(e.image.ref,eI,void 0,{format:"mp4"}):void 0,a=e.fullBleed,o=e_?.block&&g.PubLeafletBlocksImage.isMain(e_.block)&&e_.block.fullBleed,l=eP?.block&&g.PubLeafletBlocksImage.isMain(eP.block)&&eP.block.fullBleed,c=a?` 30 -mx-3 sm:-mx-4 rounded-[0px]! sm:w-[calc(100%+32px)] w-[calc(100%+24px)] 31 ${ez?"-mt-2 sm:-mt-3":o?"-mt-[5px]":""} 32 ${e$?"-mb-1 sm:-mb-4":l?"-mb-[9px]":""} 33 `:"";return(0,t.jsx)("div",{className:`imageBlock flex ${a?"":s} ${c}`,...eZ,children:(0,t.jsx)(q.PublishedImageBlock,{src:n,alt:e.alt,height:e.aspectRatio?.height,width:e.aspectRatio?.width,displayWidth:e.width,mimeType:e.image.mimeType,videoSrc:i,isFullBleed:a,className:eQ,loading:ez?void 0:"lazy",onOpenLightbox:eG?()=>eq?.(eO,r):void 0,onOpenAltInLightbox:eG?()=>eq?.(eO,r,{altExpanded:!0}):void 0})})},ew[92]=s,ew[93]=eZ,ew[94]=eG,ew[95]=eV,ew[96]=eQ,ew[97]=eI,ew[98]=ez,ew[99]=e$,ew[100]=eP,ew[101]=eq,ew[102]=eO,ew[103]=e_,ew[104]=eu):eu=ew[104],ew[105]!==eZ||ew[106]!==eQ||ew[107]!==eI?(ed=e=>(0,t.jsx)("div",{className:eQ,...eZ,children:(0,t.jsx)(V.PublishedImageGallery,{block:e,did:eI})}),ew[105]=eZ,ew[106]=eQ,ew[107]=eI,ew[108]=ed):ed=ew[108],ew[109]!==eZ||ew[110]!==eQ||ew[111]!==eH||ew[112]!==eN||ew[113]!==eD||ew[114]!==eO||ew[115]!==eA||ew[116]!==e_?.block?(em=e=>(0,t.jsx)("blockquote",{className:`blockquote whitespace-pre-wrap py-0! ${eQ} ${x.PubLeafletBlocksBlockquote.isMain(e_?.block)&&!eD?"pt-3!":""}`,...eZ,children:(0,t.jsx)(A.TextBlock,{facets:e.facets,plaintext:e.plaintext,index:eN,preview:eA,pageId:eO,footnoteIndexMap:eH})}),ew[109]=eZ,ew[110]=eQ,ew[111]=eH,ew[112]=eN,ew[113]=eD,ew[114]=eO,ew[115]=eA,ew[116]=e_?.block,ew[117]=em):em=ew[117],ew[118]!==eZ||ew[119]!==eQ||ew[120]!==eH||ew[121]!==eN||ew[122]!==eO||ew[123]!==eA?(ef=e=>(0,t.jsx)("p",{className:`textBlock whitespace-pre-wrap ${eQ} ${"small"===e.textSize?"text-secondary":"text-primary"}`,...eZ,style:{...eZ.style,fontSize:"small"===e.textSize?"0.875em":"large"===e.textSize?"1.125em":Z.blockTextSize.p},children:(0,t.jsx)(A.TextBlock,{facets:e.facets,plaintext:e.plaintext,index:eN,preview:eA,pageId:eO,footnoteIndexMap:eH})}),ey=e=>{let n=(0,X.slugify)(e.plaintext),r={...eZ,id:eA?void 0:n||eZ.id},i={...e,index:eN,preview:eA,pageId:eO,footnoteIndexMap:eH},a=eO?`?page=${eO}#${n}`:`#${n}`,o=e=>eA||!n?e:(0,t.jsx)("a",{href:a,className:"no-underline text-inherit cursor-pointer",children:e});return 1===e.level?(0,t.jsx)("h2",{className:`h1Block whitespace-pre-wrap ${eQ} ${ec[1]}`,...r,style:{...r.style,fontSize:Z.blockTextSize.h1},children:o((0,t.jsx)(A.TextBlock,{...i}))}):2===e.level?(0,t.jsx)("h3",{className:`h2Block whitespace-pre-wrap ${eQ} ${ec[2]}`,...r,style:{...r.style,fontSize:Z.blockTextSize.h2},children:o((0,t.jsx)(A.TextBlock,{...i}))}):3===e.level?(0,t.jsx)("h4",{className:`h3Block whitespace-pre-wrap ${eQ} ${ec[3]}`,...r,style:{...r.style,fontSize:Z.blockTextSize.h3},children:o((0,t.jsx)(A.TextBlock,{...i}))}):(0,t.jsx)("h5",{className:`h6Block whitespace-pre-wrap ${eQ} ${ec[4]}`,...r,style:{...r.style,fontSize:Z.blockTextSize.h4},children:o((0,t.jsx)(A.TextBlock,{...i}))})},ew[118]=eZ,ew[119]=eQ,ew[120]=eH,ew[121]=eN,ew[122]=eO,ew[123]=eA,ew[124]=ef,ew[125]=ey):(ef=ew[124],ey=ew[125]),ew[126]!==eT.block||ew[127]!==y||ew[128]!==v||ew[129]!==N||ew[130]!==_||ew[131]!==P||ew[132]!==j||ew[133]!==B||ew[134]!==J||ew[135]!==ee||ew[136]!==et||ew[137]!==en||ew[138]!==eo||ew[139]!==es||ew[140]!==eu||ew[141]!==ed||ew[142]!==em||ew[143]!==ef||ew[144]!==ey||ew[145]!==c||ew[146]!==u||ew[147]!==h||ew[148]!==p||ew[149]!==m){let e={"pub.leaflet.blocks.page":c,"pub.leaflet.blocks.embeddedCanvas":u,"pub.leaflet.blocks.bskyPost":h,"pub.leaflet.blocks.standardSitePost":p,"pub.leaflet.blocks.standardSitePublication":m,"pub.leaflet.blocks.iframe":y,"pub.leaflet.blocks.html":v,"pub.leaflet.blocks.horizontalRule":ex,"pub.leaflet.blocks.membersOnlyDelimiter":N,"pub.leaflet.blocks.signup":_,"pub.leaflet.blocks.postHeader":P,"pub.leaflet.blocks.recommendedPubs":j,"pub.leaflet.blocks.postsList":B,"pub.leaflet.blocks.poll":J,"pub.leaflet.blocks.button":ee,"pub.leaflet.blocks.unorderedList":et,"pub.leaflet.blocks.orderedList":en,"pub.leaflet.blocks.drawing":eC,"pub.leaflet.blocks.math":eS,"pub.leaflet.blocks.code":eo,"pub.leaflet.blocks.website":es,"pub.leaflet.blocks.image":eu,"pub.leaflet.blocks.imageGallery":ed,"pub.leaflet.blocks.blockquote":em,"pub.leaflet.blocks.text":ef,"pub.leaflet.blocks.header":ey};ek=(0,w.matchBlock)(eT.block,e,eE),ew[126]=eT.block,ew[127]=y,ew[128]=v,ew[129]=N,ew[130]=_,ew[131]=P,ew[132]=j,ew[133]=B,ew[134]=J,ew[135]=ee,ew[136]=et,ew[137]=en,ew[138]=eo,ew[139]=es,ew[140]=eu,ew[141]=ed,ew[142]=em,ew[143]=ef,ew[144]=ey,ew[145]=c,ew[146]=u,ew[147]=h,ew[148]=p,ew[149]=m,ew[150]=ek}else ek=ew[150];return ek};function eh(e){let r,i,a=(0,n.c)(8),{data:o}=(0,B.useStandardSitePublication)(e.initialData?null:e.uri),s=e.initialData??o,l=s?.record,c=s?.uri;return a[0]!==e.initialData||a[1]!==e.uri?(r=(0,t.jsx)("div",{className:"bg-bg-page",children:e.initialData?(0,t.jsx)(j.StandardSitePublicationItemView,{publication:e.initialData}
33):(0,t.jsx)(j.StandardSitePublicationItem,{uri:e.uri})}),a[0]=e.initialData,a[1]=e.uri,a[2]=r):r=a[2],a[3]!==e.showPublicationTheme||a[4]!==l||a[5]!==c||a[6]!==r?(i=(0,t.jsx)("div",{className:"standardSitePublicationBlock block-border overflow-hidden w-full",children:(0,t.jsx)(O.WithPublicationTheme,{record:l,uri:c,enabled:e.showPublicationTheme,children:r})}),a[3]=e.showPublicationTheme,a[4]=l,a[5]=c,a[6]=r,a[7]=i):i=a[7],i}function ep(e){let r,i,a,o,s=(0,n.c)(24);s[0]!==e.pageId?(r=e.pageId?{type:"doc",id:e.pageId}:void 0,s[0]=e.pageId,s[1]=r):r=s[1];let l=r,c=(0,ee.usePostFrame)();s[2]!==c||s[3]!==l?(i={onOpen:e=>{c.openPage(l,{type:"iframe",url:e})},onReplaceWith:ef,onAddBelow:em},s[2]=c,s[3]=l,s[4]=i):i=s[4];let{iframeRef:u}=(0,J.useIframeChannel)(i),{theme:h}=(0,d.useDocument)();s[5]!==h?(a={theme:h},s[5]=h,s[6]=a):a=s[6];let p=(0,O.usePubTheme)(a),m=e.aspectRatio?`${e.aspectRatio.width}/${e.aspectRatio.height}`:void 0;if(e.html){let n,r,i=`relative w-full overflow-hidden group/embedBlock block-border my-2 ${m?"h-auto":""}`;return s[7]!==m||s[8]!==e.height?(n=m?{aspectRatio:m}:{height:e.height},s[7]=m,s[8]=e.height,s[9]=n):n=s[9],s[10]!==e.html||s[11]!==i||s[12]!==n?(r=(0,t.jsx)("iframe",{className:i,style:n,srcDoc:e.html,sandbox:N.srcDocSandbox,allow:"fullscreen",loading:"lazy",referrerPolicy:"no-referrer"}),s[10]=e.html,s[11]=i,s[12]=n,s[13]=r):r=s[13],r}if(!e.url)return null;if(s[14]!==m||s[15]!==u||s[16]!==e.height||s[17]!==e.url||s[18]!==p.bgPage||s[19]!==p.primary){let n,r=new URL(e.url);r.searchParams.set("parts.page.embed.ctx.mode","view"),r.searchParams.set("parts.page.embed.ctx.bgColor",p.bgPage.toString("hex")),r.searchParams.set("parts.page.embed.ctx.primaryColor",p.primary.toString("hex")),s[21]!==m||s[22]!==e.height?(n=m?{aspectRatio:m}:{height:e.height},s[21]=m,s[22]=e.height,s[23]=n):n=s[23],o=(0,t.jsx)("iframe",{ref:u,className:`relative w-full overflow-hidden group/embedBlock block-border my-2 ${m?"h-auto":""}`,style:n,src:r.toString(),allow:"fullscreen",loading:"lazy"}),s[14]=m,s[15]=u,s[16]=e.height,s[17]=e.url,s[18]=p.bgPage,s[19]=p.primary,s[20]=o}else o=s[20];return o}function em(){}function ef(){}function eg(e){return l.PubLeafletBlocksHeader.isMain(e)?"heading":x.PubLeafletBlocksBlockquote.isMain(e)?"blockquote":v.PubLeafletBlocksHorizontalRule.isMain(e)?"horizontal-rule":s.PubLeafletBlocksUnorderedList.isMain(e)||y.PubLeafletBlocksOrderedList.isMain(e)?"list":"other"}function ey(e){return e?"-ml-[22px]":"-ml-[2px]"}function eb(e){let r,i,a,o,s,l,c,u,d,h=(0,n.c)(54),p=void 0!==e.item.checked;h[0]!==p||h[1]!==e.bskyPostData||h[2]!==e.className||h[3]!==e.did||h[4]!==e.footnoteIndexMap||h[5]!==e.index||h[6]!==e.item.children||h[7]!==e.pageId||h[8]!==e.pages||h[9]!==e.pollData||h[10]!==e.standardSitePostData||h[11]!==e.standardSitePublicationData?(r=e.item.children?.length?(0,t.jsx)("ul",{className:ey(p),children:e.item.children.map((n,r)=>(0,t.jsx)(eb,{pages:e.pages,pollData:e.pollData,bskyPostData:e.bskyPostData,standardSitePostData:e.standardSitePostData,standardSitePublicationData:e.standardSitePublicationData,index:[...e.index,r],item:n,did:e.did,className:e.className,pageId:e.pageId,footnoteIndexMap:e.footnoteIndexMap},r))}):null,h[0]=p,h[1]=e.bskyPostData,h[2]=e.className,h[3]=e.did,h[4]=e.footnoteIndexMap,h[5]=e.index,h[6]=e.item.children,h[7]=e.pageId,h[8]=e.pages,h[9]=e.pollData,h[10]=e.standardSitePostData,h[11]=e.standardSitePublicationData,h[12]=r):r=h[12];let m=r;h[13]!==p||h[14]!==e.bskyPostData||h[15]!==e.className||h[16]!==e.did||h[17]!==e.footnoteIndexMap||h[18]!==e.index||h[19]!==e.item.orderedListChildren||h[20]!==e.pageId||h[21]!==e.pages||h[22]!==e.pollData||h[23]!==e.standardSitePostData||h[24]!==e.standardSitePublicationData?(i=e.item.orderedListChildren?.children?.length?(0,t.jsx)("ol",{className:ey(p),children:e.item.orderedListChildren.children.map((n,r)=>(0,t.jsx)(ev,{pages:e.pages,pollData:e.pollData,bskyPostData:e.bskyPostData,standardSitePostData:e.standardSitePostData,standardSitePublicationData:e.standardSitePublicationData,index:[...e.index,r],item:n,did:e.did,className:e.className,pageId:e.pageId,startIndex:e.item.orderedListChildren?.startIndex,footnoteIndexMap:e.footnoteIndexMap},r))}):null,h[13]=p,h[14]=e.bskyPostData,h[15]=e.className,h[16]=e.did,h[17]=e.footnoteIndexMap,h[18]=e.index,h[19]=e.item.orderedListChildren,h[20]=e.pageId,h[21]=e.pages,h[22]=e.pollData,h[23]=e.standardSitePostData,h[24]=e.standardSitePublicationData,h[25]=i):i=h[25];let f=i,g=`listMarker shrink-0 mr-3 z-1 mt-[14px] h-[5px] w-[5px] ${e.item.content?.$type!=="null"?"rounded-full bg-secondary":""}`;return h[26]!==g?(a=(0,t.jsx)("div",{className:"flex justify-end w-8 shrink-0",children:(0,t.jsx)("div",{className:g})}),h[26]=g,h[27]=a):a=h[27],h[28]!==p||h[29]!==e.item.checked?(o=p&&(0,t.jsx)("div",{className:`shrink-0 flex items-center h-3 mt-1 pt-[12px] pr-2 ${e.item.checked?"text-accent-contrast":"text-border"}`,children:e.item.checked?(0,t.jsx)(et.CheckboxChecked,{}):(0,t.jsx)(en.CheckboxEmpty,{})}),h[28]=p,h[29]=e.item.checked,h[30]=o):o=h[30],h[31]!==a||h[32]!==o?(s=(0,t.jsxs)("div",{className:"flex shrink-0",children:[a,o]}),h[31]=a,h[32]=o,h[33]=s):s=h[33],h[34]!==e.item.content?(l={block:e.item.content},h[34]=e.item.content,h[35]=l):l=h[35],h[36]!==e.bskyPostData||h[37]!==e.did||h[38]!==e.footnoteIndexMap||h[39]!==e.index||h[40]!==e.pageId||h[41]!==e.pages||h[42]!==e.pollData||h[43]!==e.standardSitePostData||h[44]!==e.standardSitePublicationData||h[45]!==l?(c=(0,t.jsx)(ed,{pollData:e.pollData,pages:e.pages,bskyPostData:e.bskyPostData,standardSitePostData:e.standardSitePostData,standardSitePublicationData:e.standardSitePublicationData,block:l,did:e.did,isList:!0,index:e.index,pageId:e.pageId,footnoteIndexMap:e.footnoteIndexMap}),h[36]=e.bskyPostData,h[37]=e.did,h[38]=e.footnoteIndexMap,h[39]=e.index,h[40]=e.pageId,h[41]=e.pages,h[42]=e.pollData,h[43]=e.standardSitePostData,h[44]=e.standardSitePublicationData,h[45]=l,h[46]=c):c=h[46],h[47]!==m||h[48]!==f||h[49]!==c?(u=(0,t.jsxs)("div",{className:"flex flex-col w-full min-w-0",children:[c,m,f]}),h[47]=m,h[48]=f,h[49]=c,h[50]=u):u=h[50],h[51]!==s||h[52]!==u?(d=(0,t.jsxs)("li",{className:"pb-0! flex flex-row gap-2",children:[s,u]}),h[51]=s,h[52]=u,h[53]=d):d=h[53],d}function ev(e){let r,i,a,o,s,l,c,u,d,h=(0,n.c)(55),p=(e.startIndex||1)+e.index[e.index.length-1],m=void 0!==e.item.checked;h[0]!==m||h[1]!==e.bskyPostData||h[2]!==e.className||h[3]!==e.did||h[4]!==e.footnoteIndexMap||h[5]!==e.index||h[6]!==e.item.children||h[7]!==e.pageId||h[8]!==e.pages||h[9]!==e.pollData||h[10]!==e.standardSitePostData||h[11]!==e.standardSitePublicationData||h[12]!==e.startIndex?(r=e.item.children?.length?(0,t.jsx)("ol",{className:ey(m),children:e.item.children.map((n,r)=>(0,t.jsx)(ev,{pages:e.pages,pollData:e.pollData,bskyPostData:e.bskyPostData,standardSitePostData:e.standardSitePostData,standardSitePublicationData:e.standardSitePublicationData,index:[...e.index,r],item:n,did:e.did,className:e.className,pageId:e.pageId,startIndex:e.startIndex,footnoteIndexMap:e.footnoteIndexMap},r))}):null,h[0]=m,h[1]=e.bskyPostData,h[2]=e.className,h[3]=e.did,h[4]=e.footnoteIndexMap,h[5]=e.index,h[6]=e.item.children,h[7]=e.pageId,h[8]=e.pages,h[9]=e.pollData,h[10]=e.standardSitePostData,h[11]=e.standardSitePublicationData,h[12]=e.startIndex,h[13]=r):r=h[13];let f=r;h[14]!==m||h[15]!==e.bskyPostData||h[16]!==e.className||h[17]!==e.did||h[18]!==e.footnoteIndexMap||h[19]!==e.index||h[20]!==e.item.unorderedListChildren||h[21]!==e.pageId||h[22]!==e.pages||h[23]!==e.pollData||h[24]!==e.standardSitePostData||h[25]!==e.standardSitePublicationData?(i=e.item.unorderedListChildren?.children?.length?(0,t.jsx)("ul",{className:ey(m),children:e.item.unorderedListChildren.children.map((n,r)=>(0,t.jsx)(eb,{pages:e.pages,pollData:e.pollData,bskyPostData:e.bskyPostData,standardSitePostData:e.standardSitePostData,standardSitePublicationData:e.standardSitePublicationData,index:[...e.index,r],item:n,did:e.did,className:e.className,pageId:e.pageId,footnoteIndexMap:e.footnoteIndexMap},r))}):null,h[14]=m,h[15]=e.bskyPostData,h[16]=e.className,h[17]=e.did,h[18]=e.footnoteIndexMap,h[19]=e.index,h[20]=e.item.unorderedListChildren,h[21]=e.pageId,h[22]=e.pages,h[23]=e.pollData,h[24]=e.standardSitePostData,h[25]=e.standardSitePublicationData,h[26]=i):i=h[26];let g=i;
33return h[27]!==p?(a=(0,t.jsxs)("div",{className:"listMarker shrink-0 w-8 text-right z-1 mt-[4px]",children:[p,"."]}),h[27]=p,h[28]=a):a=h[28],h[29]!==m||h[30]!==e.item.checked?(o=m&&(0,t.jsx)("div",{className:`shrink-0 flex items-center h-3 mt-1 pt-[12px] pr-2 ${e.item.checked?"text-accent-contrast":"text-border"}`,children:e.item.checked?(0,t.jsx)(et.CheckboxChecked,{}):(0,t.jsx)(en.CheckboxEmpty,{})}),h[29]=m,h[30]=e.item.checked,h[31]=o):o=h[31],h[32]!==a||h[33]!==o?(s=(0,t.jsxs)("div",{className:"flex shrink-0",children:[a,o]}),h[32]=a,h[33]=o,h[34]=s):s=h[34],h[35]!==e.item.content?(l={block:e.item.content},h[35]=e.item.content,h[36]=l):l=h[36],h[37]!==e.bskyPostData||h[38]!==e.did||h[39]!==e.footnoteIndexMap||h[40]!==e.index||h[41]!==e.pageId||h[42]!==e.pages||h[43]!==e.pollData||h[44]!==e.standardSitePostData||h[45]!==e.standardSitePublicationData||h[46]!==l?(c=(0,t.jsx)(ed,{pollData:e.pollData,pages:e.pages,bskyPostData:e.bskyPostData,standardSitePostData:e.standardSitePostData,standardSitePublicationData:e.standardSitePublicationData,block:l,did:e.did,isList:!0,index:e.index,pageId:e.pageId,footnoteIndexMap:e.footnoteIndexMap}),h[37]=e.bskyPostData,h[38]=e.did,h[39]=e.footnoteIndexMap,h[40]=e.index,h[41]=e.pageId,h[42]=e.pages,h[43]=e.pollData,h[44]=e.standardSitePostData,h[45]=e.standardSitePublicationData,h[46]=l,h[47]=c):c=h[47],h[48]!==f||h[49]!==c||h[50]!==g?(u=(0,t.jsxs)("div",{className:"flex flex-col w-full min-w-0",children:[c,f,g]}),h[48]=f,h[49]=c,h[50]=g,h[51]=u):u=h[51],h[52]!==s||h[53]!==u?(d=(0,t.jsxs)("li",{className:"pb-0! flex flex-row gap-2",children:[s,u]}),h[52]=s,h[53]=u,h[54]=d):d=h[54],d}function ex(){return(0,t.jsx)("hr",{className:"my-4 w-full border-border-light"})}function ek(e,t){return{id:String(t),stroke:e}}function ew(e,t){return{id:String(t),fill:e}}function eC(e){return(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(P.InkSvg,{viewBox:e.viewBox,strokes:e.strokes.map(ek),fills:e.fills?.map(ew)})})}function eS(e){return(0,t.jsx)(_.StaticMathBlock,{block:e})}function eE(){return null}var eT=e.i(174080),eI=e.i(283599),eD=e.i(271235),eN=e.i(788613),eA=e.i(46454),e_=e.i(612854),eP=e.i(124851);function eM(e){return e?(e.likeCount??0)+(e.replyCount??0)*1.5+(e.quoteCount??0)*1.5:0}function eR(e){if(0===e.length)return null;let t=new URLSearchParams({uris:JSON.stringify(e)});return`/api/bsky/hydrate?${t.toString()}`}async function eL(e){let t=new URLSearchParams({uris:JSON.stringify(e)}),n=await fetch(`/api/bsky/hydrate?${t.toString()}`);if(!n.ok)throw Error("Failed to fetch Bluesky posts");return n.json()}function ej(e){let t=e.map(e=>e.uri),n=eR(t);n&&(0,eD.preload)(n,()=>eL(t))}let eO=e=>{let i,o,s,l,c=(0,n.c)(7),{uri:u,normalizedDocument:h,normalizedPublication:m}=(0,d.useDocument)(),f=(0,p.getDocumentUrls)(h,u,m);c[0]!==e.quotesAndMentions?(i=eR(o=e.quotesAndMentions.map(e$)),c[0]=e.quotesAndMentions,c[1]=i,c[2]=o):(i=c[1],o=c[2]);let g=i;c[3]!==o?(s=()=>eL(o),c[3]=o,c[4]=s):s=c[4];let{data:y,isLoading:b}=(0,eI.default)(g,s),v=new Map;y?.forEach(e=>{v.set(e.uri,e)});let x=e.quotesAndMentions.sort((e,t)=>{let n=eM(v.get(e.uri));return eM(v.get(t.uri))-n}),k=0===e.quotesAndMentions.length?(0,t.jsxs)(eP.EmptyState,{container:"opaque",title:"It's quiet⦠for now.",children:[(0,t.jsx)("div",{className:"font-bold",children:"no quotes yet!"}),(0,t.jsx)("div",{children:"highlight any part of this post to quote it"})]}):b?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 text-tertiary italic text-sm mt-8",children:[(0,t.jsx)("span",{children:"loading"}),(0,t.jsx)(eN.DotLoader,{})]}):x.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-4 sm:gap-6",children:x.map((n,i)=>{let o=v.get(n.uri);if(!o)return null;let s={type:"thread",uri:n.uri},l=null;if(n.link){let e=new URL(n.link).pathname.split("/l-quote/")[1];e&&(l=(0,p.decodeQuotePosition)(e)??null)}let c=!(a.AppBskyEmbedExternal.isView(o.embed)&&(0,p.matchDocumentUrl)(o.embed.external.uri,f));return(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(e_.BskyPostContent,{post:o,parent:s,showBlueskyLink:!0,showEmbed:c,avatarSize:"medium",quoteEnabled:!0,replyEnabled:!0,className:"text-sm",compactEmbed:!0,hasQuote:l?{index:i,did:e.did,position:l}:void 0}),(0,t.jsx)("hr",{className:"border-border-light last:hidden"})]},n.uri)})});return c[5]!==k?(l=(0,t.jsx)(t.Fragment,{children:k}),c[5]=k,c[6]=l):l=c[6],l},eB=e=>{var r,a;let p,f,g,y,b,v,x,k,w,C,S,E,T,I=(0,n.c)(28),D=(0,i.useIsMobile)(),N=(0,ee.usePostFrame)(),{uri:A}=(0,d.useDocument)(),{pages:_}=(0,h.useLeafletContent)();I[0]!==_||I[1]!==e.position.pageId?(f=e.position.pageId?_.find(t=>
33t.id===e.position.pageId):_[0],I[0]=_,I[1]=e.position.pageId,I[2]=f):f=I[2];let P=f;I[3]!==P||I[4]!==e.position?(r=(0,u.pageBlocksInOrder)(P),a=e.position,p=[],r.forEach(({block:e,index:t})=>{if(s.PubLeafletBlocksUnorderedList.isMain(e.block)){let n=function e(t,n,r){let i=[];return Array.isArray(t)?(t.forEach((t,a)=>{let o=[...r,a],s={block:t.content},l=eF(o,n)?eU(s,o,n):null,c=[];t.children&&(c=e(t.children,n,o)),(l||c.length)&&i.push({content:l?.block||{$type:"null"},children:c.length>0?c:void 0})}),i):[]}(e.block.children,a,t);n.length>0&&p.push({...e,block:{...e.block,children:n}});return}if(eF(t,a))if(o.PubLeafletBlocksText.isMain(e.block)||l.PubLeafletBlocksHeader.isMain(e.block)||c.PubLeafletBlocksCode.isMain(e.block)){let n=eU(e,t,a);n&&p.push(n)}else p.push(e)}),g=p,I[3]=P,I[4]=e.position,I[5]=g):g=I[5];let M=g;return I[6]!==e.position?(y=()=>{m.useActiveHighlightState.setState({activeHighlight:e.position})},I[6]=e.position,I[7]=y):y=I[7],I[8]!==A||I[9]!==N||I[10]!==D||I[11]!==e.position.pageId||I[12]!==e.position.start.block?(b=t=>{(0,eT.flushSync)(()=>N.showPage(e.position.pageId));let n=D?16:t.currentTarget.getBoundingClientRect().top,r=`post-page-${e.position.pageId??A}`,i=window.document.getElementById(r),a=window.document.getElementById(e.position.start.block.join("."));if(!a||!i)return;let o=a.getBoundingClientRect(),s=i&&o.top+i.scrollTop||0;o.left<0&&i.scrollIntoView({behavior:"smooth"}),i?.scrollTo({top:s-n,behavior:"smooth"})},I[8]=A,I[9]=N,I[10]=D,I[11]=e.position.pageId,I[12]=e.position.start.block,I[13]=b):b=I[13],I[14]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsxs)("div",{className:"flex flex-col w-4",children:[(0,t.jsx)("div",{className:"shrink-0 h-1 w-0.5 border border-border mx-auto mt-2"}),(0,t.jsx)(eA.QuoteTiny,{className:"shrink-0 text-tertiary "}),(0,t.jsx)("div",{className:"w-0.5 grow border border-border mx-auto mb-2"})]}),I[14]=v):v=I[14],I[15]===Symbol.for("react.memo_cache_sentinel")?(x=[],k=[],w=[],C=[],I[15]=x,I[16]=k,I[17]=w,I[18]=C):(x=I[15],k=I[16],w=I[17],C=I[18]),I[19]!==M||I[20]!==e.did?(S=(0,t.jsxs)("div",{className:"flex gap-3 items-stretch italic rounded-md pt-1 ",children:[v,(0,t.jsx)(eu,{pollData:x,pages:k,bskyPostData:w,standardSitePostData:C,blocks:M,did:e.did,preview:!0,className:"pt-3! px-0! text-tertiary"})]}),I[19]=M,I[20]=e.did,I[21]=S):S=I[21],I[22]!==b||I[23]!==S?(E=(0,t.jsx)("div",{className:"quoteSectionQuote text-secondary text-sm text-left hover:cursor-pointer",onClick:b,children:S}),I[22]=b,I[23]=S,I[24]=E):E=I[24],I[25]!==E||I[26]!==y?(T=(0,t.jsx)("div",{className:"quoteSection",onMouseLeave:eV,onMouseEnter:y,children:E}),I[25]=E,I[26]=y,I[27]=T):T=I[27],T};function eF(e,t){let{start:n,end:r}=t,i=eH(e,n.block)>=0,a=0>=eH(e,r.block);return i&&a}function eH(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){if(e[r]<t[r])return -1;if(e[r]>t[r])return 1}return e.length-t.length}function eU(e,t,n){let r;if(!o.PubLeafletBlocksText.isMain(e.block)&&!l.PubLeafletBlocksHeader.isMain(e.block)&&!c.PubLeafletBlocksCode.isMain(e.block))return e;let{start:i,end:a}=n,s=0,u=e.block.plaintext.length;ez(t,i.block)&&(s=i.offset),ez(t,a.block)&&(u=a.offset);let d=e.block.plaintext.substring(s,u);return d?((o.PubLeafletBlocksText.isMain(e.block)||l.PubLeafletBlocksHeader.isMain(e.block))&&(r=Array.isArray(e.block?.facets)?e.block?.facets?.map(e=>{let t=e.index.byteStart,n=e.index.byteEnd;return n<=s||t>=u?null:{...e,index:{byteStart:Math.max(0,t-s),byteEnd:Math.min(d.length,n-s)}}}).filter(e=>null!==e):[]),{...e,block:{...e.block,plaintext:d,facets:r}}):null}function ez(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function e$(e){return e.uri}function eV(){m.useActiveHighlightState.setState({activeHighlight:null})}},596814,968562,e=>{"use strict";e.s(["StandardSitePostDrawerView",()=>w],596814);var t=e.i(843476),n=e.i(500932),r=e.i(788613),i=e.i(132711),a=e.i(465082),o=e.i(126479),s=e.i(912383),l=e.i(902057);e.s(["filterQuotesForPage",()=>b,"prefetchDocumentDiscussion",()=>v,"useDocumentDiscussionData",()=>x],968562);var c=e.i(283599),u=e.i(271235),d=e.i(593302),h=e.i(935593);e.i(314192);
33var p=e.i(615405),m=e.i(250209),f=e.i(517770);let g=e=>["doc_interactions",e],y=e=>(0,h.callRPC)("get_document_interactions",{document_uri:e});function b(e,t){return e.filter(e=>{if(!e.link)return!t;let n=new URL(e.link).pathname.split("/l-quote/")[1];if(!n)return!t;let r=(0,f.decodeQuotePosition)(n);return r?.pageId===t})}async function v(e,t){let n=await (0,u.preload)(g(e),()=>y(e));(0,l.prefetchQuotesData)(b(n?.quotesAndMentions??[],t))}function x(e,t){let r,i,a,o,s,l,u,h,f,b,v,x=(0,n.c)(35);x[0]!==e||x[1]!==t?(r=t?g(e):null,x[0]=e,x[1]=t,x[2]=r):r=x[2],x[3]!==e?(i=()=>y(e),x[3]=e,x[4]=i):i=x[4];let w=(0,c.default)(r,i),C=w.data;try{let t;x[5]!==e?(t=new d.AtUri(e),x[5]=e,x[6]=t):t=x[6],a=t.host}catch{a=""}let S=C?.document??null;x[7]!==S?(o=S?(0,p.getDocumentPages)(S)??[]:[],x[7]=S,x[8]=o):o=x[8];let E=o;if(x[9]!==C?.comments?(s=C?.comments??[],x[9]=C?.comments,x[10]=s):s=x[10],x[11]!==s){for(let e of(u=s.filter(k),l={},u)){let t=e.record?.onPage??"";l[t]=(l[t]??0)+1}x[11]=s,x[12]=l,x[13]=u}else l=x[12],u=x[13];x[14]!==l||x[15]!==C?.publication||x[16]!==C?.quotesAndMentions||x[17]!==S||x[18]!==e||x[19]!==u?(h=S?{uri:e,normalizedDocument:S,normalizedPublication:C?.publication??null,postUrl:(0,m.getDocumentURL)(S,e,C?.publication),theme:null,prevNext:null,quotesAndMentions:C?.quotesAndMentions??[],publication:null,commentsCount:u.length,commentsCountByPage:l,mentions:[],recommendsCount:0}:null,x[14]=l,x[15]=C?.publication,x[16]=C?.quotesAndMentions,x[17]=S,x[18]=e,x[19]=u,x[20]=h):h=x[20];let T=h,I=C?.publication?.preferences;x[21]!==C?.comments?(f=C?.comments??[],x[21]=C?.comments,x[22]=f):f=x[22];let D=f;x[23]!==C?.quotesAndMentions?(b=C?.quotesAndMentions??[],x[23]=C?.quotesAndMentions,x[24]=b):b=x[24];let N=I?.showComments!==!1,A=I?.showMentions!==!1;return x[25]!==C||x[26]!==a||x[27]!==T||x[28]!==E||x[29]!==w.isLoading||x[30]!==D||x[31]!==b||x[32]!==N||x[33]!==A?(v={isLoading:w.isLoading,data:C,did:a,pages:E,documentContextValue:T,comments:D,quotesAndMentions:b,showComments:N,showMentions:A},x[25]=C,x[26]=a,x[27]=T,x[28]=E,x[29]=w.isLoading,x[30]=D,x[31]=b,x[32]=N,x[33]=A,x[34]=v):v=x[34],v}function k(e){return!e.deleted}function w(e){let c,u,d,h=(0,n.c)(15),{isLoading:p,data:m,did:f,pages:g,documentContextValue:y,comments:b,quotesAndMentions:v}=x(e.uri,!0);return h[0]!==e.uri?(c=(0,t.jsx)("div",{className:"standardSitePostBlock block-border overflow-hidden bg-bg-page mb-3",children:(0,t.jsx)(i.StandardSitePostItem,{uri:e.uri,hideInteractions:!0})}),h[0]=e.uri,h[1]=c):c=h[1],h[2]!==b||h[3]!==m||h[4]!==f||h[5]!==y||h[6]!==p||h[7]!==g||h[8]!==e.tab||h[9]!==e.uri||h[10]!==v?(u=!m&&p?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 text-tertiary italic text-sm py-8",children:[(0,t.jsx)("span",{children:"loading"}),(0,t.jsx)(r.DotLoader,{})]}):y?(0,t.jsx)(o.LeafletContentProvider,{value:{pages:g},children:(0,t.jsx)(a.DocumentProvider,{value:y,children:"comments"===e.tab?(0,t.jsx)(s.CommentsDrawerContent,{document_uri:e.uri,comments:b}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"border-border-light mt-3 mb-6"}),(0,t.jsx)(l.DiscussionDrawerContent,{did:f,quotesAndMentions:v})]})})}):null,h[2]=b,h[3]=m,h[4]=f,h[5]=y,h[6]=p,h[7]=g,h[8]=e.tab,h[9]=e.uri,h[10]=v,h[11]=u):u=h[11],h[12]!==c||h[13]!==u?(d=(0,t.jsxs)("div",{className:"standardSitePostDiscussion flex flex-col",children:[c,u]}),h[12]=c,h[13]=u,h[14]=d):d=h[14],d}},658610,e=>{"use strict";let t={thread:"thread",quotes:"quotes",standardSitePost:"post",recommends:"recommends",tag:"tag"},n=new Map(Object.entries(t).map(([e,t])=>[t,e]));function r(e,t){let r=e?.indexOf(":")??-1;if(!e||-1===r)return"recommends"===e?{tab:"comments",thread:{type:"recommends",uri:t}}:{tab:"quotes"===e?"quotes":"comments"};let i=n.get(e.slice(0,r)),a=e.slice(r+1);return i&&a?{tab:"comments",thread:"tag"===i?{type:i,tag:a}:{type:i,uri:a}}:{tab:"comments"}}e.s(["drawerThreadFromLocation",0,function(e){return r(new URL(window.location.href).searchParams.get("interactionDrawer"),e).thread},"parseDrawerParam",0,r,"serializeDrawerParam",0,function(e,n){let r=e.threadStack[e.threadStack.length-1];return r?"recommends"===r.type&&r.uri===n?"recommends":`${t[r.type]}:${"tag"===r.type?r.tag:r.uri}`:e.drawer}])},794866,510038,e=>{"use strict";e.s(["DrawerThreadContext",()=>f,"DrawerThreadPageProvider",()=>y,"drawerThreadKey",()=>p,"sameDrawerThread",()=>m,"useOpenThread",()=>g],794866);var t=e.i(843476),n=e.i(500932),r=e.i(271645);e.s(["PostFrameProvider",()=>c,"PublishedPostFrame",()=>h,"usePostFrame",()=>l],510038);var i=e.i(465082),a=e.i(602448),o=e.i(871040);let s=(0,r.createContext)(null);function l(){let e=(0,r.useContext)(s),t=u();return e??t}function c(e){let r,i=(0,n.c)(3);return i[0]!==e.children||i[1]!==e.value?(r=(0,t.jsx)(s.Provider,{value:e.value,children:e.children}),i[0]=e.children,i[1]=e.value,i[2]=r):r=i[2],r}function u(){let e,t,r,s,l=(0,n.c)(9),c=(0,i.useDocumentOptional)()?.uri,u=(0,a.useOpenPages)();return l[0]!==c?(e=(e,t)=>{c&&(0,o.openInteractionDrawer)(e,c,t)},t=(e,t)=>{c&&(0,o.toggleInteractionDrawer)(e,c,t)},r=(e,t)=>{c&&(0,o.openDrawerThread)(c,e,t)},l[0]=c,l[1]=e,l[2]=t,l[3]=r):(e=l[1],t=l[2],r=l[3]),l[4]!==u||l[5]!==e||l[6]!==t||l[7]!==r?(s={drawer:!0,headerInteractions:!0,openPages:u,openPage:a.openPage,closePage:a.closePage,showPage:d,openDiscussion:e,toggleDiscussion:t,openThread:r},l[4]=u,l[5]=e,l[6]=t,l[7]=r,l[8]=s):s=l[8],s}function d(e){e&&(0,a.openPage)(void 0,{type:"doc",id:e})}function h(e){let r,i=(0,n.c)(3);(0,a.useInitializeOpenPages)();let o=u();return i[0]!==e.children||i[1]!==o?(r=(0,t.jsx)(c,{value:o,children:e.children}),i[0]=e.children,i[1]=o,i[2]=r):r=i[2],r}function p(e){return"tag"===e.type?e.tag:e.uri}function m(e,t){return e.type===t.type&&p(e)===p(t)}let f=(0,r.createContext)(null);function g(){let e,t=(0,n.c)(3),i=(0,r.useContext)(f),a=l();return t[0]!==i||t[1]!==a?(e=(e,t)=>{i?i.push(t):("thread"===t.type||"quotes"===t.type)&&a.openPage(e,t)},t[0]=i,t[1]=a,t[2]=e):e=t[2],e}function y(e){let r,i,a,o=(0,n.c)(6),s=l();return o[0]!==s||o[1]!==e.pageId?(i={push:t=>s.openThread(t,e.pageId)},o[0]=s,o[1]=e.pageId,o[2]=i):i=o[2],r=i,o[3]!==e.children||o[4]!==r?(a=(0,t.jsx)(f.Provider,{value:r,children:e.children}),o[3]=e.children,o[4]=r,o[5]=a):a=o[5],a}},750050,138374,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(465082),i=e.i(271645),a=e.i(459759),o=e.i(503410),s=e.i(545850),l=e.i(69278),c=e.i(634622),u=e.i(532089),d=e.i(681415),h=e.i(231363),p=e.i(192506),m=e.i(124670),f=e.i(620196),g=e.i(706682),y=e.i(949555),b=e.i(860740);function v(e){return e.monthly_price_cents}function x(e){return e.name}e.s(["MembersOnlyPaywall",0,()=>{let e,k,w,C,S,E,T,I,D,N=(0,n.c)(37),A=(0,r.useDocumentOptional)(),_=(0,y.useUnlockStatus)(),P=A?.publication,M=(0,s.useViewerSubscription)(P?.uri),{membership:R}=(0,d.useMyMembership)(P?.uri??""),[L,j]=(0,i.useState)(!1);if(!P)return null;if("loading"===_){let e;return N[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"membersOnlyPaywall my-4 flex flex-col items-center gap-2 text-center block-border bg-bg-page px-4 py-6",children:(0,t.jsx)("div",{role:"status","aria-label":"Checking access",className:"flex items-center gap-1 font-bold text-secondary",children:(0,t.jsx)(g.LoadingTiny,{className:"animate-spin shrink-0"})})}),N[0]=e):e=N[0],e}let O=A?.membersOnly?.tiers;if(!O)return null;let B=O.paid,F=A?.membersOnly?.gatePolicy??null,H=F?.audience==="subscribers";if(N[1]!==F||N[2]!==B){let t;N[5]!==F?(t=e=>(0,p.membershipUnlocksGatedPost)({kind:"paid",tierId:e.id},F),N[5]=F,N[6]=t):t=N[6];let n=B.filter(t);e=n.length?Math.min(...n.map(v)):null,k=n.length<B.length?n.map(x):[],N[1]=F,N[2]=B,N[3]=e,N[4]=k}else e=N[3],k=N[4];let U=k,z=M.membership?.kind==="paid"&&!(0,p.membershipUnlocksGatedPost)(M.membership,F);N[7]!==P.record||N[8]!==P.uri?(w=P?.record?.icon?(0,m.blobRefToSrc)(P.record.icon.ref,new f.AtUri(P.uri).host):void 0,N[7]=P.record,N[8]=P.uri,N[9]=w):w=N[9];let $=P?.record?.name;N[10]!==w||N[11]!==$?(C=(0,t.jsx)(c.PubIcon,{icon:w,pubName:$,large:!0}),N[10]=w,N[11]=$,N[12]=C):C=N[12];let V=z?"Upgrade your membership to continue reading":H?"Subscribe to continue reading":"Become a member to continue reading";return N[13]!==V?(S=(0,t.jsx)("h3",{className:"leading-tight pb-1",children:V}),N[13]=V,N[14]=S):S=N[14],N[15]!==U||N[16]!==z||N[17]!==e||N[18]!==H?(E=H?(0,t.jsx)("p",{children:"Free for subscribers"}):null!==e&&(0,t.jsx)("p",{children:z&&U.length>0?`Available starting from ${(0,u.formatPrice)(e)}/month`:`Memberships start at ${(0,u.formatPrice)(e)}/month`}),N[15]=U,N[16]=z,N[17]=e,N[18]=H,N[19]=E):E=N[19],N[20]!==S||N[21]!==E?(T=(0,t.jsxs)("div",{className:"",children:[S,E]}),N[20]=S,N[21]=E,N[22]=T):T=N[22],N[23]!==L||N[24]!==F||N[25]!==R||N[26]!==O||N[27]!==z||N[28]!==P.name||N[29]!==P.newsletterMode||N[30]!==P.uri||N[31]!==M?(I=z?(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-center justify-center",children:[(0,t.jsx)(l.ButtonPrimary,{type:"button",className:"pubPageUpgrade",disabled:!R,onClick:()=>j(!0),children:"Upgrade"}),L&&R&&(0,t.jsx)(b.ChangePlanModal,{membership:R,title:"Upgrade your membership",gatePolicy:F,onSuccess:h.revalidateUnlocks,onClose:()=>j(!1)}),(0,t.jsx)(o.ManageSubscription,{publicationUri:P.uri,newsletterMode:P.newsletterMode,user:M,triggerLabel:"Manage Subscription",membershipTiers:O})]}):(0,t.jsx)(a.PaidSubscribeButton,{publicationUri:P.uri,publicationName:P.name,source:{placement:"paywall"},newsletterMode:P.newsletterMode,tiers:O,gatePolicy:F}),N[23]=L,N[24]=F,N[25]=R,N[26]=O,N[27]=z,N[28]=P.name,N[29]=P.newsletterMode,N[30]=P.uri,N[31]=M,N[32]=I):I=N[32],N[33]!==C||N[34]!==T||N[35]!==I?(D=(0,t.jsxs)("div",{className:"membersOnlyPaywall light-container flex flex-col items-center gap-3 text-center block-border bg-bg-page px-4 py-4 my-4 sm:my-6",children:[C,T,I]}),N[33]=C,N[34]=T,N[35]=I,N[36]=D):D=N[36],D}],750050);var k=e.i(819772),w=e.i(279490);e.s(["PublishedRecommendedPubs",0,e=>{let r,i,a=(0,n.c)(6),{listings:o}=(0,w.usePublicationRecommendationListings)(e.publicationUri);return 0===o.length?null:(a[0]!==e.publicationUri?(r={placement:"recommendation",publication:e.publicationUri},a[0]=e.publicationUri,a[1]=r):r=a[1],a[2]!==o||a[3]!==e.compact||a[4]!==r?(i=(0,t.jsx)(k.RecommendedPubsGrid,{listings:o,compact:e.compact,subscribeSource:r}),a[2]=o,a[3]=e.compact,a[4]=r,a[5]=i):i=a[5],i)}],138374)},949555,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(283599);let a=(0,e.i(271235).withMiddleware)(i.default,e=>
33(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)));var o=e.i(465082),s=e.i(126479),l=e.i(806398),c=e.i(95187);let u=(0,c.createServerReference)("40b94e794d640989b8b4c1851bf2ba825b4b5d8673",c.callServer,void 0,c.findSourceMapURL,"getUnlockedPost"),d=(0,r.createContext)(null),h=(0,r.createContext)("idle");e.s(["PostDataProvider",0,function(e){let r,i,c,p,m,f,g,y,b,v,x=(0,n.c)(23),{document:k,initial:w}=e,{identity:C,identityPending:S}=(0,l.useIdentityData)(),E=k.uri,T=!!k.membersOnly?.gated;x[0]!==E||x[1]!==T||x[2]!==C?(r=T&&C?.id?["unlocked-post",E,C.id]:null,x[0]=E,x[1]=T,x[2]=C,x[3]=r):r=x[3],x[4]!==E?(i=()=>u(E),x[4]=E,x[5]=i):i=x[5];let{data:I,error:D}=a(r,i),N=I?.entitled?I:null,A=!T||N?"idle":D?"error":S||C?.id&&!I?"loading":"idle",_=N??w;return x[6]!==k||x[7]!==N?(p=N&&k.membersOnly?{...k,membersOnly:{...k.membersOnly,gated:!1}}:k,x[6]=k,x[7]=N,x[8]=p):p=x[8],c=p,x[9]!==_.pages?(f={pages:_.pages},x[9]=_.pages,x[10]=f):f=x[10],m=f,x[11]!==A||x[12]!==e.children?(g=(0,t.jsx)(h.Provider,{value:A,children:e.children}),x[11]=A,x[12]=e.children,x[13]=g):g=x[13],x[14]!==_||x[15]!==g?(y=(0,t.jsx)(d.Provider,{value:_,children:g}),x[14]=_,x[15]=g,x[16]=y):y=x[16],x[17]!==m||x[18]!==y?(b=(0,t.jsx)(s.LeafletContentProvider,{value:m,children:y}),x[17]=m,x[18]=y,x[19]=b):b=x[19],x[20]!==c||x[21]!==b?(v=(0,t.jsx)(o.DocumentProvider,{value:c,children:b}),x[20]=c,x[21]=b,x[22]=v):v=x[22],v},"usePostResources",0,function(){let e=(0,r.useContext)(d);if(!e)throw Error("usePostResources must be used within PostDataProvider");return e},"useUnlockStatus",0,function(){return(0,r.useContext)(h)}],949555)},788244,e=>{"use strict";e.s(["PostHeader",()=>g,"PostHeaderLayout",()=>v]);var t=e.i(843476),n=e.i(500932),r=e.i(250209),i=e.i(871040),a=e.i(510038),o=e.i(794866),s=e.i(465218),l=e.i(853915),c=e.i(899169),u=e.i(338448),d=e.i(859015),h=e.i(732849),p=e.i(271645),m=e.i(425481),f=e.i(229770);function g(e){let o,u,d,h,p,m,f,g=(0,n.c)(29),b=e.data,x=b?.normalizedDocument,k=e.profile,w=e.data?.documents_in_publications[0]?.publications,C=(0,s.usePostEditLink)(b?.uri,w?.identity_did),{headerInteractions:S}=(0,a.usePostFrame)();if(!b?.data||!x)return null;g[0]!==b||g[1]!==w?(o=w&&(0,t.jsx)(c.SpeedyLink,{className:"font-bold no-underline! text-accent-contrast",href:b&&(0,r.getPublicationURL)(w),children:w?.name}),g[0]=b,g[1]=w,g[2]=o):o=g[2],g[3]!==C?(u=C&&(0,t.jsx)("a",{className:"absolute -right-3 sm:-right-4 top-0 bottom-0 rounded-full flex place-items-center",href:C,children:(0,t.jsx)(l.EditTiny,{className:"shrink-0"})}),g[3]=C,g[4]=u):u=g[4],g[5]!==o||g[6]!==u?(d=(0,t.jsxs)(t.Fragment,{children:[o,u]}),g[5]=o,g[6]=u,g[7]=d):d=g[7];let E=e.compact?void 0:x.description,T=!S;return g[8]!==k||g[9]!==e.contributors||g[10]!==x||g[11]!==T?(h=(0,t.jsx)(y,{record:x,profile:k,contributors:e.contributors,hideTags:T}),g[8]=k,g[9]=e.contributors,g[10]=x,g[11]=T,g[12]=h):h=g[12],g[13]!==b?.commentsCountByPage||g[14]!==b?.quotesAndMentions||g[15]!==b?.recommendsCount||g[16]!==S||g[17]!==e.isCanvas||g[18]!==e.preferences?(p=!e.isCanvas&&S&&(0,t.jsx)(i.Interactions,{className:"sm:mt-0 mt-1",showComments:!1!==e.preferences.showComments,showMentions:!1!==e.preferences.showMentions,showRecommends:!1!==e.preferences.showRecommends,quotesCount:(0,i.getQuoteCount)(b?.quotesAndMentions||[])||0,commentsCount:b?.commentsCountByPage[""]||0,recommendsCount:b?.recommendsCount||0}),g[13]=b?.commentsCountByPage,g[14]=b?.quotesAndMentions,g[15]=b?.recommendsCount,g[16]=S,g[17]=e.isCanvas,g[18]=e.preferences,g[19]=p):p=g[19],g[20]!==h||g[21]!==p?(m=(0,t.jsxs)(t.Fragment,{children:[h,p]}),g[20]=h,g[21]=p,g[22]=m):m=g[22],g[23]!==e.compact||g[24]!==x.title||g[25]!==d||g[26]!==E||g[27]!==m?(f=(0,t.jsx)(v,{compact:e.compact,pubLink:d,postTitle:x.title,postDescription:E,postInfo:m}),g[23]=e.compact,g[24]=x.title,g[25]=d,g[26]=E,g[27]=m,g[28]=f):f=g[28],f}function y(e){let r,i,s,l,c,g,y,v,x,k=(0,n.c)(20);k[0]!==e.contributors?(r=e.contributors??[],k[0]=e.contributors,k[1]=r):r=k[1];let w=r.filter(b),C=(0,a.usePostFrame)();k[2]!==C?(s={push:e=>C.openThread(e)},k[2]=C,k[3]=s):s=k[3],i=s;let S=e.record;k[4]!==S.publishedAt?(l=S?.publishedAt||new Date().toISOString(),k[4]=S.publishedAt,k[5]=l):l=k[5],k[6]===Symbol.for("react.memo_cache_sentinel")?(c={year:"numeric",month:"long",day:"2-digit"},k[6]=c):c=k[6];let E=(0,u.useLocalizedDate)(l,c);k[7]!==S.tags?(g=S.tags??[],k[7]=S.tags,k[8]=g):g=k[8];let T=g,I=e.hideTags?0:T.length,D=w.length>0?(0,t.jsx)("div",{className:"flex flex-row flex-wrap items-center text-tertiary",children:w.map((e,n)=>(0,t.jsxs)(p.Fragment,{children:[n>0&&(0,t.jsx)("span",{className:"whitespace-pre",children:(0,m.bylineSeparator)(n,w.length)}),(0,t.jsx)(h.ProfilePopover,{didOrHandle:e.did,trigger:(0,t.jsx)("span",{className:"hover:underline",children:(0,m.bylineName)(e)})})]},e.did))}):e.profile?(0,t.jsx)(h.ProfilePopover,{didOrHandle:e.profile.did,trigger:(0,t.jsx)("span",{className:"text-tertiary hover:underline",children:e.profile.displayName||e.profile.handle})}):null;return k[9]!==E||k[10]!==S.publishedAt?(y=S.publishedAt?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Separator,{classname:"h-4!"}),(0,t.jsx)("p",{children:(0,t.jsx)("time",{dateTime:S.publishedAt,children:E})})]}):null,k[9]=E,k[10]=S.publishedAt,k[11]=y):y=k[11],k[12]!==I||k[13]!==i||k[14]!==T?(v=I>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Separator,{classname:"h-4!"}),(0,t.jsx)(o.DrawerThreadContext.Provider,{value:i,children:(0,t.jsx)(f.TagPopover,{tags:T})})]}),k[12]=I,k[13]=i,k[14]=T,k[15]=v):v=k[15],k[16]!==D||k[17]!==y||k[18]!==v?(x=(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[D,y,v]}),k[16]=D,k[17]=y,k[18]=v,k[19]=x):x=k[19],x}function b(e){return e.displayName||e.handle}let v=e=>{let r,i,a,o,s,l=(0,n.c)(17),c=`postHeader w-full flex flex-col px-3 sm:px-4 ${e.compact?"pt-2 pb-3":"sm:pt-3 pt-2 pb-5"}`,u=`pubInfo relative flex text-accent-contrast font-bold justify-between w-full ${e.compact?"text-sm":""}`;l[0]!==e.pubLink||l[1]!==u?(r=(0,t.jsx)("div",{className:u,children:e.pubLink}),l[0]=e.pubLink,l[1]=u,l[2]=r):r=l[2],l[3]!==e.compact||l[4]!==e.postTitle?(i=e.postTitle&&(0,t.jsx)("h1",{className:`postTitle leading-tight pt-0.5 font-bold outline-hidden bg-transparent ${e.compact?"text-lg":"text-2xl"}`,children:e.postTitle}),l[3]=e.compact,l[4]=e.postTitle,l[5]=i):i=l[5],l[6]!==e.postDescription?(a=e.postDescription?(0,t.jsx)("div",{className:"postDescription italic text-secondary outline-hidden bg-transparent pt-2",children:e.postDescription}):null,l[6]=e.postDescription,l[7]=a):a=l[7];let d=`postInfo text-sm text-tertiary flex gap-1 flex-wrap justify-between ${e.compact?"pt-1.5":"pt-3"}`;return l[8]!==e.postInfo||l[9]!==d?(o=(0,t.jsx)("div",{className:d,children:e.postInfo}),l[8]=e.postInfo,l[9]=d,l[10]=o):o=l[10],l[11]!==c||l[12]!==r||l[13]!==i||l[14]!==a||l[15]!==o?(s=(0,t.jsxs)("header",{className:c,id:"post-header",children:[r,i,a,o]}),l[11]=c,l[12]=r,l[13]=i,l[14]=a,l[15]=o,l[16]=s):s=l[16],s}},253372,e=>{"use strict";e.s(["QuotesLink",()=>p,"ThreadLink",()=>h,"fetchQuotes",()=>d,"fetchThread",()=>s,"getQuotesKey",()=>u,"getThreadKey",()=>o,"useThreadPrefetchHandlers",()=>c]);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(271235),a=e.i(794866);let o=e=>`thread:${e}`;async function s(e){let t=new URLSearchParams({uri:e}),n=await fetch(`/api/bsky/thread?${t.toString()}`);if(!n.ok)throw Error("Failed to fetch thread");return n.json()}let l=e=>{(0,i.preload)(o(e),()=>s(e))};function c(e){let t,a,s,c,u=(0,n.c)(9),{cache:d}=(0,i.useSWRConfig)();u[0]!==d||u[1]!==e?(t=()=>{d.get(o(e))?.data||l(e)},u[0]=d,u[1]=e,u[2]=t):t=u[2];let h=t,p=(0,r.useRef)(null);u[3]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{p.current&&clearTimeout(p.current)},u[3]=a):a=u[3];let m=a;return u[4]!==h?(s=()=>{m(),p.current=setTimeout(h,150)},u[4]=h,u[5]=s):s=u[5],u[6]!==h||u[7]!==s?(c={onMouseEnter:s,onMouseLeave:m,onPointerDown:h},u[6]=h,u[7]=s,u[8]=c):c=u[8],c}let u=e=>`quotes:${e}`;async function d(e){let t=new URLSearchParams({uri:e}),n=await fetch(`/api/bsky/quotes?${t.toString()}`);if(!n.ok)throw Error("Failed to fetch quotes");return n.json()}function h(e){let r,i,o,s=(0,n.c)(12),{postUri:c,parent:u,children:d,className:h,onClick:p}=e,m=(0,a.useOpenThread)();s[0]!==p||s[1]!==m||s[2]!==u||s[3]!==c?(r=e=>{e.stopPropagation(),p?.(e),e.defaultPrevented||m(u,{type:"thread",uri:c})},s[0]=p,s[1]=m,s[2]=u,s[3]=c,s[4]=r):r=s[4];let f=r;s[5]!==c?(i=()=>{l(c)},s[5]=c,s[6]=i):i=s[6];let g=i;return s[7]!==d||s[8]!==h||s[9]!==f||s[10]!==g?(o=(0,t.jsx)("button",{className:h,onClick:f,onMouseEnter:g,onPointerDown:g,children:d}),s[7]=d,s[8]=h,s[9]=f,s[10]=g,s[11]=o):o=s[11],o}function p(e){let r,o,s,l=(0,n.c)(12),{postUri:c,parent:h,children:p,className:m,onClick:f}=e,g=(0,a.useOpenThread)();l[0]!==f||l[1]!==g||l[2]!==h||l[3]!==c?(r=e=>{e.stopPropagation(),f?.(e),e.defaultPrevented||g(h,{type:"quotes",uri:c})},l[0]=f,l[1]=g,l[2]=h,l[3]=c,l[4]=r):r=l[4];let y=r;l[5]!==c?(o=()=>{(0,i.preload)(u(c),()=>d(c))},l[5]=c,l[6]=o):o=l[6];let b=o;
33return l[7]!==p||l[8]!==m||l[9]!==y||l[10]!==b?(s=(0,t.jsx)("button",{className:m,onClick:y,onMouseEnter:b,onPointerDown:b,children:p}),l[7]=p,l[8]=m,l[9]=y,l[10]=b,l[11]=s):s=l[11],s}},278688,e=>{"use strict";e.s(["ThreadView",()=>b]);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(593302),a=e.i(620196),o=e.i(283599),s=e.i(794866),l=e.i(788613);e.i(521747);var c=e.i(498911),u=e.i(950649),d=e.i(612854),h=e.i(253372),p=e.i(836108),m=e.i(381677),f=e.i(465082),g=e.i(902057),y=e.i(517770);function b(e){let r,i,a,s=(0,n.c)(10),{parentUri:c,initialTab:u}=e;s[0]!==c?(r=c?(0,h.getThreadKey)(c):null,s[0]=c,s[1]=r):r=s[1],s[2]!==c?(i=()=>(0,h.fetchThread)(c),s[2]=c,s[3]=i):i=s[3];let{data:d,isLoading:p,error:m}=(0,o.default)(r,i);if(p){let e;return s[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 text-tertiary italic text-sm py-8",children:[(0,t.jsx)("span",{children:"loading thread"}),(0,t.jsx)(l.DotLoader,{})]}),s[4]=e):e=s[4],e}if(m){let e;return s[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"text-tertiary italic text-sm text-center py-8",children:"Failed to load thread"}),s[5]=e):e=s[5],e}return d?(s[6]!==u||s[7]!==c||s[8]!==d?(a=(0,t.jsx)(v,{post:d,parentUri:c,initialTab:u}),s[6]=u,s[7]=c,s[8]=d,s[9]=a):a=s[9],a):null}function v(e){let o,l,u,d,h,p,m,g,b,v,k=(0,n.c)(31),{post:C,parentUri:S}=e,E=(0,r.useRef)(null),T=null!==(0,r.useContext)(s.DrawerThreadContext),{uri:I,normalizedDocument:D,normalizedPublication:N}=(0,f.useDocument)();k[0]!==I?(o=new a.AtUri(I),k[0]=I,k[1]=o):o=k[1];let A=o.host;if(k[2]!==I||k[3]!==D||k[4]!==N?(u=(0,y.getDocumentUrls)(D,I,N),k[2]=I,k[3]=D,k[4]=N,k[5]=u):u=k[5],l=u,k[6]!==T?(d=()=>{!T&&E.current&&E.current.scrollIntoView({behavior:"instant",block:"start"})},h=[T],k[6]=T,k[7]=d,k[8]=h):(d=k[7],h=k[8]),(0,r.useEffect)(d,h),i.AppBskyFeedDefs.isNotFoundPost(C)){let e;return k[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(c.PostNotAvailable,{}),k[9]=e):e=k[9],e}if(i.AppBskyFeedDefs.isBlockedPost(C)){let e;return k[10]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"text-tertiary italic text-sm text-center py-8",children:"This post is blocked"}),k[10]=e):e=k[10],e}if(!i.AppBskyFeedDefs.isThreadViewPost(C)){let e;return k[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(c.PostNotAvailable,{}),k[11]=e):e=k[11],e}let _=C.post.author.did;if(k[12]!==C.parent){p=[];let e=C.parent;for(;e&&i.AppBskyFeedDefs.isThreadViewPost(e);)p.unshift(e),e=e.parent;k[12]=C.parent,k[13]=p}else p=k[13];let P=`threadContent flex flex-col gap-0 w-full ${0!==p.length&&"pt-1"}`;return k[14]!==S||k[15]!==p?(m=p.map((e,n)=>(0,t.jsx)(w,{post:e,isMainPost:!1,pageUri:S},e.post.uri)),k[14]=S,k[15]=p,k[16]=m):m=k[16],k[17]!==S||k[18]!==C?(g=(0,t.jsx)("div",{ref:E,children:(0,t.jsx)(w,{post:C,isMainPost:!0,pageUri:S})}),k[17]=S,k[18]=C,k[19]=g):g=k[19],k[20]!==A||k[21]!==l||k[22]!==C||k[23]!==e.initialTab||k[24]!==_?(b=(0,t.jsx)(x,{post:C,rootAuthorDid:_,documentUrls:l,docDid:A,initialTab:e.initialTab}),k[20]=A,k[21]=l,k[22]=C,k[23]=e.initialTab,k[24]=_,k[25]=b):b=k[25],k[26]!==P||k[27]!==m||k[28]!==g||k[29]!==b?(v=(0,t.jsxs)("div",{className:P,children:[m,g,b]}),k[26]=P,k[27]=m,k[28]=g,k[29]=b,k[30]=v):v=k[30],v}function x(e){let i,a,o,s,l=(0,n.c)(19),{post:c,rootAuthorDid:u,documentUrls:d,docDid:h}=e;l[0]!==c.replies?(i=c.replies??[],l[0]=c.replies,l[1]=i):i=l[1];let m=i,f=c.post.replyCount??m.length,g=c.post.quoteCount??0,y=m.length>0,b=g>0,v=y&&b,[x,w]=(0,r.useState)(e.initialTab??(y?"replies":"quotes"));if(!y&&!b)return null;let S=y?b?x:"replies":"quotes";return l[2]!==y||l[3]!==g||l[4]!==f||l[5]!==v||l[6]!==S?(a=v?(0,t.jsx)(p.Tabs,{value:S,onChange:e=>w(e),options:[{value:"replies",label:`Replies (${f})`},{value:"quotes",label:`Quote Posts (${g})`}]}):(0,t.jsxs)("div",{className:"text-tertiary text-sm font-bold",children:[y?`Replies (${f})`:`Quote Posts (${g})`,(0,t.jsx)("hr",{className:"border-border-light mt-[6px]"})]}),l[2]=y,l[3]=g,l[4]=f,l[5]=v,l[6]=S,l[7]=a):a=l[7],l[8]!==h||l[9]!==d||l[10]!==c.post.author||l[11]!==c.post.uri||l[12]!==m||l[13]!==u||l[14]!==S?(o="replies"===S?(0,t.jsx)(C,{replies:m,pageUri:c.post.uri,parentPostUri:c.post.uri,depth:0,parentAuthorDid:c.post.author.did,rootAuthorDid:u,documentUrls:d,docDid:h}):(0,t.jsx)(k,{postUri:c.post.uri,pageUri:c.post.uri}
33),l[8]=h,l[9]=d,l[10]=c.post.author,l[11]=c.post.uri,l[12]=m,l[13]=u,l[14]=S,l[15]=o):o=l[15],l[16]!==a||l[17]!==o?(s=(0,t.jsxs)("div",{className:"threadInteractions flex flex-col mt-4 w-full",children:[a,o]}),l[16]=a,l[17]=o,l[18]=s):s=l[18],s}function k(e){let i,a,s,c,u=(0,n.c)(14);u[0]!==e.postUri?(i=(0,h.getQuotesKey)(e.postUri),u[0]=e.postUri,u[1]=i):i=u[1],u[2]!==e.postUri?(a=()=>(0,h.fetchQuotes)(e.postUri),u[2]=e.postUri,u[3]=a):a=u[3];let{data:p,isLoading:m,error:f}=(0,o.default)(i,a);if(m){let e;return u[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 text-tertiary italic text-sm py-8",children:[(0,t.jsx)("span",{children:"loading quotes"}),(0,t.jsx)(l.DotLoader,{})]}),u[4]=e):e=u[4],e}if(f){let e;return u[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"text-tertiary italic text-sm text-center py-8",children:"Failed to load quotes"}),u[5]=e):e=u[5],e}if(!p||0===p.posts.length){let e;return u[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"text-tertiary italic text-sm text-center py-8",children:"No quotes yet"}),u[6]=e):e=u[6],e}if(u[7]!==e.pageUri||u[8]!==p.posts){let n;u[10]!==e.pageUri?(n=(n,i)=>{let a={type:"thread",uri:e.pageUri};return(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(d.BskyPostContent,{post:n,parent:a,showEmbed:!0,compactEmbed:!0,showBlueskyLink:!0,quoteEnabled:!0,replyEnabled:!0,className:"relative rounded text-sm"}),(0,t.jsx)("hr",{className:"last:hidden border-border-light my-4"})]},n.uri)},u[10]=e.pageUri,u[11]=n):n=u[11],s=p.posts.map(n),u[7]=e.pageUri,u[8]=p.posts,u[9]=s}else s=u[9];return u[12]!==s?(c=(0,t.jsx)("div",{className:"flex flex-col gap-0 pt-4",children:s}),u[12]=s,u[13]=c):c=u[13],c}function w(e){let r,i,a,o=(0,n.c)(9),{post:s,isMainPost:l,pageUri:c}=e,u=s.post;o[0]!==c?(r={type:"thread",uri:c},o[0]=c,o[1]=r):r=o[1];let h=r;if(l){let e;return o[2]!==h||o[3]!==u?(e=(0,t.jsx)("div",{className:"threadMainPost flex gap-2 relative w-full",children:(0,t.jsx)(d.BskyPostContent,{post:u,parent:h,avatarSize:"large",showBlueskyLink:!0,showInteractions:!1,showEmbed:!0,compactEmbed:!0,quoteEnabled:!0})}),o[2]=h,o[3]=u,o[4]=e):e=o[4],e}return o[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"absolute top-0 bottom-0 left-[6px] w-5 ",children:(0,t.jsx)("div",{className:"bg-border-light w-[2px] h-full mx-auto"})}),o[5]=i):i=o[5],o[6]!==h||o[7]!==u?(a=(0,t.jsxs)("div",{className:"threadGrandparentPost flex gap-2 relative w-full pl-[6px] pb-2",children:[i,(0,t.jsx)(d.CompactBskyPostContent,{post:u,parent:h,quoteEnabled:!0,replyEnabled:!0})]}),o[6]=h,o[7]=u,o[8]=a):a=o[8],a}function C(e){let a,o,s,l,c=(0,n.c)(21),{replies:u,parentAuthorDid:d,rootAuthorDid:h,pageUri:p,documentUrls:m,docDid:f}=e;c[0]!==d||c[1]!==u?(o=d?[...u].sort((e,t)=>{let n=i.AppBskyFeedDefs.isThreadViewPost(e)&&e.post.author.did===d,r=i.AppBskyFeedDefs.isThreadViewPost(t)&&t.post.author.did===d;return n&&!r?-1:!n&&r?1:0}):u,c[0]=d,c[1]=u,c[2]=o):o=c[2],a=o;let g=`replies flex flex-col w-full pt-4 ${0===e.depth?"gap-0":"gap-8"}`;if(c[3]!==f||c[4]!==m||c[5]!==p||c[6]!==e.depth||c[7]!==u||c[8]!==h||c[9]!==a){let n;c[11]!==f||c[12]!==m||c[13]!==p||c[14]!==e.depth||c[15]!==u||c[16]!==h?(n=(n,a)=>
33{if(i.AppBskyFeedDefs.isNotFoundPost(n))return(0,t.jsx)("div",{className:"text-tertiary italic text-sm px-t py-6 opaque-container text-center justify-center my-2",children:"Post not found"},`not-found-${a}`);if(i.AppBskyFeedDefs.isBlockedPost(n))return(0,t.jsx)("div",{className:"text-tertiary italic text-sm px-t py-6 opaque-container text-center justify-center my-2",children:"Post blocked"},`blocked-${a}`);if(!i.AppBskyFeedDefs.isThreadViewPost(n))return null;let o=n.replies&&n.replies.length>0;return(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(E,{post:n,isLast:a===u.length-1&&!o,pageUri:p,depth:e.depth,rootAuthorDid:h,documentUrls:m,docDid:f}),0===e.depth&&(0,t.jsx)("hr",{className:"border-border-light my-4 last:hidden"})]},n.post.uri)},c[11]=f,c[12]=m,c[13]=p,c[14]=e.depth,c[15]=u,c[16]=h,c[17]=n):n=c[17],s=a.map(n),c[3]=f,c[4]=m,c[5]=p,c[6]=e.depth,c[7]=u,c[8]=h,c[9]=a,c[10]=s}else s=c[10];return c[18]!==g||c[19]!==s?(l=(0,t.jsx)("div",{className:g,children:s}),c[18]=g,c[19]=s,c[20]=l):l=c[20],l}function S(e){let r,i,a,o,s=(0,n.c)(9);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"absolute top-0 bottom-0 left-[38px] w-[2px] bg-border-light pointer-events-none"}),s[0]=r):r=s[0],s[1]!==e?(i=(0,t.jsx)("button",{className:"repliesCollapse absolute top-0 bottom-0 left-[28px] w-[20px] z-10",onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onCollapse()}}),s[1]=e,s[2]=i):i=s[2],s[3]!==e.children||s[4]!==i?(a=(0,t.jsxs)("div",{className:"repliesWrapper relative pt-1 pl-[26px] ",children:[r,i,e.children]}),s[3]=e.children,s[4]=i,s[5]=a):a=s[5],s[6]!==e.open||s[7]!==a?(o=(0,t.jsx)(m.CollapsibleReplies,{open:e.open,children:a}),s[6]=e.open,s[7]=a,s[8]=o):o=s[8],o}let E=e=>{let r,a,o,s,l,c,d,p,m,f=(0,n.c)(46),{post:g,pageUri:y,rootAuthorDid:b,documentUrls:v,docDid:x}=e,k=(0,u.useThreadState)(D),w=(0,u.useThreadState)(N);if(f[0]!==k||f[1]!==g||f[2]!==b){let e=function(e,t){if(e.post.author.did!==t)return[e];let n=[e],r=e;for(;r.replies&&r.replies.length>0;){let e=r.replies,a=e.filter(e=>i.AppBskyFeedDefs.isThreadViewPost(e)&&e.post.author.did===t);if(1!==a.length||1!==e.length)break;n.push(a[0]),r=a[0]}return n}(g,b);r=(a=e[e.length-1]).replies&&a.replies.length>0,o=k.has(a.post.uri),f[0]=k,f[1]=g,f[2]=b,f[3]=r,f[4]=a,f[5]=o}else r=f[3],a=f[4],o=f[5];let E=o,A=!r&&null!=a.post.replyCount&&a.post.replyCount>0;return f[6]!==g.post.uri||f[7]!==w?(s=()=>w(g.post.uri),f[6]=g.post.uri,f[7]=w,f[8]=s):s=f[8],f[9]!==x||f[10]!==v||f[11]!==y||f[12]!==g.post||f[13]!==s?(l=(0,t.jsx)(T,{post:g.post,pageUri:y,documentUrls:v,docDid:x,toggleCollapsed:s}),f[9]=x,f[10]=v,f[11]=y,f[12]=g.post,f[13]=s,f[14]=l):l=f[14],f[15]!==x||f[16]!==v||f[17]!==r||f[18]!==E||f[19]!==a||f[20]!==y||f[21]!==e.depth||f[22]!==b||f[23]!==w?(c=r&&e.depth<10&&(0,t.jsx)(S,{open:!E,onCollapse:()=>w(a.post.uri),children:(0,t.jsx)(C,{pageUri:y,parentPostUri:a.post.uri,replies:a.replies,depth:e.depth+1,parentAuthorDid:a.post.author.did,rootAuthorDid:b,documentUrls:v,docDid:x})}),f[15]=x,f[16]=v,f[17]=r,f[18]=E,f[19]=a,f[20]=y,f[21]=e.depth,f[22]=b,f[23]=w,f[24]=c):c=f[24],f[25]!==x||f[26]!==v||f[27]!==E||f[28]!==A||f[29]!==a||f[30]!==y||f[31]!==e.depth||f[32]!==b||f[33]!==w?(d=A&&e.depth<10&&(0,t.jsx)(S,{open:!E,onCollapse:()=>w(a.post.uri),children:!E&&(0,t.jsx)(I,{postUri:a.post.uri,pageUri:y,depth:e.depth,rootAuthorDid:b,documentUrls:v,docDid:x})}),f[25]=x,f[26]=v,f[27]=E,f[28]=A,f[29]=a,f[30]=y,f[31]=e.depth,f[32]=b,f[33]=w,f[34]=d):d=f[34],f[35]!==r||f[36]!==A||f[37]!==a||f[38]!==y||f[39]!==e.depth?(p=(r||A)&&e.depth>=10&&(0,t.jsx)("div",{className:"ml-[28px]",children:(0,t.jsx)(h.ThreadLink,{postUri:a.post.uri,parent:{type:"thread",uri:y},className:"text-sm text-accent-contrast hover:underline",children:"Continue thread"})}),f[35]=r,f[36]=A,f[37]=a,f[38]=y,f[39]=e.depth,f[40]=p):p=f[40],f[41]!==l||f[42]!==c||f[43]!==d||f[44]!==p?(m=(0,t.jsx)("div",{className:"flex h-fit relative",children:(0,t.jsxs)("div",{className:"reply relative flex flex-col w-full ",children:[l,c,d,p]})}),f[41]=l,f[42]=c,f[43]=d,f[44]=p,f[45]=m):m=f[45],m};function T(e){let r,a,o,s,l,c,u=(0,n.c)(28),{post:h,pageUri:p,documentUrls:m,docDid:f,compact:b}=e;u[0]!==m||u[1]!==h?(r=function(e,t){if(0===t.length)return null;let n=e.record;if(n.facets){for(let e of n.facets)for(let n of e.features)if(i.AppBskyRichtextFacet.isLink(n)){let e=(0,y.matchDocumentUrl)(n.uri,t);if(e)return{...e,isEmbed:!1}}}if(e.embed&&i.AppBskyEmbedExternal.isView(e.embed)){let n=(0,y.matchDocumentUrl)(e.embed.external.uri,t);if(n)return{...n,isEmbed:!0}}return null}(h,m),u[0]=m,u[1]=h,u[2]=r):r=u[2];let v=r;u[3]!==p?(a={type:"thread",uri:p},u[3]=p,u[4]=a):a=u[4];let x=a;u[5]!==f||u[6]!==v?(o=v?.quotePosition&&(0,t.jsx)("div",{className:"mb-1 ml-[32px]",children:(0,t.jsx)(g.QuoteContent,{position:v.quotePosition,index:0,did:f})}),u[5]=f,u[6]=v,u[7]=o):o=u[7];let k=o;if(b){let n,r,i,a=!!e.toggleCollapsed;return u[8]!==e.toggleCollapsed?(n=e.toggleCollapsed?t=>{t.preventDefault(),e.toggleCollapsed()}:void 0,u[8]=e.toggleCollapsed,u[9]=n):n=u[9],u[10]!==x||u[11]!==h||u[12]!==a||u[13]!==n?(r=(0,t.jsx)(d.
33CompactBskyPostContent,{post:h,parent:x,quoteEnabled:!0,replyEnabled:a,replyOnClick:n}),u[10]=x,u[11]=h,u[12]=a,u[13]=n,u[14]=r):r=u[14],u[15]!==k||u[16]!==r?(i=(0,t.jsxs)("div",{className:"bskyPostReplyCompact flex flex-col w-full",children:[k,r]}),u[15]=k,u[16]=r,u[17]=i):i=u[17],i}let w=!v?.isEmbed;return u[18]!==e.toggleCollapsed?(s=e.toggleCollapsed?t=>{t.preventDefault(),e.toggleCollapsed()}:void 0,u[18]=e.toggleCollapsed,u[19]=s):s=u[19],u[20]!==x||u[21]!==h||u[22]!==w||u[23]!==s?(l=(0,t.jsx)(d.BskyPostContent,{post:h,parent:x,showEmbed:w,showBlueskyLink:!1,quoteEnabled:!0,replyEnabled:!0,replyOnClick:s,className:" text-sm"}),u[20]=x,u[21]=h,u[22]=w,u[23]=s,u[24]=l):l=u[24],u[25]!==k||u[26]!==l?(c=(0,t.jsxs)("div",{className:"bskyPostReply flex flex-col w-full ",children:[k,l]}),u[25]=k,u[26]=l,u[27]=c):c=u[27],c}function I(e){let r,a,s,c=(0,n.c)(14);c[0]!==e.postUri?(r=(0,h.getThreadKey)(e.postUri),c[0]=e.postUri,c[1]=r):r=c[1],c[2]!==e.postUri?(a=()=>(0,h.fetchThread)(e.postUri),c[2]=e.postUri,c[3]=a):a=c[3];let{data:u,isLoading:d}=(0,o.default)(r,a);if(d){let e;return c[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex items-center gap-1 text-tertiary italic text-xs py-2",children:(0,t.jsx)(l.DotLoader,{})}),c[4]=e):e=c[4],e}if(!u||!i.AppBskyFeedDefs.isThreadViewPost(u)||!u.replies||0===u.replies.length)return null;let p=u.replies,m=e.depth+1;return c[5]!==e.docDid||c[6]!==e.documentUrls||c[7]!==e.pageUri||c[8]!==e.postUri||c[9]!==e.rootAuthorDid||c[10]!==p||c[11]!==m||c[12]!==u.post.author.did?(s=(0,t.jsx)(C,{replies:p,pageUri:e.pageUri,parentPostUri:e.postUri,depth:m,parentAuthorDid:u.post.author.did,rootAuthorDid:e.rootAuthorDid,documentUrls:e.documentUrls,docDid:e.docDid}),c[5]=e.docDid,c[6]=e.documentUrls,c[7]=e.pageUri,c[8]=e.postUri,c[9]=e.rootAuthorDid,c[10]=p,c[11]=m,c[12]=u.post.author.did,c[13]=s):s=c[13],s}function D(e){return e.collapsedThreads}function N(e){return e.toggleCollapsed}},602448,758459,e=>{"use strict";var t=e.i(500932),n=e.i(768834),r=e.i(174080),i=e.i(899719),a=e.i(618566),o=e.i(517770),s=e.i(271645);let l=()=>{let e,n=(0,t.c)(2),r=(0,s.useSyncExternalStore)(p,m,f);return n[0]!==r?(e=new URLSearchParams(r),n[0]=r,n[1]=e):e=n[1],e},c=new Set,u=()=>c.forEach(e=>e()),d=!1,h=e=>{let t=window.history[e].bind(window.history);window.history[e]=(...e)=>{t(...e),u()}},p=e=>(d||(d=!0,window.addEventListener("popstate",u),h("pushState"),h("replaceState")),c.add(e),()=>{c.delete(e)}),m=()=>window.location.search,f=()=>"";e.s(["useClientSearchParams",0,l],758459);let g=e=>"doc"===e.type?e.id:"quotes"===e.type?`quotes:${e.uri}`:"iframe"===e.type?`iframe:${e.url}`:`thread:${e.uri}`,y=(0,n.create)(()=>({pages:[],initialized:!1}));function b(e){return e}e.s(["closePage",0,e=>{let t=g(e);y.setState(e=>{let n=e.pages.findIndex(e=>g(e)===t);return{pages:e.pages.slice(0,n),initialized:!0}})},"getPageKey",0,g,"openPage",0,(e,t,n)=>{let a=g(t),o=e?g(e):void 0;if(-1!==y.getState().pages.findIndex(e=>g(e)===a)){n?.scrollIntoView!==!1&&(0,i.scrollIntoView)(`post-page-${a}`);return}(0,r.flushSync)(()=>{y.setState(e=>{let n=e.pages.findIndex(e=>g(e)===o);return{pages:-1===n?[t]:[...e.pages.slice(0,n+1),t],initialized:!0}})}),n?.scrollIntoView!==!1&&requestAnimationFrame(()=>{(0,i.scrollIntoView)(`post-page-${a}`)})},"useInitializeOpenPages",0,()=>{let e,n,r=(0,t.c)(3),{quote:i}=(0,a.useParams)();r[0]!==i?(e=()=>{if(!y.getState().initialized){let e=new URLSearchParams(window.location.search).get("page");if(e)return void y.setState({pages:[{type:"doc",id:e}],initialized:!0});if(i){let e=(0,o.decodeQuotePosition)(i);if(e?.pageId)return void y.setState({pages:[{type:"doc",id:e.pageId}],initialized:!0})}y.setState({initialized:!0})}},n=[i],r[0]=i,r[1]=e,r[2]=n):(e=r[1],n=r[2]),(0,s.useEffect)(e,n)},"useOpenPages",0,()=>{let e,n=(0,t.c)(8),{quote:r}=(0,a.useParams)(),i=y(b),s=l();n[0]!==s?(e=s.get("page"),n[0]=s,n[1]=e):e=n[1];let c=e;if(!i.initialized){if(c){let e;return n[2]!==c?(e=[{type:"doc",id:c}],n[2]=c,n[3]=e):e=n[3],e}if(r){let e;n[4]!==r?(e=(0,o.decodeQuotePosition)(r),n[4]=r,n[5]=e):e=n[5];let t=e;if(t?.pageId){let e;return n[6]!==t.pageId?(e=[{type:"doc",id:t.pageId}],n[6]=t.pageId,n[7]=e):e=n[7],e}}}return i.pages}],602448)},542271,216926,26765,493306,813932,471747,486401,624111,59992,e=>{"use strict";var t=e.i(500932),n=e.i(618566),r=e.i(768834),i=e.i(517770);let a=(0,r.create)(()=>({activeHighlight:null}));function o(e){return e.activeHighlight}function s(e){return null!==e}e.s(["useActiveHighlightState",0,a,"useHighlight",0,(e,r)=>{let l,c,u=(0,t.c)(9),{quote:d}=(0,n.useParams)(),h=a(o);if(u[0]!==h||u[1]!==d){let e;l=h?[h]:[],u[3]!==d?(e=d?(0,i.decodeQuotePosition)(d):null,u[3]=d,u[4]=e):e=u[4];let t=e;t&&l.push(t),u[0]=h,u[1]=d,u[2]=l}else l=u[2];
33return u[5]!==l||u[6]!==r||u[7]!==e?(c=l.map(t=>{if(!t||r&&t.pageId!==r||t.pageId&&!r)return null;let n=Math.max(t.start.block.length,t.end.block.length);if(!e.concat(Array(Math.max(0,n-e.length)).fill(-1)).reduce((e,n,r)=>e&&(-1===n&&t?.start.block[r]===void 0||n>=(t?.start.block[r]??-1))&&n<=t.end.block[r],!0))return null;let i=null,a=null;return e.length===t.start.block.length&&e.every((e,n)=>e===t.start.block[n])&&(i=t.start.offset),e.length===t.end.block.length&&e.every((e,n)=>e===t.end.block[n])&&(a=t.end.offset),{startOffset:i,endOffset:a}}).filter(s),u[5]=l,u[6]=r,u[7]=e,u[8]=c):c=u[8],c}],542271);let l={1:"mt-5 sm:mt-6",2:"mt-4 sm:mt-5",3:"mt-2 sm:mt-3"};e.s(["blockSpacingClassName",0,function(e){let t,n=e.isLast?"mb-3 sm:mb-4":"heading"===e.kind?"mb-0!":"mb-2";return"heading"===e.kind?t=e.isFirst?"mt-1 sm:mt-2":"horizontal-rule"===e.previous?"":"heading"===e.previous?"mt-1":l[e.headingLevel??1]??"mt-2 sm:mt-3":"blockquote"===e.kind?(t="blockquote"===e.previous?"-mt-3!":"mt-1!",n="mb-2!"):t=e.isFirst?"mt-0":"mt-1",e.isListItem&&(n="mb-0!","blockquote"===e.kind&&"blockquote"===e.previous&&(t="-mt-1!")),`min-h-7 ${t} ${n}`},"canvasBlockEdges",0,"[&>*:first-child]:mt-0! [&>*:last-child]:mb-0! [&>*:last-child:not(ul,ol,.isListItem)]:min-h-6!"],216926);var c=e.i(88606);e.s(["PubLeafletBlocksImage",0,c],26765);var u=e.i(406851);e.s(["PubLeafletBlocksOrderedList",0,u],493306);var d=e.i(480876);e.s(["PubLeafletBlocksHorizontalRule",0,d],813932);var h=e.i(199975);e.s(["PubLeafletBlocksBlockquote",0,h],471747);var p=e.i(251691);e.s(["PubLeafletBlocksButton",0,p],486401),e.s(["matchBlock",0,function(e,t,n){return Object.prototype.hasOwnProperty.call(t,e.$type)?(0,t[e.$type])(e):n(e)}],624111);var m=e.i(271645);e.s(["useDebouncedValue",0,function(e,n){let r,i,a=(0,t.c)(4),[o,s]=(0,m.useState)(e);return a[0]!==n||a[1]!==e?(r=()=>{let t=setTimeout(()=>s(e),n);return()=>clearTimeout(t)},i=[e,n],a[0]=n,a[1]=e,a[2]=r,a[3]=i):(r=a[2],i=a[3]),(0,m.useEffect)(r,i),o}],59992)},465218,e=>{"use strict";var t=e.i(500932),n=e.i(283599),r=e.i(95187);let i=(0,r.createServerReference)("40512a8598d1f805036df301aab7a1f32ddbc58cf4",r.callServer,void 0,r.findSourceMapURL,"getPostEditLink");var a=e.i(806398);function o(e){let[,t]=e;return i(t)}e.s(["usePostEditLink",0,function(e,r){let i,s,l=(0,t.c)(5),{identity:c}=(0,a.useIdentityData)(),u=!!c?.atp_did&&!!r&&c.atp_did===r;l[0]!==e||l[1]!==c||l[2]!==u?(i=u&&e?["post-edit-link",e,c.id]:null,l[0]=e,l[1]=c,l[2]=u,l[3]=i):i=l[3],l[4]===Symbol.for("react.memo_cache_sentinel")?(s={revalidateOnFocus:!1,revalidateIfStale:!1},l[4]=s):s=l[4];let{data:d}=(0,n.default)(i,o,s);return d?`https://leaflet.pub/${d}`:null}],465218)},173275,995346,e=>{"use strict";e.s(["BaseBlock",()=>eI,"Block",()=>eC,"BlockLayout",()=>e_,"ListMarker",()=>eL],173275);var t=e.i(843476),n=e.i(500932),r=e.i(467592),i=e.i(271645),a=e.i(477183),o=e.i(829975),s=e.i(813029),l=e.i(223001),c=e.i(845118),u=e.i(781553),d=e.i(394191),h=e.i(752316),p=e.i(492122),m=e.i(293297),f=e.i(308054),g=e.i(219746),y=e.i(12992),b=e.i(136297),v=e.i(933049),x=e.i(105445),k=e.i(132242),w=e.i(849631),C=e.i(897108),S=e.i(885124),E=e.i(905683),T=e.i(394021),I=e.i(227086),D=e.i(346817),N=e.i(971981),A=e.i(553445),_=e.i(429969),P=e.i(549281),M=e.i(432935),R=e.i(945870),L=e.i(386660),j=e.i(503820),O=e.i(997779),B=e.i(562495),F=e.i(290094),H=e.i(583132),U=e.i(930590),z=e.i(861643),$=e.i(793064),V=e.i(681175),q=e.i(509973),G=e.i(132697),W=e.i(658172),K=e.i(762268),Y=e.i(276452),Z=e.i(142524),X=e.i(859015),Q=e.i(762584),J=e.i(993417),ee=e.i(195040),et=e.i(69278);let en=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M5.26069 7.92329C5.60586 7.92329 5.88568 8.20312 5.88569 8.54829C5.88549 8.89329 5.60575 9.17329 5.26069 9.17329H4.13276L2.46187 12.1635H13.538L11.8671 9.17329H10.8408C10.4958 9.17314 10.216 8.8932 10.2158 8.54829C10.2158 8.2032 10.4957 7.92344 10.8408 7.92329H12.2333C12.4598 7.92329 12.6688 8.04594 12.7792 8.2436L15.1484 12.4838C15.2564 12.6773 15.2546 12.9138 15.1425 13.1049C15.0303 13.2958 14.8249 13.4134 14.6035 13.4135H1.39644C1.17488 13.4134 0.969555 13.296 0.857373 13.1049C0.74528 12.9139 0.742714 12.6773 0.850537 12.4838L3.22065 8.2436L3.26655 8.17329C3.38348 8.01756 3.56766 7.92347 3.76558 7.92329H5.26069ZM7.49605 2.12934C7.78164 1.8709 8.21719 1.87106 8.50288 2.12934L11.4755 4.8188C11.7825 5.09675 11.8061 5.57131 11.5283 5.87837C11.2503 6.18527 10.7758 6.20892 10.4687 5.9311L8.74995 4.37544V10.1518C8.74989 10.5659 8.41398 10.9016 7.99995 10.9018C7.58596 10.9016 7.25001 10.5658 7.24995 10.1518V4.37446L5.53023 5.9311C5.22322 6.20847 4.74948 6.18495 4.47163 5.87837C4.194 5.57129 4.21749 5.09667 4.52437 4.8188L7.49605 2.12934Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},er=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M12.2334 2.06055C12.4598 2.06055 12.6688 2.1832 12.7793 2.38086L15.1484 6.62109C15.2564 6.81454 15.254
336 7.05108 15.1426 7.24219C15.0304 7.43305 14.8249 7.55063 14.6035 7.55078H8.75V11.0977L10.4688 9.54199C10.7758 9.26419 11.2504 9.28788 11.5283 9.59472C11.8062 9.90178 11.7825 10.3763 11.4756 10.6543L8.50293 13.3437C8.21725 13.6022 7.78176 13.6022 7.4961 13.3437L4.52442 10.6543C4.21751 10.3764 4.19388 9.90178 4.47168 9.59472C4.74951 9.28815 5.22327 9.26466 5.53028 9.54199L7.25 11.0986V7.55078H1.39649C1.17493 7.55073 0.969647 7.4332 0.857425 7.24219C0.745336 7.05115 0.742781 6.81453 0.850589 6.62109L3.22071 2.38086L3.2666 2.31055C3.38356 2.15479 3.56766 2.06069 3.76563 2.06055H12.2334ZM2.46192 6.30078H13.5381L11.8672 3.31055H4.13282L2.46192 6.30078Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},ei=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M5.26069 6.68913C5.60579 6.68913 5.88556 6.96906 5.88569 7.31413C5.88569 7.65931 5.60586 7.93913 5.26069 7.93913H4.13276L2.46186 10.9294H13.538L11.8671 7.93913H10.8408C10.4957 7.93901 10.2158 7.65923 10.2158 7.31413C10.2159 6.96912 10.4958 6.68925 10.8408 6.68913H12.2333C12.4597 6.68913 12.6688 6.81193 12.7792 7.00944L15.1484 11.2497C15.2565 11.4432 15.2546 11.6796 15.1425 11.8708C15.0304 12.0619 14.825 12.1792 14.6035 12.1794H14.4833L15.1484 13.3698C15.2565 13.5632 15.2545 13.7997 15.1425 13.9909C15.0304 14.182 14.825 14.2993 14.6035 14.2995H1.39643C1.1748 14.2994 0.969541 14.182 0.857365 13.9909C0.745444 13.7998 0.742575 13.5632 0.850529 13.3698L1.51557 12.1794H1.39643C1.17479 12.1793 0.969535 12.0619 0.857365 11.8708C0.745336 11.6796 0.742523 11.4431 0.850529 11.2497L3.22065 7.00944L3.26654 6.93913C3.38348 6.7834 3.56764 6.68929 3.76557 6.68913H5.26069ZM7.49604 0.896161C7.78169 0.637664 8.21719 0.637726 8.50287 0.896161L11.4755 3.58561C11.7825 3.86357 11.8061 4.33812 11.5283 4.64518C11.2503 4.95197 10.7757 4.9757 10.4687 4.69792L8.74994 3.14225V8.91862C8.74979 9.3326 8.41391 9.66845 7.99994 9.66862C7.58599 9.66843 7.2501 9.33258 7.24994 8.91862V3.14128L5.53022 4.69792C5.22321 4.97519 4.74944 4.95173 4.47162 4.64518C4.19385 4.33815 4.21752 3.86356 4.52436 3.58561L7.49604 0.896161Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},ea=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M12.2334 0.962891C12.4598 0.96289 12.6688 1.08554 12.7793 1.2832L15.1484 5.52344C15.2565 5.71691 15.2547 5.95337 15.1426 6.14453C15.0304 6.33547 14.825 6.45298 14.6035 6.45313H14.293L15.1484 7.9834C15.2564 8.17685 15.2546 8.41338 15.1426 8.60449C15.0304 8.79535 14.8249 8.91294 14.6035 8.91309H8.75V12.46L10.4687 10.9043C10.7758 10.6265 11.2504 10.6501 11.5283 10.957C11.8062 11.2641 11.7825 11.7386 11.4756 12.0166L8.50293 14.7061C8.21724 14.9644 7.78172 14.9645 7.49609 14.7061L4.52441 12.0166C4.2175 11.7387 4.19394 11.2641 4.47168 10.957C4.74952 10.6505 5.22327 10.6269 5.53027 10.9043L7.25 12.4609V8.91309H1.39648C1.17494 8.91302 0.969633 8.79551 0.85742 8.60449C0.745335 8.41347 0.742786 8.17684 0.850584 7.9834L1.70605 6.45313H1.39648C1.17488 6.45306 0.969616 6.33563 0.85742 6.14453C0.745308 5.95346 0.742707 5.7169 0.850584 5.52344L3.2207 1.2832L3.2666 1.21289C3.38354 1.05714 3.56767 0.963042 3.76562 0.962891H12.2334ZM3.13769 6.45313L2.46191 7.66309H13.5381L12.8623 6.45313H3.13769Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};function eo(e){let i,a,o,s,l,c,u,d,h,p,m=(0,n.c)(22),{rep:f}=(0,r.useReplicache)(),g=(0,ee.useCanvasPaintOrder)(e.parent),y=g.indexOf(e.entityID),b=y===g.length-1,v=0===y;m[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(er,{}),m[0]=i):i=m[0],m[1]!==v?(a={action:"backward",label:"Send Backward",icon:i,disabled:v},m[1]=v,m[2]=a):a=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(en,{}),m[3]=o):o=m[3],m[4]!==b?(s={action:"forward",label:"Bring Forward",icon:o,disabled:b},m[4]=b,m[5]=s):s=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(ea,{}),m[6]=l):l=m[6],m[7]!==v?(c={action:"back",label:"Send to Back",icon:l,disabled:v},m[7]=v,m[8]=c):c=m[8],m[9]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(ei,{}),m[9]=u):u=m[9],m[10]!==b?(d={action:"front",label:"Bring to Front",icon:u,disabled:b},m[10]=b,m[11]=d):d=m[11],m[12]!==a||m[13]!==s||m[14]!==c||m[15]!==d?(h=[a,s,c,d],m[12]=a,m[13]=s,m[14]=c,m[15]=d,m[16]=h):h=m[16];let x=h;return m[17]!==x||m[18]!==e.entityID||m[19]!==e.parent||m[20]!==f?.mutate?(p=(0,t.jsx)("div",{className:"flex gap-1",onClick:es,children:x.map(n=>(0,t.jsx)(et.TooltipButton,{tooltipContent:n.label,disabled:n.disabled,className:"disabled:opacity-40",onMouseDown:()=>f?.mutate.moveCanvasBlockLayer({parent:e.parent,entityID:e.entityID,action:n.action}),children:n.icon},n.action))}),m[17]=x,m[18]=e.entityID,m[19]=e.parent,m[20]=f?.mutate,m[21]=p):p=m[21],p}function es(e){return e.stopPropagation()}e.s(["Blocks",()=>eb],995346);var el=e.i(680016),ec=e.i(393991),eu=e.i(988314),ed=e.i(468034),eh=e.i(616009),ep=e.i(734582),em=e.i(310845),ef=e.i(581869),eg=e.i(135537),ey=e.i(216926);function eb(e){let n=(0,s.useUIState)(t=>t.zoomedBlocks[e.entityID]),a=(0,s.useIsPageFocused)(e.entityID),l=(0,ec.useBlocks)(e.entityID),c=(0,i.useMemo)(()=>(0,el.filterBlocksForZoom)(l,n),[l,n]),{rep:u}=(0,r.useReplicache)(),d=(0,g.useFoldedBlocks)(),h=(0,i.useMemo)(()=>{var e;let t;return t=new Set((e=c).map(e=>e.entityID)),new Set(e.flatMap(e=>[...e.listData?.path.slice(0,-1).map(e=>e.entity)??[],...e.headingPath??[]]).filter(e=>t.has(e)))},[c]),p=(0,i.useMemo)(()=>{let e=d.filter(e=>h.has(e));return c.filter(t=>!(0,el.isBlockHidden)(t,e))},[c,d,h]),m=n?c[0]?.listData?.depth:void 0,y=l.length>0;(0,i.useEffect)(()=>{n&&y&&void 0===m&&s.useUIState.getState().zoomOutOfBlock(e.entityID)},[y,e.entityID,m,n]),(0,i.useEffect)(()=>
33{if(a)return(0,ef.addShortcut)([{altKey:!0,metaKey:!0,key:"ArrowUp",shift:!0,handler:()=>{(0,f.foldBlocks)(u,[...h])}},{altKey:!0,metaKey:!0,key:"ArrowDown",shift:!0,handler:()=>{(0,f.unfoldBlocks)(u,[...h])}}])},[h,a,u]);let b=n?c.findLast(e=>e.listData?.parent===n):c.findLast(e=>!e.listData||1===e.listData.depth),v=n?void 0:b?.headingPath,x=(0,i.useMemo)(()=>{let e=c.at(-1);if(!e)return;let t=d.filter(e=>h.has(e)&&!v?.includes(e));return(0,el.isBlockHidden)(e,t)?p.at(-1):e},[c,p,d,h,v]),k=x&&x!==p.at(-1)?v:void 0;(0,i.useEffect)(()=>{if(!e.preview)return o.listDndPages.set(e.entityID,{pageID:e.entityID,blocks:p,zoomDepth:m}),()=>void o.listDndPages.delete(e.entityID)},[e.entityID,e.preview,p,m]);let{footnotes:w}=(0,eg.useFootnoteContext)(),[C,S]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{S(w.length>0)},[w.length]),(0,t.jsxs)("div",{className:`blocks w-full flow-root outline-hidden ${e.group?`h-fit ${ey.canvasBlockEdges}`:`pt-2 sm:pt-3 ${C?"h-fit":"min-h-full"}`}`,children:[p.map((t,n,r)=>{let a,o=r[n+1];return a=(t.listData?.depth||1)===(o?.listData?.depth||1)&&o?.position||null,(0,i.createElement)(eC,{pageType:"doc",preview:e.preview,...t,key:t.entityID,entityID:t.entityID,previousBlock:r[n-1]||null,nextBlock:r[n+1]||null,nextPosition:a,headingFoldable:h.has(t.entityID)&&!t.listData,displayDepth:m&&t.listData?t.listData.depth-m+1:void 0})}),!e.preview&&(!e.group||!b)&&(0,t.jsx)(ex,{lastBlock:b||null,unfoldOnAppend:v,entityID:n??e.entityID}),!e.group&&(0,t.jsx)(ek,{trailingBlock:x,unfoldToReachTrailing:k,lastRootBlock:b||void 0,unfoldOnAppend:v,entityID:n??e.entityID,areFootnotes:C})]})}function ev(e,t){return t.unfold?.length&&(0,f.unfoldBlocks)(e,t.unfold),(0,ed.addBlockBelow)(e,{parent:t.parent,position:t.position,nextPosition:null,permission_set:t.permission_set,type:"text"})}function ex(e){let i,a,o,s,l=(0,n.c)(13),{rep:c}=(0,r.useReplicache)(),u=(0,p.useEntitySetContext)();l[0]!==e.lastBlock?(i=t=>{let n=e.lastBlock?.type==="text"?t.editorStates[e.lastBlock.entityID]?.editor:null;return!n||n.doc.content.size<=2},l[0]=e.lastBlock,l[1]=i):i=l[1];let d=(0,eu.useEditorStates)(i);return!u.permissions.write||(e.lastBlock?.type==="text"||e.lastBlock?.type==="heading")&&d?null:(l[2]!==u.set||l[3]!==e.entityID||l[4]!==e.lastBlock?.position||l[5]!==e.unfoldOnAppend||l[6]!==c?(a=async()=>{if(!c)return;let t=await ev(c,{parent:e.entityID,position:e.lastBlock?.position||null,unfold:e.unfoldOnAppend,permission_set:u.set});(0,ed.focusNewTextBlock)(t)},l[2]=u.set,l[3]=e.entityID,l[4]=e.lastBlock?.position,l[5]=e.unfoldOnAppend,l[6]=c,l[7]=a):a=l[7],l[8]!==e.lastBlock?(o=e.lastBlock?" ":(0,t.jsx)("div",{className:"pt-2 sm:pt-3",children:"write something..."}),l[8]=e.lastBlock,l[9]=o):o=l[9],l[10]!==a||l[11]!==o?(s=(0,t.jsx)("div",{className:"newBlockButton flex items-center justify-between group/text px-3 sm:px-4",children:(0,t.jsx)("div",{className:"h-6 hover:cursor-text italic text-tertiary grow",onMouseDown:a,children:o})}),l[10]=a,l[11]=o,l[12]=s):s=l[12],s)}let ek=e=>{let i,a,o,s=(0,n.c)(16),{rep:l}=(0,r.useReplicache)(),c=(0,p.useEntitySetContext)(),u=e.lastRootBlock?.position||null;s[0]!==e.entityID||s[1]!==u?(i={parent:e.entityID,position:u,nextPosition:null},s[0]=e.entityID,s[1]=u,s[2]=i):i=s[2];let m=(0,h.useHandleDrop)(i),g=e.trailingBlock,y=!!g&&!!K.isTextBlock[g.type],b=(0,r.useEntity)(y?g.entityID:null,"block/text");if(c.permissions.write&&!e.areFootnotes)return s[3]!==c.set||s[4]!==e.entityID||s[5]!==e.lastRootBlock?.position||s[6]!==e.unfoldOnAppend||s[7]!==e.unfoldToReachTrailing||s[8]!==l||s[9]!==g||s[10]!==y||s[11]!==b?.data?(a=()=>{let t=y?eu.useEditorStates.getState().editorStates[g.entityID]?.editor:null;y&&(t?t.doc.content.size<=2:function(e){if(!e)return!0;let t=new eh.Doc;return(0,eh.applyUpdate)(t,ep.toByteArray(e)),t.getXmlElement("prosemirror").toArray().every(e=>""===(0,em.YJSFragmentToString)(e))}(b?.data.value))?(e.unfoldToReachTrailing?.length&&(0,f.unfoldBlocks)(l,e.unfoldToReachTrailing),(0,d.focusBlock)(g,{type:"end"})):l&&ev(l,{parent:e.entityID,position:e.lastRootBlock?.position||null,unfold:e.unfoldOnAppend,permission_set:c.set}).then(ed.focusNewTextBlock)},s[3]=c.set,s[4]=e.entityID,s[5]=e.lastRootBlock?.position,s[6]=e.unfoldOnAppend,s[7]=e.unfoldToReachTrailing,s[8]=l,s[9]=g,s[10]=y,s[11]=b?.data,s[12]=a):a=s[12],s[13]!==m||s[14]!==a?(o=(0,t.jsx)("div",{className:"blockListClickableBottomArea grow min-h-[50vh]",onClick:a,onDragOver:ew,onDrop:m}),s[13]=m,s[14]=a,s[15]=o):o=s[15],o};function ew(e){e.preventDefault(),e.stopPropagation()}let eC=(0,i.memo)(function(e){let a,f,g,b,v,x,k,w,C,S,E,T,D,N,_,P,M,R=(0,n.c)(55),L=(0,l.useBlockMouseHandlers)(e);R[0]!==e.nextPosition||R[1]!==e.parent||R[2]!==e.position?(a={parent:e.parent,position:e.position,nextPosition:e.nextPosition},R[0]=e.nextPosition,R[1]=e.parent,R[2]=e.position,R[3]=a):a=R[3];let j=(0,h.useHandleDrop)(a),O=(0,p.useEntitySetContext)(),B=(0,I.useIsMobile)(),{rep:F,undoManager:H}=(0,r.useReplicache)(),{isLongPress:U,longPressHandlers:z}=(0,u.useLongPress)(()=>{!K.isTextBlock[e.type]&&f.current&&(0,d.focusBlock)({type:e.type,entityID:e.entityID,parent:e.parent},{type:"start"})});f=U,R[4]!==e.entityID||R[5]!==e.listData?.path||R[6]!==e.preview?(g=t=>!e.preview&&null!==t.activeId&&(t.activeId===e.entityID||!!e.listData?.path.some(e=>e.entity===t.activeId)),R[4]=e.entityID,R[5]=e.listData?.path,R[6]=e.preview,R[7]=g):g=R[7];let $=(0,o.useListDragState)(g);R[8]!==e.entityID||R[9]!==e.preview?(b=t=>e.preview||t.dropTarget?.entityID!==e.entityID?null:`${t.dropTarget.edge}:${t.dropTarget.depth}`,R[8]=e.entityID,R[9]=e.preview,R[10]=b):b=R[10];let V=(0,o.useListDragState)(b),q=(0,s.useIsBlockSelected)(e.entityID);R[11]!==e.entityID?(v=t=>t.focusedEntity?.entityType==="block"&&t.focusedEntity.entityID===e.entityID,R[11]=e.entityID,R[12]=v):v=R[12];let G=(0,s.useUIState)(v),W=(0,r.useEntity)(e.entityID,"block/text-alignment")?.data.value,Y="button"===e.type||"image"===e.type?"justify-center":"justify-start";W&&(Y=({left:"justify-start",right:"justify-end",center:"justify-center",justify:"justify-start"})[W]);let[Z,X]=(0,i.useState)(!1);R[13]!==q?(x=()=>{q||X(!1)},k=[q],R[13]=q,R[14]=x,R[15]=k):(x=R[14],k=R[15]),(0,i.useEffect)(x,k),(0,c.useBlockKeyboardHandlers)(e,Z,X),R[16]!==O||R[17]!==e||R[18]!==F||R[19]!==H?(w=t=>{let{last:n,movement:r,event:i}=t,[a]=r;!n||i&&"pointerType"in i&&"touch"!==i.pointerType||!F||!e.listData||!O.permissions.write||!(50>
33Math.abs(a))&&(i?.preventDefault(),a>0?e.previousBlock&&(0,m.indent)(e,e.previousBlock,F,H):(0,m.outdent)(e,e.previousBlock,F,void 0,H))},R[16]=O,R[17]=e,R[18]=F,R[19]=H,R[20]=w):w=R[20],R[21]===Symbol.for("react.memo_cache_sentinel")?(C={touch:!0},R[21]=C):C=R[21];let Q=B&&!!e.listData&&G;R[22]!==Q?(S={axis:"x",filterTaps:!0,pointer:C,enabled:Q},R[22]=Q,R[23]=S):S=R[23];let J=(0,y.useDrag)(w,S);R[24]!==Z||R[25]!==e?(E=(0,t.jsx)(eI,{...e,areYouSure:Z,setAreYouSure:X}),R[24]=Z,R[25]=e,R[26]=E):E=R[26];let ee=E;R[27]!==J||R[28]!==z||R[29]!==L||R[30]!==e.preview?(T=e.preview?{}:{...L,...z,...J()},R[27]=J,R[28]=z,R[29]=L,R[30]=e.preview,R[31]=T):T=R[31],R[32]!==e.entityID||R[33]!==e.preview?(D=e.preview?void 0:A.elementId.block(e.entityID).container,R[32]=e.entityID,R[33]=e.preview,R[34]=D):D=R[34];let et=!e.preview&&O.permissions.write?ej:void 0,en=!e.preview&&O.permissions.write?j:void 0,er=` 34 blockWrapper group/blockWrapper relative 35 flex flex-row gap-2 36 px-3 sm:px-4 37 38 z-1 w-full 39 ${$?"opacity-30":""} 40 ${e.listData&&G?"touch-pan-y":""} 41 ${Y} 42 ${(0,ey.blockSpacingClassName)({kind:eN(e),headingLevel:e.headingLevel,previous:e.previousBlock?eN(e.previousBlock):void 0,isFirst:!e.listData&&!e.previousBlock,isLast:!e.nextBlock,isListItem:!!e.listData})} 43 ${e.listData&&!e.nextBlock?.listData?"pb-2 min-h-9!":""} 44 ${e.listData?"isListItem":""}`;return R[35]!==e?(N=!e.preview&&(0,t.jsx)(eA,{...e}),R[35]=e,R[36]=N):N=R[36],R[37]!==V?(_=V&&(0,t.jsx)(eE,{indicator:V}),R[37]=V,R[38]=_):_=R[38],R[39]!==ee||R[40]!==O||R[41]!==e.entityID||R[42]!==e.listData||R[43]!==e.preview||R[44]!==e.type?(P=e.preview||!O.permissions.write?ee:(0,t.jsx)(eS,{entityID:e.entityID,isListItem:!!e.listData,bodyDraggable:!K.isTextBlock[e.type],children:ee}),R[39]=ee,R[40]=O,R[41]=e.entityID,R[42]=e.listData,R[43]=e.preview,R[44]=e.type,R[45]=P):P=R[45],R[46]!==T||R[47]!==D||R[48]!==et||R[49]!==en||R[50]!==er||R[51]!==N||R[52]!==_||R[53]!==P?(M=(0,t.jsxs)("div",{...T,id:D,onDragOver:et,onDrop:en,className:er,children:[N,_,P]}),R[46]=T,R[47]=D,R[48]=et,R[49]=en,R[50]=er,R[51]=N,R[52]=_,R[53]=P,R[54]=M):M=R[54],M},function(e,t){var n,r;return!["pageType","entityID","parent","position","factID","type","nextPosition","headingFoldable","displayDepth","preview"].some(n=>e[n]!==t[n])&&(n=e.listData,!!(n===(r=t.listData)||n&&r&&n.checklist===r.checklist&&n.parent===r.parent&&n.depth===r.depth&&n.displayNumber===r.displayNumber&&n.listStyle===r.listStyle&&n.path.length===r.path.length&&n.path.every((e,t)=>e.depth===r.path[t].depth&&e.entity===r.path[t].entity)))&&eT(e.nextBlock,t.nextBlock)&&eT(e.previousBlock,t.previousBlock)}),eS=e=>{let n=(0,a.useDraggable)({id:e.entityID,disabled:!e.isListItem&&!e.bodyDraggable}),r=(0,a.useDroppable)({id:e.entityID}),s=(0,i.useCallback)(e=>{n.setNodeRef(e),r.setNodeRef(e)},[n.setNodeRef,r.setNodeRef]),{attributes:l,listeners:c,setActivatorNodeRef:u}=n,d=(0,i.useMemo)(()=>e.isListItem?{attributes:l,listeners:c,setActivatorNodeRef:u}:null,[e.isListItem,l,c,u]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{ref:s,className:"absolute inset-0 pointer-events-none","aria-hidden":!0}),(0,t.jsx)(o.ListDragHandleContext.Provider,{value:d,children:(0,t.jsx)(o.BlockBodyDragContext.Provider,{value:e.bodyDraggable?c:null,children:e.children})})]})},eE=e=>{let r,i,a=(0,n.c)(5),[o,s]=e.indicator.split(":"),l=`listDropIndicator pointer-events-none absolute left-3 right-3 sm:left-4 sm:right-4 z-10 h-[3px] rounded-full bg-accent-contrast ${"top"===o?"-top-[2px]":"-bottom-[2px]"}`,c=`calc(${parseInt(s,10)-1} * var(--list-marker-width))`;return a[0]!==c?(r={marginLeft:c},a[0]=c,a[1]=r):r=a[1],a[2]!==l||a[3]!==r?(i=(0,t.jsx)("div",{className:l,style:r}),a[2]=l,a[3]=r,a[4]=i):i=a[4],i};function eT(e,t){return e===t||!!e&&!!t&&e.factID===t.factID&&e.parent===t.parent&&e.position===t.position&&e.entityID===t.entityID&&e.type===t.type&&(0,W.deepEquals)(e.listData,t.listData)}let eI=e=>{let r,i,a,o,s=(0,n.c)(12),l=eD[e.type];if(!l){let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{children:"unknown block"}),s[0]=e):e=s[0],e}return s[1]!==e?(r=e.headingFoldable&&(0,t.jsx)(eR,{...e}),s[1]=e,s[2]=r):r=s[2],s[3]!==e?(i=e.listData&&(0,t.jsx)(eL,{...e}),s[3]=e,s[4]=i):i=s[4],s[5]!==l||s[6]!==e?(a=e.areYouSure?(0,t.jsx)(T.AreYouSure,{closeAreYouSure:()=>e.setAreYouSure&&e.setAreYouSure(!1),type:e.type,entityID:e.entityID}):(0,t.jsx)(l,{...e,preview:e.preview}),s[5]=l,s[6]=e,s[7]=a):a=s[7],s[8]!==r||s[9]!==i||s[10]!==a?(o=(0,t.jsxs)(t.Fragment,{children:[r,i,a]}),s[8]=r,s[9]=i,s[10]=a,s[11]=o):o=s[11],o},eD={code:F.CodeBlock,math:B.MathBlock,card:k.PageLinkBlock,"embedded-canvas":w.EmbeddedCanvasBlock,text:b.TextBlock,blockquote:b.TextBlock,heading:b.TextBlock,image:v.ImageBlock,"image-gallery":x.ImageGalleryBlock,link:C.ExternalLinkBlock,embed:S.EmbedBlock,html:S.HTMLBlock,mailbox:E.MailboxBlock,datetime:D.DateTimeBlock,rsvp:N.RSVPBlock,button:_.ButtonBlock,poll:P.PollBlock,"bluesky-post":M.BlueskyPostBlock,"standard-site-post":R.StandardSitePostBlock,"standard-site-publication":L.StandardSitePublicationBlock,"horizontal-rule":H.HorizontalRule,"members-only-delimiter":z.MembersOnlyDelimiterBlock,"posts-list":$.PostsListBlock,"recommended-pubs":V.RecommendedPubsBlock,signup:q.SubscribeBlock,"post-header":G.PostHeaderBlock,group:function(e){let i,a,o,l,c=(0,n.c)(12);c[0]!==e.entityID?(i=t=>t.focusedEntity?.entityType==="block"&&(t.focusedEntity.entityID===e.entityID||t.focu
44sedEntity.parent===e.entityID)?t.focusedEntity.entityID:null,c[0]=e.entityID,c[1]=i):i=c[1];let u=(0,s.useUIState)(i),d=(0,r.useEntity)(u,"block/type")?.data.value,h=u===e.entityID||!!d&&K.isTextBlock[d];return c[2]!==u||c[3]!==e||c[4]!==h?(a=u&&(0,t.jsx)("div",{className:"canvasBlockGroupFrame absolute -inset-y-px inset-x-[11px] sm:inset-x-[15px] pointer-events-none bg-bg-page block-border-selected",children:h&&!e.preview&&(0,t.jsx)(eM,{block:e,optionsClassName:"pointer-events-auto",areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure})}),c[2]=u,c[3]=e,c[4]=h,c[5]=a):a=c[5],c[6]!==e.entityID||c[7]!==e.preview?(o=(0,t.jsx)(eb,{entityID:e.entityID,group:!0,preview:e.preview}),c[6]=e.entityID,c[7]=e.preview,c[8]=o):o=c[8],c[9]!==a||c[10]!==o?(l=(0,t.jsxs)("div",{className:"canvasBlockGroup relative -mx-3 sm:-mx-4",children:[a,o]}),c[9]=a,c[10]=o,c[11]=l):l=c[11],l},drawing:U.DrawingBlock};function eN(e){return"blockquote"===e.type?"blockquote":e.listData?"list":"heading"===e.type?"heading":"horizontal-rule"===e.type?"horizontal-rule":"other"}let eA=e=>{let r,i=(0,n.c)(6),a=null===e.previousBlock;i[0]!==e.entityID||i[1]!==e.nextBlock?.entityID||i[2]!==e.previousBlock?.entityID?(r=t=>{if(t.selectedBlocks.length<=1||!t.selectedBlocks.some(t=>t.entityID===e.entityID))return null;let n=t.selectedBlocks.some(t=>t.entityID===e.nextBlock?.entityID),r=t.selectedBlocks.some(t=>t.entityID===e.previousBlock?.entityID);return`${n?"n":""}${r?"p":""}`},i[0]=e.entityID,i[1]=e.nextBlock?.entityID,i[2]=e.previousBlock?.entityID,i[3]=r):r=i[3];let o=(0,s.useUIState)(r);if(null!==o){let e,n=` 45 blockSelectionBG multiselected selected 46 pointer-events-none 47 bg-border-light 48 absolute right-2 left-2 -bottom-1 49 ${a?"top-0":"-top-1"} 50 ${!o.includes("p")&&"rounded-t-md"} 51 ${!o.includes("n")&&"rounded-b-md"} 52 `;return i[4]!==n?(e=(0,t.jsx)("div",{className:n}),i[4]=n,i[5]=e):e=i[5],e}},e_=e=>{let r,i,a,s,l,c,u=(0,n.c)(21),d=(0,o.useBlockBodyDrag)(),h=`nonTextBlockAndControls relative ${e.hasAlignment?"w-fit":"w-full"} ${d?"[-webkit-touch-callout:none]":""}`;u[0]!==d?(r=d?(0,o.dragHandleAttr)("body"):{},u[0]=d,u[1]=r):r=u[1],u[2]!==d?(i=d?e=>{e.target.closest("button, a, input, textarea, select, [contenteditable], [data-draggable]")||d.onPointerDown?.(e)}:void 0,u[2]=d,u[3]=i):i=u[3];let p=`nonTextBlock ${e.className} p-2 sm:p-3 overflow-hidden 53 ${e.hasAlignment?"w-fit":"w-full"} 54 ${e.isSelected?"block-border-selected ":"block-border"} 55 ${e.borderOnHover&&"hover:border-accent-contrast! hover:outline-accent-contrast! focus-within:border-accent-contrast! focus-within:outline-accent-contrast!"} 56 ${"accent"===e.hasBackground?"bg-[var(--accent-light)]":"page"===e.hasBackground?"bg-page":"transparent"} 57 `;return u[4]!==e.children?(a=(0,t.jsx)(o.ListDragHandleContext.Provider,{value:null,children:e.children}),u[4]=e.children,u[5]=a):a=u[5],u[6]!==p||u[7]!==a?(s=(0,t.jsx)("div",{className:p,children:a}),u[6]=p,u[7]=a,u[8]=s):s=u[8],u[9]!==e.areYouSure||u[10]!==e.extraOptions||u[11]!==e.isSelected||u[12]!==e.optionsClassName||u[13]!==e.setAreYouSure?(l=e.isSelected&&(0,t.jsx)(eM,{optionsClassName:e.optionsClassName,areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,extraOptions:e.extraOptions}),u[9]=e.areYouSure,u[10]=e.extraOptions,u[11]=e.isSelected,u[12]=e.optionsClassName,u[13]=e.setAreYouSure,u[14]=l):l=u[14],u[15]!==h||u[16]!==r||u[17]!==i||u[18]!==s||u[19]!==l?(c=(0,t.jsxs)("div",{className:h,...r,onPointerDown:i,children:[s,l]}),u[15]=h,u[16]=r,u[17]=i,u[18]=s,u[19]=l,u[20]=c):c=u[20],c},eP=null,eM=e=>{let i,a,o,l,c,u,d,h=(0,n.c)(23),{rep:m,undoManager:f}=(0,r.useReplicache)(),g=(0,p.useEntitySetContext)(),y=(0,s.useUIState)(eO),b=e.block??(y?.entityType==="block"?y:void 0),v=(0,r.useEntity)(b?.parent||null,"page/type"),x=(0,s.useUIState)(eB);if(!b||x)return;if(!g.permissions.write)return null;let{entityID:k,parent:w}=b,C=`flex gap-1 absolute -top-[25px] right-2 pb-0.5 pt-1 px-1 rounded-t-md bg-border text-bg-page ${e.optionsClassName}`;return h[0]!==k||h[1]!==g.set||h[2]!==v?.data.value||h[3]!==w||h[4]!==m?(i=v?.data.value==="canvas"?(0,t.jsx)(eo,{parent:w,entity
57ID:k}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:async e=>{e.stopPropagation(),m&&await (0,Q.moveBlockDown)(m,g.set)},children:(0,t.jsx)(Z.ArrowDownTiny,{})}),(0,t.jsx)("button",{onClick:async e=>{e.stopPropagation(),m&&await (0,Q.moveBlockUp)(m)},children:(0,t.jsx)(Z.ArrowDownTiny,{className:"rotate-180"})})]}),h[0]=k,h[1]=g.set,h[2]=v?.data.value,h[3]=w,h[4]=m,h[5]=i):i=h[5],h[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(X.Separator,{classname:"border-bg-page! h-4! mx-0.5"}),h[6]=a):a=h[6],h[7]!==e.extraOptions?(o=e.extraOptions&&(0,t.jsxs)(t.Fragment,{children:[e.extraOptions," ",(0,t.jsx)(X.Separator,{classname:"border-bg-page! h-4! mx-0.5"})]}),h[7]=e.extraOptions,h[8]=o):o=h[8],h[9]!==k||h[10]!==w||h[11]!==e||h[12]!==m||h[13]!==f?(l=async t=>{if(t.stopPropagation(),m)if(s.useUIState.getState().focusAndSelectBlock({entityID:k,parent:w}),void 0!==e.areYouSure&&e.setAreYouSure){if(!e.areYouSure){e.setAreYouSure(!0),eP=window.setTimeout(eF,300);return}if(e.areYouSure){if(eP){window.clearTimeout(eP),eP=window.setTimeout(eH,300);return}await (0,J.deleteBlock)([k],m,f)}}else await (0,J.deleteBlock)([k],m,f)},h[9]=k,h[10]=w,h[11]=e,h[12]=m,h[13]=f,h[14]=l):l=h[14],h[15]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(Y.DeleteTiny,{}),h[15]=c):c=h[15],h[16]!==l?(u=(0,t.jsx)("button",{onClick:l,children:c}),h[16]=l,h[17]=u):u=h[17],h[18]!==C||h[19]!==i||h[20]!==o||h[21]!==u?(d=(0,t.jsxs)("div",{className:C,children:[i,a,o,u]}),h[18]=C,h[19]=i,h[20]=o,h[21]=u,h[22]=d):d=h[22],d},eR=e=>{let i,a,o,s=(0,n.c)(9),{rep:l}=(0,r.useReplicache)(),c=(0,g.useIsFolded)(e.entityID),u=(0,r.useEntity)(e.entityID,"block/heading-level")?.data.value,d=`headingFoldButton absolute -left-1 ${1===u?"top-[12px]":2===u?"top-[7px]":"top-[4px]"} p-0.5 pl-[3px] rounded-r-full text-bg-page transition-opacity 58 ${c?"opacity-100 bg-accent-contrast":"opacity-0 sm:group-hover/blockWrapper:opacity-100 bg-border "}`;s[0]!==e.entityID||s[1]!==l?(i=()=>(0,f.toggleFold)(l,e.entityID),s[0]=e.entityID,s[1]=l,s[2]=i):i=s[2];let h=`transition-transform ${c?"-rotate-90":""}`;return s[3]!==h?(a=(0,t.jsx)(Z.ArrowDownTiny,{className:h,width:12,height:12}),s[3]=h,s[4]=a):a=s[4],s[5]!==d||s[6]!==i||s[7]!==a?(o=(0,t.jsx)("button",{className:d,onClick:i,children:a}),s[5]=d,s[6]=i,s[7]=a,s[8]=o):o=s[8],o},eL=e=>{let a,s,l,c,u,d,h,m,y,b,v,x=(0,n.c)(46),k=(0,r.useEntity)(e.entityID,"block/check-list"),w=(0,r.useEntity)(e.entityID,"block/list-style"),C=(0,r.useEntity)(e.entityID,"block/heading-level")?.data.value,S=(0,r.useEntity)(e.entityID,"card/block"),E=(0,g.useIsFolded)(e.entityID)&&S.length>0,T=e.displayDepth??e.listData?.depth,{permissions:I}=(0,p.useEntitySetContext)(),{rep:D}=(0,r.useReplicache)(),N=(0,o.useListDragHandle)(),[A,_]=(0,i.useState)(!1),[P,M]=(0,i.useState)("");x[0]!==A?(a=()=>{A||M("")},s=[A],x[0]=A,x[1]=a,x[2]=s):(a=x[1],s=x[2]),(0,i.useEffect)(a,s),x[3]!==P||x[4]!==e.entityID||x[5]!==e.listData||x[6]!==D?(l=async()=>{if(!D||!e.listData)return;let t=parseInt(P,10);isNaN(t)||t<1||(t===(e.listData.displayNumber||1)?await D.mutate.retractAttribute({entity:e.entityID,attribute:"block/list-number"}):await D.mutate.assertFact({entity:e.entityID,attribute:"block/list-number",data:{type:"number",value:t}})),_(!1)},x[3]=P,x[4]=e.entityID,x[5]=e.listData,x[6]=D,x[7]=l):l=x[7];let R=l,L=`shrink-0 flex justify-end items-center h-3 z-1 59 ${e.className} 60 ${"heading"===e.type?3===C?"pt-[12px]":2===C?"pt-[15px]":"pt-[20px]":"pt-[12px]"} 61 `,B=T&&`calc(${T} * var(--list-marker-width) ${k?" + 20px":""} - 6px `;x[8]!==B?(c={width:B},x[8]=B,x[9]=c):c=x[9];let F=N?.setActivatorNodeRef,H=N?.attributes,U=N?.listeners;x[10]!==N?(u=N?(0,o.dragHandleAttr)("marker"):{},x[10]=N,x[11]=u):u=x[11],x[12]!==N?(d=e=>{N?.listeners?.onPointerDown?.(e),N&&e.stopPropagation()},x[12]=N,x[13]=d):d=x[13],x[14]!==S.length||x[15]!==e.entityID||x[16]!==D?(h=()=>{!(0,o.didListDragJustEnd)()&&S.length>0&&(0,f.toggleFold)(D,e.entityID)},x[14]=S.length,x[15]=e.entityID,x[16]=D,x[17]=h):h=x[17];let z=`listMarker group/list-marker ${w?.data.value==="ordered"?"":"px-3 py-2"} ${S.length>0?"cursor-pointer":"cursor-default"} ${N?"touch-none select-none":""}`;return x[18]!==S.length||x[19]!==A||x[20]!==E||x[21]!==R||x[22]!==w?.data.value||x[23]!==P||x[24]!==I||x[25]!==e.listData?.displayNumber?(m=w?.data.value==="ordered"?A?(0,t.jsx)("input",{type:"text",value:P,onChange:e=>M(e.target.value),onClick:eU,onBlur:R,onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),R()):"Escape"===e.key&&_(!1)},autoFocus:!0,className:"text-secondary font-normal text-right min-w-[2rem] w-[2rem] border border-border rounded-md px-1 py-0.5 focus:border-tertiary focus:outline-solid focus:outline-tertiary focus:outline-2 focus:outline-offset-1"}):(0,t.jsxs)("div",{className:"text-secondary font-normal text-right w-[2rem] cursor-pointer hover:text-primary",onClick:t=>{t.stopPropagation(),I.write&&w?.data.value==="ordered"&&(M(String(e.listData?.displayNumber||1)),_(!0))},children:[e.listData?.displayNumber||1,"."]}):(0,t.jsx)("div",{className:`h-[5px] w-[5px] rounded-full bg-secondary shrink-0 right-0 outline outline-offset-1 62 ${E?"outline-secondary":` ${S.length>0?"sm:group-hover/list-marker:outline-secondary outline-transparent":"outline-transparent"}`}`}),x[18]=S.length,x[19]=A,x[20]=E,x[21]=R,x[22]=w?.data.value,x[23]=P,x[24]=I,x[25]=e.listData?.displayNumber,x[26]=m):m=x[26],x[27]!==d||x[28]!==h||x[29]!==z||x[30]!==m||x[31]!==F||x[32]!==H||x[33]!==U||x[34]!==u?(y=(0,t.jsx)("button",{ref:F,...H,...U,...u,onPointerDown:d,onClick:h,className:z,children:m}),x[27]=d,x[28]=h,x[29]=z,x[30]=m,x[31]=F,x[32]=H,x[33]=U,x[34]=u,x[35]=y):y=x[35],x[36]!==k||x[37]!==I||x[38]!==e.entityID||x[39]!==D?.mutate?(b=k&&(0,t.jsx)("button",{onClick:()=>{I.write&&D?.mutate.assertFact({entity:e.entityID,attribute:"block/check-list",data:{type:"boolean",value:!k.data.value}})},className:`pr-2 ${k?.data.value?"text-accent-contrast":"text-border"}
62 ${I.write?"cursor-default":""}`,children:k?.data.value?(0,t.jsx)(j.CheckboxChecked,{}):(0,t.jsx)(O.CheckboxEmpty,{})}),x[36]=k,x[37]=I,x[38]=e.entityID,x[39]=D?.mutate,x[40]=b):b=x[40],x[41]!==y||x[42]!==b||x[43]!==L||x[44]!==c?(v=(0,t.jsxs)("div",{className:L,style:c,children:[y,b]}),x[41]=y,x[42]=b,x[43]=L,x[44]=c,x[45]=v):v=x[45],v};function ej(e){e.preventDefault(),e.stopPropagation()}function eO(e){return e.focusedEntity}function eB(e){return e.selectedBlocks.length>1}function eF(){eP=null}function eH(){eP=null}function eU(e){return e.stopPropagation()}},339012,716536,447440,e=>{"use strict";e.s(["BlockCommandBar",()=>W],339012);var t=e.i(843476),n=e.i(500932),r=e.i(271645);e.s(["blockCommands",()=>F],447440);var i=e.i(813029),a=e.i(478802),o=e.i(433823),s=e.i(836811),l=e.i(110383),c=e.i(988314),u=e.i(553445),d=e.i(394191),h=e.i(193950),p=e.i(366366),m=e.i(54642),f=e.i(836120),g=e.i(333230),y=e.i(75187),b=e.i(513585),v=e.i(213250),x=e.i(861370),k=e.i(100375),w=e.i(750590),C=e.i(429307),S=e.i(40797),E=e.i(385691),T=e.i(354992),I=e.i(895604),D=e.i(507646),N=e.i(743937),A=e.i(842158),_=e.i(516904),P=e.i(8127),M=e.i(642448),R=e.i(74863);let L="lastUsedCodeLanguage";e.s(["LAST_USED_CODE_LANGUAGE_KEY",0,L],716536);var j=e.i(680016);async function O(e,t,n){let r;return t.entityID?(r=t.entityID,await e?.mutate.assertFact({entity:r,attribute:"block/type",data:{type:"block-type-union",value:n}})):(r=(0,l.v7)(),await e?.mutate.addBlock({parent:t.parent,factID:(0,l.v7)(),permission_set:t.entity_set,type:n,position:(0,a.generateKeyBetween)(t.position,t.nextPosition),newEntityID:r})),r}function B(e){let t=c.useEditorStates.getState().editorStates[e];if(!t)return;let n=t.editor.tr;n.deleteRange(1,n.doc.content.size-1),t.view?t.view.dispatch(n):(0,c.setEditorState)(e,{editor:t.editor.apply(n)})}let F=[{name:"Text",icon:(0,t.jsx)(D.ParagraphSmall,{}),type:"text",onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID),B(await O(e,t,"text"))}},{name:"Title",icon:(0,t.jsx)(D.Header1Small,{}),type:"text",alternateNames:["h1"],onSelect:async(e,t,n)=>{await H(1,e,t)}},{name:"Header",icon:(0,t.jsx)(D.Header2Small,{}),type:"text",alternateNames:["h2"],onSelect:async(e,t,n)=>{await H(2,e,t)}},{name:"Subheader",icon:(0,t.jsx)(D.Header3Small,{}),type:"text",alternateNames:["h3"],onSelect:async(e,t,n)=>{await H(3,e,t)}},{name:"Unordered List",icon:(0,t.jsx)(A.ListUnorderedSmall,{}),alternateNames:["Bulleted List"],type:"text",onSelect:async(e,t,n)=>{let r=await O(e,t,"text");await e?.mutate.assertFact({entity:r,attribute:"block/is-list",data:{value:!0,type:"boolean"}}),B(r)}},{name:"Ordered List",icon:(0,t.jsx)(A.ListOrderedSmall,{}),type:"text",alternateNames:["Numbered List"],onSelect:async(e,t,n)=>{let r=await O(e,t,"text");await e?.mutate.assertFact([{entity:r,attribute:"block/is-list",data:{value:!0,type:"boolean"}},{entity:r,attribute:"block/list-style",data:{value:"ordered",type:"list-style-union"}}]),B(r)}},{name:"Block Quote",icon:(0,t.jsx)(M.QuoteSmall,{}),type:"text",onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID),B(await O(e,t,"blockquote"))}},{name:"Image",icon:(0,t.jsx)(w.BlockImageSmall,{}),type:"block",onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID);let r=await O(e,t,"image");setTimeout(()=>{let e=document.getElementById(u.elementId.block(r).input);e?.focus()},100),n.add({undo:()=>{U(r)},redo:()=>{let e=document.getElementById(u.elementId.block(r).input);e?.focus()}})}},{name:"Image Gallery",icon:(0,t.jsx)(C.ImageGallerySmall,{}),type:"block",alternateNames:["gallery","images","carousel"],onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID);let r=await O(e,t,"image-gallery");setTimeout(()=>{let e=document.getElementById(u.elementId.block(r).input);e?.focus()},100),n.add({undo:()=>{U(r)},redo:()=>{let e=document.getElementById(u.elementId.block(r).input);e?.focus()}})}},{name:"External Link",icon:(0,t.jsx)(N.LinkSmall,{}),type:"block",onSelect:async(e,t)=>{await O(e,t,"link")}},{name:"Button",icon:(0,t.jsx)(m.BlockButtonSmall,{}),type:"block",onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID),await O(e,t,"button"),n.add({undo:()=>{t.entityID&&U(t.entityID)},redo:()=>{}})}},{name:"Divider",icon:"â",type:"block",alternateNames:["Horizontal Rule","hr"],onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID),await O(e,t,"horizontal-rule"),n.add({undo:()=>{t.entityID&&U(t.entityID)},redo:()=>{}})}},{name:"Poll",icon:(0,t.jsx)(E.BlockPollSmall,{}),type:"block",onSelect:async(e,t,n)=>{let r=await O(e,t,"poll"),i=(0,l.v7)();await e.mutate.addPollOption({pollEntity:r,pollOptionEntity:i,pollOptionName:"",factID:(0,l.v7)(),permission_set:t.entity_set}),await e.mutate.addPollOption({pollEntity:r,pollOptionEntity:(0,l.v7)(),pollOptionName:"",factID:(0,l.v7)(),permission_set:t.entity_set}),h.usePollBlockUIState.setState(e=>({[r]:{state:"editing"}})),setTimeout(()=>{(0,p.focusElement)(document.getElementById(u.elementId.block(r).pollInput(i)))},20),n.add({undo:()=>{t.entityID&&U(t.entityID)},redo:()=>{setTimeout(()=>{(0,p.focusElement)(document.getElementById(u.elementId.block(r).pollInput(i)))},20)}})}},{name:"Embed Website",icon:(0,t.jsx)(k.BlockEmbedSmall,{}),type:"block",onSelect:async(e,t)=>{await O(e,t,"embed")}},{name:"Embed HTML",icon:(0,t.jsx)(k.BlockEmbedSmall,{}),type:"block",onSelect:async(e,t)=>{await O(e,t,"html")}},{name:"Math",icon:(0,t.jsx)(_.BlockMathSmall,{}),type:"block",hiddenInPublication:!1,onSelect:async(e,t)=>{await O(e,t,"math")}},{name:"Code",icon:(0,t.jsx)(P.BlockCodeSmall,{}),type:"block",hiddenInPublication:!1,onSelect:async(e,t)=>{let n=await O(e,t,"code"),r=localStorage.getItem(L);r&&await e.mutate.assertFact({entity:n,attribute:"block/code-language",data:{type:"string",value:r}})}},{name:"Date and Time",icon:(0,t.jsx)(f.BlockCalendarSmall,{}),type:"event",hiddenInPublication:!0,onSelect:(e,t)=>
62(t.entityID&&B(t.entityID),O(e,t,"datetime"))},{name:"New Page",icon:(0,t.jsx)(x.BlockDocPageSmall,{}),type:"page",hiddenOnPublicationPage:!0,onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID);let r=await O(e,t,"card"),a=(0,l.v7)();await e?.mutate.addPageLinkBlock({blockEntity:r,firstBlockFactID:(0,l.v7)(),firstBlockEntity:(0,l.v7)(),pageEntity:a,type:"doc",permission_set:t.entity_set,display:(0,s.getEditorPrefs)().pageLinkDisplay}),i.useUIState.getState().openPage(t.parent,a),n.add({undo:()=>{i.useUIState.getState().closePage(a),setTimeout(()=>(0,d.focusBlock)({parent:t.parent,entityID:r,type:"text"},{type:"end"}),100)},redo:()=>{i.useUIState.getState().openPage(t.parent,a),(0,o.focusPage)(a,e,"focusFirstBlock")}}),(0,o.focusPage)(a,e,"focusFirstBlock")}},{name:"New Canvas",icon:(0,t.jsx)(g.BlockCanvasPageSmall,{}),type:"page",hiddenOnPublicationPage:!0,onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID);let r=await O(e,t,"card"),a=(0,l.v7)();await e?.mutate.addPageLinkBlock({type:"canvas",blockEntity:r,firstBlockFactID:(0,l.v7)(),firstBlockEntity:(0,l.v7)(),pageEntity:a,permission_set:t.entity_set,display:(0,s.getEditorPrefs)().pageLinkDisplay}),i.useUIState.getState().openPage(t.parent,a),(0,o.focusPage)(a,e,"focusFirstBlock"),n.add({undo:()=>{i.useUIState.getState().closePage(a),setTimeout(()=>(0,d.focusBlock)({parent:t.parent,entityID:r,type:"text"},{type:"end"}),100)},redo:()=>{i.useUIState.getState().openPage(t.parent,a),(0,o.focusPage)(a,e,"focusFirstBlock")}})}},{name:"Drawing",icon:(0,t.jsx)(b.BlockEmbeddedCanvasSmall,{}),type:"page",alternateNames:["sketch","diagram","canvas"],hiddenOnPublicationPage:!0,hiddenOnCanvas:!0,onSelect:async(e,t,n)=>{t.entityID&&B(t.entityID);let r=(0,l.v7)(),a=()=>{i.useUIState.getState().openPage(t.parent,r),(0,o.focusPage)(r,e)};await n.withUndoGroup(async()=>{let o=await O(e,t,"embedded-canvas");await e.mutate.addEmbeddedCanvasBlock({blockEntity:o,pageEntity:r,permission_set:t.entity_set,...v.EMBEDDED_CANVAS_SIZES.medium}),n.add({undo:()=>i.useUIState.getState().closePage(r),redo:a})}),a()}},{name:"Post List",icon:(0,t.jsx)(T.PostListSmall,{}),type:"publication",alternateNames:["posts","archive","feed","listing"],publicationOnly:!0,hiddenInPost:!0,onSelect:async(e,t)=>{t.entityID&&B(t.entityID),await O(e,t,"posts-list")}},{name:"Recommended Pubs",icon:(0,t.jsx)(I.RecommendFilledSmall,{}),type:"publication",alternateNames:["recommendations","recommended","publications","pubs"],publicationOnly:!0,onSelect:async(e,t)=>{t.entityID&&B(t.entityID),await O(e,t,"recommended-pubs")}},{name:"Post Title",icon:(0,t.jsx)(y.BlockPostHeaderSmall,{}),type:"publication",alternateNames:["header","metadata","byline","post header"],publicationOnly:!0,hiddenOnPublicationPage:!0,canvasOnly:!0,onSelect:async(e,t)=>{t.entityID&&B(t.entityID),await O(e,t,"post-header")}},{name:"Subscribe Form",icon:(0,t.jsx)(S.BlockMailboxSmall,{}),type:"publication",alternateNames:["subscribe","newsletter","email","signup"],publicationOnly:!0,onSelect:async(e,t)=>{t.entityID&&B(t.entityID),await O(e,t,"signup")}},{name:"Paywall",icon:(0,t.jsx)(R.LockTiny,{}),type:"publication",alternateNames:["members","membership","members only","premium"],publicationOnly:!0,hiddenOnPublicationPage:!0,membersOnlyDelimiter:!0,onSelect:async(e,t,n)=>{if((0,j.getPageBlocks)(e,t.parent).some(e=>"members-only-delimiter"===e.type))return;t.entityID&&B(t.entityID);let r=await O(e,t,"members-only-delimiter");await e.mutate.assertFact({entity:r,attribute:"block/members-only-audience",data:{type:"string",value:t.hasPaidTiers?"paid":"subscribers"}}),n.add({undo:()=>{t.entityID&&U(t.entityID)},redo:()=>{}})}}];async function H(e,t,n){let r=await O(t,n,"heading");await t.mutate.assertFact({entity:r,attribute:"block/heading-level",data:{type:"number",value:e}}),B(r)}function U(e){document.getElementById(u.elementId.block(e).text)?.focus()}var z=e.i(467592),$=e.i(393991),V=e.i(492122),q=e.i(876082),G=e.i(998430);let W=e=>{let i,a,o,s,l,u,d=(0,n.c)(24),{props:h,searchValue:p}=e,[m,f]=(0,r.useState)(void 0),{rep:g,undoManager:y,rootEntity:b}=(0,z.useReplicache)(),v=(0,V.useEntitySetContext)(),{data:x}=(0,q.useLeafletPublicationData)(),k=!!(0,q.useLeafletPublicationPage)(),w=!!x?.publications?.publication_membership_settings?.enabled;d[0]!==x?.publications?.publication_membership_tiers?(i=x?.publications?.publication_membership_tiers??[],d[0]=x?.publications?.publication_membership_tiers,d[1]=i):i=d[1];let C=i.some(K),S=(0,z.useEntity)(b,"root/page")[0]?.data.value,E=(0,$.useBlocks)(h.parent);d[2]!==E?(a=E.some(Y),d[2]=E,d[3]=a):a=d[3];let T=a,I=(0,z.useEntity)(h.parent,"page/type")?.data.value==="canvas";d[4]!==h.entityID?(o=()=>
62{if(!h.entityID)return;let e=h.entityID,t=c.useEditorStates.getState().editorStates[e];if(!t)return;let n=t.editor.tr;n.deleteRange(1,n.doc.content.size-1),t.view?t.view.dispatch(n):(0,c.setEditorState)(e,{editor:t.editor.apply(n)})},d[4]=h.entityID,d[5]=o):o=d[5];let D=o;d[6]!==S||d[7]!==T||d[8]!==k||d[9]!==I||d[10]!==w||d[11]!==h.parent||d[12]!==x||d[13]!==p?(s=e=>{let t=p.toLocaleLowerCase(),n=e.name.toLocaleLowerCase().includes(t),r=e.alternateNames?.some(e=>e.toLocaleLowerCase().includes(t))??!1,i=!x||!e.hiddenInPublication,a=!e.membersOnlyDelimiter||w&&h.parent===S&&!T,o=!e.publicationOnly||!!x?.publications,s=!!e.hiddenOnPublicationPage&&k,l=!!e.hiddenInPost&&!k,c=I?!e.hiddenOnCanvas:!e.canvasOnly;return(n||r)&&i&&a&&o&&!s&&!l&&c},d[6]=S,d[7]=T,d[8]=k,d[9]=I,d[10]=w,d[11]=h.parent,d[12]=x,d[13]=p,d[14]=s):s=d[14];let N=F.filter(s),A=G.Combobox,_=N.map(Z),P=async()=>{await y.withUndoGroup(async()=>{let e=N.find(e=>e.name===m);e&&g&&await e.onSelect(g,{...h,entity_set:v.set,hasPaidTiers:C},y)})};d[15]!==D?(l=()=>D(),d[15]=D,d[16]=l):l=d[16];let M=0===N.length?(0,t.jsx)("div",{className:"w-full text-tertiary text-center italic px-2 ",children:"No blocks found"}):N.map((e,n)=>(0,t.jsxs)("div",{className:"contents",children:[(0,t.jsxs)(G.ComboboxResult,{className:"pl-0!",result:e.name,onSelect:()=>y.withUndoGroup(async()=>{g&&await e.onSelect(g,{...h,entity_set:v.set,hasPaidTiers:C},y)}),highlighted:m,setHighlighted:f,children:[(0,t.jsx)("div",{className:"text-tertiary w-8 shrink-0 flex justify-center",children:e.icon}),e.name]}),N[n+1]&&e.type!==N[n+1].type&&(0,t.jsx)("hr",{className:"mx-2 my-0.5 border-border"})]},n));return d[17]!==A||d[18]!==m||d[19]!==P||d[20]!==l||d[21]!==M||d[22]!==_?(u=(0,t.jsx)(A,{open:!0,triggerClassName:"absolute left-0",resultsClassName:"py-1",results:_,highlighted:m,setHighlighted:f,onSelect:P,onOpenChange:l,children:M}),d[17]=A,d[18]=m,d[19]=P,d[20]=l,d[21]=M,d[22]=_,d[23]=u):u=d[23],u};function K(e){return e.active}function Y(e){return"members-only-delimiter"===e.type}function Z(e){return e.name}},477180,e=>{"use strict";var t=e.i(843476),n=e.i(500932);function r(e){return e.preventDefault()}e.s(["BlockSettingOptions",0,function(e){let i,a,o=(0,n.c)(6),s=`relative w-full items-stretch sm:flex sm:flex-row sm:gap-1 ${e.halfWidthOnMobile?"grid grid-cols-2 gap-2":"flex flex-col gap-2"}`;return o[0]!==e?(i=e.options.map(n=>{let i=e.value===n.value;return(0,t.jsxs)("button",{className:`BlockSettingOption text-left flex flex-col flex-1 pt-1 p-2 outline-2 outline-offset-1 border ${i?"accent-container outline-accent-contrast border-accent-contrast ":"opaque-container outline-transparent"}`,type:"button","aria-pressed":i,onMouseDown:r,onClick:()=>e.onSelect(n.value),children:[(0,t.jsx)("div",{className:"text-xs font-bold text-secondary uppercase pb-1",children:n.value}),(0,t.jsx)("div",{className:"flex items-center grow w-full",children:(0,t.jsx)(n.Icon,{selected:i})})]},n.value)}),o[0]=e,o[1]=i):i=o[1],o[2]!==e.children||o[3]!==s||o[4]!==i?(a=(0,t.jsxs)("div",{className:s,children:[i,e.children]}),o[2]=e.children,o[3]=s,o[4]=i,o[5]=a):a=o[5],a}])},521747,e=>{"use strict";e.s(["BlueskyEmbed",()=>a]);var t=e.i(843476),n=e.i(500932),r=e.i(794866),i=e.i(498911);let a=e=>{let a,o,s=(0,n.c)(9),l=(0,r.useOpenThread)();return s[0]!==l||s[1]!==e.parent?(a=t=>l(e.parent,{type:"thread",uri:t}),s[0]=l,s[1]=e.parent,s[2]=a):a=s[2],s[3]!==e.className||s[4]!==e.compact||s[5]!==e.embed||s[6]!==e.postUrl||s[7]!==a?(o=(0,t.jsx)(i.BskyEmbed,{content:e.embed,postUrl:e.postUrl,className:e.className,compact:e.compact,onQuoteClick:a}),s[3]=e.className,s[4]=e.compact,s[5]=e.embed,s[6]=e.postUrl,s[7]=a,s[8]=o):o=s[8],o}},691205,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(492122),i=e.i(271645),a=e.i(467592),o=e.i(813029),s=e.i(793610),l=e.i(859015),c=e.i(784192),u=e.i(438424),d=e.i(170685);let h=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M6.33526 4.21162C8.62822 5.97119 11.0945 9.53887 12.0001 11.4535C12.9056 9.53901 15.3718 5.97116 17.6649 4.21162C19.3193 2.94199 22 1.95962 22 5.08557C22 5.70987 21.6498 10.33 21.4445 11.08C20.7306 13.6878 18.1292 14.3529 15.8152 13.9503C19.86 14.654 20.8889 16.9848 18.6668 19.3156C14.4465 23.7423 12.601 18.205 12.1279 16.7861C11.9998 16.4018 12.0002 16.4018 11.8721 16.7861C11.3993 18.205 9.55378 23.7424 5.33322 19.3156C3.11103 16.9848 4.13995 14.6538 8.18483 13.9503C5.87077 14.3529 3.26934 13.6878 2.55555 11.08C2.35016 10.3299 2 5.7098 2 5.08557C2 1.95962 4.68086 2.94199 6.33526 4.21162Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};var p=e.i(864460);e.s(["BlueskyPostEmpty",0,e=>{let m,f,g,y,b,v,x,k,w,C,S,E,T,I=(0,n.c)(30),{rep:D}=(0,a.useReplicache)(),N=(0,o.useIsBlockSelected)(e.entityID);(0,r.useEntitySetContext)();let[A,_]=(0,i.useState)(""),P=async()=>
62{if(!D)return;let t=e.entityID;if(!1===await (0,d.addBlueskyPostBlock)(A,t,D)){let e=document.getElementById("bluesky-post-block-submit")?.getBoundingClientRect();m({error:!0,text:"post not found!",position:{x:e&&e.left+12||0,y:e&&e.top||0}})}};m=(0,s.useSmoker)(),I[0]!==m||I[1]!==A?(f=function(e,t){A&&""!==A?(0,u.isUrl)(A)&&A.includes("bsky.app")||m({error:!0,text:"invalid bluesky url!",position:{x:e,y:t}}):m({error:!0,text:"no url!",position:{x:e,y:t}})},I[0]=m,I[1]=A,I[2]=f):f=I[2];let M=f;I[3]!==M||I[4]!==P?(g=e=>{e.preventDefault();let t=document.getElementById("bluesky-post-block-submit")?.getBoundingClientRect();t&&M(t.left+12,t.top),P()},I[3]=M,I[4]=P,I[5]=g):g=I[5];let R=`shrink-0 ${N?"text-tertiary":"text-border"} `;I[6]!==R?(y=(0,t.jsx)(h,{className:R}),I[6]=R,I[7]=y):y=I[7],I[8]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(l.Separator,{}),I[8]=b):b=I[8],I[9]===Symbol.for("react.memo_cache_sentinel")?(v=e=>_(e.target.value),I[9]=v):v=I[9],I[10]!==P||I[11]!==A?(x=e=>{"Enter"===e.key&&P(),"Backspace"!==e.key||e.currentTarget.value||""===A||e.preventDefault()},I[10]=P,I[11]=A,I[12]=x):x=I[12],I[13]!==x||I[14]!==A?(k=(0,t.jsx)(c.Input,{type:"text",className:"w-full grow border-none outline-hidden bg-transparent ",placeholder:"bsky.app/post-url",value:A,onChange:v,onKeyDown:x}),I[13]=x,I[14]=A,I[15]=k):k=I[15];let L=`p-1 ${N?"text-accent-contrast":"text-border"}`;return I[16]!==M||I[17]!==P?(w=e=>{e.preventDefault(),M(e.clientX+12,e.clientY),P()},I[16]=M,I[17]=P,I[18]=w):w=I[18],I[19]===Symbol.for("react.memo_cache_sentinel")?(C=(0,t.jsx)(p.CheckTiny,{}),I[19]=C):C=I[19],I[20]!==L||I[21]!==w?(S=(0,t.jsx)("button",{type:"submit",id:"bluesky-post-block-submit",className:L,onMouseDown:w,children:C}),I[20]=L,I[21]=w,I[22]=S):S=I[22],I[23]!==S||I[24]!==y||I[25]!==k?(E=(0,t.jsxs)("div",{className:"max-w-sm flex gap-2 rounded-md text-secondary",children:[y,b,k,S]}),I[23]=S,I[24]=y,I[25]=k,I[26]=E):E=I[26],I[27]!==g||I[28]!==E?(T=(0,t.jsx)("form",{onSubmit:g,children:E}),I[27]=g,I[28]=E,I[29]=T):T=I[29],T}],691205)},145399,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(593302);e.s(["BlueskyRichText",0,function(e){let i,a=(0,n.c)(3),{record:o}=e;if(!o)return null;if(a[0]!==o.facets||a[1]!==o.text){let e=new r.RichText({text:o.text,facets:o.facets}),n=[],s=0;for(let i of e.segments())i.link&&r.AppBskyRichtextFacet.validateLink(i.link).success?n.push((0,t.jsx)("a",{href:i.link.uri,className:"text-accent-contrast hover:underline",target:"_blank",rel:"noopener noreferrer",children:i.text},s)):i.mention&&r.AppBskyRichtextFacet.validateMention(i.mention).success?n.push((0,t.jsx)("a",{href:`https://bsky.app/profile/${i.mention.did}`,className:"text-accent-contrast hover:underline",target:"_blank",rel:"noopener noreferrer",children:i.text},s)):i.tag&&r.AppBskyRichtextFacet.validateTag(i.tag).success?n.push((0,t.jsx)("a",{href:`https://bsky.app/tag/${i.tag.tag}`,className:"text-accent-contrast hover:underline",target:"_blank",rel:"noopener noreferrer",children:i.text},s)):n.push(i.text),s++;i=(0,t.jsx)("p",{className:"whitespace-pre-wrap",children:n}),a[0]=o.facets,a[1]=o.text,a[2]=i}else i=a[2];return i}])},432935,945870,386660,e=>{"use strict";e.s(["BlueskyPostBlock",()=>b],432935);var t=e.i(843476),n=e.i(500932),r=e.i(492122),i=e.i(271645),a=e.i(467592),o=e.i(813029),s=e.i(173275),l=e.i(553445),c=e.i(394191),u=e.i(593302);e.i(521747);var d=e.i(498911),h=e.i(691205),p=e.i(612854),m=e.i(206057),f=e.i(477180),g=e.i(668767),y=e.i(829971);let b=e=>{let m,f,g=(0,n.c)(39),{permissions:b}=(0,r.useEntitySetContext)(),x=(0,o.useIsBlockSelected)(e.entityID),k=(0,a.useEntity)(e.entityID,"block/bluesky-post")?.data.value,w=(0,a.useEntity)(e.entityID,"bluesky-post/host")?.data.value,C=(0,a.useEntity)(e.entityID,"bluesky-post/view");switch(g[0]!==x||g[1]!==e.entityID||g[2]!==e.preview?(m=()=>{if(e.preview)return;let t=document.getElementById(l.elementId.block(e.entityID).input);x?t?.focus():t?.blur()},f=[x,e.entityID,e.preview],g[0]=x,g[1]=e.entityID,g[2]=e.preview,g[3]=m,g[4]=f):(m=g[3],f=g[4]),(0,i.useEffect)(m,f),!0){case!k:{let n,r,i,a;if(!b.write)return null;g[5]!==e.entityID||g[6]!==e.preview?(n=e.preview?void 0:l.elementId.block(e.entityID).input,g[5]=e.entityID,g[6]=e.preview,g[7]=n):n=g[7];let o=` 63 w-full h-[104px] p-2 64 text-tertiary hover:text-accent-contrast hover:cursor-pointer 65 flex flex-auto gap-2 items-center justify-center hover:border-2 border-dashed rounded-lg 66 ${x?"border-2 border-tertiary":"border border-border"} 67 ${"canvas"===e.pageType&&"bg-bg-page"}`;return g[8]!==e.entityID||g[9]!==e.parent||g[10]!==e.type?(r=()=>{(0,c.focusBlock)({type:e.type,entityID:e.entityID,parent:e.parent},{type:"start"})},g[8]=e.entityID,g[9]=e.parent,g[10]=e.type,g[11]=r):r=g[11],g[12]!==e?(i=(0,t.jsx)(h.BlueskyPostEmpty,{...e}),g[12]=e,g[13]=i):i=g[13],g[14]!==n||g[15]!==o||g[16]!==r||g[17]!==i?(a=(0,t.jsx)("label",{id:n,className:o,onMouseDown:r,children:i}),g[14]=n,g[15]=o,g[16]=r,g[17]=i,g[18]=a):a=g[18],a}case u.AppBskyFeedDefs.isBlockedPost(k)||u.AppBskyFeedDefs.isBlockedAuthor(k)||u.AppBskyFeedDefs.isNotFoundPost(k):{let e,n,r=!!x;return g[19]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(d.PostNotAvailable,{}),g[19]=e):e=g[19],g[20]!==r?(n=(0,t.jsx)(s.BlockLayout,{isSelected:r,className:"w-full",children:e}),g[20]=r,g[21]=n):n=g[21],n}case u.AppBskyFeedDefs.isThreadViewPost(k):{let n,r,i,a,o=k.post,l=C?.data.value;
67g[22]!==o||g[23]!==l?(n=(0,y.resolveBskyPostView)(o,l),g[22]=o,g[23]=l,g[24]=n):n=g[24];let c=n,u=!!x;return g[25]!==o||g[26]!==e.entityID||g[27]!==e.preview||g[28]!==c.view?(r=!e.preview&&(0,y.getBskyPostMedia)(o)&&(0,t.jsx)(v,{entityID:e.entityID,view:c.view}),g[25]=o,g[26]=e.entityID,g[27]=e.preview,g[28]=c.view,g[29]=r):r=g[29],g[30]!==w||g[31]!==o||g[32]!==c.media||g[33]!==c.view?(i="media"===c.view?(0,t.jsx)(p.BskyPostMediaContent,{post:o,media:c.media,parent:void 0,className:"text-sm text-secondary",clientHost:w,openThreadOnClick:!1}):(0,t.jsx)(p.BskyPostContent,{post:o,parent:void 0,showBlueskyLink:!0,showEmbed:!0,avatarSize:"large",className:"text-sm text-secondary ",clientHost:w,openThreadOnClick:!1}),g[30]=w,g[31]=o,g[32]=c.media,g[33]=c.view,g[34]=i):i=g[34],g[35]!==u||g[36]!==r||g[37]!==i?(a=(0,t.jsx)(s.BlockLayout,{isSelected:u,hasBackground:"page",borderOnHover:!0,className:"blueskyPostBlock sm:px-3! sm:py-2! px-2! py-1!",extraOptions:r,children:i}),g[35]=u,g[36]=r,g[37]=i,g[38]=a):a=g[38],a}}};function v(e){let r,i,o,s,l=(0,n.c)(8),{rep:c}=(0,a.useReplicache)();return l[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("h4",{children:"Post Style"}),l[0]=r):r=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(i=[{value:"full",Icon:k},{value:"media",Icon:w}],l[1]=i):i=l[1],l[2]!==e.entityID||l[3]!==c?(o=t=>{c&&c.mutate.assertFact({entity:e.entityID,attribute:"bluesky-post/view",data:{type:"bluesky-post-view-union",value:t}})},l[2]=e.entityID,l[3]=c,l[4]=o):o=l[4],l[5]!==e.view||l[6]!==o?(s=(0,t.jsxs)(m.BlockSettings,{label:"Bluesky Post",className:"w-sm",children:[r,(0,t.jsx)(f.BlockSettingOptions,{options:i,value:e.view,onSelect:o})]}),l[5]=e.view,l[6]=o,l[7]=s):s=l[7],s}let x=()=>{let e,r=(0,n.c)(1);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"w-full h-[36px] bg-border rounded-[2px] bg-cover bg-center",style:{backgroundImage:"url(/imagePlaceholder.png)",backgroundBlendMode:"hard-light"}}),r[0]=e):e=r[0],e},k=e=>{let r,i,a,o=(0,n.c)(4),{selected:s}=e,l=`flex gap-1.5 p-2 w-full overflow-hidden opaque-container border-tertiary! ${s?"border-accent-contrast!":""}`;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-border shrink-0"}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsxs)("div",{className:"flex flex-col gap-1 grow min-w-0",children:[(0,g.PlaceholderText)("sm","50%"),(0,g.PlaceholderText)("md"),(0,t.jsx)(x,{})]}),o[1]=i):i=o[1],o[2]!==l?(a=(0,t.jsxs)("div",{className:l,children:[r,i]}),o[2]=l,o[3]=a):a=o[3],a},w=e=>{let r,i,a,o=(0,n.c)(4),{selected:s}=e,l=`flex flex-col gap-1 p-2 w-full overflow-hidden opaque-container border-tertiary! ${s?"border-accent-contrast!":""}`;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(x,{}),i=(0,g.PlaceholderText)("sm","30%"),o[0]=r,o[1]=i):(r=o[0],i=o[1]),o[2]!==l?(a=(0,t.jsxs)("div",{className:l,children:[r,i]}),o[2]=l,o[3]=a):a=o[3],a};e.s(["StandardSitePostBlock",()=>D],945870);var C=e.i(103136),S=e.i(132711),E=e.i(510285),T=e.i(876082),I=e.i(850952);let D=e=>{let r,i,l,c,u=(0,n.c)(24),d=(0,o.useIsBlockSelected)(e.entityID),h=(0,a.useEntity)(e.entityID,"block/standard-site-post")?.data.value,p=(0,a.useEntity)(e.entityID,"standard-site-post/size"),m=p?.data.value??"medium",f=(0,a.useEntity)(e.entityID,"standard-site-post/show-publication-theme"),g=f?.data.value!==!1,y=(0,T.useLeafletPublicationData)(),b=y.data?.publications?.uri??null,{data:v}=(0,E.useStandardSitePost)(e.preview?null:h);if(!h)return null;if(e.preview){let e,n,r=!!d;return u[0]!==m?(e=(0,t.jsx)("div",{className:"bg-bg-page",children:(0,t.jsx)(S.StandardSitePostItemPlaceholder,{size:m})}),u[0]=m,u[1]=e):e=u[1],u[2]!==r||u[3]!==e?(n=(0,t.jsx)(s.BlockLayout,{isSelected:r,borderOnHover:!0,className:"standardSitePostBlock p-0! overflow-hidden!",children:e}),u[2]=r,u[3]=e,u[4]=n):n=u[4],n}if(!v){let e;return u[5]!==b||u[6]!==m||u[7]!==h?(e=(0,t.jsx)(S.StandardSitePostItem,{uri:h,size:m,currentPublicationUri:b}),u[5]=b,u[6]=m,u[7]=h,u[8]=e):e=u[8],e}let x=!!d;
67u[9]!==e.entityID?(r=(0,t.jsx)(N,{entityID:e.entityID}),u[9]=e.entityID,u[10]=r):r=u[10];let k=v.publication?.record??void 0;return u[11]!==b||u[12]!==m||u[13]!==h?(i=(0,t.jsx)("div",{className:"bg-bg-page",children:(0,t.jsx)(S.StandardSitePostItem,{uri:h,size:m,currentPublicationUri:b})}),u[11]=b,u[12]=m,u[13]=h,u[14]=i):i=u[14],u[15]!==v.record||u[16]!==g||u[17]!==k||u[18]!==i?(l=(0,t.jsx)(I.PublicationThemeWrapper,{postRecord:v.record,pubRecord:k,enabled:g,children:i}),u[15]=v.record,u[16]=g,u[17]=k,u[18]=i,u[19]=l):l=u[19],u[20]!==x||u[21]!==r||u[22]!==l?(c=(0,t.jsx)(s.BlockLayout,{isSelected:x,borderOnHover:!0,className:"standardSitePostBlock p-0! overflow-hidden!",extraOptions:r,children:l}),u[20]=x,u[21]=r,u[22]=l,u[23]=c):c=u[23],c};function N(e){let r,i,o,s,l,c,u,d,h=(0,n.c)(19),{rep:p}=(0,a.useReplicache)(),y=(0,a.useEntity)(e.entityID,"standard-site-post/size"),b=y?.data.value??"medium",v=(0,a.useEntity)(e.entityID,"standard-site-post/show-publication-theme"),x=v?.data.value!==!1;h[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("h4",{children:"Post Size"}),h[0]=r):r=h[0],h[1]===Symbol.for("react.memo_cache_sentinel")?(i=[{value:"small",Icon:g.SmallIcon},{value:"medium",Icon:g.MedIcon},{value:"large",Icon:g.LargeIcon}],h[1]=i):i=h[1];let k="small"===b||"large"===b?b:"medium";return h[2]!==e.entityID||h[3]!==p?(o=t=>{p&&p.mutate.assertFact({entity:e.entityID,attribute:"standard-site-post/size",data:{type:"standard-site-post-size-union",value:t}})},h[2]=e.entityID,h[3]=p,h[4]=o):o=h[4],h[5]!==k||h[6]!==o?(s=(0,t.jsx)(f.BlockSettingOptions,{options:i,value:k,onSelect:o}),h[5]=k,h[6]=o,h[7]=s):s=h[7],h[8]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("hr",{className:"border-border-light my-1"}),h[8]=l):l=h[8],h[9]!==e.entityID||h[10]!==p||h[11]!==x?(c=()=>{p&&p.mutate.assertFact({entity:e.entityID,attribute:"standard-site-post/show-publication-theme",data:{type:"boolean",value:!x}})},h[9]=e.entityID,h[10]=p,h[11]=x,h[12]=c):c=h[12],h[13]!==x||h[14]!==c?(u=(0,t.jsx)(C.ToggleWithLabel,{label:"Use Publication Theme",toggle:x,onToggle:c}),h[13]=x,h[14]=c,h[15]=u):u=h[15],h[16]!==s||h[17]!==u?(d=(0,t.jsxs)(m.BlockSettings,{label:"Post",className:"w-md",children:[r,s,l,u]}),h[16]=s,h[17]=u,h[18]=d):d=h[18],d}e.s(["StandardSitePublicationBlock",()=>P],386660);var A=e.i(344290),_=e.i(66016);let P=e=>{let r,i,l,c,u=(0,n.c)(21),d=(0,o.useIsBlockSelected)(e.entityID),h=(0,a.useEntity)(e.entityID,"block/standard-site-publication")?.data.value,p=(0,a.useEntity)(e.entityID,"standard-site-publication/show-publication-theme"),m=p?.data.value!==!1,{data:f}=(0,_.useStandardSitePublication)(e.preview?null:h);if(!h)return null;if(e.preview){let e,n,r=!!d;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"bg-bg-page",children:(0,t.jsx)(A.StandardSitePublicationItemPlaceholder,{})}),u[0]=e):e=u[0],u[1]!==r?(n=(0,t.jsx)(s.BlockLayout,{isSelected:r,borderOnHover:!0,className:"standardSitePublicationBlock p-0! overflow-hidden!",children:e}),u[1]=r,u[2]=n):n=u[2],n}if(!f){let e,n,r=!!d;return u[3]!==h?(e=(0,t.jsx)("div",{className:"bg-bg-page",children:(0,t.jsx)(A.StandardSitePublicationItem,{uri:h})}),u[3]=h,u[4]=e):e=u[4],u[5]!==r||u[6]!==e?(n=(0,t.jsx)(s.BlockLayout,{isSelected:r,borderOnHover:!0,className:"standardSitePublicationBlock p-0! overflow-hidden!",children:e}),u[5]=r,u[6]=e,u[7]=n):n=u[7],n}let g=!!d;return u[8]!==e.entityID?(r=(0,t.jsx)(M,{entityID:e.entityID}),u[8]=e.entityID,u[9]=r):r=u[9],u[10]!==h?(i=(0,t.jsx)("div",{className:"bg-bg-page",children:(0,t.jsx)(A.StandardSitePublicationItem,{uri:h})}),u[10]=h,u[11]=i):i=u[11],u[12]!==f.record||u[13]!==f.uri||u[14]!==m||u[15]!==i?(l=(0,t.jsx)(I.WithPublicationTheme,{record:f.record,uri:f.uri,enabled:m,children:i}),u[12]=f.record,u[13]=f.uri,u[14]=m,u[15]=i,u[16]=l):l=u[16],u[17]!==g||u[18]!==r||u[19]!==l?(c=(0,t.jsx)(s.BlockLayout,{isSelected:g,borderOnHover:!0,className:"standardSitePublicationBlock p-0! overflow-hidden!",extraOptions:r,children:l}),u[17]=g,u[18]=r,u[19]=l,u[20]=c):c=u[20],c};function M(e){let r,i,o=(0,n.c)(7),{rep:s}=(0,a.useReplicache)(),l=(0,a.useEntity)(e.entityID,"standard-site-publication/show-publication-theme"),c=l?.data.value!==!1;return o[0]!==e.entityID||o[1]!==s||o[2]!==c?(r=()=>{s&&s.mutate.assertFact({entity:e.entityID,attribute:"standard-site-publication/show-publication-theme",data:{type:"boolean",value:!c}})},o[0]=e.entityID,o[1]=s,o[2]=c,o[3]=r):r=o[3],o[4]!==c||o[5]!==r?(i=(0,t.jsx)(m.BlockSettings,{label:"Publication",children:(0,t.jsx)(C.ToggleWithLabel,{label:"Use Publication Theme",toggle:c,onToggle:r})}),o[4]=c,o[5]=r,o[6]=i):i=o[6],i}},429969,549281,e=>{"use strict";e.s(["ButtonBlock",()=>w],429969);var t=e.i(843476),n=e.i(500932),r=e.i(492122),i=e.i(271645),a=e.i(467592),o=e.i(813029),s=e.i(173275),l=e.i(468034),c=e.i(793610),u=e.i(859015),d=e.i(784192),h=e.i(438424),p=e.i(394191),m=e.i(69278),f=e.i(54642),g=e.i(864460),y=e.i(743937),b=e.i(791676),v=e.i(511987),x=e.i(206057);let k=e=>e.startsWith("http")||e.startsWith("mailto")||e.startsWith("tel:")?e:`https://${e}`,w=e=>{let i,l,c,u,d=(0,n.c)(17),{permissions:h}=(0,r.useEntitySetContext)(),p=(0,a.useEntity)(e.entityID,"button/text"),f=(0,a.useEntity)(e.entityID,"button/url"),g=(0,o.useIsBlockSelected)(e.entityID),y=(0,a.useEntity)(e.entityID,"block/text-alignment")?.data.value;if(!f){let n;return!h.write||e.preview?null:(d[0]!==e?(n=(0,t.jsx)(C,{...e}),d[0]=e,d[1]=n):n=d[1],n)}let b=!!g,v="justify"!==y;d[2]!==e.entityID||d[3]!==e.preview?(i=e.preview?void 0:(0,t.jsx)(S,{entity
67ID:e.entityID}),d[2]=e.entityID,d[3]=e.preview,d[4]=i):i=d[4];let x=f?.data.value,k=` ${"justify"===y?"w-full":"w-fit"}`,w="justify"===y,E=p?.data.value;return d[5]!==w||d[6]!==E?(l=(0,t.jsx)(m.ButtonPrimary,{role:"link",type:"submit",fullWidth:w,children:E}),d[5]=w,d[6]=E,d[7]=l):l=d[7],d[8]!==x||d[9]!==k||d[10]!==l?(c=(0,t.jsx)("a",{href:x,target:"_blank",referrerPolicy:"no-referrer",className:k,children:l}),d[8]=x,d[9]=k,d[10]=l,d[11]=c):c=d[11],d[12]!==b||d[13]!==v||d[14]!==i||d[15]!==c?(u=(0,t.jsx)(s.BlockLayout,{isSelected:b,borderOnHover:!0,hasAlignment:v,className:"p-0! rounded-md! border-none!",extraOptions:i,children:c}),d[12]=b,d[13]=v,d[14]=i,d[15]=c,d[16]=u):u=d[16],u},C=e=>{let{rep:n,undoManager:b}=(0,a.useReplicache)(),v=(0,c.useSmoker)(),x=(0,r.useEntitySetContext)(),w=(0,o.useIsBlockSelected)(e.entityID),[C,S]=(0,i.useState)(""),[E,T]=(0,i.useState)(""),I=E,D=(0,a.useEntity)(e.entityID,"block/text-alignment")?.data.value,N=async()=>{await b.withUndoGroup(async()=>{let t=e.entityID;if(!t&&n&&(t=await (0,l.addBlockBelow)(n,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:x.set,type:"card"})),I=k(E),!n)return;await n.mutate.assertFact({entity:t,attribute:"block/type",data:{type:"block-type-union",value:"button"}}),await n?.mutate.assertFact({entity:t,attribute:"button/text",data:{type:"string",value:C}}),await n?.mutate.assertFact({entity:t,attribute:"button/url",data:{type:"string",value:I}});let r=await (0,l.addBlockBelow)(n,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:x.set,type:"text"});(0,p.focusBlock)({entityID:r,type:"text",parent:e.parent},{type:"start"})})};return(0,t.jsxs)("div",{className:`buttonBlockSettingsWrapper flex flex-col gap-2 w-full 68 `,children:[(0,t.jsx)(m.ButtonPrimary,{className:`relative ${"center"===D?"place-self-center":"left"===D?"place-self-start":"right"===D?"place-self-end":"place-self-center"}`,fullWidth:"justify"===D,children:""!==C?C:"Button"}),(0,t.jsx)(s.BlockLayout,{isSelected:!!w,borderOnHover:!0,hasBackground:"accent",className:"buttonBlockSettings text-tertiary hover:cursor-pointer border-dashed! p-0!",children:(0,t.jsx)("form",{className:"w-full",onSubmit:e=>{e.preventDefault();let t=document.getElementById("button-block-settings")?.getBoundingClientRect();C?E?(0,h.isUrl)(E)?N():v({error:!0,text:"invalid url!",position:{y:t?t.top:0,x:t?t.left+12:0}}):v({error:!0,text:"missing url!",position:{y:t?t.top:0,x:t?t.left+12:0}}):v({error:!0,text:"missing button text!",position:{y:t?t.top:0,x:t?t.left+12:0}})},children:(0,t.jsxs)("div",{className:"buttonBlockSettingsContent w-full flex flex-col sm:flex-row gap-2 text-secondary px-2 py-3 sm:pb-3 pb-1",children:[(0,t.jsxs)("div",{className:"buttonBlockSettingsTitleInput flex gap-2 w-full sm:w-52",children:[(0,t.jsx)(f.BlockButtonSmall,{className:`shrink-0 ${w?"text-tertiary":"text-border"} `}),(0,t.jsx)(u.Separator,{}),(0,t.jsx)(d.Input,{type:"text",className:"w-full grow border-none outline-hidden bg-transparent",placeholder:"button text",value:C,onChange:e=>S(e.target.value),onKeyDown:e=>{"Backspace"!==e.key||e.currentTarget.value||""===E||e.preventDefault()}})]}),(0,t.jsxs)("div",{className:"buttonBlockSettingsLinkInput grow flex gap-2 w-full",children:[(0,t.jsx)(y.LinkSmall,{className:`shrink-0 ${w?"text-tertiary":"text-border"} `}),(0,t.jsx)(u.Separator,{}),(0,t.jsx)(d.Input,{type:"text",id:"button-block-url-input",className:"w-full grow border-none outline-hidden bg-transparent",placeholder:"www.example.com",value:E,onChange:e=>T(e.target.value),onKeyDown:e=>{"Backspace"!==e.key||e.currentTarget.value||e.preventDefault()}})]}),(0,t.jsxs)("button",{id:"button-block-settings",type:"submit",className:`p-1 shrink-0 w-fit flex gap-2 items-center place-self-end ${w?"text-accent-contrast":"text-accent-contrast sm:text-border"}`,children:[(0,t.jsx)("div",{className:"sm:hidden block",children:"Save"}),(0,t.jsx)(g.CheckTiny,{})]})]})})})]})};function S(e){let r,o,s,l,u,p,m,f,g,y,w,C,S,I,D,N,A,_,P,M,R,L,j,O=(0,n.c)(49),{rep:B}=(0,a.useReplicache)(),F=(0,c.useSmoker)(),H=(0,a.useEntity)(e.entityID,"button/text")?.data.value??"",
68U=(0,a.useEntity)(e.entityID,"button/url")?.data.value??"",z=(0,a.useEntity)(e.entityID,"block/text-alignment")?.data.value??"center",[$,V]=(0,i.useState)(H),[q,G]=(0,i.useState)(U);O[0]!==H?(r=()=>V(H),o=[H],O[0]=H,O[1]=r,O[2]=o):(r=O[1],o=O[2]),(0,i.useEffect)(r,o),O[3]!==U?(s=()=>G(U),l=[U],O[3]=U,O[4]=s,O[5]=l):(s=O[4],l=O[5]),(0,i.useEffect)(s,l),O[6]!==e.entityID||O[7]!==B?.mutate||O[8]!==H||O[9]!==$?(u=()=>{if($!==H){if(!$.trim())return void V(H);B?.mutate.assertFact({entity:e.entityID,attribute:"button/text",data:{type:"string",value:$}})}},O[6]=e.entityID,O[7]=B?.mutate,O[8]=H,O[9]=$,O[10]=u):u=O[10];let W=u;O[11]!==e.entityID||O[12]!==B?.mutate||O[13]!==F||O[14]!==U||O[15]!==q?(p=t=>{if(q!==U){if(!q||!(0,h.isUrl)(q)){let e=t.currentTarget.getBoundingClientRect();F({error:!0,text:q?"invalid url!":"missing url!",position:{y:e.top,x:e.left+12}}),G(U);return}B?.mutate.assertFact({entity:e.entityID,attribute:"button/url",data:{type:"string",value:k(q)}})}},O[11]=e.entityID,O[12]=B?.mutate,O[13]=F,O[14]=U,O[15]=q,O[16]=p):p=O[16];let K=p;return O[17]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("span",{className:"font-bold",children:"Button Text"}),O[17]=m):m=O[17],O[18]===Symbol.for("react.memo_cache_sentinel")?(f=e=>V(e.currentTarget.value),O[18]=f):f=O[18],O[19]!==W?(g=e=>{"Enter"===e.key&&(e.preventDefault(),W())},O[19]=W,O[20]=g):g=O[20],O[21]!==W||O[22]!==g||O[23]!==$?(y=(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[m,(0,t.jsx)(d.Input,{type:"text",className:"input-with-border",value:$,onMouseDown:T,onChange:f,onBlur:W,onKeyDown:g})]}),O[21]=W,O[22]=g,O[23]=$,O[24]=y):y=O[24],O[25]===Symbol.for("react.memo_cache_sentinel")?(w=(0,t.jsx)("span",{className:"font-bold",children:"Link"}),O[25]=w):w=O[25],O[26]===Symbol.for("react.memo_cache_sentinel")?(C=e=>G(e.currentTarget.value),O[26]=C):C=O[26],O[27]!==K?(S=e=>{"Enter"===e.key&&(e.preventDefault(),K(e))},O[27]=K,O[28]=S):S=O[28],O[29]!==K||O[30]!==S||O[31]!==q?(I=(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[w,(0,t.jsx)(d.Input,{type:"text",className:"input-with-border",placeholder:"www.example.com",value:q,onMouseDown:E,onChange:C,onBlur:K,onKeyDown:S})]}),O[29]=K,O[30]=S,O[31]=q,O[32]=I):I=O[32],O[33]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsx)("hr",{className:"border-border-light"}),O[33]=D):D=O[33],O[34]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)("span",{className:"font-bold",children:"Alignment"}),O[34]=N):N=O[34],O[35]!==e.entityID||O[36]!==B?.mutate?(A=t=>B?.mutate.assertFact({entity:e.entityID,attribute:"block/text-alignment",data:{type:"text-alignment-type-union",value:t}}),O[35]=e.entityID,O[36]=B?.mutate,O[37]=A):A=O[37],O[38]===Symbol.for("react.memo_cache_sentinel")?(_={value:"left",label:(0,t.jsx)(v.AlignLeftSmall,{"aria-label":"Left"})},O[38]=_):_=O[38],O[39]===Symbol.for("react.memo_cache_sentinel")?(P={value:"center",label:(0,t.jsx)(v.AlignCenterSmall,{"aria-label":"Center"})},O[39]=P):P=O[39],O[40]===Symbol.for("react.memo_cache_sentinel")?(M={value:"right",label:(0,t.jsx)(v.AlignRightSmall,{"aria-label":"Right"})},O[40]=M):M=O[40],O[41]===Symbol.for("react.memo_cache_sentinel")?(R=[_,P,M,{value:"justify",label:(0,t.jsx)(v.AlignJustifiedSmall,{"aria-label":"Full Width"})}],O[41]=R):R=O[41],O[42]!==z||O[43]!==A?(L=(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[N,(0,t.jsx)(b.ToggleGroup,{value:z,background:"light",onCh
68ange:A,options:R})]}),O[42]=z,O[43]=A,O[44]=L):L=O[44],O[45]!==I||O[46]!==L||O[47]!==y?(j=(0,t.jsxs)(x.BlockSettings,{label:"Button",className:"w-xs",children:[y,I,D,L]}),O[45]=I,O[46]=L,O[47]=y,O[48]=j):j=O[48],j}function E(e){return e.stopPropagation()}function T(e){return e.stopPropagation()}e.s(["PollBlock",()=>U],549281);var I=e.i(366366),D=e.i(885718),N=e.i(110383),A=e.i(876082),_=e.i(95187);let P=(0,_.createServerReference)("60fed1cc7f19a6b30419828d57c32b4507eb06daa9",_.callServer,void 0,_.findSourceMapURL,"voteOnPoll");var M=e.i(553445),R=e.i(133564);e.i(314192);var L=e.i(615405),j=e.i(18262);let O=e=>{let r,i,a,l=(0,n.c)(8),{normalizedDocument:c}=(0,A.useLeafletPublicationData)(),u=(0,o.useIsBlockSelected)(e.entityID);e:{if(!c){r=!1;break e}let t=(0,L.getDocumentPages)(c);if(!t){r=!1;break e}for(let n of t)if("pub.leaflet.pages.linearDocument"===n.$type){for(let t of n.blocks||[])if(t.block?.$type===j.ids.PubLeafletBlocksPoll&&t.block.pollRef.uri.split("/").pop()===e.entityID){r=!0;break e}}r=!1}let d=r,h=!!u;return l[0]!==d||l[1]!==e.entityID?(i=(0,t.jsx)(B,{entityID:e.entityID,isPublished:d}),l[0]=d,l[1]=e.entityID,l[2]=i):i=l[2],l[3]!==e.areYouSure||l[4]!==e.setAreYouSure||l[5]!==h||l[6]!==i?(a=(0,t.jsx)(s.BlockLayout,{className:"poll flex flex-col gap-2",hasBackground:"accent",isSelected:h,areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,children:i}),l[3]=e.areYouSure,l[4]=e.setAreYouSure,l[5]=h,l[6]=i,l[7]=a):a=l[7],a},B=e=>{let i,o,s,l,c,u=(0,n.c)(22),d=(0,a.useEntity)(e.entityID,"poll/options"),{rep:h}=(0,a.useReplicache)(),p=(0,r.useEntitySetContext)();if(u[0]!==e.isPublished?(i=e.isPublished&&(0,t.jsx)("div",{className:"text-sm italic text-tertiary",children:"This poll has been published. You can't edit the options."}),u[0]=e.isPublished,u[1]=i):i=u[1],u[2]!==d.length||u[3]!==e.isPublished?(o=0===d.length&&!e.isPublished&&(0,t.jsx)("div",{className:"text-center italic text-tertiary text-sm",children:"no options yet..."}),u[2]=d.length,u[3]=e.isPublished,u[4]=o):o=u[4],u[5]!==d||u[6]!==e.entityID||u[7]!==e.isPublished){let n;u[9]!==e.entityID||u[10]!==e.isPublished?(n=n=>(0,t.jsx)(F,{entityID:n.data.value,pollEntity:e.entityID,disabled:e.isPublished,canDelete:!e.isPublished},n.id),u[9]=e.entityID,u[10]=e.isPublished,u[11]=n):n=u[11],s=d.map(n),u[5]=d,u[6]=e.entityID,u[7]=e.isPublished,u[8]=s}else s=u[8];return u[12]!==p||u[13]!==e.entityID||u[14]!==e.isPublished||u[15]!==h?.mutate?(l=!e.isPublished&&p.permissions.write&&(0,t.jsx)("button",{className:"pollAddOption w-fit flex gap-2 items-center justify-start text-sm text-accent-contrast",onClick:async()=>{let t=(0,N.v7)();await h?.mutate.addPollOption({pollEntity:e.entityID,pollOptionEntity:t,pollOptionName:"",permission_set:p.set,factID:(0,N.v7)()}),(0,I.focusElement)(document.getElementById(M.elementId.block(e.entityID).pollInput(t)))},children:"Add an Option"}),u[12]=p,u[13]=e.entityID,u[14]=e.isPublished,u[15]=h?.mutate,u[16]=l):l=u[16],u[17]!==i||u[18]!==o||u[19]!==s||u[20]!==l?(c=(0,t.jsxs)(t.Fragment,{children:[i,o,s,l]}),u[17]=i,u[18]=o,u[19]=s,u[20]=l,u[21]=c):c=u[21],c},F=e=>{let i,o,s,l,c,u,h=(0,n.c)(24),{rep:p}=(0,a.useReplicache)(),{permissions:m}=(0,r.useEntitySetContext)(),f=(0,a.useEntity)(e.entityID,"poll-option/name")?.data.value;h[0]!==e.entityID||h[1]!==e.pollEntity?(i=M.elementId.block(e.pollEntity).pollInput(e.entityID),h[0]=e.entityID,h[1]=e.pollEntity,h[2]=i):i=h[2];let g=e.disabled||!m.write,y=f||"";return h[3]!==e.entityID||h[4]!==p?.mutate?(o=async t=>{await p?.mutate.assertFact([{entity:e.entityID,attribute:"poll-option/name",data:{type:"string",value:t.currentTarget.value}}])},h[3]=e.entityID,h[4]=p?.mutate,h[5]=o):o=h[5],h[6]!==e.canDelete||h[7]!==e.entityID||h[8]!==p?.mutate?(s=t=>{e.canDelete&&"Backspace"===t.key&&!t.currentTarget.value&&(t.preventDefault(),p?.mutate.removePollOption({optionEntity:e.entityID}))},h[6]=e.canDelete,h[7]=e.entityID,h[8]=p?.mutate,h[9]=s):s=h[9],h[10]!==i||h[11]!==g||h[12]!==y||h[13]!==o||h[14]!==s?(l=(0,t.jsx)(d.AsyncValueInput,{id:i,type:"text",className:"pollOptionInput w-full input-with-border",placeholder:"Option hereâ¦",disabled:g,value:y,onChange:o,onKeyDown:s}),h[10]=i,h[11]=g,h[12]=y,h[13]=o,h[14]=s,h[15]=l):l=h[15],h[16]!==m.write||h[17]!==e.canDelete||h[18]!==e.entityID||h[19]!==p?.mutate?(c=m.write&&e.canDelete&&(0,t.jsx)("button",{tabIndex:-1,
68className:"text-accent-contrast",onMouseDown:async()=>{await p?.mutate.removePollOption({optionEntity:e.entityID})},children:(0,t.jsx)(R.CloseTiny,{})}),h[16]=m.write,h[17]=e.canDelete,h[18]=e.entityID,h[19]=p?.mutate,h[20]=c):c=h[20],h[21]!==l||h[22]!==c?(u=(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[l,c]}),h[21]=l,h[22]=c,h[23]=u):u=h[23],u};var H=e.i(193950);let U=e=>{let r,i=(0,n.c)(6),{data:a}=(0,A.useLeafletPublicationData)();if(e.preview){let n;return i[0]!==e.entityID?(n=(0,t.jsx)(z,{entityID:e.entityID}),i[0]=e.entityID,i[1]=n):n=i[1],n}if(!a){let n;return i[2]!==e?(n=(0,t.jsx)($,{...e}),i[2]=e,i[3]=n):n=i[3],n}return i[4]!==e?(r=(0,t.jsx)(O,{...e}),i[4]=e,i[5]=r):r=i[5],r},z=e=>{let r,i,o=(0,n.c)(4),l=(0,a.useEntity)(e.entityID,"poll/options");return o[0]!==l?(r=l.map(X),o[0]=l,o[1]=r):r=o[1],o[2]!==r?(i=(0,t.jsx)(s.BlockLayout,{isSelected:!1,hasBackground:"accent",className:"poll flex flex-col gap-2 w-full",children:r}),o[2]=r,o[3]=i):i=o[3],i},$=e=>{let n=(0,o.useIsBlockSelected)(e.entityID),{permissions:a}=(0,r.useEntitySetContext)(),{data:l}=(0,A.usePollData)(),c=l?.voter_token&&l.polls.find(t=>t.poll_votes_on_entity.voter_token===l.voter_token&&t.poll_votes_on_entity.poll_entity===e.entityID),u=(0,H.usePollBlockUIState)(t=>t[e.entityID]?.state);u||(u=c?"results":"voting");let d=(0,i.useCallback)(t=>{H.usePollBlockUIState.setState(n=>({[e.entityID]:{state:t}}))},[]),h=l?.polls.filter(t=>t.poll_votes_on_entity.poll_entity===e.entityID)||[],p=h.length;return(0,t.jsx)(s.BlockLayout,{isSelected:!!n,hasBackground:"accent",areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,className:"poll flex flex-col gap-2 w-full",children:"editing"===u?(0,t.jsx)(K,{totalVotes:p,votes:h.map(e=>e.poll_votes_on_entity),entityID:e.entityID,close:()=>{c?d("results"):d("voting")}}):"results"===u?(0,t.jsx)(G,{entityID:e.entityID,pollState:u,setPollState:d,hasVoted:!!c}):(0,t.jsx)(V,{entityID:e.entityID,onSubmit:()=>d("results"),pollState:u,setPollState:d,hasVoted:!!c})})},V=e=>{let o,s,l,c,d,h,p,f,g,y,b,v=(0,n.c)(37),{data:x,mutate:k}=(0,A.usePollData)(),{permissions:w}=(0,r.useEntitySetContext)(),C=(0,a.useEntity)(e.entityID,"poll/options");v[0]!==x||v[1]!==e.entityID?(o=x?.voter_token?x.polls.filter(t=>t.poll_votes_on_entity.poll_entity===e.entityID&&t.poll_votes_on_entity.voter_token===x.voter_token).map(Q):[],v[0]=x,v[1]=e.entityID,v[2]=o):o=v[2];let S=o,[E,T]=(0,i.useState)(S);if(v[3]!==C||v[4]!==E){let e;v[6]!==E?(e=(e,n)=>(0,t.jsx)(q,{selected:E.includes(e.data.value),toggleSelected:()=>T(t=>t.includes(e.data.value)?t.filter(t=>t!==e.data.value):[...t,e.data.value]),entityID:e.data.value},e.data.value),v[6]=E,v[7]=e):e=v[7],s=C.map(e),v[3]=C,v[4]=E,v[5]=s}else s=v[5];return v[8]!==w.write||v[9]!==e?(l=w.write&&(0,t.jsx)("button",{className:"pollEditOptions w-fit flex gap-2 items-center justify-start text-sm text-accent-contrast",onClick:()=>{e.setPollState("editing")},children:"Edit Options"}),v[8]=w.write,v[9]=e,v[10]=l):l=v[10],v[11]!==w.write?(c=w.write&&(0,t.jsx)(u.Separator,{classname:"h-6"}),v[11]=w.write,v[12]=c):c=v[12],v[13]!==e.hasVoted||v[14]!==e.pollState||v[15]!==e.setPollState?(d=(0,t.jsx)(Z,{setPollState:e.setPollState,pollState:e.pollState,hasVoted:e.hasVoted}),v[13]=e.hasVoted,v[14]=e.pollState,v[15]=e.setPollState,v[16]=d):d=v[16],v[17]!==l||v[18]!==c||v[19]!==d?(h=(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[l,c,d]}),v[17]=l,v[18]=c,v[19]=d,v[20]=h):h=v[20],v[21]!==k||v[22]!==e||v[23]!==E?(p=async()=>{await P(e.entityID,E),k(t=>{if(t&&t.voter_token)return{...t,polls:[...t.polls.filter(n=>n.poll_votes_on_entity.voter_token!==t.voter_token||n.poll_votes_on_entity.poll_entity!=e.entityID),...E.map(n=>({poll_votes_on_entity:{option_entity:n,entities:{set:""},poll_entity:e.entityID,voter_token:t.voter_token}}))]}}),e.onSubmit()},v[21]=k,v[22]=e,v[23]=E,v[24]=p):p=v[24],v[25]!==S||v[26]!==E?(f=0===E.length||E.length===S.length&&E.every(e=>S.includes(e)),v[25]=S,v[26]=E,v[27]=f):f=v[27],v[28]!==p||v[29]!==f?(g=(0,t.jsx)(m.ButtonPrimary,{className:"place-self-end",onClick:p,disabled:f,children:"Vote!"}),v[28]=p,v[29]=f,v[30]=g):g=v[30],v[31]!==h||v[32]!==g?(y=(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[h,g]}),v[31]=h,v[32]=g,v[33]=y):y=v[33],v[34]!==s||v[35]!==y?(b=(0,t.jsxs)(t.Fragment,{children:[s,y]}),v[34]=s,v[35]=y,v[36]=b):b=v[36],b},q=e=>{let r,i,o=(0,n.c)(10),s=(0,a.useEntity)(e.entityID,"poll-option/name")?.data.value;if(!s)return null;if(e.selected){let n,r;return o[0]!==e?(n=()=>{e.toggleSelected()},o[0]=e,o[1]=n):n=o[1],o[2]!==s||o[3]!==n?(r=(0,t.jsx)("div",{className:"flex gap-2 items-center",children:(0,t.jsx)(m.ButtonPrimary,{className:"pollOption grow max-w-full flex",onClick:n,children:s})}),o[2]=s,o[3]=n,o[4]=r):r=o[4],r}return o[5]!==e?(r=()=>{e.toggleSelected()},o[5]=e,o[6]=r):r=o[6],o[7]!==s||o[8]!==r?(i=(0,t.jsx)("div",{className:"flex gap-2 items-center",children:(0,t.jsx)(m.ButtonSecondary,{className:"pollOption grow max-w-full flex",onClick:r,children:s})}),o[7]=s,o[8]=r,o[9]=i):i=o[9],i},G=e=>{let i,o,s,l,c,d,h=(0,n.c)(22),{data:p}=(0,A.usePollData)(),{permissions:m}=(0,r.useEntitySetContext)(),f=(0,a.useEntity)(e.entityID,"poll/options");
68if(h[0]!==p?.pollVotes||h[1]!==f||h[2]!==e.entityID){let n,r=p?.pollVotes.find(t=>t.poll_entity===e.entityID),a=r?.votesByOption||{},o=Math.max(...Object.values(a));h[4]!==o?(n=(e,t)=>{let[n,r]=t;return r===o&&e.push(n),e},h[4]=o,h[5]=n):n=h[5];let s=Object.entries(a).reduce(n,[]);i=f.map(e=>(0,t.jsx)(W,{winner:s.includes(e.data.value),entityID:e.data.value,totalVotes:r?.unique_votes||0,votes:r?.votesByOption[e.data.value]||0},e.id)),h[0]=p?.pollVotes,h[1]=f,h[2]=e.entityID,h[3]=i}else i=h[3];return h[6]!==m.write||h[7]!==e?(o=m.write&&(0,t.jsx)("button",{className:"pollEditOptions w-fit flex gap-2 items-center justify-start text-sm text-accent-contrast",onClick:()=>{e.setPollState("editing")},children:"Edit Options"}),h[6]=m.write,h[7]=e,h[8]=o):o=h[8],h[9]!==m.write?(s=m.write&&(0,t.jsx)(u.Separator,{classname:"h-6"}),h[9]=m.write,h[10]=s):s=h[10],h[11]!==e.hasVoted||h[12]!==e.pollState||h[13]!==e.setPollState?(l=(0,t.jsx)(Z,{setPollState:e.setPollState,pollState:e.pollState,hasVoted:e.hasVoted}),h[11]=e.hasVoted,h[12]=e.pollState,h[13]=e.setPollState,h[14]=l):l=h[14],h[15]!==o||h[16]!==s||h[17]!==l?(c=(0,t.jsxs)("div",{className:"flex gap-2",children:[o,s,l]}),h[15]=o,h[16]=s,h[17]=l,h[18]=c):c=h[18],h[19]!==i||h[20]!==c?(d=(0,t.jsxs)(t.Fragment,{children:[i,c]}),h[19]=i,h[20]=c,h[21]=d):d=h[21],d},W=e=>{let r,i,o,s,l,c,u,d,h=(0,n.c)(20),p=(0,a.useEntity)(e.entityID,"poll-option/name")?.data.value,m=`pollResult relative grow py-0.5 px-2 border-accent-contrast rounded-md overflow-hidden ${e.winner?"font-bold border-2":"border"}`,f=`${(e.winner,"6px")} ${D.theme.colors["bg-page"]}`;return h[0]!==f?(r={WebkitTextStroke:f,paintOrder:"stroke fill"},h[0]=f,h[1]=r):r=h[1],h[2]!==p?(i=(0,t.jsx)("div",{className:"grow max-w-full truncate",children:p}),h[2]=p,h[3]=i):i=h[3],h[4]!==e.votes?(o=(0,t.jsx)("div",{children:e.votes}),h[4]=e.votes,h[5]=o):o=h[5],h[6]!==r||h[7]!==i||h[8]!==o?(s=(0,t.jsxs)("div",{style:r,className:"pollResultContent text-accent-contrast relative flex gap-2 justify-between z-10",children:[i,o]}),h[6]=r,h[7]=i,h[8]=o,h[9]=s):s=h[9],h[10]!==e.totalVotes||h[11]!==e.votes?(l=(0,t.jsx)("div",{className:"bg-accent-contrast rounded-[2px] m-0.5",style:{maskImage:"var(--hatchSVG)",maskRepeat:"repeat repeat",...0===e.votes?{width:"4px"}:{flexBasis:`${e.votes/e.totalVotes*100}%`}}}),h[10]=e.totalVotes,h[11]=e.votes,h[12]=l):l=h[12],h[13]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("div",{}),h[13]=c):c=h[13],h[14]!==l?(u=(0,t.jsxs)("div",{className:"pollResultBG absolute bg-bg-page w-full top-0 bottom-0 left-0 right-0 flex flex-row z-0",children:[l,c]}),h[14]=l,h[15]=u):u=h[15],h[16]!==m||h[17]!==s||h[18]!==u?(d=(0,t.jsxs)("div",{className:m,children:[s,u]}),h[16]=m,h[17]=s,h[18]=u,h[19]=d):d=h[19],d},K=e=>{let o,s,l,c,u,d,h,p,f,y,b=(0,n.c)(33),v=(0,a.useEntity)(e.entityID,"poll/options"),{rep:x,undoManager:k}=(0,a.useReplicache)(),w=(0,r.useEntitySetContext)();b[0]===Symbol.for("react.memo_cache_sentinel")?(o={},b[0]=o):o=b[0];let[C,S]=(0,i.useState)(o);if(b[1]!==e.totalVotes?(s=e.totalVotes>0&&(0,t.jsx)("div",{className:"text-sm italic text-tertiary",children:"You can't edit options people already voted for!"}),b[1]=e.totalVotes,b[2]=s):s=b[2],b[3]!==v.length?(l=0===v.length&&(0,t.jsx)("div",{className:"text-center italic text-tertiary text-sm",children:"no options yet..."}),b[3]=v.length,b[4]=l):l=b[4],b[5]!==C||b[6]!==v||b[7]!==e.entityID||b[8]!==e.votes){let n;b[10]!==C||b[11]!==e.entityID||b[12]!==e.votes?(n=n=>(0,t.jsx)(Y,{entityID:n.data.value,pollEntity:e.entityID,disabled:!!e.votes.find(e=>e.option_entity===n.data.value),localNameState:C[n.data.value],setLocalNameState:S},n.id),b[10]=C,b[11]=e.entityID,b[12]=e.votes,b[13]=n):n=b[13],c=v.map(n),b[5]=C,b[6]=v,b[7]=e.entityID,b[8]=e.votes,b[9]=c}else c=b[9];return b[14]!==w||b[15]!==e.entityID||b[16]!==x?.mutate?(u=(0,t.jsx)("button",{className:"pollAddOption w-fit flex gap-2 items-center justify-start text-sm text-accent-contrast",onClick:async()=>{let t=(0,N.v7)();await x?.mutate.addPollOption({pollEntity:e.entityID,pollOptionEntity:t,pollOptionName:"",permission_set:w.set,factID:(0,N.v7)()}),(0,I.focusElement)(document.getElementById(M.elementId.block(e.entityID).pollInput(t)))},children:"Add an Option"}),b[14]=w,b[15]=e.entityID,b[16]=x?.mutate,b[17]=u):u=b[17],b[18]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)("hr",{className:"border-border"}),b[18]=d):d=b[18],b[19]!==C||b[20]!==e||b[21]!==x?.mutate||b[22]!==k?(h=async()=>{await k.withUndoGroup(async()=>{let e=Object.entries(C).filter(J);await Promise.all(e.map(async e=>{let[t]=e;return await x?.mutate.removePollOption({optionEntity:t})})),await x?.mutate.assertFact(Object.entries(C).filter(ee).map(et))}),e.close()},b[19]=C,b[20]=e,b[21]=x?.mutate,b[22]=k,b[23]=h):h=b[23],b[24]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(g.CheckTiny,{}),b[24]=p):p=b[24],b[25]!==h?(f=(0,t.jsxs)(m.ButtonPrimary,{className:"place-self-end",onClick:h,children:["Save ",p]}),b[25]=h,b[26]=f):f=b[26],b[27]!==s||b[28]!==l||b[29]!==c||b[30]!==u||b[31]!==f?(y=(0,t.jsxs)(t.Fragment,{children:[s,l,c,u,d,f]}),b[27]=s,b[28]=l,b[29]=c,b[30]=u,b[31]=f,b[32]=y):y=b[32],y},Y=e=>{let r,o,s,l,c,u,h,p,m,f,g=(0,n.c)(31),{rep:y}=(0,a.useReplicache)(),b=(0,a.useEntity)(e.entityID,"poll-option/name")?.data.value;g[0]!==b||g[1]!==e?(r=()=>{e.setLocalNameState(t=>({...t,[e.entityID]:b||""}))},g[0]=b,g[1]=e,g[2]=r):r=g[2],g[3]!==b||g[4]!==e.entityID||g[5]!==e.setLocalNameState?(o=[b,e.setLocalNameState,e.entityID],g[3]=b,g[4]=e.entityID,g[5]=e.setLocalNameState,g[6]=o):o=g[6],(0,i.useEffect)(r,o),g[7]!==e.entityID||g[8]!==e.pollEntity?(s=M.elementId.block(e.pollEntity).pollInput(e.entityID),g[7]=e.entityID,g[8]=e.pollEntity,g[9]=s):s=g[9];let v=void 0===e.localNameState?b:e.localNameState;return g[10]!==e?(l=t=>{e.setLocalNameState(n=>({...n,[e.entityID]:t.target.value}))}
68,g[10]=e,g[11]=l):l=g[11],g[12]!==e.entityID||g[13]!==y?.mutate?(c=t=>{"Backspace"!==t.key||t.currentTarget.value||(t.preventDefault(),y?.mutate.removePollOption({optionEntity:e.entityID}))},g[12]=e.entityID,g[13]=y?.mutate,g[14]=c):c=g[14],g[15]!==e.disabled||g[16]!==s||g[17]!==v||g[18]!==l||g[19]!==c?(u=(0,t.jsx)(d.Input,{id:s,type:"text",className:"pollOptionInput w-full input-with-border",placeholder:"Option hereâ¦",disabled:e.disabled,value:v,onChange:l,onKeyDown:c}),g[15]=e.disabled,g[16]=s,g[17]=v,g[18]=l,g[19]=c,g[20]=u):u=g[20],g[21]!==e.entityID||g[22]!==y?.mutate?(h=async()=>{await y?.mutate.removePollOption({optionEntity:e.entityID})},g[21]=e.entityID,g[22]=y?.mutate,g[23]=h):h=g[23],g[24]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(R.CloseTiny,{}),g[24]=p):p=g[24],g[25]!==e.disabled||g[26]!==h?(m=(0,t.jsx)("button",{tabIndex:-1,disabled:e.disabled,className:"text-accent-contrast disabled:text-border",onMouseDown:h,children:p}),g[25]=e.disabled,g[26]=h,g[27]=m):m=g[27],g[28]!==u||g[29]!==m?(f=(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[u,m]}),g[28]=u,g[29]=m,g[30]=f):f=g[30],f},Z=e=>{let r,i,a=(0,n.c)(5);a[0]!==e?(r=()=>{e.setPollState("voting"===e.pollState?"results":"voting")},a[0]=e,a[1]=r):r=a[1];let o="voting"===e.pollState?"See Results":e.hasVoted?"Change Vote":"Back to Poll";return a[2]!==r||a[3]!==o?(i=(0,t.jsx)("button",{className:"text-sm text-accent-contrast ",onClick:r,children:o}),a[2]=r,a[3]=o,a[4]=i):i=a[4],i};function X(e){return(0,t.jsx)(m.ButtonSecondary,{className:"pollOption grow max-w-full",children:" "},e.id)}function Q(e){return e.poll_votes_on_entity.option_entity}function J(e){let[,t]=e;return""===t}function ee(e){let[,t]=e;return!!t}function et(e){let[t,n]=e;return{entity:t,attribute:"poll-option/name",data:{type:"string",value:n}}}},603136,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(22272);e.s(["CompactPageLink",0,function(e){let i,a,o,s,l,c=(0,n.c)(10);c[0]===Symbol.for("react.memo_cache_sentinel")?(i={"--list-marker-width":"20px"},c[0]=i):i=c[0];let u=`pageBlockOne grow min-w-0 ${e.isHeading?"font-bold":""}`;return c[1]!==e.title?(a=e.title??(0,t.jsx)("span",{className:"text-tertiary italic",children:"Untitled"}),c[1]=e.title,c[2]=a):a=c[2],c[3]!==u||c[4]!==a?(o=(0,t.jsx)("div",{className:u,children:a}),c[3]=u,c[4]=a,c[5]=o):o=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(r.ArrowRightTiny,{className:"shrink-0 text-tertiary"}),c[6]=s):s=c[6],c[7]!==e.trailing||c[8]!==o?(l=(0,t.jsxs)("div",{style:i,className:"pageLinkBlockCompact w-full flex items-center gap-2 pl-3 pr-2 py-2 text-sm",children:[o,e.trailing,s]}),c[7]=e.trailing,c[8]=o,c[9]=l):l=c[9],l}])},270069,150631,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(467592),a=e.i(864460),o=e.i(492122),s=e.i(864293),l=e.i(669590),c=e.i(760524),u=e.i(929495),d=e.i(607268),h=e.i(273318),p=e.i(12802),m=e.i(110383),f=e.i(64572),g=e.i(813029);async function y(e,t,n){return e.query(async e=>{let r=(0,f.scanIndex)(e),i=(await r.eav(t,"canvas/block")).find(e=>e.data.value===n),[a]=await r.eav(n,"drawing/view-box");if(!i||!a)return null;let[o]=await r.eav(n,"canvas/block/width"),[s]=await r.eav(n,"canvas/block/rotation"),l=await r.eav(n,"drawing/stroke");return{positionFactID:i.id,layout:{position:i.data.position,width:o?.data.value||360,rotation:Math.round(s?.data.value||0),viewBox:a.data.value},strokes:l.map(e=>({id:e.id,stroke:e.data.value}))}})}async function b(e,t){let n=p.useInkSession.getState().target,r=await e.query(async e=>{let n=(0,f.scanIndex)(e),r=[];for(let e of(await n.eav(t,"canvas/block"))){let[t]=await n.eav(e.data.value,"block/type");t?.data.value==="drawing"&&r.push(e.data.value)}return r});r.sort((e,t)=>Number(t===n)-Number(e===n));let i=[];for(let n of r){let r=await y(e,t,n);r&&i.push({...r,entity:n})}return i}async function v(e,t,n){for(let r of(await b(e,n.page))){let i=(0,d.loopAt)(r.strokes,(0,d.canvasToDrawing)(r.layout,n.point));if(!i)continue;let{id:a,stroke:o}=i.stroke;if(o.fill?.color===n.color)return;await t.withUndoGroup(()=>e.mutate.assertFact({id:a,entity:r.entity,attribute:"drawing/stroke",data:{type:"ink-stroke",value:{...o,points:[...o.points],fill:{points:i.loop,color:n.color}}}}));return}}let x={position:{x:-d.DRAWING_PADDING,y:-d.DRAWING_PADDING},width:2*d.DRAWING_PADDING+1,rotation:0,viewBox:{x:0,y:0,width:d.INK_UNITS_PER_PX,height:0}};async function k(e,t,n,r,i){let a=r.layout.viewBox;if(!i||["x","y","width","height"].every(e=>i[e]===a[e]))return;let o=(0,d.refitLayout)(r.layout,i);await e.mutate.assertFact([{entity:n,attribute:"drawing/view-box",data:{type:"view-box",value:o.viewB
68ox}},{entity:n,attribute:"canvas/block/width",data:{type:"number",value:o.width}},{id:r.positionFactID,entity:t,attribute:"canvas/block",data:{type:"spatial-reference",value:n,position:o.position}}])}async function w(e,t,n){let r=p.useInkSession.getState().target,i=r?await y(e,n.page,r):null,a=i??{layout:x,positionFactID:(0,m.v7)()},o=function(e,t,n){let r=(0,d.simplifySamples)((0,d.inkSamples)(e,n.size),.25,.03),i=[];for(let[e,n,a]of r){let r=(0,d.canvasToDrawing)(t,{x:e,y:n}),o=Math.round(r.x),s=Math.round(r.y),l=i.length;l>=3&&i[l-3]===o&&i[l-2]===s||i.push(o,s,Math.round(a*d.INK_PRESSURE_SCALE))}return{points:i,color:n.color,size:Math.max(1,Math.round(n.size/(0,d.drawingScale)(t))),...n.simulatePressure&&{simulatePressure:!0}}}(n.canvasPoints,a.layout,n),s=(0,d.strokeBounds)(o);s&&await t.withUndoGroup(async()=>{let t=i&&r||(0,m.v7)();i||(await e.mutate.addCanvasBlock({parent:n.page,permission_set:n.permission_set,factID:a.positionFactID,newEntityID:t,type:"drawing",position:a.layout.position}),p.useInkSession.setState({target:t})),await e.mutate.assertFact({id:(0,m.v7)(),entity:t,attribute:"drawing/stroke",data:{type:"ink-stroke",value:o}}),await k(e,n.page,t,a,(0,d.unionBounds)([i?.layout.viewBox??null,s]))})}async function C(e,t,n){let r=await y(e,n.page,n.target);if(!r)return;let i=r.strokes.filter(e=>!n.strokeIDs.includes(e.id));await t.withUndoGroup(async()=>{for(let t of n.strokeIDs)await e.mutate.retractFact({factID:t});await k(e,n.page,n.target,r,(0,d.unionBounds)(i.map(e=>(0,d.strokeBounds)(e.stroke))))})}async function S(e,t){let{page:n,target:r}=p.useInkSession.getState();if(p.useInkSession.setState({page:null,target:null,erasing:[]}),!e||!n||!r)return;let i=await y(e,n,r);if(!i)return;if(0===i.strokes.length)return void await t.withUndoGroup(()=>e.mutate.removeBlock({blockEntity:r,parent:n}));let a=g.useUIState.getState();a.setSelectedBlocks([{entityID:r,parent:n}]),a.setFocusedBlock({entityType:"block",entityID:r,parent:n})}let E=`url("data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="8" fill="white" fill-opacity="0.6" stroke="black" stroke-width="1.5"/></svg>')}") 10 10, crosshair`;function T(e){return(0,t.jsx)(h.InkPath,{stroke:e.stroke},e.key)}function I(){return p.useInkSession.setState({erasing:[]})}function D(e){for(let t of Array.from(e.changedTouches))if("stylus"===t.touchType)return e.preventDefault()}function N(e){let r,o,l,c,u,h,m=(0,n.c)(15),{rep:f,undoManager:g}=(0,i.useReplicache)(),{zoom:y}=(0,s.useCanvasZoom)(),b=(0,p.useInkSession)(_);m[0]!==b?(r=e=>e.data.value===b,m[0]=b,m[1]=r):r=m[1];let v=(0,i.useEntity)(e.pageID,"canvas/block").find(r),x=(0,i.useEntity)(b,"drawing/view-box")?.data.value,k=(0,i.useEntity)(b,"canvas/block/width")?.data.value||360,w=(0,i.useEntity)(b,"canvas/block/rotation")?.data.value||0;if(!v||!x)return null;let C=(0,d.frameTopRight)({position:v.data.position,width:k,rotation:Math.round(w),viewBox:x}),E=C.y-4/y,T=`translate(-100%, -100%) scale(${1/y})`;return m[2]!==C.x||m[3]!==E||m[4]!==T?(o={left:C.x,top:E,transform:T,transformOrigin:"bottom right"},m[2]=C.x,m[3]=E,m[4]=T,m[5]=o):o=m[5],m[6]!==f||m[7]!==g?(l=()=>S(f,g),m[6]=f,m[7]=g,m[8]=l):l=m[8],m[9]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(a.CheckTiny,{}),m[9]=c):c=m[9],m[10]!==l?(u=(0,t.jsx)("button",{"aria-label":"Done drawing",title:"Done",onClick:l,className:"block p-1 rounded-full bg-accent-1 border border-accent-1 text-accent-2 shadow-sm",children:c}),m[10]=l,m[11]=u):u=m[11],m[12]!==o||m[13]!==u?(h=(0,t.jsx)("div",{className:"inkSessionControls absolute cursor-default",style:o,onPointerDown:A,children:u}),m[12]=o,m[13]=u,m[14]=h):h=m[14],h}function A(e){return e.stopPropagation()}function _(e){return e.target}e.s(["CanvasInkLayer",0,function(e){let a,s,m,f,g,b,x,k,A,_,P,M,R,L,j,O,B,F,H,U,z=(0,n.c)(52),{rep:$,undoManager:V}=(0,i.useReplicache)(),q=(0,o.useEntitySetContext)(),{tool:G,color:W,size:K}=(0,p.useInkSession)(),Y=(0,r.useRef)(null),Z=(0,r.useRef)(null);z[0]===Symbol.for("react.memo_cache_sentinel")?(a=new Set,z[0]=a):a=z[0];let X=(0,r.useRef)(a),[Q,J]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(null);z[1]===Symbol.for("react.memo_cache_sentinel")?(s=[],z[1]=s):s=z[1];let[en,er]=(0,r.useState)(s),ei=(0,r.useRef)(0);if(z[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{let e=Y.current;return e.addEventListener("touchstart",D,{passive:!1}),e.addEventListener("touchmove",D,{passive:!1}),()=>{e.removeEventListener("touchstart",D),e.removeEventListener("touchmove",D)}},f=[],z[2]=m,z[3]=f):(m=z[2],f=z[3]),(0,r.useEffect)(m,f),z[4]!==$||z[5]!==V?(g=()=>{let e=e=>{"Escape"===e.key&&S($,V)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},b=[$,V],z[4]=$,z[5]=V,z[6]=g,z[7]=b):(g=z[6],b=z[7]),(0,r.useEffect)(g,b),z[8]!==W||z[9]!==e.pageID||z[10]!==K){let t=async(e,t)=>{let n=await e.drawing;if(!n||Z.current!==e)return;let r=(0,d.canvasToDrawing)(n.layout,t),i=8/(0,d.drawingScale)(n.layout),a=e.erased.size;
68for(let t of n.strokes)(0,d.strokeHit)(t.stroke,r,i)&&e.erased.add(t.id);e.erased.size>a&&p.useInkSession.setState({erasing:[...e.erased]})};x=(n,r)=>{let i=(0,c.isIOS)()?[]:r.nativeEvent.getCoalescedEvents?.()||[];for(let a of(0===i.length&&(i=[r.nativeEvent]),i)){let r=(0,l.clientToCanvas)(Y.current,e.pageID,a);if("fill"===n.tool&&n.points.length>0)break;if("eraser"===n.tool){t(n,r);continue}let i="pen"!==a.pointerType?.5:a.pressure>0?a.pressure:n.points[n.points.length-1]/d.INK_PRESSURE_SCALE||.5;n.points.push(r.x,r.y,i*d.INK_PRESSURE_SCALE)}"pen"===n.tool&&et(k(n))},k=e=>({points:e.points,color:W,size:K,simulatePressure:e.simulatePressure}),z[8]=W,z[9]=e.pageID,z[10]=K,z[11]=x,z[12]=k}else x=z[11],k=z[12];z[13]===Symbol.for("react.memo_cache_sentinel")?(A=()=>{Z.current=null,et(null),p.useInkSession.setState({erasing:[]})},z[13]=A):A=z[13];let ea=A;z[14]!==W||z[15]!==q||z[16]!==k||z[17]!==e.pageID||z[18]!==$||z[19]!==K||z[20]!==V?(_=t=>{let n=Z.current;if(!n||n.pointerId!==t.pointerId||!$)return;if(Z.current=null,"eraser"===n.tool){let t=p.useInkSession.getState().target;if(!t||0===n.erased.size)return;C($,V,{page:e.pageID,target:t,strokeIDs:[...n.erased]}).then(I);return}if("fill"===n.tool)return void v($,V,{page:e.pageID,point:{x:n.points[0],y:n.points[1]},color:W});ei.current=ei.current+1;let r=ei.current;et(null),er(e=>[...e,{key:r,stroke:k(n)}]),w($,V,{page:e.pageID,permission_set:q.set,canvasPoints:n.points,color:W,size:K,simulatePressure:n.simulatePressure}).finally(()=>requestAnimationFrame(()=>er(e=>e.filter(e=>e.key!==r))))},z[14]=W,z[15]=q,z[16]=k,z[17]=e.pageID,z[18]=$,z[19]=K,z[20]=V,z[21]=_):_=z[21];let eo=_,es=Q?"pan-x pan-y":"none",el="eraser"===G?E:"crosshair";return z[22]!==es||z[23]!==el?(P={zIndex:u.CANVAS_DRAG_STACK_ORDER+1,touchAction:es,cursor:el},z[22]=es,z[23]=el,z[24]=P):P=z[24],z[25]!==x||z[26]!==Q||z[27]!==e.pageID||z[28]!==$||z[29]!==G?(M=t=>{if("touch"===t.pointerType&&(X.current.add(t.pointerId),X.current.size>1))return ea();let n=p.useInkSession.getState();if(n.colorPickerOpen)return n.setColorPickerOpen(!1);if("touch"===t.pointerType&&Q||("pen"!==t.pointerType||Q||J(!0),"mouse"===t.pointerType&&0!==t.button||(0,l.isCanvasPinching)()))return;t.preventDefault(),Y.current?.setPointerCapture(t.pointerId);let r="eraser"===G||"pen"===t.pointerType&&!!(32&t.buttons);Z.current={pointerId:t.pointerId,tool:r?"eraser":G,points:[],simulatePressure:"pen"!==t.pointerType,drawing:r&&$&&n.target?y($,e.pageID,n.target):null,erased:new Set},x(Z.current,t)},z[25]=x,z[26]=Q,z[27]=e.pageID,z[28]=$,z[29]=G,z[30]=M):M=z[30],z[31]!==x?(R=e=>{let t=Z.current;t&&t.pointerId===e.pointerId&&x(t,e)},z[31]=x,z[32]=R):R=z[32],z[33]!==eo?(L=e=>{X.current.delete(e.pointerId),eo(e)},z[33]=eo,z[34]=L):L=z[34],z[35]===Symbol.for("react.memo_cache_sentinel")?(j=e=>{X.current.delete(e.pointerId),Z.current?.pointerId===e.pointerId&&ea()},z[35]=j):j=z[35],z[36]!==en?(O=en.map(T),z[36]=en,z[37]=O):O=z[37],z[38]!==ee?(B=ee&&(0,t.jsx)(h.InkPath,{stroke:ee,live:!0}),z[38]=ee,z[39]=B):B=z[39],z[40]!==O||z[41]!==B?(F=(0,t.jsxs)("svg",{className:"absolute inset-0 w-full h-full pointer-events-none overflow-visible",children:[O,B]}),z[40]=O,z[41]=B,z[42]=F):F=z[42],z[43]!==e.pageID?(H=(0,t.jsx)(N,{pageID:e.pageID}),z[43]=e.pageID,z[44]=H):H=z[44],z[45]!==P||z[46]!==M||z[47]!==R||z[48]!==L||z[49]!==F||z[50]!==H?(U=(0,t.jsxs)("div",{ref:Y,className:"canvasInkLayer absolute inset-0",style:P,onPointerDown:M,onPointerMove:R,onPointerUp:L,onPointerCancel:j,children:[F,H]}),z[45]=P,z[46]=M,z[47]=R,z[48]=L,z[49]=F,z[50]=H,z[51]=U):U=z[51],U}],270069);var P=e.i(492185),M=e.i(715295),R=e.i(80762),L=e.i(597849),j=e.i(552933),O=e.i(615079),B=e.i(618431),F=e.i(768928),H=e.i(537712),U=e.i(814649),z=e.i(859015);let $=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M7 21l-4.3-4.3a2.4 2.4 0 0 1 0-3.4l9.6-9.6a2.4 2.4 0 0 1 3.4 0l5.6 5.6a2.4 2.4 0 0 1 0 3.4L13 21zM21 21H7M5 11l9 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},V=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M19 11l-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11zM5 2l5 5M2 13h15M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};var q=e.i(461875),G=e.i(133564);function W(e){"Enter"===e.key&&e.currentTarget.blur()}e.s(["InkToolbar",0,function(e){let a,o,s,l,c,u,h,m,f,g,y,b,v,x,k,w,C,E,T,I,D,N,A=(0,n.c)(51),{rep:_,undoManager:K}=(0,i.useReplicache)(),Y=(0,p.useInkSession)();if(Y.page!==e.pageID)return null;let Z=Y.colorPickerOpen,X=Y.setColorPickerOpen;A[0]!==Y.color?(a=(0,d.inkColor)(Y.color),A[0]=Y.color,A[1]=a):a=A[1],A[2]!==a?(o={color:a},A[2]=a,A[3]=o):o=A[3],A[4]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(q.PaintSmall,{}),A[4]=s):s=A[4],A[5]!==o?(l=(0,t.jsx)("button",{"aria-label":"Ink color",title:"Ink color",className:"shrink-0 w-7 h-7 flex items-center justify-center rounded-full hover:bg-border-light",style:o,children:s}),A[5]=o,A[6]=l):l=A[6],A[7]!==Y?(c=(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:[...d.INK_COLORS,{value:Y.customColor,label:"Custom color"}].map((e,n)=>(0,t.jsxs)(r.Fragment,{children:[n===d.INK_COLORS.length&&(0,t.jsx)(z.Separator,{classname:"h-5! mx-0.5"}),(0,t.jsx)("button",{"aria-label":e.label,title:e.label,onClick:()=>Y.setColor(e.value),className:`w-6 h-6 shrink-0 rounded-full border border-border outline-2 outline-offset-1 ${Y.color===e.value?"outline-accent-contrast":"outline-transparent hover:outline-border"}`,style:{backgroundColor:(0,d.inkColor)(e.value)}})]},e.label))}),A[7]=Y,A[8]=c):c=A[8],A[9]!==Y.customColor?(u=(0,F.parseColor)(Y.customColor),A[9]=Y.customColor,A[10]=u):u=A[10],A[11]!==Y?(h=e=>Y.setCustomColor(e.toString("hex")),A[11]=Y,A[12]=h):h=A[12],A[13]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(P.ColorArea,{className:"w-full h-[128px] rounded-md",colorSpace:"hsb",xChannel:"saturation",yChannel:"brightness",children:(0,t.jsx)(j.ColorThumb,{className:H.thumbStyle})}),A[13]=m):m=A[13],A[14]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(L.ColorSlider,{colorSpace:"hsb",className:"w-full",channel:"hue",children:(0,t.jsx)(B.SliderTrack,{className:"h-2 w-full rounded-md",children:(0,t.jsx)(j.ColorThumb,{className:`${H.thumbStyle} mt-[4px]`})})}),A[14]=f):f=A[14],A[15]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(M.ColorField,{"aria-label":"Hex color",className:"w-full",children:(0,t.jsx)(O.Input,{onKeyDown:W,className:"input-with-border w-full py-0.5! text-sm"})}),A[15]=g):g=A[15],A[16]!==u||A[17]!==h?(y=(0,t.jsxs)(R.ColorPicker,{value:u,onChange:h,children:[m,f,g]}),A[16]=u,A[17]=h,A[18]=y):y=A[18],A[19]!==y||A[20]!==c?(b=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[c,y]}),A[19]=y,A[20]=c,A[21]=b):b=A[21],A[22]!==Y.colorPickerOpen||A[23]!==Y.setColorPickerOpen||A[24]!==b||A[25]!==l?(v=(0,t.jsx)(U.Popover,{asChild:!0,open:Z,onOpenChange:X,side:"bottom",className:"w-[172px]",trigger:l,children:b}),A[22]=Y.colorPickerOpen,A[23]=Y.setColorPickerOpen,A[24]=b,A[25]=l,A[26]=v):v=A[26],A[27]!==Y?(x=d.INK_SIZES.map(e=>(0,t.jsx)("button",{"aria-label":`Pen size ${e}`,title:"Pen size",onClick:()=>Y.setSize(e),className:`w-7 h-7 flex items-center justify-center rounded-full ${"pen"===Y.tool&&Y.size===e?"bg-border-light":"hover:bg-border-light"}`,children:(0,t.jsx)("span",{className:"rounded-full",style:{width:e+2,height:e+2,backgroundColor:(0,d.inkColor)(Y.color)}})},e)),A[27]=Y,A[28]=x):x=A[28],A[29]!==Y?(k=()=>Y.setTool("fill"===Y.tool?"pen":"fill"),A[29]=Y,A[30]=k):k=A[30];let Q=`w-7 h-7 flex items-center justify-center rounded-full ${"fill"===Y.tool?"bg-border-light text-primary":"text-tertiary hover:bg-border-light"}`;A[31]===Symbol.for("react.memo_cache_sentinel")?(w=(0,t.jsx)(V,{width:18,height:18}
68),A[31]=w):w=A[31],A[32]!==k||A[33]!==Q?(C=(0,t.jsx)("button",{"aria-label":"Fill",title:"Fill a closed shape",onClick:k,className:Q,children:w}),A[32]=k,A[33]=Q,A[34]=C):C=A[34],A[35]!==Y?(E=()=>Y.setTool("eraser"===Y.tool?"pen":"eraser"),A[35]=Y,A[36]=E):E=A[36];let J=`w-7 h-7 flex items-center justify-center rounded-full ${"eraser"===Y.tool?"bg-border-light text-primary":"text-tertiary hover:bg-border-light"}`;return A[37]===Symbol.for("react.memo_cache_sentinel")?(T=(0,t.jsx)($,{width:18,height:18}),A[37]=T):T=A[37],A[38]!==E||A[39]!==J?(I=(0,t.jsx)("button",{"aria-label":"Eraser",title:"Eraser",onClick:E,className:J,children:T}),A[38]=E,A[39]=J,A[40]=I):I=A[40],A[41]!==Y.target||A[42]!==_||A[43]!==K?(D=!Y.target&&(0,t.jsx)("button",{"aria-label":"Stop drawing",title:"Stop drawing",onClick:()=>S(_,K),className:"w-7 h-7 flex items-center justify-center rounded-full text-tertiary hover:bg-border-light",children:(0,t.jsx)(G.CloseTiny,{})}),A[41]=Y.target,A[42]=_,A[43]=K,A[44]=D):D=A[44],A[45]!==v||A[46]!==x||A[47]!==C||A[48]!==I||A[49]!==D?(N=(0,t.jsxs)("div",{className:"inkToolbar absolute top-3 left-1/2 -translate-x-1/2 z-30 flex items-center gap-1 bg-bg-page border border-border rounded-full shadow-sm px-1 py-1",children:[v,x,C,I,D]}),A[45]=v,A[46]=x,A[47]=C,A[48]=I,A[49]=D,A[50]=N):N=A[50],N}],150631)},930590,861643,793064,681175,509973,e=>{"use strict";e.s(["DrawingBlock",()=>d],930590);var t=e.i(843476),n=e.i(271645),r=e.i(467592),i=e.i(813029),a=e.i(492122),o=e.i(853915),s=e.i(173275),l=e.i(273318),c=e.i(607268),u=e.i(12802);function d(e){let d=(0,r.useEntity)(e.entityID,"drawing/stroke"),h=(0,r.useEntity)(e.entityID,"drawing/view-box")?.data.value,p=(0,u.useInkSession)(t=>t.target===e.entityID?t.erasing:null),m=(0,u.useInkSession)(t=>t.target===e.entityID),f=(0,i.useIsBlockSelected)(e.entityID),{permissions:g}=(0,a.useEntitySetContext)(),y=g.write&&!e.preview&&"canvas"===e.pageType,b=(0,n.useMemo)(()=>d.filter(e=>!p?.includes(e.id)).sort((e,t)=>e.id<t.id?-1:1).map(e=>({id:e.id,stroke:e.data.value})),[d,p]),v=(0,n.useMemo)(()=>(0,c.drawingFills)(b),[b]);if(!h)return null;let x=()=>u.useInkSession.getState().start(e.parent,e.entityID);return(0,t.jsx)(s.BlockLayout,{isSelected:!!f&&!m&&!e.preview,className:"p-0! border-0! overflow-visible!",extraOptions:y&&(0,t.jsx)("button",{"aria-label":"Edit drawing",title:"Edit drawing",onMouseDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation(),x()},children:(0,t.jsx)(o.EditTiny,{})}),children:(0,t.jsx)("div",{className:`w-full rounded-md outline-2 outline-offset-4 ${m?"outline-dashed outline-border":"outline-transparent"}`,onDoubleClick:y?x:void 0,children:(0,t.jsx)(l.InkSvg,{viewBox:h,strokes:b,fills:v})})})}var h=e.i(500932),p=e.i(74863),m=e.i(142524),f=e.i(876082),g=e.i(416504),y=e.i(532089),b=e.i(110383);function v(e,t){if("subscribers"===e.audience)return"Subscribers";if("paid"===e.audience)return"Paid Members";let n=t.filter(t=>e.tierIds.includes(t.id)).map(e=>e.name);return n.length>0?n.join(", "):"Selected Tiers"}function x(e){let n,i,a,o,s,l,c,u,d,p,f,x,E,T,I,D,N=(0,h.c)(51),{rep:A,undoManager:_}=(0,r.useReplicache)();N[0]!==e.policy.audience||N[1]!==e.policy.tierIds?(n="tiers"===e.policy.audience?e.policy.tierIds:[],N[0]=e.policy.audience,N[1]=e.policy.tierIds,N[2]=n):n=N[2];let P=n;N[3]!==e.audienceFact?.id||N[4]!==e.entityID||N[5]!==e.tierFacts||N[6]!==e.tiers||N[7]!==A||N[8]!==_?(i=t=>{A&&("subscribers"===t||"paid"===t||"tiers"===t)&&("tiers"!==t||0!==e.tiers.length)&&_.withUndoGroup(async()=>{if(await A.mutate.assertFact({id:e.audienceFact?.id??(0,b.v7)(),entity:e.entityID,attribute:"block/members-only-audience",data:{type:"string",value:t}}),"tiers"===t){let t=new Set(e.tiers.map(S)),n=new Set(e.tierFacts.map(C).filter(e=>t.has(e))),r=e.tierFacts.filter(e=>!t.has(e.data.value)).map(e=>A.mutate.retractFact({factID:e.id}));0===n.size&&r.push(...e.tiers.map(t=>A.mutate.assertFact({id:(0,b.v7)(),entity:e.entityID,attribute:"block/members-only-tier",data:{type:"string",value:t.id}}))),await Promise.all(r)}})},N[3]=e.audienceFact?.id,N[4]=e.entityID,N[5]=e.tierFacts,N[6]=e.tiers,N[7]=A,N[8]=_,N[9]=i):i=N[9];let M=i;N[10]!==P||N[11]!==e.entityID||N[12]!==e.tierFacts||N[13]!==A||N[14]!==_?(a=t=>{if(!A)return;let n=P.includes(t.id);if(n&&1===P.length)return;
68let r=n?P.filter(e=>e!==t.id):[...P,t.id];_.withUndoGroup(async()=>{if(A){for(let t of e.tierFacts)r.includes(t.data.value)||await A.mutate.retractFact({factID:t.id});for(let t of r)e.tierFacts.some(e=>e.data.value===t)||await A.mutate.assertFact({id:(0,b.v7)(),entity:e.entityID,attribute:"block/members-only-tier",data:{type:"string",value:t}})}})},N[10]=P,N[11]=e.entityID,N[12]=e.tierFacts,N[13]=A,N[14]=_,N[15]=a):a=N[15];let R=a;return N[16]!==e.policy||N[17]!==e.tiers?(o=v(e.policy,e.tiers),N[16]=e.policy,N[17]=e.tiers,N[18]=o):o=N[18],N[19]!==o?(s=(0,t.jsxs)("div",{className:"truncate",children:[" ",o]}),N[19]=o,N[20]=s):s=N[20],N[21]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(m.ArrowDownTiny,{className:"shrink-0 scale-90"}),N[21]=l):l=N[21],N[22]!==s?(c=(0,t.jsxs)("button",{type:"button","aria-label":"Choose which members can read past this point",onMouseDown:w,className:"flex items-center gap-0.5 underline decoration-dotted hover:text-accent-contrast min-w-0 grow",children:[s,l]}),N[22]=s,N[23]=c):c=N[23],N[24]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsxs)("div",{className:"text-tertiary text-sm font-bold px-2 pt-1",children:["Unlocked forâ¦"," "]}),N[24]=u):u=N[24],N[25]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(g.RadioMenuItem,{value:"subscribers",children:"Subscribers"}),N[25]=d):d=N[25],N[26]!==e.policy.audience||N[27]!==e.tiers.length?(p=(e.tiers.length>0||"paid"===e.policy.audience)&&(0,t.jsx)(g.RadioMenuItem,{value:"paid",children:"Paid Members"}),N[26]=e.policy.audience,N[27]=e.tiers.length,N[28]=p):p=N[28],N[29]!==e.tiers.length?(f=e.tiers.length>0&&(0,t.jsx)(g.RadioMenuItem,{value:"tiers",onSelect:k,children:"Selected Paid Tiers"}),N[29]=e.tiers.length,N[30]=f):f=N[30],N[31]!==e.policy.audience||N[32]!==M||N[33]!==f||N[34]!==p?(x=(0,t.jsxs)(g.RadioMenuGroup,{value:e.policy.audience,onValueChange:M,children:[d,p,f]}),N[31]=e.policy.audience,N[32]=M,N[33]=f,N[34]=p,N[35]=x):x=N[35],N[36]!==e.policy.audience||N[37]!==e.tiers.length?(E="tiers"===e.policy.audience&&e.tiers.length>0&&(0,t.jsx)(g.MenuSeparator,{}),N[36]=e.policy.audience,N[37]=e.tiers.length,N[38]=E):E=N[38],N[39]!==P||N[40]!==e.policy.audience||N[41]!==e.tiers||N[42]!==R?(T="tiers"===e.policy.audience&&e.tiers.map(e=>(0,t.jsx)(g.CheckboxMenuItem,{onSelect:t=>{t.preventDefault(),R(e)},checked:P.includes(e.id),children:(0,t.jsxs)("div",{className:"flex flex-col min-w-0 leading-tight",children:[(0,t.jsx)("span",{className:"truncate",children:e.name}),(0,t.jsxs)("span",{className:"text-tertiary text-xs font-normal",children:[(0,y.formatPrice)(e.monthly_price_cents),"/month"]})]})},e.id)),N[39]=P,N[40]=e.policy.audience,N[41]=e.tiers,N[42]=R,N[43]=T):T=N[43],N[44]!==T?(I=(0,t.jsx)("div",{className:"flex flex-col gap-0.5",children:T}),N[44]=T,N[45]=I):I=N[45],N[46]!==x||N[47]!==E||N[48]!==I||N[49]!==c?(D=(0,t.jsxs)(g.Menu,{asChild:!0,side:"top",align:"center",className:"p-1! max-w-full w-xs min-w-0",trigger:c,children:[u,x,E,I]}),N[46]=x,N[47]=E,N[48]=I,N[49]=c,N[50]=D):D=N[50],D}function k(e){return e.preventDefault()}function w(e){return e.preventDefault()}function C(e){return e.data.value}function S(e){return e.id}function E(e){return e.active}function T(e,t){return e.monthly_price_cents-t.monthly_price_cents}function I(e){return e.data.value}e.s(["MembersOnlyDelimiterBlock",0,e=>{let n,o,s,l,c,u,d,m,g,y,b=(0,h.c)(27),k=(0,i.useIsBlockSelected)(e.entityID),{permissions:w}=(0,a.useEntitySetContext)(),{data:C}=(0,f.useLeafletPublicationData)(),S=(0,r.useEntity)(e.entityID,"block/members-only-audience"),D=(0,r.useEntity)(e.entityID,"block/members-only-tier");if(b[0]!==C?.publications?.publication_membership_tiers?(n=C?.publications?.publication_membership_tiers??[],b[0]=C?.publications?.publication_membership_tiers,b[1]=n):n=b[1],b[2]!==S||b[3]!==k||b[4]!==w.write||b[5]!==e.entityID||b[6]!==n||b[7]!==D){let r=n.filter(E).sort(T),i=[...new Set(D.map(I).filter(e=>r.some(t=>t.id===e)))],a=S?.data.value,h="subscribers"===a||"paid"===a?{audience:a}:"tiers"===a?{audience:a,tierIds:i}:{audience:"tiers",tierIds:[]};u=`my-2 w-full flex items-center gap-2 text-tertiary text-sm 69 ${k?"block-border-selected border-none!":""} 70 `,b[14]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)("hr",{className:"grow border-border-light"}),b[14]=d):d=b[14],o="flex items-center gap-2 min-w-0 font-bold",b[15]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(p.LockTiny,{className:"shrink-0"}),l=(0,t.jsx)("span",{className:"w-max shrink-0",children:"Only for"}),b[15]=s,b[16]=l):(s=b[15],l=b[16]),c=w.write?(0,t.jsx)(x,{entity
70ID:e.entityID,tiers:r,audienceFact:S,tierFacts:D,policy:h}):v(h,r),b[2]=S,b[3]=k,b[4]=w.write,b[5]=e.entityID,b[6]=n,b[7]=D,b[8]=o,b[9]=s,b[10]=l,b[11]=c,b[12]=u,b[13]=d}else o=b[8],s=b[9],l=b[10],c=b[11],u=b[12],d=b[13];return b[17]!==o||b[18]!==s||b[19]!==l||b[20]!==c?(m=(0,t.jsxs)("div",{className:o,children:[s,l,c]}),b[17]=o,b[18]=s,b[19]=l,b[20]=c,b[21]=m):m=b[21],b[22]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)("hr",{className:"grow border-border-light"}),b[22]=g):g=b[22],b[23]!==u||b[24]!==d||b[25]!==m?(y=(0,t.jsxs)("div",{className:u,children:[d,m,g]}),b[23]=u,b[24]=d,b[25]=m,b[26]=y):y=b[26],y}],861643),e.s(["PostsListBlock",()=>W],793064);var D=e.i(398920),N=e.i(906065),A=e.i(152318),_=e.i(593302),P=e.i(250209),M=e.i(124670);let R=/[:,\-ââ/|]/;function L(e,t){return null!==e&&null!==t&&e.toLowerCase()===t.toLowerCase()}var j=e.i(209195),O=e.i(927895),B=e.i(103136),F=e.i(206057),H=e.i(668767),U=e.i(477180),z=e.i(133564),$=e.i(124851),V=e.i(859015),q=e.i(496523),G=e.i(619469);let W=e=>{let n,r,a,o,l,c=(0,h.c)(16),u=(0,i.useIsBlockSelected)(e.entityID);c[0]!==e.entityID?(n=t=>t.focusedEntity?.entityID===e.entityID,c[0]=e.entityID,c[1]=n):n=c[1];let d=(0,i.useUIState)(n);if(e.preview){let e,n;return c[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(Z,{}),c[2]=e):e=c[2],c[3]!==u?(n=(0,t.jsx)(s.BlockLayout,{isSelected:u,className:"border-none! rounded-none!",children:e}),c[3]=u,c[4]=n):n=c[4],n}return c[5]!==e.entityID?(r=(0,t.jsx)(es,{entityID:e.entityID}),c[5]=e.entityID,c[6]=r):r=c[6],c[7]!==d||c[8]!==r?(a=(0,t.jsx)(G.CustomizeTutorialTooltip,{target:"posts-list",className:"flex",blockFocused:d,children:r}),c[7]=d,c[8]=r,c[9]=a):a=c[9],c[10]!==e.entityID?(o=(0,t.jsx)(Y,{entityID:e.entityID}),c[10]=e.entityID,c[11]=o):o=c[11],c[12]!==u||c[13]!==a||c[14]!==o?(l=(0,t.jsx)(s.BlockLayout,{isSelected:u,className:"border-none! p-0! rounded-none! overflow-visible!",extraOptions:a,children:o}),c[12]=u,c[13]=a,c[14]=o,c[15]=l):l=c[15],l};function K(e){let t,n=(0,h.c)(5),i=(0,r.useEntity)(e,"posts-list/reader-controls"),a=(0,r.useEntity)(e,"posts-list/reader-search"),o=(0,r.useEntity)(e,"posts-list/reader-tag-filter"),s=(0,r.useEntity)(e,"posts-list/reader-sort"),l=i?.data.value,c=a?.data.value,u=o?.data.value,d=s?.data.value;return n[0]!==l||n[1]!==c||n[2]!==u||n[3]!==d?(t={readerControls:l,readerSearch:c,readerTagFilter:u,readerSort:d},n[0]=l,n[1]=c,n[2]=u,n[3]=d,n[4]=t):t=n[4],t}function Y({entityID:e}){let{data:i}=(0,D.usePublicationData)(),a=(0,D.useNormalizedPublicationRecord)(),{rootEntity:o}=(0,r.useReplicache)(),s=(0,r.useEntity)(o,"theme/page-width")?.data.value,l=(0,r.useEntity)(e,"posts-list/view"),c=l?.data.value??"medium",u=K(e),d=(0,n.useMemo)(()=>
70"chapter"===c?void 0:(0,j.resolveReaderControls)(u),[c,u.readerControls,u.readerSearch,u.readerTagFilter,u.readerSort]),h=(0,r.useEntity)(e,"posts-list/highlight-first-post"),p=h?.data.value??!1,m=(0,r.useEntity)(e,"posts-list/show-page-count")?.data.value??!0,f=(0,r.useEntity)(e,"posts-list/filter-tag"),g=(0,n.useMemo)(()=>f.map(e=>e.data.value),[f]),y=(0,r.useEntity)(e,"posts-list/limit"),b=y?.data.value,v=(0,n.useMemo)(()=>{var e;if(!i?.documents)return null;let t=(0,j.sortPostsForList)((0,j.filterPostsByTags)(i.documents,g).map(e=>({uri:e.uri,record:e.record,commentsCount:e.commentsCount,mentionsCount:e.mentionsCount,recommendsCount:e.recommendsCount,membersOnly:e.membersOnly})));return{posts:t,latestPost:t[0],chapterCards:"chapter"===c&&i.publication?(e=i.publication,(function(e){let t=[...e].sort((e,t)=>{let n=e.record.publishedAt?new Date(e.record.publishedAt).getTime():0,r=t.record.publishedAt?new Date(t.record.publishedAt).getTime():0;return n!==r?n-r:e.uri<t.uri?-1:1}),n=e=>(e.record.title||"").trim(),r=t.map(e=>{var t;let r;return(r=(t=n(e)).match(R))&&void 0!==r.index&&t.slice(0,r.index).trim()||null}),i=[],a=0;for(;a<t.length;){if(!L(r[a],r[a+1]??null)){i.push({key:t[a].uri,label:n(t[a]),posts:[t[a]]}),a++;continue}let e=a+1;for(;e+1<t.length&&L(r[a],r[e+1]);)e++;let o=r[a];i.push({key:`${o.toLowerCase()}|${t[a].uri}`,label:o,posts:t.slice(a,e+1)}),a=e+1}return i})(t).map(t=>{let n=t.posts[0],r=n.record.coverImage;return{key:t.key,label:t.label,href:(0,P.getDocumentURL)(n.record,n.uri,e),pageCount:t.posts.length,coverImageSrc:r?(0,M.blobRefToSrc)(r.ref,new _.AtUri(n.uri).host,void 0,{width:M.COVER_THUMBNAIL_WIDTH.large,height:M.COVER_THUMBNAIL_WIDTH.large}):void 0,membersOnly:t.posts.some(e=>!!e.membersOnly)}})):void 0,readerIndex:d?(0,j.buildPostsListIndex)(t,e=>(0,O.getFirstParagraph)(e.record)):void 0}},[i?.documents,i?.publication,g,c,d]);return void 0!==i&&i?.publication?v&&0!==v.posts.length?"chapter"===c?(0,t.jsx)(A.ChapterShelf,{publication:i.publication,publicationRecord:a,cards:v.chapterCards??[],latestPost:v.latestPost,highlightLatest:p,showPageCount:m,disableLinks:!0}):(0,t.jsx)(N.PaginatedPublicationPostsList,{publication:i.publication,publicationRecord:a,uris:v.readerIndex?void 0:v.posts.map(e=>e.uri),index:v.readerIndex,knownPosts:v.posts,view:c,highlightFirstPost:p,limit:b,readerControls:d,disableLinks:!0,pageWidth:s}):(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)($.EmptyState,{container:"light",className:"px-2 py-1! mb-1",children:"You haven't published any posts yet! When you do, they'll show here."}),(0,t.jsx)(et,{view:c,highlightFirst:p,count:Math.min(3,b&&b>0?b:3),pageWidth:s??a?.theme?.pageWidth})]}):(0,t.jsx)(Z,{})}function Z(){let e,n=(0,h.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"publicationPostList w-full flex flex-col gap-4",children:[0,1,2].map(X)}),n[0]=e):e=n[0],e}function X(e){return(0,t.jsxs)("div",{className:"flex w-full grow flex-col",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"h-5 w-2/3 bg-border-light rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-full bg-border-light rounded animate-pulse"})]}),(0,t.jsx)("div",{className:"pt-2",children:(0,t.jsx)("div",{className:"h-3 w-24 bg-border-light rounded animate-pulse"})}),(0,t.jsx)("hr",{className:"last:hidden border-border-light mt-4"})]},e)}let Q="bg-border-light rounded-[2px]",J="bg-border bg-cover bg-center rounded-md",ee={backgroundImage:"url(/imagePlaceholder.png)",backgroundBlendMode:"hard-light"};function et(e){let r,i=(0,h.c)(18);if("chapter"===e.view){let n,r,a,o;i[0]!==e.highlightFirst?(n=e.highlightFirst&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-sm uppercase font-bold text-tertiary pb-1",children:"Latest"}),(0,t.jsx)("div",{className:"block-border px-3",children:(0,t.jsx)(eo,{})}),(0,t.jsx)("hr",{className:"border-border-light my-4"})]}),i[0]=e.highlightFirst,i[1]=n):n=i[1];let s=e.pageWidth;return i[2]===Symbol.for("react.memo_cache_sentinel")?(r=Array.from({length:3},en),i[2]=r):r=i[2],i[3]!==e.pageWidth||i[4]!==r?(a=(0,t.jsx)(A.ChapterGrid,{pageWidth:s,children:r}),i[3]=e.pageWidth,i[4]=r,i[5]=a):a=i[5],i[6]!==n||i[7]!==a?(o=(0,t.jsxs)("div",{className:"w-full","aria-hidden":!0,
70children:[n,a]}),i[6]=n,i[7]=a,i[8]=o):o=i[8],o}let a=(e.pageWidth??0)>=768;if(i[9]!==e.count||i[10]!==e.highlightFirst||i[11]!==e.view||i[12]!==a){let o;i[14]!==e.highlightFirst||i[15]!==e.view||i[16]!==a?(o=(r,i)=>(0,t.jsxs)(n.Fragment,{children:[e.highlightFirst&&0===i?(0,t.jsx)(ei,{widePage:a}):"small"===e.view?(0,t.jsx)(er,{}):(0,t.jsx)(eo,{}),(0,t.jsx)("hr",{className:"last:hidden border-border-light"})]},i),i[14]=e.highlightFirst,i[15]=e.view,i[16]=a,i[17]=o):o=i[17],r=(0,t.jsx)("div",{className:"w-full flex flex-col gap-2 py-2","aria-hidden":!0,children:Array.from({length:e.count},o)}),i[9]=e.count,i[10]=e.highlightFirst,i[11]=e.view,i[12]=a,i[13]=r}else r=i[13];return r}function en(e,n){return(0,t.jsx)(ea,{},n)}function er(){let e,n=(0,h.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex flex-col gap-2 py-2",children:[(0,t.jsx)("div",{className:`h-5 w-2/3 ${Q}`}),(0,t.jsx)("div",{className:`h-3 w-24 ${Q}`})]}),n[0]=e):e=n[0],e}function ei(e){let n,r,i,a=(0,h.c)(6),o=`flex flex-col w-full ${e.widePage?"sm:flex-row sm:gap-4":""}`,s=`shrink-0 ${J} ${e.widePage?"sm:h-[254px] aspect-[3/2]":"w-full aspect-[1.91/1]"}`;return a[0]!==s?(n=(0,t.jsx)("div",{style:ee,className:s}),a[0]=s,a[1]=n):n=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsxs)("div",{className:"flex flex-col gap-2 grow py-2",children:[(0,t.jsx)("div",{className:`h-6 w-3/4 ${Q}`}),(0,t.jsx)("div",{className:`h-4 w-full ${Q}`}),(0,t.jsx)("div",{className:`h-4 w-5/6 ${Q}`}),(0,t.jsx)("div",{className:`h-3 w-24 mt-2 ${Q}`})]}),a[2]=r):r=a[2],a[3]!==o||a[4]!==n?(i=(0,t.jsxs)("div",{className:o,children:[n,r]}),a[3]=o,a[4]=n,a[5]=i):i=a[5],i}function ea(){let e,n=(0,h.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex flex-col gap-2 min-w-0",children:[(0,t.jsx)("div",{className:`w-full aspect-2/3 ${J}`,style:ee}),(0,t.jsx)("div",{className:`h-4 w-3/4 ${Q}`}),(0,t.jsx)("div",{className:`h-3 w-12 ${Q}`})]}),n[0]=e):e=n[0],e}function eo(){let e,n=(0,h.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex w-full items-start",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 grow min-w-0 py-2 pr-3",children:[(0,t.jsx)("div",{className:`h-5 w-2/3 ${Q}`}),(0,t.jsx)("div",{className:`h-4 w-full ${Q}`}),(0,t.jsx)("div",{className:`h-4 w-4/5 ${Q}`}),(0,t.jsx)("div",{className:`h-3 w-24 mt-2 ${Q}`})]}),(0,t.jsx)("div",{className:`shrink-0 w-24 sm:w-36 aspect-square my-2 ${J}`,style:ee})]}),n[0]=e):e=n[0],e}function es(e){let{rep:i,undoManager:a}=(0,r.useReplicache)(),{data:o}=(0,D.usePublicationData)(),s=(0,r.useEntity)(e.entityID,"posts-list/view"),l=s?.data.value??"medium",c=(0,r.useEntity)(e.entityID,"posts-list/highlight-first-post"),u=c?.data.value??!1,d=(0,r.useEntity)(e.entityID,"posts-list/show-page-count")?.data.value??!0,h=(0,r.useEntity)(e.entityID,"posts-list/filter-tag"),p=(0,n.useMemo)(()=>h.map(e=>e.data.value),[h]),m=(0,r.useEntity)(e.entityID,"posts-list/limit"),f=m?.data.value,g=K(e.entityID),y=!!g.readerControls,[v,x]=(0,n.useState)(()=>p.length>0),[k,w]=(0,n.useState)(()=>!!f&&f>0),[C,S]=(0,n.useState)(!1),E=(t,n)=>{if(i)return i.mutate.assertFact({entity:e.entityID,attribute:t,data:{type:"boolean",value:n}})},T=t=>{i&&i.mutate.assertFact({entity:e.entityID,attribute:"posts-list/limit",data:{type:"number",value:t}})},I=(0,n.useMemo)(()=>{let e=new Set;for(let t of o?.documents??[])for(let n of t.record.tags??[])e.add(n);return Array.from(e).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:"base"}))},[o?.documents]);return(0,t.jsxs)(F.BlockSettings,{label:"Post List",className:"w-md",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("h3",{children:"List Layout"})}),(0,t.jsx)(U.BlockSettingOptions,{options:[{value:"small",Icon:el},{value:"medium",Icon:eu},{value:"chapter",Icon:ec}],value:l,halfWidthOnMobile:!0,onSelect:t=>{i&&i.mutate.assertFact({entity:e.entityID,attribute:"posts-list/view",data:{type:"posts-list-view-union",value:t}})}
70,children:"chapter"===l&&(0,t.jsx)("button",{type:"button",className:"absolute -bottom-3 right-[calc(50%+0.5rem)] sm:right-1 bg-accent-1 text-accent-2 rounded-full ","aria-expanded":C,onMouseDown:e=>e.preventDefault(),onClick:()=>S(!C),children:(0,t.jsx)(q.HelpSmall,{className:"scale-75"})})})]}),"chapter"===l&&C&&(0,t.jsxs)("div",{className:"light-container p-2 text-tertiary text-sm leading-snug flex flex-col gap-1.5",children:[(0,t.jsx)("p",{children:"Group posts into chapters based on titles"})," ",(0,t.jsx)("hr",{className:"border-dashed"}),(0,t.jsxs)("p",{children:["Posts titled ",(0,t.jsx)("br",{}),'"Ch1 - Pg1"',(0,t.jsx)("br",{}),'"Ch1 - Pg2"',(0,t.jsx)("br",{}),'"Ch1 - Pg3" ',(0,t.jsx)("br",{}),'will group into a chapter named "Ch1".']}),(0,t.jsxs)("p",{className:"font-bold",children:["Separate chapter names and page titles with ",(0,t.jsx)("br",{}),(0,t.jsx)(V.ShortcutKey,{children:"/"})," ",(0,t.jsx)(V.ShortcutKey,{children:","})," ",(0,t.jsx)(V.ShortcutKey,{children:":"})," or ",(0,t.jsx)(V.ShortcutKey,{children:"-"}),".",(0,t.jsx)("br",{})," Do not use these characters in chapter names!"]})]}),(0,t.jsx)(B.ToggleWithLabel,{label:"Highlight Latest Post",toggle:u,onToggle:()=>{i&&i.mutate.assertFact({entity:e.entityID,attribute:"posts-list/highlight-first-post",data:{type:"boolean",value:!u}})}}),"chapter"===l&&(0,t.jsx)(B.ToggleWithLabel,{label:"Show Page Count",toggle:d,onToggle:()=>{i&&i.mutate.assertFact({entity:e.entityID,attribute:"posts-list/show-page-count",data:{type:"boolean",value:!d}})}}),"chapter"!==l&&(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(B.ToggleWithLabel,{label:"Limit Posts",toggle:k,onToggle:()=>{k?(i&&m&&i.mutate.retractFact({factID:m.id}),w(!1)):(w(!0),(!f||f<1)&&T(5))}}),k&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-secondary text-sm",children:[(0,t.jsx)("span",{children:"Show only"}),(0,t.jsx)("input",{type:"number",min:1,value:f??5,onMouseDown:e=>e.stopPropagation(),onChange:e=>{let t=Math.max(1,Math.floor(Number(e.target.value)));Number.isFinite(t)&&T(t)},className:"input-tag w-16 border border-border rounded px-1 py-0.5 bg-bg-page"}),(0,t.jsx)("span",{children:"posts"})]})]}),(0,t.jsx)("hr",{className:"border-border-light my-1"}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{children:"Settings"}),(0,t.jsxs)("div",{className:"tagFilter flex flex-col gap-1 ",children:[(0,t.jsx)(B.ToggleWithLabel,{label:"Filter by Tag",toggle:v,onToggle:()=>{v?(a.withUndoGroup(async()=>{if(i)for(let e of h)await i.mutate.retractFact({factID:e.id})}),x(!1)):x(!0)}}),v&&p.length>0&&(0,t.jsx)("button",{type:"button",className:"self-end text-tertiary hover:text-accent-contrast text-sm",onMouseDown:e=>e.preventDefault(),onClick:()=>a.withUndoGroup(async()=>{if(i)for(let e of h)await i.mutate.retractFact({factID:e.id})}),children:"clear"}),v?(0,t.jsx)("div",{className:"tagList light-container p-2",children:0===I.length?(0,t.jsx)("div",{className:"text-tertiary italic text-sm",children:"no tags yet"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:I.map(n=>{let r=h.find(e=>e.data.value===n),a=!!r;return(0,t.jsxs)("button",{type:"button","aria-pressed":a,onMouseDown:e=>e.preventDefault(),onClick:()=>{i&&(r?i.mutate.retractFact({factID:r.id}):i.mutate.assertFact({id:(0,b.v7)(),entity:e.entityID,attribute:"posts-list/filter-tag",data:{type:"string",value:n}}))},className:`tag flex items-center text-xs rounded-md border px-1 py-0.5 ${a?"bg-accent-1 border-accent-1 font-bold text-accent-2":"bg-bg-page border-border text-tertiary"}`,children:[n,a?(0,t.jsx)(z.CloseTiny,{className:"scale-75 text-accent-2"}):null]},n)})})}):null]}),"chapter"!==l&&(0,t.jsxs)("div",{className:"readerControls flex flex-col gap-1",children:[(0,t.jsx)(B.ToggleWithLabel,{label:"Enable Reader Controls",toggle:y,onToggle:()=>a.withUndoGroup(async()=>{y?await E("posts-list/reader-controls",!1):(await E("posts-list/reader-controls",!0),await E("posts-list/reader-search",!0),await E("posts-list/reader-tag-filter",!0),await E("posts-list/reader-sort",!0))})}),y&&(0,t.jsx)("div",{className:"flex flex-col gap-1 py-1 px-2 opaque-container text-secondary",children:[{label:"Search",attribute:"posts-list/reader-search",value:g.readerSearch??!0},{label:"Filter by Tag",attribute:"posts-list/reader-tag-filter",value:g.readerTagFilter??!0},{label:"Sort",attribute:"posts-list/reader-sort",value:g.readerSort??!0}].map(e=>(0,t.jsx)(B.ToggleWithLabel,{label:e.label,toggle:e.value,onToggle:()=>E(e.attribute,!e.value)},e.attribute))})]})]})]})}let el=e=>{let n,r,i=(0,h.c)(3),{selected:a}=e,o=`flex flex-col w-full overflow-hidden opaque-container border-tertiary! divide-y divide-border-light ${a&&"border-accent-contrast!"}`;return i[0]===Symbol.for("react.memo_cache_sentinel")?(n=[0,1,2].map(ed),i[0]=n):n=i[0],i[1]!==o?(r=(0,t.jsx)("div",{className:o,children:n}),i[1]=o,i[2]=r):r=i[2],r},ec=e=>{let n,r,i=(0,h.c)(3),{selected:a}=e,o=`grid grid-cols-2 gap-1.5 w-full overflow-hidden opaque-container border-tertiary! py-2 px-4 sm:px-2 ${a&&"border-accent-contrast!"}`;return i[0]===Symbol.for("react.memo_cache_sentinel")?(n=[0,1].map(eh),i[0]=n):n=i[0],i[1]!==o?(r=(0,t.jsx)("div",{className:o,children:n}),i[1]=o,i[2]=r):r=i[2],r},eu=e=>{let n,r,i=(0,h.c)(3),{selected:a}=e,o=`flex flex-col w-full overflow-hidden opaque-container border-tertiary! divide-y divide-border-light ${a&&"border-accent-contrast!"}`;return i[0]===Symbol.for("react.memo_cache_sentinel")?(n=[0,1].map(ep),i[0]=n):n=i[0],i[1]!==o?(r=(0,t.jsx)("div",{className:o,children:n}),i[1]=o,i[2]=r):r=i[2],r};function ed(e){return(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-1.5 sm:p-2",children:[(0,H.PlaceholderText)("lg"),(0,t.jsx)("div",{className:"flex justify-between mt-1 w-full",children:(0,H.PlaceholderText)("sm","60%")})]},e)}function eh(e){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("div",{className:"w-full aspect-2/3 bg-border border border-border bg-cover bg-center rounded-[2px]",style:{backgroundImage:"url(/imagePlaceholder.png)",backgroundBlendMode:"hard-light"}}),(0,H.PlaceholderText)("sm","80%")]},e)}function ep(e){return(0,t.jsxs)("div",{className:"flex w-full",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-1.5 sm:p-2 grow min-w-0",children:[(0,H.PlaceholderText)("lg"),(0,H.PlaceholderText)("md"),(0,H.PlaceholderText)("md","80%"),(0,t.jsx)("div",{className:"flex justify-between mt-1 sm:mt-2 w-full",children:(0,H.PlaceholderText)("sm","60%")})]}),(0,t.jsx)("div",{className:"aspect-square h-[44px] sm:h-[68px] bg-border border-l border-border shrink-0 bg-cover bg-center",style:{backgroundImage:"url(/imagePlaceholder.png)",backgroundBlendMode:"hard-light"}})]},e)}e.s(["RecommendedPubsBlock",()=>eg],681175);var em=e.i(279490),ef=e.i(819772);let eg=e=>{let n,r,a,o=(0,h.c)(10),l=(0,i.useIsBlockSelected)(e.entityID);if(e.preview){let e,n;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(eb,{}
70),o[0]=e):e=o[0],o[1]!==l?(n=(0,t.jsx)(s.BlockLayout,{isSelected:l,className:"border-none! rounded-none!",children:e}),o[1]=l,o[2]=n):n=o[2],n}return o[3]!==e.entityID?(n=(0,t.jsx)(ex,{entityID:e.entityID}),r=(0,t.jsx)(ey,{entityID:e.entityID}),o[3]=e.entityID,o[4]=n,o[5]=r):(n=o[4],r=o[5]),o[6]!==l||o[7]!==n||o[8]!==r?(a=(0,t.jsx)(s.BlockLayout,{isSelected:l,className:"border-none! p-0! rounded-none! overflow-visible!",extraOptions:n,children:r}),o[6]=l,o[7]=n,o[8]=r,o[9]=a):a=o[9],a};function ey(e){let n,i,a=(0,h.c)(9),{entityID:o}=e,{data:s}=(0,f.useLeafletPublicationData)(),l=(0,r.useEntity)(o,"recommended-pubs/compact")?.data.value,c=s?.publications,{loading:u,listings:d}=(0,em.usePublicationRecommendationListings)(c?.uri);if(!c||u){let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(eb,{}),a[0]=e):e=a[0],e}if(0===d.length){let e,n=`${(0,P.getBasePublicationURL)(c)}/dashboard/settings?tab=general`;return a[1]!==n?(e=(0,t.jsx)($.EmptyState,{container:"light",title:"You haven't recommended any publications yet!",children:(0,t.jsxs)("div",{children:["Set up your recommendations in"," ",(0,t.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"inline",children:"Publication Settings"})]})}),a[1]=n,a[2]=e):e=a[2],e}return a[3]!==c.uri?(n={placement:"recommendation",publication:c.uri},a[3]=c.uri,a[4]=n):n=a[4],a[5]!==l||a[6]!==d||a[7]!==n?(i=(0,t.jsx)(ef.RecommendedPubsGrid,{listings:d,compact:l,disableLinks:!0,subscribeSource:n}),a[5]=l,a[6]=d,a[7]=n,a[8]=i):i=a[8],i}function eb(){let e,n=(0,h.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"grid grid-cols-3 gap-2",children:[0,1,2].map(ev)}),n[0]=e):e=n[0],e}function ev(e){return(0,t.jsx)("div",{className:"h-28 bg-border-light rounded-lg animate-pulse"},e)}function ex(e){let n,i,a=(0,h.c)(7),{rep:o}=(0,r.useReplicache)(),s=(0,r.useEntity)(e.entityID,"recommended-pubs/compact")?.data.value??!1;return a[0]!==s||a[1]!==e.entityID||a[2]!==o?(n=()=>{o&&o.mutate.assertFact({entity:e.entityID,attribute:"recommended-pubs/compact",data:{type:"boolean",value:!s}})},a[0]=s,a[1]=e.entityID,a[2]=o,a[3]=n):n=a[3],a[4]!==s||a[5]!==n?(i=(0,t.jsx)(F.BlockSettings,{label:"Recommended Pubs",className:"w-xs",children:(0,t.jsx)(B.ToggleWithLabel,{label:"Compact",helpText:"Show the recommendations in a single side-scrolling row.",toggle:s,onToggle:n})}),a[4]=s,a[5]=n,a[6]=i):i=a[6],i}e.s(["SubscribeBlock",()=>ew],509973);var ek=e.i(368408);let ew=e=>{let n,r,a,o,l,c,u=(0,h.c)(28),d=(0,i.useIsBlockSelected)(e.entityID),{data:p,normalizedPublication:m}=(0,f.useLeafletPublicationData)(),g=p?.publications?.uri,y=!!p?.publications?.publication_newsletter_settings?.enabled,b=m?.name||"Subscribe",v=m?.description;if(e.preview){let e,n,r;return u[0]!==b?(e=(0,t.jsx)("h3",{className:"leading-snug text-secondary",children:b}),u[0]=b,u[1]=e):e=u[1],u[2]!==v?(n=v&&(0,t.jsx)("div",{className:"text-tertiary",children:v}),u[2]=v,u[3]=n):n=u[3],u[4]!==e||u[5]!==n?(r=(0,t.jsx)(s.BlockLayout,{isSelected:!1,className:"accent-container rounded-lg! border-none! p-0! text-center justify-center",children:(0,t.jsxs)("div",{className:"px-3 pt-3 pb-4 sm:px-4 sm:pt-4 sm:pb-5",children:[e,n]})}),u[4]=e,u[5]=n,u[6]=r):r=u[6],r}let x=!!d;return u[7]!==b?(n=(0,t.jsx)("h3",{className:"leading-snug text-secondary",children:b}
70),u[7]=b,u[8]=n):n=u[8],u[9]!==v?(r=v&&(0,t.jsx)("div",{className:"text-tertiary",children:v}),u[9]=v,u[10]=r):r=u[10],u[11]!==y||u[12]!==m?.url||u[13]!==v||u[14]!==b||u[15]!==g?(a=g&&(0,t.jsx)(ek.SubscribeInput,{publicationUri:g,publicationUrl:m?.url,source:{placement:"editor"},publicationName:b,publicationDescription:v,newsletterMode:y}),u[11]=y,u[12]=m?.url,u[13]=v,u[14]=b,u[15]=g,u[16]=a):a=u[16],u[17]!==a?(o=(0,t.jsx)("div",{className:"w-fit max-w-full mx-auto pt-3",children:a}),u[17]=a,u[18]=o):o=u[18],u[19]!==n||u[20]!==r||u[21]!==o?(l=(0,t.jsxs)("div",{className:"px-3 pt-3 pb-4 sm:px-4 sm:pt-4 sm:pb-5",children:[n,r,o]}),u[19]=n,u[20]=r,u[21]=o,u[22]=l):l=u[22],u[23]!==e.areYouSure||u[24]!==e.setAreYouSure||u[25]!==x||u[26]!==l?(c=(0,t.jsx)(s.BlockLayout,{isSelected:x,areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,className:"accent-container rounded-lg! border-none! p-0! text-center justify-center",children:l}),u[23]=e.areYouSure,u[24]=e.setAreYouSure,u[25]=x,u[26]=l,u[27]=c):c=u[27],c}},12802,e=>{"use strict";var t=e.i(768834),n=e.i(579473),r=e.i(813029),i=e.i(607268);let a=e=>"fill"===e?"fill":"pen",o=(0,t.create)((0,n.combine)({page:null,target:null,tool:"pen",color:i.INK_COLORS[0].value,size:i.INK_SIZES[1],customColor:"#0090FF",colorPickerOpen:!1,erasing:[]},e=>({start:(t,n=null)=>{r.useUIState.setState({selectedBlocks:[],focusedEntity:null}),document.activeElement?.blur?.(),e({page:t,target:n,tool:"pen",erasing:[],colorPickerOpen:!1})},setTool:t=>e({tool:t}),setColor:t=>e(e=>({color:t,tool:a(e.tool)})),setCustomColor:t=>e(e=>({customColor:t,color:t,tool:a(e.tool)})),setSize:t=>e({size:t,tool:"pen"}),setColorPickerOpen:t=>e({colorPickerOpen:t})})));e.s(["useInkSession",0,o])},885124,905683,394021,346817,971981,e=>{"use strict";e.s(["EmbedBlock",()=>D,"HTMLBlock",()=>P],885124);var t=e.i(843476),n=e.i(500932),r=e.i(492122),i=e.i(271645),a=e.i(467592),o=e.i(813029),s=e.i(173275),l=e.i(468034),c=e.i(793610),u=e.i(859015),d=e.i(784192),h=e.i(438424),p=e.i(553445),m=e.i(394191),f=e.i(851181),g=e.i(864293),y=e.i(100375),b=e.i(864460),v=e.i(853915),x=e.i(788613),k=e.i(670751),w=e.i(828517),C=e.i(899719),S=e.i(629683),E=e.i(170685),T=e.i(791676),I=e.i(364441);let D=e=>{let r,i=(0,n.c)(4);if((0,a.useEntity)(e.entityID,"embed/html")){let n;return i[0]!==e?(n=(0,t.jsx)(P,{...e}),i[0]=e,i[1]=n):n=i[1],n}return i[2]!==e?(r=(0,t.jsx)(_,{...e}),i[2]=e,i[3]=r):r=i[3],r},N=e=>{let i,o,s,l,c=(0,n.c)(21),{rep:u}=(0,a.useReplicache)(),{permissions:d}=(0,r.useEntitySetContext)(),h="canvas"===e.pageType,p=(0,a.useEntity)(e.entityID,"embed/height")?.data.value||360,m=(0,a.useEntity)(e.entityID,"embed/aspect-ratio")?.data.value,y=(0,g.useCanvasZoomLevel)();c[0]!==p||c[1]!==e.entityID||c[2]!==u?.mutate||c[3]!==y?(i={onDragEnd:t=>u?.mutate.assertFact({entity:e.entityID,attribute:"embed/height",data:{type:"number",value:p+t.y/y}})},c[0]=p,c[1]=e.entityID,c[2]=u?.mutate,c[3]=y,c[4]=i):i=c[4];let b=(0,f.useDrag)(i);c[5]!==m||c[6]!==b||c[7]!==h||c[8]!==d||c[9]!==e.preview?(o=e.preview||!d.write||m?null:(0,t.jsx)("div",{"data-draggable":!0,className:`resizeHandle touch-none 71 cursor-ns-resize shrink-0 z-10 w-6 h-[5px] 72 absolute bottom-[3px] right-1/2 translate-x-1/2 73 rounded-full bg-white border-2 border-[#8C8C8C] shadow-[0_0_0_1px_white,inset_0_0_0_1px_white] 74 ${h?"hidden group-hover/canvas-block:block":""}`,...b.handlers}),c[5]=m,c[6]=b,c[7]=h,c[8]=d,c[9]=e.preview,c[10]=o):o=c[10];let v=o;c[11]!==m||c[12]!==p||c[13]!==b||c[14]!==y?(s=m?{aspectRatio:m}
74:{height:p+(b.dragDelta?.y||0)/y},c[11]=m,c[12]=p,c[13]=b,c[14]=y,c[15]=s):s=c[15];let x=s,k=`w-full ${!m&&b.dragDelta?"pointer-events-none":""}`;return c[16]!==m||c[17]!==v||c[18]!==x||c[19]!==k?(l={aspectRatio:m,resizeHandle:v,sizeStyle:x,wrapperClassName:k},c[16]=m,c[17]=v,c[18]=x,c[19]=k,c[20]=l):l=c[20],l},A=e=>{let r,i,a=(0,n.c)(7),l=!!(0,o.useIsBlockSelected)(e.entityID);return a[0]!==e.children||a[1]!==l?(r=(0,t.jsx)(s.BlockLayout,{isSelected:l,className:"flex flex-col relative w-full overflow-hidden group/embedBlock p-0!",children:e.children}),a[0]=e.children,a[1]=l,a[2]=r):r=a[2],a[3]!==e.sizing.resizeHandle||a[4]!==e.sizing.wrapperClassName||a[5]!==r?(i=(0,t.jsxs)("div",{className:e.sizing.wrapperClassName,children:[r,e.sizing.resizeHandle]}),a[3]=e.sizing.resizeHandle,a[4]=e.sizing.wrapperClassName,a[5]=r,a[6]=i):i=a[6],i},_=e=>{let n=(0,r.useEntitySetContext)(),{permissions:s}=n,{rep:c,undoManager:u}=(0,a.useReplicache)(),d=(0,a.useEntity)(e.entityID,"embed/url"),h=N(e),[p,m]=(0,i.useState)(!1),f=(0,i.useCallback)(async(e,t)=>{if(c)if("text"===t.type)await c.mutate.assertFact([{entity:e,attribute:"block/type",data:{type:"block-type-union",value:"text"}},{entity:e,attribute:"block/text",data:{type:"text",value:t.content}}]);else{let n=[{entity:e,attribute:"block/type",data:{type:"block-type-union",value:"embed"}},{entity:e,attribute:"embed/url",data:{type:"string",value:t.url}}];t.aspectRatio?n.push({entity:e,attribute:"embed/aspect-ratio",data:{type:"string",value:t.aspectRatio}}):t.height&&n.push({entity:e,attribute:"embed/height",data:{type:"number",value:t.height}}),await c.mutate.assertFact(n)}},[c]),{iframeRef:g}=(0,w.useIframeChannel)({onOpen:t=>{o.useUIState.getState().openPage(e.parent,{type:"iframe",url:t}),(0,C.scrollIntoView)(`iframe-page-${t}`,.8)},onReplaceWith:t=>{f(e.entityID,t)},onAddBelow:async t=>{await u.withUndoGroup(async()=>{if(!c)return;let r=await (0,l.addBlockBelow)(c,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:n.set,type:"text"===t.type?"text":"card"});await f(r,t)})}}),y=(0,S.useColorAttribute)(null,"theme/page-background"),b=(0,S.useColorAttribute)(null,"theme/primary"),v=(0,i.useMemo)(()=>{if(!d)return;let e=new URL(d.data.value);return e.searchParams.set("parts.page.embed.ctx.mode","edit"),e.searchParams.set("parts.page.embed.ctx.bgColor",y.toString("hex")),e.searchParams.set("parts.page.embed.ctx.primaryColor",b.toString("hex")),e.toString()},[d,y,b]),x=v?.includes("youtube.com")||v?.includes("youtu.be");return e.preview?null:d?p?(0,t.jsx)(R,{...e,initialUrl:d.data.value,isEditingExisting:!0,onDone:()=>m(!1)}):(0,t.jsxs)(A,{entityID:e.entityID,sizing:h,children:[(0,t.jsx)("iframe",{ref:g,className:h.aspectRatio?"w-full h-auto":"w-full",style:h.sizeStyle,src:v,allow:"fullscreen",loading:"lazy",referrerPolicy:x?"strict-origin-when-cross-origin":"no-referrer"}),s.write&&(0,t.jsx)(M,{entityID:e.entityID,parent:e.parent,type:e.type,onClick:()=>m(!0)})]}):s.write?(0,t.jsx)(R,{...e}):null},P=e=>{let o,s,l,c=(0,n.c)(20),{permissions:u}=(0,r.useEntitySetContext)(),d=(0,a.useEntity)(e.entityID,"embed/html"),h=N(e),[p,m]=(0,i.useState)(!1);if(e.preview)return null;if(!d){let n;return u.write?(c[0]!==e?(n=(0,t.jsx)(R,{...e}),c[0]=e,c[1]=n):n=c[1],n):null}if(p){let n,r;return c[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>m(!1),c[2]=n):n=c[2],c[3]!==d.data.value||c[4]!==e?(r=(0,t.jsx)(R,{...e,initialHtml:d.data.value,isEditingExisting:!0,onDone:n}),c[3]=d.data.value,c[4]=e,c[5]=r):r=c[5],r}let f=h.aspectRatio?"w-full h-auto":"w-full";return c[6]!==d.data.value||c[7]!==h.sizeStyle||c[8]!==f?(o=(0,t.jsx)("iframe",{className:f,style:h.sizeStyle,srcDoc:d.data.value,sandbox:I.srcDocSandbox,allow:"fullscreen",loading:"lazy",referrerPolicy:"no-referrer"}),c[6]=d.data.value,c[7]=h.sizeStyle,c[8]=f,c[9]=o):o=c[9],c[10]!==u.write||c[11]!==e.entityID||c[12]!==e.parent||c[13]!==e.type?(s=u.write&&(0,t.jsx)(M,{entityID:e.entityID,parent:e.parent,type:e.type,onClick:()=>m(!0)}),c[10]=u.write,c[11]=e.entityID,c[12]=e.parent,c[13]=e.type,c[14]=s):s=c[14],c[15]!==e.entityID||c[16]!==h||c[17]!==o||c[18]!==s?(l=(0,t.jsxs)(A,{entityID:e.entityID,sizing:h,children:[o,s]}),c[15]=e.entityID,c[16]=h,c[17]=o,c[18]=s,c[19]=l):l=c[19],l},M=e=>{let r,i,a,o=(0,n.c)(5);return o[0]!==e?(r=t=>{t.preventDefault(),t.stopPropagation(),(0,m.focusBlock)({type:e.type,entityID:e.entityID,parent:e.parent},{type:"start"}),e.onClick()},o[0]=e,o[1]=r):r=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(v.EditTiny,{}),o[2]=i):i=o[2],o[3]!==r?(a=(0,t.jsx)("button",{"aria-label":"Edit embed",onMouseDown:r,className:"absolute top-2 right-2 z-10 p-1 opaque-container text-secondary",children:i}),o[3]=r,o[4]=a):a=o[4],a},R=e=>{let r,a,s,l,c,u,d,h,f=(0,n.c)(25),g=N(e),y=(0,o.useIsBlockSelected)(e.entityID);f[0]!==y||f[1]!==e.entityID?(r=()=>{let t=document.getElementById(p.elementId.block(e.entityID).input);y?t?.focus():t?.blur()},a=[y,e.entityID],f[0]=y,f[1]=e.entityID,f[2]=r,f[3]=a):(r=f[2],a=f[3]),(0,i.useEffect)(r,a);let b=g.wrapperClassName;f[4]!==e.entityID?(s=p.elementId.block(e.entityID),f[4]=e.entityID,f[5]=s):s=f[5];let v=s.input;f[6]!==e.entityID?(l=L(e.entityID),f[6]=e.entityID,f[7]=l):l=f[7];let x=` 75 w-full p-2 76 text-tertiary hover:text-accent-contrast hover:cursor-pointer 77 flex flex-auto gap-2 items-center justify-center hover:border-2 border-dashed rounded-lg 78 ${y?"border-2 border-tertiary":"border border-border"} 79 ${"canvas"===e.pageType&&"bg-bg-page"}`;return f[8]!==e.entityID||f[9]!==e.parent||f[10]!==e.type?(c=()=>{(0,m.focusBlock)({type:e.type,entityID:e.entityID,parent:e.parent},{type:"start"})},f[8]=e.entityID,f[9]=e.parent,f[10]=e.type,f[11]=c):c=f[11],f[12]!==e?(u=(0,t.jsx)(j,{...e}),f[12]=e,f[13]=u):u=f[13],f[14]!==g.sizeStyle||f[15]!==s.input||f[16]!==l||f[17]!==x||f[18]!==c||f[19]!==u?(d=(0,t.jsx)("label",{id:v,htmlFor:l,className:x,style:g.sizeStyle,onMouseDown:c,children:u}),f[14]=g.sizeStyle,f[15]=s.input,f[16]=l,f[17]=x,f[18]=c,f[19]=u,f[20]=d):d=f[20],f[21]!==g.resizeHandle||f[22]!==g.wrapperClassName||f[23]!==d?(h=(0,t.jsxs)("div",{className:b,children:[d,g.resizeHandle]}),f[21]=g.resizeHandle,f[22]=g.wrapperClassName,f[23]=d,f[24]=h):h=f[24],h},L=e=>`${e}-embed-input`,j=e=>{let n=(0,o.useIsBlockSelected)(e.entityID),s=(0,r.useEntitySetContext)(),p="html"===e.type?"html":"url",[f,g]=(0,i.useState)(e.initialUrl??""),[v,w]=(0,i.useState)(e.initialHtml??""),[C,S]=(0,i.useState)(!1),{rep:I,undoManager:D}=(0,a.useReplicache)(),N=(0,a.useEntity)(e.entityID,"embed/aspect-ratio"),A=(0,a.useEntity)(e.entityID,"embed/height"),_=!!N||!!A,P=async()=>
79{if(e.isEditingExisting)return void e.onDone?.();if(!I||"canvas"===e.pageType)return;let t=await (0,l.addBlockBelow)(I,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:s.set,type:"text"});(0,m.focusBlock)({entityID:t,type:"text",parent:e.parent},{type:"start"})},M=async()=>{I&&await D.withUndoGroup(async()=>{let t=e.entityID;t||(t=await (0,l.addBlockBelow)(I,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:s.set,type:"embed"}));let n=f;if(f.startsWith("http")||(n=`https://${f}`),I){S(!0);try{let e=await fetch("/api/link_previews",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({url:n,type:"meta"})}),r=n,i=360,a=null;if(200===e.status){let n=await e.json();if(n.leafletPost){await (0,E.assertStandardSitePostFacts)(I,t,n.leafletPost.uri),S(!1),await P();return}if(n.leafletPublication){await (0,E.assertStandardSitePublicationFacts)(I,t,n.leafletPublication.uri),S(!1),await P();return}if(n.success&&n.data.links?.player?.[0]){let e=n.data.links.player[0];r=e.href,i=e.media?.height||300,a=(0,k.getAspectRatio)(e.media)}}let o=[{entity:t,attribute:"embed/url",data:{type:"string",value:r}}];_||(a?o.push({entity:t,attribute:"embed/aspect-ratio",data:{type:"string",value:a}}):o.push({entity:t,attribute:"embed/height",data:{type:"number",value:i}})),await I.mutate.assertFact(o)}catch{await I.mutate.assertFact([{entity:t,attribute:"embed/url",data:{type:"string",value:n}}])}finally{S(!1)}await P()}})},R=async()=>{await D.withUndoGroup(async()=>{if(I){S(!0);try{let t=e.entityID;t||(t=await (0,l.addBlockBelow)(I,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:s.set,type:"html"}));let n=[{entity:t,attribute:"embed/html",data:{type:"string",value:v}}];_||n.push({entity:t,attribute:"embed/height",data:{type:"number",value:360}}),await I.mutate.assertFact(n),await P()}finally{S(!1)}}})},j=(0,c.useSmoker)(),O=e=>{if(!C)if("url"===p){if(!f||""===f)return void j({error:!0,text:"no url!",position:e});if(!(0,h.isUrl)(f))return void j({error:!0,text:"invalid url!",position:e});M()}else{if(!v.trim())return void j({error:!0,text:"no html!",position:e});R()}};return(0,t.jsxs)("form",{className:"w-full h-full flex flex-col gap-2",onSubmit:e=>{e.preventDefault();let t=document.getElementById("embed-block-submit")?.getBoundingClientRect();O({x:t?t.left+12:0,y:t?t.top:0})},children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between gap-2 shrink-0",children:[(0,t.jsx)(T.ToggleGroup,{value:N?.data.value??"fixed",onChange:t=>{if(I){if("fixed"===t){N&&I.mutate.retractFact({factID:N.id});return}I.mutate.assertFact({entity:e.entityID,attribute:"embed/aspect-ratio",data:{type:"string",value:t}})}},options:[{value:"fixed",label:"Fixed"},{value:"4/3",label:"4:3"},{value:"1/1",label:"1:1"},{value:"4/1",label:"4:1"}]}),(0,t.jsx)("button",{type:"submit",id:"embed-block-submit",disabled:C,className:`p-1 ${n?"text-accent-contrast":"text-border"}`,onMouseDown:e=>{e.preventDefault(),O({x:e.clientX+12,y:e.clientY})},children:C?(0,t.jsx)(x.DotLoader,{}):(0,t.jsx)(b.CheckTiny,{})})]}),"url"===p?(0,t.jsx)("div",{className:"w-full flex-auto flex items-center justify-center",children:(0,t.jsxs)("div",{className:"max-w-sm flex gap-2 rounded-md text-secondary",children:[(0,t.jsx)(y.BlockEmbedSmall,{className:`shrink-0 ${n?"text-tertiary":"text-border"} `}),(0,t.jsx)(u.Separator,{}),(0,t.jsx)(d.Input,{id:L(e.entityID),type:"text",className:"w-full grow border-none outline-hidden bg-transparent ",placeholder:"www.example.com",value:f,onChange:e=>g(e.target.value)})]})}):(0,t.jsx)("textarea",{id:L(e.entityID),className:"w-full flex-auto resize-none border-none outline-hidden bg-transparent font-mono text-sm text-secondary",placeholder:"<p>paste html here</p>",value:v,onChange:e=>w(e.target.value)})]})};e.s(["MailboxBlock",()=>B],905683);var O=e.i(433823);let B=e=>{let r,i,l,c,u=(0,n.c)(11),d=(0,o.useIsBlockSelected)(e.entityID),h=(0,a.useEntity)(e.entityID,"mailbox/archive"),{rep:p}=(0,a.useReplicache)(),m=!!d;return u[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"font-bold text-secondary",children:"Mailbox blocks are deprecated"}),i=(0,t.jsx)("div",{className:"text-tertiary text-sm",children:"Email subscriptions have moved to publication newsletters."}),u[0]=r,u[1]=i):(r=u[0],i=u[1]),u[2]!==h||u[3]!==e.parent||u[4]!==p?(l=h&&(0,t.jsx)("button",{className:"text-accent-contrast hover:underline text-sm mt-1",onMouseDown:t=>{t.preventDefault(),p&&(o.useUIState.getState().openPage(e.parent,h.data.value),(0,O.focusPage)(h.data.value,p))},children:"See past posts"}),u[2]=h,u[3]=e.parent,u[4]=p,u[5]=l):l=u[5],u[6]!==e.areYouSure||u[7]!==e.setAreYouSure||u[8]!==m||u[9]!==l?(c=(0,t.jsxs)(s.BlockLayout,{isSelected:m,hasBackgroun
79d:"accent",areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,className:"flex flex-col gap-1 items-center justify-center text-center",children:[r,i,l]}),u[6]=e.areYouSure,u[7]=e.setAreYouSure,u[8]=m,u[9]=l,u[10]=c):c=u[10],c};var F=e.i(69278),H=e.i(133564),U=e.i(993417);e.s(["AreYouSure",0,e=>{let r,i,o,s,l,c,u,d,h,p,m=(0,n.c)(28);m[0]!==e.entityID?(r=[e.entityID].flat(),m[0]=e.entityID,m[1]=r):r=m[1];let f=r,{rep:g,undoManager:y}=(0,a.useReplicache)(),b=` 80 w-full 81 flex items-center justify-center 82 ${!e.compact&&`bg-border-light border-2 border-border rounded-lg 83 ${"card"===e.type?"h-[104px]":"mailbox"===e.type?"h-[92px]":"h-full"}`}`,v=`flex h-fit justify-center items-center font-bold text-secondary ${e.compact?"flex-row gap-2 justify-between w-full ":"flex-col py-2 gap-1"}`;return m[2]!==f.length||m[3]!==e.type?(i=f.length>1?"Blocks":"card"===e.type?(0,t.jsx)("span",{children:"Page"}):"embedded-canvas"===e.type?(0,t.jsx)("span",{children:"Drawing"}):"mailbox"===e.type?(0,t.jsx)("span",{children:"Mailbox and Posts"}):(0,t.jsx)("span",{children:"Block"}),m[2]=f.length,m[3]=e.type,m[4]=i):i=m[4],m[5]!==i?(o=(0,t.jsxs)("div",{className:"text-center w-fit",children:["Delete"," ",i,"?"," "]}),m[5]=i,m[6]=o):o=m[6],m[7]!==f||m[8]!==g||m[9]!==y?(s=(0,t.jsx)(F.ButtonPrimary,{autoFocus:!0,compact:!0,onClick:async e=>{e.stopPropagation(),g&&await (0,U.deleteBlock)(f,g,y)},children:"Delete"}),m[7]=f,m[8]=g,m[9]=y,m[10]=s):s=m[10],m[11]!==e?(l=()=>e.closeAreYouSure(),m[11]=e,m[12]=l):l=m[12],m[13]!==e.compact?(c=e.compact?(0,t.jsx)(H.CloseTiny,{className:"mx-2 shrink-0"}):"Nevermind",m[13]=e.compact,m[14]=c):c=m[14],m[15]!==l||m[16]!==c?(u=(0,t.jsx)("button",{className:"text-accent-1",onClick:l,children:c}),m[15]=l,m[16]=c,m[17]=u):u=m[17],m[18]!==s||m[19]!==u?(d=(0,t.jsxs)("div",{className:"flex gap-2",children:[s,u]}),m[18]=s,m[19]=u,m[20]=d):d=m[20],m[21]!==v||m[22]!==o||m[23]!==d?(h=(0,t.jsxs)("div",{className:v,children:[o,d]}),m[21]=v,m[22]=o,m[23]=d,m[24]=h):h=m[24],m[25]!==b||m[26]!==h?(p=(0,t.jsx)("div",{className:b,children:h}),m[25]=b,m[26]=h,m[27]=p):p=m[27],p}],394021),e.s(["DateTimeBlock",()=>X],346817);var z=e.i(814649),$=e.i(281092),V=e.i(817016),q=e.i(99245),G=e.i(301107),W=e.i(248787),K=e.i(265658),Y=e.i(836120),Z=e.i(641192);function X(e){let r,a,o,s=(0,n.c)(6),[l,c]=(0,i.useState)(!1),u=(0,G.useHasPageLoaded)();if(s[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{c(!0)},a=[],s[0]=r,s[1]=a):(r=s[0],a=s[1]),(0,i.useEffect)(r,a),!l&&!u){let e;return s[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex flex-row gap-2 group/date w-64 z-1 border border-transparent",children:(0,t.jsx)(Y.BlockCalendarSmall,{className:"text-tertiary"})}),s[2]=e):e=s[2],e}return s[3]!==u||s[4]!==e?(o=(0,t.jsx)(Q,{...e,initalLoad:u}),s[3]=u,s[4]=e,s[5]=o):o=s[5],o}function Q(e){let l,c,u,d,h,p,m,f,g,y,b,v,x,k,w,C,S=(0,n.c)(53),{rep:E}=(0,a.useReplicache)(),{permissions:T}=(0,r.useEntitySetContext)(),I=(0,a.useEntity)(e.entityID,"block/date-time");e:{let e;if(!I){let e;S[0]===Symbol.for("react.memo_cache_sentinel")?(e=new Date,S[0]=e):e=S[0],l=e;break e}S[1]!==I.data.value?(e=new Date(I.data.value),S[1]=I.data.value,S[2]=e):e=S[2],l=e}let D=l;S[3]!==D?(c=()=>`${D.getHours().toString().padStart(2,"0")}:${D.getMinutes().toString().padStart(2,"0")}`,S[3]=D,S[4]=c):c=S[4];let[N,A]=(0,i.useState)(c),_=(0,o.useIsBlockSelected)(e.entityID),P=(0,a.useEntity)(e.entityID,"block/text-alignment")?.data.value;S[5]!==I||S[6]!==e.entityID||S[7]!==E?.mutate||S[8]!==D?(u=t=>{var n;let r,i,a=t.target.value;if(A(a),!I)return;let[o,s]=a.split(":").map(ee),l=((r=(0,$.toDate)(D,void 0)).setMinutes(s),n=r,(i=(0,$.toDate)(n,void 0)).setHours(o),i);E?.mutate.assertFact({entity:e.entityID,data:{type:"date-time",value:l.toISOString(),dateOnly:I?.data.dateOnly,originalTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone},attribute:"block/date-time"})},S[5]=I,S[6]=e.entityID,S[7]=E?.mutate,S[8]=D,S[9]=u):u=S[9];let M=u;S[10]!==I?.data||S[11]!==e.entityID||S[12]!==E?.mutate||S[13]!==N?(d=t=>{if(!N||!t){t&&E?.mutate.assertFact({entity:e.entityID,data:{originalTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,type:"date-time",value:t.toISOString(),dateOnly:I?.data.dateOnly},attribute:"block/date-time"});return}let[n,r]=N.split(":").map(J),i=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n,r);E?.mutate.assertFact({entity:e.entityID,data:{type:"date-time",value:i.toISOString(),originalTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,dateOnly:I?.data.dateOnly},attribute:"block/date-time"})}
83,S[10]=I?.data,S[11]=e.entityID,S[12]=E?.mutate,S[13]=N,S[14]=d):d=S[14];let R=d,L=!T.write,j=!!_,O=`flex flex-row gap-2 group/date w-64 z-1 border-transparent! 84 ${"center"===P?"justify-center":"right"===P?"justify-end":"justify-start"} 85 `;S[15]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)(Y.BlockCalendarSmall,{className:"text-tertiary"}),S[15]=h):h=S[15];let B=void 0===e.initalLoad||e.initalLoad;S[16]!==I||S[17]!==T.write||S[18]!==D?(p=I?(0,t.jsxs)("div",{className:`font-bold 86 ${!T.write?"":"group-hover/date:underline"} 87 `,children:[D.toLocaleDateString(void 0,{month:"short",year:new Date().getFullYear()!==D.getFullYear()?"numeric":void 0,day:"numeric"})," ",I.data.dateOnly?null:(0,t.jsxs)("span",{children:["|"," ",D.toLocaleTimeString([],{hour:"numeric",minute:"numeric"})]})]}):(0,t.jsx)("div",{className:"italic text-tertiary text-left group-hover/date:underline",children:T.write?"add a date and timeâ¦":"TBDâ¦"}),S[16]=I,S[17]=T.write,S[18]=D,S[19]=p):p=S[19],S[20]!==B||S[21]!==p?(m=(0,t.jsx)(et,{active:B,children:p}),S[20]=B,S[21]=p,S[22]=m):m=S[22],S[23]!==m||S[24]!==j||S[25]!==O?(f=(0,t.jsxs)(s.BlockLayout,{isSelected:j,className:O,children:[h,m]}),S[23]=m,S[24]=j,S[25]=O,S[26]=f):f=S[26];let F=I?D:void 0;S[27]!==R||S[28]!==F?(g=(0,t.jsx)(Z.DatePicker,{mode:"single",selected:F,onSelect:R}),S[27]=R,S[28]=F,S[29]=g):g=S[29],S[30]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(V.Separator,{className:"border-border"}),S[30]=y):y=S[30];let H=!!I?.data.dateOnly;S[31]!==I?.data.originalTimezone||S[32]!==I?.data.value||S[33]!==e.entityID||S[34]!==E?.mutate?(b=t=>{E?.mutate.assertFact({entity:e.entityID,data:{type:"date-time",value:I?.data.value||new Date().toISOString(),originalTimezone:I?.data.originalTimezone||Intl.DateTimeFormat().resolvedOptions().timeZone,dateOnly:t.currentTarget.checked},attribute:"block/date-time"})},S[31]=I?.data.originalTimezone,S[32]=I?.data.value,S[33]=e.entityID,S[34]=E?.mutate,S[35]=b):b=S[35],S[36]!==H||S[37]!==b?(v=(0,t.jsx)(q.Checkbox,{checked:H,onChange:b,children:"All day"}),S[36]=H,S[37]=b,S[38]=v):v=S[38];let U=I?.data.dateOnly;return S[39]!==M||S[40]!==U||S[41]!==N?(x=(0,t.jsx)("input",{disabled:U,type:"time",value:N,onChange:M,className:"dateBlockTimeInput input-with-border bg-bg-page text-primary w-full "}),S[39]=M,S[40]=U,S[41]=N,S[42]=x):x=S[42],S[43]!==v||S[44]!==x?(k=(0,t.jsxs)("div",{className:"flex gap-4 pb-1 items-center",children:[v,x]}),S[43]=v,S[44]=x,S[45]=k):k=S[45],S[46]!==g||S[47]!==k?(w=(0,t.jsxs)("div",{className:"flex flex-col gap-3 ",children:[g,y,k]}),S[46]=g,S[47]=k,S[48]=w):w=S[48],S[49]!==f||S[50]!==w||S[51]!==L?(C=(0,t.jsx)(z.Popover,{disabled:L,className:"w-64 z-10 px-2!",trigger:f,children:w}),S[49]=f,S[50]=w,S[51]=L,S[52]=C):C=S[52],C}function J(e){return parseInt(e,10)}function ee(e){return parseInt(e,10)}let et=e=>{let r,i,a=(0,n.c)(5),o=+!!e.active;a[0]!==o?(r={opacity:o},a[0]=o,a[1]=r):r=a[1];let s=(0,K.useSpring)(r);return a[2]!==e.children||a[3]!==s?(i=(0,t.jsx)(W.animated.div,{style:s,children:e.children}),a[2]=e.children,a[3]=s,a[4]=i):i=a[4],i};function en(e){let r,i,a=(0,n.c)(3),l=!!(0,o.useIsBlockSelected)(e.entityID);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("p",{className:"text-tertiary italic text-sm py-4",children:"The RSVP block has been deprecated."}),a[0]=r):r=a[0],a[1]!==l?(i=(0,t.jsx)(s.BlockLayout,{isSelected:l,className:"rsvp relative flex flex-col gap-1 w-full rounded-lg place-items-center justify-center",children:r}),a[1]=l,a[2]=i):i=a[2],i}e.s(["RSVPBlock",()=>en],971981)},849631,897108,e=>{"use strict";e.s(["EmbeddedCanvasBlock",()=>y],849631);var t=e.i(843476),n=e.i(500932),r=e.i(173275),i=e.i(467592),a=e.i(813029),o=e.i(433823),s=e.i(637777),l=e.i(970827),c=e.i(792834),u=e.i(890882),d=e.i(492122),h=e.i(853915),p=e.i(141851),m=e.i(814649),f=e.i(477180),g=e.i(213250);function y(e){let o,h,m,f,g,y,b,x=(0,n.c)(30),w=(0,i.useEntity)(e.entityID,"block/card")?.data.value,C=(0,c.useCanvasSize)(w||null),S=(0,a.useIsBlockSelected)(e.entityID);x[0]!==w?(o=e=>!!w&&e.openPages.includes(w),x[0]=w,x[1]=o):o=x[1];let E=(0,a.useUIState)(o),T=(0,i.useEntity)(e.entityID,"image/alt")?.data.value,{permissions:I}=(0,d.useEntitySetContext)();if(!w||!C.fixed)return null;let D=!!S,N=`embeddedCanvasBlockWrapper group/image relative p-0! ${E?"border-accent-contrast! outline-accent-contrast!":""}`;return x[2]!==w?(h=(0,t.jsx)(s.CanvasContent,{entityID:w,preview:!0}),x[2]=w,x[3]=h):h=x[3],x[4]!==T||x[5]!==C||x[6]!==h?(m=(0,t.jsx)(u.ScaledCanvas,{size:C,inert:!0,alt:T,children:h}),x[4]=T,x[5]=C,x[6]=h,x[7]=m):m=x[7],x[8]!==w||x[9]!==I||x[10]!==e.parent||x[11]!==e.preview||x[12]!==C?(f=!e.preview&&I.write&&(0,t.jsxs)("div",{className:"absolute top-2 right-2 flex items-stretch gap-1",children:[(0,t.jsx)(k,{page:w,size:C}),(0,t.jsx)(v,{parent:e.parent,page:w})]}),x[8]=w,x[9]=I,x[10]=e.parent,x[11]=e.preview,x[12]=C,x[13]=f):f=x[13],x[14]!==S||x[15]!==I||x[16]!==e.entityID||x[17]!==e.preview?(g=!e.preview&&(0,t.jsx)(p.ImageAltButton,{entity
87ID:e.entityID,selected:!!S,canEdit:I.write,placeholder:"Describe this drawingâ¦"}),x[14]=S,x[15]=I,x[16]=e.entityID,x[17]=e.preview,x[18]=g):g=x[18],x[19]!==e.areYouSure||x[20]!==e.setAreYouSure||x[21]!==D||x[22]!==N||x[23]!==m||x[24]!==f||x[25]!==g?(y=(0,t.jsxs)(r.BlockLayout,{isSelected:D,areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,className:N,children:[m,f,g]}),x[19]=e.areYouSure,x[20]=e.setAreYouSure,x[21]=D,x[22]=N,x[23]=m,x[24]=f,x[25]=g,x[26]=y):y=x[26],x[27]!==w||x[28]!==y?(b=(0,t.jsx)(l.CardThemeProvider,{entityID:w,children:y}),x[27]=w,x[28]=y,x[29]=b):b=x[29],b}let b="flex items-center gap-1 rounded-md py-0.5 text-sm font-bold bg-accent-1 text-accent-2 hover:outline-solid hover:outline-1 hover:outline-accent-1 outline-offset-1";function v(e){let r,s,l,c=(0,n.c)(7),{rep:u}=(0,i.useReplicache)();return c[0]!==e.page||c[1]!==e.parent||c[2]!==u?(r=t=>{t.preventDefault(),t.stopPropagation(),a.useUIState.getState().openPage(e.parent,e.page),u&&(0,o.focusPage)(e.page,u)},c[0]=e.page,c[1]=e.parent,c[2]=u,c[3]=r):r=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(h.EditTiny,{}),c[4]=s):s=c[4],c[5]!==r?(l=(0,t.jsxs)("button",{"aria-label":"Edit drawing",className:`${b} px-2`,onMouseDown:x,onClick:r,children:[s," Edit"]}),c[5]=r,c[6]=l):l=c[6],l}function x(e){return e.stopPropagation()}function k(e){let r,a,o,s,l,c,u,d,h=(0,n.c)(19),{rep:p,undoManager:y}=(0,i.useReplicache)();h[0]===Symbol.for("react.memo_cache_sentinel")?(r=Object.keys(g.EMBEDDED_CANVAS_SIZES),h[0]=r):r=h[0];let v=r;h[1]!==e.size.height||h[2]!==e.size.width?(a=v.find(t=>g.EMBEDDED_CANVAS_SIZES[t].width===e.size.width&&g.EMBEDDED_CANVAS_SIZES[t].height===e.size.height),h[1]=e.size.height,h[2]=e.size.width,h[3]=a):a=h[3];let x=a,k=Math.min(16/e.size.width,16/e.size.height),I=e.size.width*k,D=e.size.height*k;h[4]!==I||h[5]!==D?(o=(0,t.jsx)("button",{"aria-label":"Drawing size",className:`${b} px-1.5`,onMouseDown:E,onClick:S,children:(0,t.jsx)("div",{className:"border-[1.5px] border-current rounded-[2px]",style:{width:I,height:D}})}),h[4]=I,h[5]=D,h[6]=o):o=h[6],h[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)("h4",{children:"Drawing Size"}),h[7]=s):s=h[7],h[8]===Symbol.for("react.memo_cache_sentinel")?(l=v.map(w),h[8]=l):l=h[8];let N=x??"";return h[9]!==e.page||h[10]!==p||h[11]!==y?(c=async t=>{if(!p)return;let{width:n,height:r}=g.EMBEDDED_CANVAS_SIZES[t];await y.withUndoGroup(()=>p.mutate.assertFact([{entity:e.page,attribute:"canvas/fixed-width",data:{type:"number",value:n}},{entity:e.page,attribute:"canvas/fixed-height",data:{type:"number",value:r}}]))},h[9]=e.page,h[10]=p,h[11]=y,h[12]=c):c=h[12],h[13]!==N||h[14]!==c?(u=(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-3 text-primary overflow-y-auto",onClick:C,children:[s,(0,t.jsx)(f.BlockSettingOptions,{options:l,value:N,onSelect:c})]}),h[13]=N,h[14]=c,h[15]=u):u=h[15],h[16]!==o||h[17]!==u?(d=(0,t.jsx)(m.Popover,{asChild:!0,side:"bottom",align:"end",sideOffset:6,className:"p-0! w-md",onOpenAutoFocus:T,trigger:o,children:u}),h[16]=o,h[17]=u,h[18]=d):d=h[18],d}function w(e){return{value:e,Icon:n=>{let{selected:r}=n;return(0,t.jsx)(I,{size:g.EMBEDDED_CANVAS_SIZES[e],selected:r})}}}function C(e){return e.stopPropagation()}function S(e){return e.stopPropagation()}function E(e){return e.stopPropagation()}function T(e){return e.preventDefault()}let I=e=>{let r,i,a=(0,n.c)(6),o=Math.min(56/e.size.width,48/e.size.height),s=`opaque-container border-tertiary! ${e.selected?"border-accent-contrast!":""}`,l=e.size.width*o,c=e.size.height*o;return a[0]!==l||a[1]!==c?(r={width:l,height:c},a[0]=l,a[1]=c,a[2]=r):r=a[2],a[3]!==s||a[4]!==r?(i=(0,t.jsx)("div",{className:"flex items-center justify-center w-full h-[48px]",children:(0,t.jsx)("div",{className:s,style:r})}),a[3]=s,a[4]=r,a[5]=i):i=a[5],i};e.s(["ExternalLinkBlock",()=>H],897108);var D=e.i(271645),N=e.i(170685),A=e.i(468034),_=e.i(793610),P=e.i(859015),M=e.i(784192),R=e.i(366366),L=e.i(438424),j=e.i(553445),O=e.i(394191),B=e.i(864460),F=e.i(743937);let H=e=>{let o,s,l,c,u,h,p,m,f,g,y,b=(0,n.c)(37),{permissions:v}=(0,d.useEntitySetContext)(),x=(0,i.useEntity)(e.entityID,"link/preview"),k=(0,i.useEntity)(e.entityID,"link/title"),w=(0,i.useEntity)(e.entityID,"link/description"),C=(0,i.useEntity)(e.entityID,"link/url"),S=(0,a.useIsBlockSelected)(e.entityID);if(b[0]!==S||b[1]!==e.entityID||b[2]!==e.preview?(o=()=>
87{if(e.preview)return;let t=document.getElementById(j.elementId.block(e.entityID).input);S?setTimeout(()=>{let t=document.getElementById(j.elementId.block(e.entityID).input);(0,R.focusElement)(t)},20):t?.blur()},s=[S,e.entityID,e.preview],b[0]=S,b[1]=e.entityID,b[2]=e.preview,b[3]=o,b[4]=s):(o=b[3],s=b[4]),(0,D.useEffect)(o,s),void 0===C){let n,r,i;if(!v.write)return null;let a=` 88 w-full h-[104px] p-2 89 text-tertiary hover:text-accent-contrast hover:cursor-pointer 90 flex flex-auto gap-2 items-center justify-center hover:border-2 border-dashed rounded-lg 91 ${S?"border-2 border-tertiary":"border border-border"} 92 ${"canvas"===e.pageType&&"bg-bg-page"}`;return b[5]!==e.entityID||b[6]!==e.parent||b[7]!==e.type?(n=()=>{(0,O.focusBlock)({type:e.type,entityID:e.entityID,parent:e.parent},{type:"start"})},b[5]=e.entityID,b[6]=e.parent,b[7]=e.type,b[8]=n):n=b[8],b[9]!==e?(r=(0,t.jsx)(U,{...e}),b[9]=e,b[10]=r):r=b[10],b[11]!==a||b[12]!==n||b[13]!==r?(i=(0,t.jsx)("label",{className:a,onMouseDown:n,children:r}),b[11]=a,b[12]=n,b[13]=r,b[14]=i):i=b[14],i}let E=!!S,T=C?.data.value;b[15]===Symbol.for("react.memo_cache_sentinel")?(l={overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-all"},b[15]=l):l=b[15];let I=k?.data.value;b[16]!==I?(c=(0,t.jsx)("div",{className:"linkBlockTitle bg-transparent -mb-0.5 border-none font-bold outline-hidden resize-none align-top border h-[24px] line-clamp-1",style:l,children:I}),b[16]=I,b[17]=c):c=b[17];let N=w?.data.value;b[18]!==N?(u=(0,t.jsx)("div",{className:"linkBlockDescription text-sm bg-transparent border-none outline-hidden resize-none align-top grow line-clamp-2",children:N}),b[18]=N,b[19]=u):u=b[19],b[20]===Symbol.for("react.memo_cache_sentinel")?(h={wordBreak:"break-word"},b[20]=h):h=b[20];let A=`min-w-0 w-full line-clamp-1 text-xs italic group-hover/linkBlock:text-accent-contrast ${S?"text-accent-contrast":"text-tertiary"}`,_=C?.data.value;b[21]!==A||b[22]!==_?(p=(0,t.jsx)("div",{style:h,className:A,children:_}),b[21]=A,b[22]=_,b[23]=p):p=b[23],b[24]!==p||b[25]!==c||b[26]!==u?(m=(0,t.jsx)("div",{className:"pt-2 pb-2 px-3 grow min-w-0",children:(0,t.jsxs)("div",{className:"flex flex-col w-full min-w-0 h-full grow ",children:[c,u,p]})}),b[24]=p,b[25]=c,b[26]=u,b[27]=m):m=b[27];let P=`url(${x?.data.src})`;return b[28]!==P?(f=(0,t.jsx)("div",{className:"linkBlockPreview w-[120px] m-2 -mb-2 bg-cover shrink-0 rounded-t-md border border-border rotate-[4deg] origin-center",style:{backgroundImage:P,backgroundPosition:"center"}}),b[28]=P,b[29]=f):f=b[29],b[30]!==m||b[31]!==f||b[32]!==T?(g=(0,t.jsxs)("a",{href:T,target:"_blank",referrerPolicy:"no-referrer",className:"flex w-full h-full text-primary hover:no-underline no-underline",children:[m,f]}),b[30]=m,b[31]=f,b[32]=T,b[33]=g):g=b[33],b[34]!==g||b[35]!==E?(y=(0,t.jsx)(r.BlockLayout,{isSelected:E,hasBackground:"page",borderOnHover:!0,className:"externalLinkBlock flex relative group/linkBlock h-[104px] p-0!",children:g}),b[34]=g,b[35]=E,b[36]=y):y=b[36],y},U=e=>{let r,o,s,l,c,u,h,p,m,f,g,y=(0,n.c)(36),b=(0,a.useIsBlockSelected)(e.entityID),v=(0,d.useEntitySetContext)(),[x,k]=(0,D.useState)(""),{rep:w,undoManager:C}=(0,i.useReplicache)();y[0]!==v||y[1]!==x||y[2]!==e.entityID||y[3]!==e.nextPosition||y[4]!==e.parent||y[5]!==e.position||y[6]!==w||y[7]!==C?(r=async()=>{w&&await C.withUndoGroup(async()=>{let t=e.entityID;t||(t=await (0,A.addBlockBelow)(w,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:v.set,type:"card"}));let n=x;x.startsWith("http")||(n=`https://${x}`),await (0,N.addLinkBlock)(n,t,w);let r=await (0,A.addBlockBelow)(w,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:v.set,type:"text"});(0,O.focusBlock)({entityID:r,type:"text",parent:e.parent},{type:"start"})})},y[0]=v,y[1]=x,y[2]=e.entityID,y[3]=e.nextPosition,y[4]=e.parent,y[5]=e.position,y[6]=w,y[7]=C,y[8]=r):r=y[8];let S=r,E=(0,_.useSmoker)(),T=`shrink-0 ${b?"text-tertiary":"text-border"} `;y[9]!==T?(o=(0,t.jsx)(F.LinkSmall,{className:T}),y[9]=T,y[10]=o):o=y[10],y[11]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(P.Separator,{}),y[11]=s):s=y[11],y[12]!==e.entityID||y[13]!==e.preview?(l=e.preview?void 0:j.elementId.block(e.entityID).input,y[12]=e.entityID,y[13]=e.preview,y[14]=l):l=y[14],y[15]===Symbol.for("react.memo_cache_sentinel")?(c=e=>k(e.target.value),y[15]=c):c=y[15],y[16]!==x||y[17]!==E||y[18]!==S?(u=e=>
92{if("Enter"===e.key&&(e.preventDefault(),x)){if(!(0,L.isUrl)(x)){let t=e.currentTarget.getBoundingClientRect();E({alignOnMobile:"left",error:!0,text:"invalid url!",position:{x:t.left,y:t.top-8}});return}S()}},y[16]=x,y[17]=E,y[18]=S,y[19]=u):u=y[19],y[20]!==x||y[21]!==l||y[22]!==u?(h=(0,t.jsx)(M.Input,{id:l,type:"url",className:"w-full grow border-none outline-hidden bg-transparent ",placeholder:"www.example.com",value:x,onChange:c,onKeyDown:u}),y[20]=x,y[21]=l,y[22]=u,y[23]=h):h=y[23];let I=`p-1 ${b?"text-accent-contrast":"text-border"}`;return y[24]!==x||y[25]!==E||y[26]!==S?(p=e=>{(e.preventDefault(),x&&""!==x)?(0,L.isUrl)(x)?S():E({alignOnMobile:"left",error:!0,text:"invalid url!",position:{x:e.clientX,y:e.clientY}}):E({alignOnMobile:"left",error:!0,text:"no url!",position:{x:e.clientX,y:e.clientY}})},y[24]=x,y[25]=E,y[26]=S,y[27]=p):p=y[27],y[28]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(B.CheckTiny,{}),y[28]=m):m=y[28],y[29]!==I||y[30]!==p?(f=(0,t.jsx)("div",{className:"flex items-center gap-3 ",children:(0,t.jsx)("button",{autoFocus:!1,className:I,onMouseDown:p,children:m})}),y[29]=I,y[30]=p,y[31]=f):f=y[31],y[32]!==f||y[33]!==o||y[34]!==h?(g=(0,t.jsx)("div",{className:"max-w-sm flex gap-2 rounded-md text-secondary",children:(0,t.jsxs)(t.Fragment,{children:[o,s,h,f]})}),y[32]=f,y[33]=o,y[34]=h,y[35]=g):g=y[35],g}},141851,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(467592),i=e.i(596689),a=e.i(853915),o=e.i(271645),s=e.i(248787),l=e.i(265658),c=e.i(663623),u=e.i(320526);function d(e){return!e}function h(e){return e.preventDefault()}e.s(["ImageAltButton",0,function(e){let p,m,f,g,y,b,v,x,k,w,C,S=(0,n.c)(35),E=e.canEdit??!0,T=(0,r.useEntity)(e.entityID,"image/alt")?.data.value,I=!!T,D=(0,r.useEntity)(e.entityID,"image/max-width")?.data.value,[N,A]=(0,o.useState)(!1),[_,P]=(0,c.default)(),{height:M}=P,R=N?M:0,L=+!!N;S[0]===Symbol.for("react.memo_cache_sentinel")?(p={tension:450,friction:30,clamp:!0},S[0]=p):p=S[0],S[1]!==R||S[2]!==L?(m={height:R,opacity:L,config:p},S[1]=R,S[2]=L,S[3]=m):m=S[3];let j=(0,l.useSpring)(m);if(!E&&!I)return null;if(!E){let n,r=T??"";return S[4]!==e.className||S[5]!==e.onSeeMore||S[6]!==r?(n=(0,t.jsx)(u.ReadOnlyAltText,{alt:r,className:e.className,onSeeMore:e.onSeeMore}),S[4]=e.className,S[5]=e.onSeeMore,S[6]=r,S[7]=n):n=S[7],n}S[8]===Symbol.for("react.memo_cache_sentinel")?(f=e=>{let t=e.currentTarget;requestAnimationFrame(()=>{t.contains(document.activeElement)||A(!1)})},S[8]=f):f=S[8];let O=`imageAltButton absolute bottom-1.5 right-1.5 left-1.5 transition-opacity flex flex-col h-fit ${e.selected||I?"opacity-100":"opacity-0 group-hover/image:opacity-100"} ${e.className||""}`;S[9]!==E||S[10]!==I||S[11]!==D||S[12]!==e.entityID||S[13]!==e.placeholder?(g=E&&(0,t.jsx)(i.ImageAltModal,{trigger:(0,t.jsx)("div",{"aria-label":"Edit alt text",onMouseDown:h,className:"hover:cursor-pointer opaque-container border-2! border-secondary! rounded-md! h-5 text-secondary",children:I?(0,t.jsx)(a.EditTiny,{}):(0,t.jsx)("div",{className:"text-xs font-bold px-1 leading-tight w-max",children:D&&D<100?"+ ALT":"ADD ALT"})}),entityID:e.entityID,placeholder:e.placeholder,title:I?"Edit Alt Text":"Add Alt Text"}),S[9]=E,S[10]=I,S[11]=D,S[12]=e.entityID,S[13]=e.placeholder,S[14]=g):g=S[14],S[15]!==I?(y=I&&(0,t.jsx)("button",{onMouseDown:e=>{e.stopPropagation(),A(d)},children:(0,t.jsx)("div",{className:"text-xs font-bold px-1 leading-tight opaque-container border-2! border-secondary! text-secondary rounded-md! h-5",children:"ALT"})}),S[15]=I,S[16]=y):y=S[16],S[17]!==g||S[18]!==y?(b=(0,t.jsxs)("div",{className:"flex gap-1 items-center justify-end",children:[g,y]}),S[17]=g,S[18]=y,S[19]=b):b=S[19],S[20]!==j?(v={...j,overflow:"hidden"},S[20]=j,S[21]=v):v=S[21];let B=T??"";return S[22]!==e.onSeeMore||S[23]!==B?(x=(0,t.jsx)(u.AltTextBody,{alt:B,onSeeMore:e.onSeeMore}),S[22]=e.onSeeMore,S[23]=B,S[24]=x):x=S[24],S[25]!==_||S[26]!==x?(k=(0,t.jsx)("div",{className:"pt-1",ref:_,children:x}),S[25]=_,S[26]=x,S[27]=k):k=S[27],S[28]!==v||S[29]!==k?(w=(0,t.jsx)(s.animated.div,{style:v,children:k}),S[28]=v,S[29]=k,S[30]=w):w=S[30],S[31]!==w||S[32]!==O||S[33]!==b?(C=(0,t.jsxs)("div",{onBlur:f,className:O,children:[b,w]}),S[31]=w,S[32]=O,S[33]=b,S[34]=C):C=S[34],C}])},596689,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(467592),a=e.i(870370),o=e.i(857592),s=e.i(69278);function l(e){let o,l,c,u,d,h,p,m,f,g,y=(0,n.c)(27),{rep:b}=(0,i.useReplicache)(),v=(0,i.useEntity)(e.entityID,"block/image"),x=(0,i.useEntity)(e.entityID,"image/alt")?.data.value??"",[k,w]=(0,r.useState)(null),C=k??x;y[0]!==v?(o=v?a.localImages.get(v.data.src)??v.data.src:null,y[0]=v,y[1]=o):o=y[1];let S=o;y[2]!==e||y[3]!==b?.mutate||y[4]!==C?(l=async t=>{let n=void 0===t?C:t;await b?.mutate.assertFact({entity:e.entityID,attribute:"image/alt",data:{type:"string",value:n}}),e.onClose()},y[2]=e,y[3]=b?.mutate,y[4]=C,y[5]=l):l=y[5];let E=l;y[6]!==x||y[7]!==S?(c=S&&(0,t.jsx)("img",{src:S,alt:x,className:"max-w-full w-fit self-center max-h-[40vh] object-contain rounded-md"}),y[6]=x,y[7]=S,y[8]=c):c=y[8];let T=e.placeholder??"Describe this imageâ¦";return y[9]===Symbol.for("react.memo_cache_sentinel")?(u=e=>w(e.currentTarget.value),y[9]=u):u=y[9],y[10]!==E?(d=e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),E())},y[10]=E,y[11]=d):d=y[11],y[12]!==T||y[13]!==d||y[14]!==C?(h=(0,t.jsx)("textarea",{autoFocus:!0,className:"input-with-border w-full resize-none min-h-[64px] p-2",placeholder:T,value:C,onChange:u,onKeyDown:d}),y[12]=T,y[13]=d,y[14]=C,y[15]=h):h=y[15],y[16]!==E?(p=(0,t.jsx)(s.ButtonTertiary,{compact:!0,onClick:()=>E(""),children:"Remove"}),y[16]=E,y[17]=p):p=y[17],y[18]!==E?(m=(0,t.jsx)(s.ButtonPrimary,{className:"self-end",compact:!0,onClick:()=>E(),children:"Save"}),y[18]=E,y[19]=m):m=y[19],y[20]!==p||y[21]!==m?(f=(0,t.jsxs)("div",{className:"flex gap-2 justify-end",children:[p,m]}),y[20]=p,y[21]=m,y[22]=f):f=y[22],y[23]!==c||y[24]!==h||y[25]!==f?(g=(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:w-[360
92px]",children:[c,h,f]}),y[23]=c,y[24]=h,y[25]=f,y[26]=g):g=y[26],g}e.s(["ImageAltModal",0,function(e){let i,a,s,c=(0,n.c)(9),[u,d]=(0,r.useState)(!1);return c[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>d(!1),c[0]=i):i=c[0],c[1]!==e.entityID||c[2]!==e.placeholder?(a=(0,t.jsx)(l,{entityID:e.entityID,placeholder:e.placeholder,onClose:i}),c[1]=e.entityID,c[2]=e.placeholder,c[3]=a):a=c[3],c[4]!==u||c[5]!==e.title||c[6]!==e.trigger||c[7]!==a?(s=(0,t.jsx)(o.Modal,{sheetOnMobile:!0,asChild:!0,trigger:e.trigger,title:e.title,open:u,onOpenChange:d,children:a}),c[4]=u,c[5]=e.title,c[6]=e.trigger,c[7]=a,c[8]=s):s=c[8],s}])},933049,295178,e=>{"use strict";e.s(["ImageBlock",()=>S],933049);var t=e.i(843476),n=e.i(271645),r=e.i(500932),i=e.i(467592),a=e.i(173275),o=e.i(813029),s=e.i(657688),l=e.i(492122),c=e.i(870370),u=e.i(201274),d=e.i(864293),h=e.i(733600),p=e.i(840124),m=e.i(468034),f=e.i(553445),g=e.i(750590),y=e.i(141851),b=e.i(218199),v=e.i(724531),x=e.i(261355),k=e.i(680016);let w=[];for(let e of["pointerdown","keydown"])window.addEventListener(e,()=>{w=o.useUIState.getState().selectedBlocks.map(e=>e.entityID)},!0);function C(e){let t,n,i=(0,r.c)(7),{write:a}=(0,l.useEntitySetContext)().permissions,o=!e.preview&&(!a||e.isSelected);i[0]!==e.entityID||i[1]!==o||i[2]!==a?(t=()=>o&&(!a||w.includes(e.entityID)),i[0]=e.entityID,i[1]=o,i[2]=a,i[3]=t):t=i[3];let s=t;return i[4]!==o||i[5]!==s?(n={canOpenLightbox:o,clickOpensLightbox:s},i[4]=o,i[5]=s,i[6]=n):n=i[6],n}function S(e){let w,S,D,N,A,_,P,M,R,L,j,O,B,F,H,U,z,$,V=(0,r.c)(90),{rep:q,undoManager:G}=(0,i.useReplicache)(),W=(0,i.useEntity)(e.entityID,"block/image"),K=(0,l.useEntitySetContext)(),Y=(0,o.useIsBlockSelected)(e.entityID),Z=(0,i.useEntity)(e.entityID,"image/full-bleed")?.data.value,X=(0,i.useEntity)(e.entityID,"image/max-width")?.data.value,[Q,J]=(0,n.use
92State)(null),ee=null===e.previousBlock,et=null===e.nextBlock,en=(0,i.useEntity)(e.entityID,"image/alt")?.data.value,er=W?.data.src;V[0]!==er?(w=er?c.localImages.get(er):void 0,V[0]=er,V[1]=w):w=V[1];let ei=w,ea=e.preview?void 0:er;V[2]!==ea?(S=e=>!!ea&&e.uploads[ea]?.state==="failed",V[2]=ea,V[3]=S):S=V[3];let eo=(0,p.useImageUploadStatus)(S),[es,el]=(0,n.useState)(0),{decoding:ec,className:eu}=(0,d.useCanvasImage)(er),{status:ed,imgProps:eh,reset:ep}=(0,u.useImageLoadStatus)(ei??er);V[4]!==ep?(D=()=>{ep(),el(I)},V[4]=ep,V[5]=D):D=V[5];let em=D,[ef,eg]=(0,n.useState)(null),ey=!!Y;V[6]!==e.entityID||V[7]!==e.preview||V[8]!==ey?(N={entityID:e.entityID,isSelected:ey,preview:e.preview},V[6]=e.entityID,V[7]=e.preview,V[8]=ey,V[9]=N):N=V[9];let{canOpenLightbox:eb,clickOpensLightbox:ev}=C(N);V[10]!==e.entityID||V[11]!==e.parent||V[12]!==q?(A=t=>{let n=q?function(e,t){let n=(0,x.getBlockStructureMirror)(e),r=(0,k.getBlocksFromMirror)(n,t),i=[];for(let e of r)if("image"===e.type)i.push(e.entityID);else if("image-gallery"===e.type)for(let t of n.eav(e.entityID,"gallery/image").toSorted((e,t)=>e.data.position>t.data.position?1:-1))i.push(t.data.value);return i}(q,e.parent):[],r=n.indexOf(e.entityID);-1===r&&(n=[e.entityID],r=0),eg({ids:n,index:r,altExpanded:t?.altExpanded})},V[10]=e.entityID,V[11]=e.parent,V[12]=q,V[13]=A):A=V[13];let ex=A,ek=(0,i.useEntity)(e.nextBlock&&e.nextBlock.entityID,"image/full-bleed")?.data.value,ew=(0,i.useEntity)(e.previousBlock&&e.previousBlock.entityID,"image/full-bleed")?.data.value;V[14]!==Y||V[15]!==e.entityID||V[16]!==e.preview?(_=()=>{if(e.preview)return;let t=document.getElementById(f.elementId.block(e.entityID).input);Y?t?.focus():t?.blur()},P=[Y,e.preview,e.entityID],V[14]=Y,V[15]=e.entityID,V[16]=e.preview,V[17]=_,V[18]=P):(_=V[17],P=V[18]),(0,n.useEffect)(_,P),V[19]!==K||V[20]!==e.entityID||V[21]!==e.nextPosition||V[22]!==e.parent||V[23]!==e.position||V[24]!==q||V[25]!==G?(M=async t=>{q&&await G.withUndoGroup(async()=>{let n=e.entityID;n||(n=await (0,m.addBlockBelow)(q,{parent:e.parent,position:e.position,nextPosition:e.nextPosition,permission_set:K.set,type:"text"})),await q.mutate.assertFact({entity:n,attribute:"block/type",data:{type:"block-type-union",value:"image"}}),await (0,c.addImage)(t,q,{entityID:n,attribute:"block/image"})})},V[19]=K,V[20]=e.entityID,V[21]=e.nextPosition,V[22]=e.parent,V[23]=e.position,V[24]=q,V[25]=G,V[26]=M):M=V[26];let eC=M;if(!W){let e,n,r,i,o;if(!K.permissions.write)return null;let s=!!Y;V[27]!==eC?(e=async e=>{e.preventDefault(),e.stopPropagation();let t=e.dataTransfer.files;if(t&&t.length>0){let e=t[0];e.type.startsWith("image/")&&await eC(e)}},V[27]=eC,V[28]=e):e=V[28];let l=`shrink-0 group-hover/image-block:text-accent-contrast ${Y?"text-tertiary":"text-border"}`;return V[29]!==l?(n=(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(g.BlockImageSmall,{className:l}),"Upload An Image"]}),V[29]=l,V[30]=n):n=V[30],V[31]!==eC?(r=(0,t.jsx)("input",{className:"h-0 w-0 hidden",type:"file",accept:"image/*",onChange:async e=>{let t=e.currentTarget.files?.[0];t&&await eC(t)}}),V[31]=eC,V[32]=r):r=V[32],V[33]!==e||V[34]!==n||V[35]!==r?(i=(0,t.jsxs)("label",{className:` 93 w-full h-full hover:cursor-pointer 94 flex flex-col items-center justify-center 95 `,onMouseDown:T,onDragOver:E,onDrop:e,children:[n,r]}),V[33]=e,V[34]=n,V[35]=r,V[36]=i):i=V[36],V[37]!==i||V[38]!==s?(o=(0,t.jsx)(a.BlockLayout,{hasBackground:"accent",isSelected:s,borderOnHover:!0,className:" group/image-block text-tertiary hover:text-accent-contrast hover:font-bold h-[104px] border-dashed rounded-lg ",children:i}),V[37]=i,V[38]=s,V[39]=o):o=V[39],o}let eS=` 96 relative group/image border-transparent! p-0! 97 ${Z?"w-[calc(100%+28px)]! sm:w-[calc(100%+36px)]! -mx-[14px] sm:-mx-[18px] rounded-[0px]! sm:outline-offset-[-16px]! -outline-offset[-12px]!":"w-fit!"} 98 ${Z?ee?"-mt-3 sm:-mt-4":ew?"-mt-[5px]":"":""} 99 ${Z?et?"-mb-4":ek?"-mb-[9px]":"":""} 100 `,eE=Q??X;
100V[40]!==eE||V[41]!==Z?(R=eE&&!Z?{width:eE,maxWidth:"100%",height:"auto"}:void 0,V[40]=eE,V[41]=Z,V[42]=R):R=V[42];let eT=R,eI=!Z,eD=!!Y,eN=Z?"top-[-8px]! border-none!":"";V[43]!==e.entityID||V[44]!==e.preview?(L=e.preview?void 0:(0,t.jsx)(b.ImageOptions,{entityID:e.entityID,onPreviewWidth:J}),V[43]=e.entityID,V[44]=e.preview,V[45]=L):L=V[45];let eA=`relative ${Z?"w-full":"w-fit"} ${"error"===ed||eo?"min-w-40 min-h-24":""}`,e_=`block ${Z?"w-full":"w-fit"} ${eb?"cursor-zoom-in":""}`;V[46]!==ev||V[47]!==ex?(j=()=>{ev()&&ex()},V[46]=ev,V[47]=ex,V[48]=j):j=V[48],V[49]!==en||V[50]!==eu||V[51]!==ec||V[52]!==W||V[53]!==eT||V[54]!==eh||V[55]!==Z||V[56]!==ei||V[57]!==es?(O=ei||W.data.local?(0,n.createElement)("img",{...eh,key:es,loading:"lazy",decoding:ec,alt:en,src:ei??W.data.fallback,height:W?.data.height,width:W?.data.width,className:`${Z?"w-full":""} ${eu}`,style:eT}):(0,n.createElement)(s.default,{...eh,key:es,alt:en||"",src:"/"+new URL(W.data.src).pathname.split("/").slice(5).join("/"),height:W?.data.height,width:W?.data.width,className:Z?"w-full":void 0,style:eT}),V[49]=en,V[50]=eu,V[51]=ec,V[52]=W,V[53]=eT,V[54]=eh,V[55]=Z,V[56]=ei,V[57]=es,V[58]=O):O=V[58],V[59]!==e_||V[60]!==j||V[61]!==O?(B=(0,t.jsx)("button",{type:"button","data-block-body":!0,className:e_,onClick:j,children:O}),V[59]=e_,V[60]=j,V[61]=O,V[62]=B):B=V[62];let eP=Z?"rounded-none!":"rounded-lg!";return V[63]!==ed||V[64]!==em||V[65]!==eP||V[66]!==ea?(F=(0,t.jsx)(h.ImageStatusOverlay,{uploadSrc:ea,loadStatus:ed,onReload:em,className:eP}),V[63]=ed,V[64]=em,V[65]=eP,V[66]=ea,V[67]=F):F=V[67],V[68]!==eA||V[69]!==B||V[70]!==F?(H=(0,t.jsxs)("div",{className:eA,children:[B,F]}),V[68]=eA,V[69]=B,V[70]=F,V[71]=H):H=V[71],V[72]!==ef||V[73]!==e.preview?(U=!e.preview&&(0,t.jsx)(v.ImageGalleryLightbox,{count:ef?.ids.length??0,index:ef?.index??null,altExpanded:ef?.altExpanded,onIndexChange:e=>{null===e&&eg(null)},renderSlide:e=>ef?(0,t.jsx)(v.EditorLightboxSlide,{entityID:ef.ids[e]}):null}),V[72]=ef,V[73]=e.preview,V[74]=U):U=V[74],V[75]!==K||V[76]!==Y||V[77]!==ex||V[78]!==e.entityID||V[79]!==e.preview?(z=e.preview?null:(0,t.jsx)(y.ImageAltButton,{entityID:e.entityID,selected:!!Y,canEdit:K.permissions.write,onSeeMore:()=>ex({altExpanded:!0})}),V[75]=K,V[76]=Y,V[77]=ex,V[78]=e.entityID,V[79]=e.preview,V[80]=z):z=V[80],V[81]!==eS||V[82]!==eI||V[83]!==eD||V[84]!==eN||V[85]!==L||V[86]!==H||V[87]!==U||V[88]!==z?($=(0,t.jsxs)(a.BlockLayout,{hasAlignment:eI,isSelected:eD,className:eS,optionsClassName:eN,extraOptions:L,children:[H,U,z]}),V[81]=eS,V[82]=eI,V[83]=eD,V[84]=eN,V[85]=L,V[86]=H,V[87]=U,V[88]=z,V[89]=$):$=V[89],$}function E(e){e.preventDefault(),e.stopPropagation()}function T(e){return e.preventDefault()}function I(e){return e+1}e.s(["useCanOpenLightbox",0,C],295178)},464691,686358,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(262219),i=e.i(141851),a=e.i(733600),o=e.i(864293),s=e.i(271645);
100function l(e){let r,i,a,o,l,c,u=(0,n.c)(17),[d,h]=(0,s.useState)("loading"),p=(0,s.useRef)(null);if(u[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{let e=p.current;e&&(e.muted=!0,e.defaultMuted=!0,e.play().then(()=>h("playing")).catch(()=>h("failed")))},u[0]=r):r=u[0],u[1]!==e.videoSrc?(i=[e.videoSrc],u[1]=e.videoSrc,u[2]=i):i=u[2],(0,s.useEffect)(r,i),!e.videoSrc||"failed"===d){let n;return u[3]!==e.children?(n=(0,t.jsx)(t.Fragment,{children:e.children}),u[3]=e.children,u[4]=n):n=u[4],n}let m="loading"===d&&e.children,f="playing"===d?e.className:"hidden",g="playing"===d?e.style:void 0;return u[5]===Symbol.for("react.memo_cache_sentinel")?(a=()=>h("playing"),o=()=>h("failed"),u[5]=a,u[6]=o):(a=u[5],o=u[6]),u[7]!==e.alt||u[8]!==e.height||u[9]!==e.videoSrc||u[10]!==e.width||u[11]!==f||u[12]!==g?(l=(0,t.jsx)("video",{ref:p,src:e.videoSrc,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,preload:"metadata",disablePictureInPicture:!0,"aria-label":e.alt,width:e.width,height:e.height,className:f,style:g,onPlaying:a,onError:o}
100),u[7]=e.alt,u[8]=e.height,u[9]=e.videoSrc,u[10]=e.width,u[11]=f,u[12]=g,u[13]=l):l=u[13],u[14]!==m||u[15]!==l?(c=(0,t.jsxs)(t.Fragment,{children:[m,l]}),u[14]=m,u[15]=l,u[16]=c):c=u[16],c}function c(e){let r,i,a,s,c,u=(0,n.c)(27),{image:d}=e,{decoding:h,className:p}=(0,o.useCanvasImage)(d.src,d.mimeType),m=`relative group/image ${e.className??""}`;u[0]!==d.height||u[1]!==d.width||u[2]!==e.useAspectRatio?(r=e.useAspectRatio?{aspectRatio:`${d.width} / ${d.height}`}:void 0,u[0]=d.height,u[1]=d.width,u[2]=e.useAspectRatio,u[3]=r):r=u[3];let f=`${e.imgClassName??""} ${p}`;return u[4]!==h||u[5]!==d.alt||u[6]!==d.height||u[7]!==d.src||u[8]!==d.width||u[9]!==f?(i=(0,t.jsx)("img",{loading:"lazy",decoding:h,alt:d.alt,src:d.src,width:d.width,height:d.height,className:f}),u[4]=h,u[5]=d.alt,u[6]=d.height,u[7]=d.src,u[8]=d.width,u[9]=f,u[10]=i):i=u[10],u[11]!==d.alt||u[12]!==d.height||u[13]!==d.videoSrc||u[14]!==d.width||u[15]!==e.imgClassName||u[16]!==i?(a=(0,t.jsx)(l,{videoSrc:d.videoSrc,alt:d.alt,width:d.width,height:d.height,className:e.imgClassName,children:i}),u[11]=d.alt,u[12]=d.height,u[13]=d.videoSrc,u[14]=d.width,u[15]=e.imgClassName,u[16]=i,u[17]=a):a=u[17],u[18]!==e.buttonClassName||u[19]!==e.onClick||u[20]!==r||u[21]!==a?(s=(0,t.jsx)("button",{type:"button","data-block-body":!0,onClick:e.onClick,className:e.buttonClassName,style:r,children:a}),u[18]=e.buttonClassName,u[19]=e.onClick,u[20]=r,u[21]=a,u[22]=s):s=u[22],u[23]!==e.overlay||u[24]!==m||u[25]!==s?(c=(0,t.jsxs)("div",{className:m,children:[s,e.overlay]}),u[23]=e.overlay,u[24]=m,u[25]=s,u[26]=c):c=u[26],c}e.s(["AnimatedImageVideo",0,l],686358),e.s(["EditorGalleryImageItem",0,function(e){let o,s,l,u,d=(0,n.c)(18),h=(0,r.useGalleryImage)(e.entityID);return h?(d[0]!==h.factSrc?(o=(0,t.jsx)(a.ImageStatusOverlay,{uploadSrc:h.factSrc,compact:!0}),d[0]=h.factSrc,d[1]=o):o=d[1],d[2]!==e.editable||d[3]!==e.entityID||d[4]!==e.onSeeMoreAlt||d[5]!==e.selected?(s=(0,t.jsx)(i.ImageAltButton,{entityID:e.entityID,selected:e.selected,canEdit:e.editable,onSeeMore:e.onSeeMoreAlt}),d[2]=e.editable,d[3]=e.entityID,d[4]=e.onSeeMoreAlt,d[5]=e.selected,d[6]=s):s=d[6],d[7]!==o||d[8]!==s?(l=(0,t.jsxs)(t.Fragment,{children:[o,s]}),d[7]=o,d[8]=s,d[9]=l):l=d[9],d[10]!==h||d[11]!==e.buttonClassName||d[12]!==e.className||d[13]!==e.imgClassName||d[14]!==e.onClick||d[15]!==e.useAspectRatio||d[16]!==l?(u=(0,t.jsx)(c,{image:h,onClick:e.onClick,className:e.className,buttonClassName:e.buttonClassName,imgClassName:e.imgClassName,useAspectRatio:e.useAspectRatio,overlay:l}),d[10]=h,d[11]=e.buttonClassName,d[12]=e.className,d[13]=e.imgClassName,d[14]=e.onClick,d[15]=e.useAspectRatio,d[16]=l,d[17]=u):u=d[17],u):null},"GalleryImageItem",0,c],464691)},776818,59986,156478,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645);e.s(["ImageGalleryGrid",0,function(e){let i,a,o,s,l,c=(0,n.c)(11),u=(0,r.useRef)(null),[d,h]=(0,r.useState)(0);c[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{let e=u.current;if(!e)return;let t=new ResizeObserver(e=>{h(e[0].contentRect.width)});return t.observe(e),()=>t.disconnect()},a=[],c[0]=i,c[1]=a):(i=c[0],a=c[1]),(0,r.useEffect)(i,a);let p=d>0?Math.max(1,Math.min(Math.ceil((d-1+e.gap)/(e.maxWidth+e.gap)),e.count)):Math.min(e.count,3),m=d>0?p*e.maxWidth+(p-1)*e.gap:void 0,f=m?`${m}px`:void 0,g=`repeat(${p}, minmax(0, 1fr))`,y=`${e.gap}
100px`;return c[2]!==f||c[3]!==g||c[4]!==y?(o={width:"100%",maxWidth:f,gridTemplateColumns:g,gap:y},c[2]=f,c[3]=g,c[4]=y,c[5]=o):o=c[5],c[6]!==e?(s=Array.from({length:e.count}).map((n,r)=>(0,t.jsx)("div",{className:"contents",children:e.renderItem(r,{className:"w-full",buttonClassName:"relative w-full overflow-hidden flex place-items-center",imgClassName:"absolute inset-0 max-w-full max-h-full object-cover m-auto",useAspectRatio:!0})},r)),c[6]=e,c[7]=s):s=c[7],c[8]!==o||c[9]!==s?(l=(0,t.jsx)("div",{ref:u,className:"w-full",children:(0,t.jsx)("div",{className:"grid mx-auto place-items-center",style:o,children:s})}),c[8]=o,c[9]=s,c[10]=l):l=c[10],l}],776818),e.s(["ImageGalleryStrip",0,function(e){let r,i,a,o=(0,n.c)(7),s=`${e.gap}px`;return o[0]!==s?(r={gap:s},o[0]=s,o[1]=r):r=o[1],o[2]!==e?(i=Array.from({length:e.count}).map((n,r)=>(0,t.jsx)("div",{className:"contents",children:e.renderItem(r,{className:"w-full",buttonClassName:"block w-full",imgClassName:"w-full h-auto"})},r)),o[2]=e,o[3]=i):i=o[3],o[4]!==r||o[5]!==i?(a=(0,t.jsx)("div",{className:"flex flex-col w-full",style:r,children:i}),o[4]=r,o[5]=i,o[6]=a):a=o[6],a}],59986);var i=e.i(541019);function a(e){let r,a,s,l=(0,n.c)(9),c="left"===e.direction?"Previous image":"Next image";l[0]!==e?(r=t=>{t.stopPropagation(),e.onClick()},l[0]=e,l[1]=r):r=l[1];let u=`imageGalleryCarouselArrow light-container hover:text-accent-contrast hover:border-accent-contrast rounded-full! p-1 ${e.className??""}`,d="left"===e.direction?"rotate-180":"";return l[2]!==d?(a=(0,t.jsx)(i.GoToArrowLined,{className:d}),l[2]=d,l[3]=a):a=l[3],l[4]!==c||l[5]!==r||l[6]!==u||l[7]!==a?(s=(0,t.jsx)("button",{type:"button","aria-label":c,onClick:r,onMouseDown:o,className:u,children:a}),l[4]=c,l[5]=r,l[6]=u,l[7]=a,l[8]=s):s=l[8],s}function o(e){return e.preventDefault()}e.s(["ImageGalleryCarousel",0,function(e){let i,o,s,l,c,u,d,h,p,m=(0,n.c)(24),f=(0,r.useRef)(null),[g,y]=(0,r.useState)(0),b=e.count;m[0]!==b?(i=()=>{let e=f.current;e&&0!==e.clientWidth&&y(Math.max(0,Math.min(b-1,Math.round(e.scrollLeft/e.clientWidth))))},m[0]=b,m[1]=i):i=m[1];let v=i;m[2]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{let t=f.current;t&&t.scrollTo({left:e*t.clientWidth,behavior:"smooth"})},m[2]=o):o=m[2];let x=o;m[3]!==b||m[4]!==e?(s=Array.from({length:b}).map((n,r)=>(0,t.jsx)("div",{className:"snap-center snap-always flex items-center justify-center",children:e.renderItem(r,{buttonClassName:"block",imgClassName:"w-full max-h-[70vh] object-contain"})},r)),m[3]=b,m[4]=e,m[5]=s):s=m[5],m[6]!==v||m[7]!==s?(l=(0,t.jsx)("div",{ref:f,onScroll:v,className:"imageGalleryCarousel grid grid-flow-col auto-cols-[100%] overflow-x-auto snap-x snap-mandatory no-scrollbar",children:s}),m[6]=v,m[7]=s,m[8]=l):l=m[8],m[9]!==g?(c=0!==g&&(0,t.jsx)(a,{direction:"left",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:()=>x(g-1)}),m[9]=g,m[10]=c):c=m[10],m[11]!==b||m[12]!==g?(u=g<b-1&&(0,t.jsx)(a,{direction:"right",className:"absolute right-2 top-1/2 -translate-y-1/2",onClick:()=>x(g+1)}),m[11]=b,m[12]=g,m[13]=u):u=m[13],m[14]!==l||m[15]!==c||m[16]!==u?(d=(0,t.jsxs)("div",{className:"relative w-full",children:[l,c,u]}),m[14]=l,m[15]=c,m[16]=u,m[17]=d):d=m[17];let k=g+1;return m[18]!==b||m[19]!==k?(h=(0,t.jsxs)("div",{className:"imageGalleryCarouselControls px-2 py-0.5 text-tertiary text-sm text-center mx-auto pt-2",children:[k," / ",b]}),m[18]=b,m[19]=k,m[20]=h):h=m[20],m[21]!==d||m[22]!==h?(p=(0,t.jsxs)("div",{className:"relative w-full",children:[d,h]}),m[21]=d,m[22]=h,m[23]=p):p=m[23],p}],156478)},724531,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(326999),a=e.i(133564),o=e.i(262219),s=e.i(541019);let l=(0,r.createContext)(!1);function c(e){let i,a,o,c,u,d,h,p,m,f,g=(0,n.c)(23),y=(0,r.useRef)(null),[b,v]=(0,r.useState)(e.initialIndex),x=e.count;g[0]!==e.initialIndex?(i=()=>{let t=y.current;t&&(t.scrollLeft=e.initialIndex*t.clientWidth)},a=[e.initialIndex],g[0]=e.initialIndex,g[1]=i,g[2]=a):(i=g[1],a=g[2]),(0,r.useEffect)(i,a),g[3]!==x?(o=()=>{let e=y.current;e&&0!==e.clientWidth&&v(Math.max(0,Math.min(x-1,Math.round(e.scrollLeft/e.clientWidth))))},g[3]=x,g[4]=o):o=g[4];let k=o;g[5]===Symbol.for("react.memo_cache_sentinel")?(c=e=>{let t=y.current;t&&t.scrollTo({left:e*t.clientWidth,behavior:"smooth"})},g[5]=c):c=g[5];let w=c;g[6]!==x||g[7]!==b?(u=()=>{let e=e=>{"ArrowRight"===e.key?w(Math.min(x-1,b+1)):"ArrowLeft"===e.key&&w(Math.max(0,b-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},d=[b,x],g[6]=x,g[7]=b,g[8]=u,g[9]=d):(u=g[8],d=g[9]),(0,r.useEffect)(u,d);let C=e.onClose;return g[10]!==x||g[11]!==e?(h=Array.from({length:x}).map((n,r)=>(0,t.jsx)("div",{className:"h-full snap-center snap-always flex flex-col items-center justify-center gap-3",children:(0,t.jsx)(l.Provider,{value:e.altExpanded&&r===e.initialIndex,children:e.renderSlide(r)})},r)),g[10]=x,g[11]=e,g[12]=h):h=g[12],g[13]!==k||g[14]!==e.onClose||g[15]!==h?(p=(0,t.jsx)("div",{ref:y,onScroll:k,onClick:C,className:"w-full h-full grid grid-rows-1 grid-flow-col auto-cols-[100%] overflow-x-auto snap-x snap-mandatory no-scrollbar",children:h}),g[13]=k,g[14]=e.onClose,g[15]=h,g[16]=p):p=g[16],g[17]!==x||g[18]!==b?(m=x>1&&(0,t.jsxs)("div",{className:"flex items-center gap-4 mx-auto text-border-light text-sm",children:[b>0?(0,t.jsx)("button",{type:"button","aria-label":"Previous image",className:"flex place-items-center justify-center w-6 h-6 rounded-full hover:bg-accent-1 text-border-light hover:text-accent-2 ",onClick:e=>{e.stopPropagation(),w(b-1)},children:(0,t.jsx)(s.GoToArrowLined,{className:"rotate-180"})}):(0,t.jsx)("div",{className:"w-6 h-6"}),b+1," / ",x,b<x-1?(0,t.jsx)("button",{type:"button","aria-label":"Next image",className:"flex place-items-center justify-center w-6 h-6 rounded-full hover:bg-accent-1 text-border-light hover:text-accent-2 ",onClick:e=>{e.stopPropagation(),w(b+1)},children:(0,t.jsx)(s.GoToArrowLined,{className:"shrink-0 grow-0"})}):(0,t.jsx)("div",{className:"w-6 h-6"})]}),g[17]=x,g[18]=b,g[19]=m):m=g[19],g[20]!==p||g[21]!==m?(f=(0,t.jsxs)("div",{className:"flex flex-col gap-8 pt-12 pb-12 h-full",children:[p,m]}),g[20]=p,g[21]=m,g[22]=f):f=g[22],f}function u(e){let r,i,a,o,s=(0,n.c)(9),{image:l}=e,c=l.fullSrc??l.src;return s[0]!==l.alt||s[1]!==c?(r=(0,t.jsx)("img",{alt:l.alt,src:c,className:" min-h-0 max-w-full object-contain",onClick:d}),s[0]=l.alt,s[1]=c,s[2]=r):r=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{}),s[3]=i):i=s[3],s[4]!==l.alt?(a=l.alt&&(0,t.jsx)(h,{alt:l.alt}),s[4]=l.alt,s[5]=a):a=s[5],s[6]!==r||s[7]!==a?(o=(0,t.jsxs)("div",{className:"flex-1 h-full w-full flex flex-col gap-3 min-h-0 justify-center items-center px-4 sm:px-8",children:[r,i,a]}),s[6]=r,s[7]=a,s[8]=o):o=s[8],o}function d(e){return e.stopPropagation()}function h(e){let i,a,o,s,c,u,d,h=(0,n.c)(20),[f,g]=(0,r.useState)((0,r.useContext)(l)),[y,b]=(0,r.useState)(!1),v=(0,r.useRef)(null);h[0]!==f?(i=()=>
100{if(f)return;let e=v.current;if(!e)return;let t=()=>b(e.scrollHeight>e.clientHeight+1);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},h[0]=f,h[1]=i):i=h[1],h[2]!==f||h[3]!==e.alt?(a=[e.alt,f],h[2]=f,h[3]=e.alt,h[4]=a):a=h[4],(0,r.useEffect)(i,a);let x=`whitespace-pre-wrap text-bg-page text-sm line-clamp-3 text-center ${f?"invisible":""}`;return h[5]!==e.alt||h[6]!==x?(o=(0,t.jsx)("div",{ref:v,className:x,children:e.alt}),h[5]=e.alt,h[6]=x,h[7]=o):o=h[7],h[8]!==f||h[9]!==e.alt?(s=f&&(0,t.jsx)("div",{className:"absolute bottom-0 inset-x-0 max-h-[60svh] overflow-y-auto opaque-container whitespace-pre-wrap text-secondary text-sm px-2 py-1.5 text-left ",children:e.alt}),h[8]=f,h[9]=e.alt,h[10]=s):s=h[10],h[11]!==o||h[12]!==s?(c=(0,t.jsxs)("div",{className:"relative w-full",children:[o,s]}),h[11]=o,h[12]=s,h[13]=c):c=h[13],h[14]!==y||h[15]!==f?(u=(y||f)&&(0,t.jsx)("button",{type:"button",className:"text-accent-contrast text-sm",onClick:()=>g(p),children:f?"See less":"See more"}),h[14]=y,h[15]=f,h[16]=u):u=h[16],h[17]!==c||h[18]!==u?(d=(0,t.jsxs)("div",{onClick:m,className:"shrink-0 w-full max-w-prose flex flex-col items-center gap-1",children:[c,u]}),h[17]=c,h[18]=u,h[19]=d):d=h[19],d}function p(e){return!e}function m(e){return e.stopPropagation()}e.s(["EditorLightboxSlide",0,function(e){let r,i=(0,n.c)(2),a=(0,o.useGalleryImage)(e.entityID);return a?(i[0]!==a?(r=(0,t.jsx)(u,{image:a}),i[0]=a,i[1]=r):r=i[1],r):null},"ImageGalleryLightbox",0,function(e){let r,o,s,l,u,d,h,p=(0,n.c)(14),m=null!==e.index;return p[0]!==e?(r=t=>{t||e.onIndexChange(null)},p[0]=e,p[1]=r):r=p[1],p[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(i.Overlay,{className:"fixed z-50 inset-0 bg-primary/80 backdrop-blur-sm data-[state=open]:animate-overlayShow"}),p[2]=o):o=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(i.Title,{className:"sr-only",children:"Image"}),p[3]=s):s=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(i.Close,{className:"fixed top-4 right-4 z-10 bg-bg-page rounded-full p-1 border border-border-light text-tertiary","aria-label":"Close",children:(0,t.jsx)(a.CloseTiny,{})}),p[4]=l):l=p[4],p[5]!==m||p[6]!==e?(u=m&&(0,t.jsx)(c,{count:e.count,initialIndex:e.index??0,altExpanded:!!e.altExpanded,renderSlide:e.renderSlide,onClose:()=>e.onIndexChange(null)}),p[5]=m,p[6]=e,p[7]=u):u=p[7],p[8]!==u?(d=(0,t.jsxs)(i.Portal,{children:[o,(0,t.jsxs)(i.Content,{"aria-describedby":void 0,className:"portalStyles z-50 fixed inset-0 outline-none",children:[s,l,u]})]}),p[8]=u,p[9]=d):d=p[9],p[10]!==m||p[11]!==r||p[12]!==d?(h=(0,t.jsx)(i.Root,{open:m,onOpenChange:r,children:d}),p[10]=m,p[11]=r,p[12]=d,p[13]=h):h=p[13],h},"LightboxSlide",0,u])},105445,76590,786350,e=>{"use strict";e.s(["ImageGalleryBlock",()=>eh],105445);var t=e.i(843476),n=e.i(500932),r=e.i(467592),i=e.i(173275),a=e.i(813029),o=e.i(492122),s=e.i(870370),l=e.i(271645),c=e.i(110383),u=e.i(750590),d=e.i(262219),h=e.i(776818),p=e.i(59986),m=e.i(156478),f=e.i(724531),g=e.i(464691),y=e.i(876082),b=e.i(478802),v=e.i(44729),x=e.i(477183),k=e.i(807311);function w(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function C(e){return null!==e&&e>=0}let S={scaleX:1,scaleY:1},E=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=w(t,r,n),o=t[i],s=a[i];return s&&o?{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}:null},T={scaleX:1,scaleY:1},I=e=>{var t,n,r,i;let a,o,s,{activeIndex:l,activeNodeRect:c,index:u,rects:d,overIndex:h}=e,p=null!=(t=d[l])?t:c;if(!p)return null;if(u===l){let e=d[h];return e?{x:0,y:l<h?e.top+e.height-(p.top+p.height):e.top-p.top,...T}:null}let m=(n=d,r=u,i=l,a=n[r],o=n[r-1],s=n[r+1],a?i<r?o?a.top-(o.top+o.height):s?s.top-(a.top+a.height):0:s?s.top-(a.top+a.height):o?a.top-(o.top+o.height):0:0);return u>l&&u<=h?{x:0,y:-p.height-m,...T}:u<l&&u>=h?{x:0,y:p.height+m,...T}:{x:0,y:0,...T}},D="Sortable",N=l.default.createContext({activeIndex:-1,containerId:D,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:E,disabled:{draggable:!1,droppable:!1}});function A(e){let{children:t,id:n,items:r,strategy:i=E,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:d}=(0,x.useDndContext)(),h=(0,k.useUniqueId)(D,n),p=null!==s.rect,m=(0,l.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),f=null!=o,g=o?m.indexOf(o.id):-1,y=u?m.indexOf(u.id):-1,b=(0,l.useRef)(m),v=!function(e,t){if(e===t)return!0;
100if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(m,b.current),w=-1!==y&&-1===g||v,C="boolean"==typeof a?{draggable:a,droppable:a}:a;(0,k.useIsomorphicLayoutEffect)(()=>{v&&f&&d(m)},[v,m,f,d]),(0,l.useEffect)(()=>{b.current=m},[m]);let S=(0,l.useMemo)(()=>({activeIndex:g,containerId:h,disabled:C,disableTransforms:w,items:m,overIndex:y,useDragOverlay:p,sortedRects:m.reduce((e,t,n)=>{let r=c.get(t);return r&&(e[n]=r),e},Array(m.length)),strategy:i}),[g,h,C.draggable,C.droppable,w,m,y,c,p,i]);return l.default.createElement(N.Provider,{value:S},t)}let _=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return w(n,r,i).indexOf(t)},P=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:l,transition:c}=e;return!!c&&!!r&&(s===a||i!==o)&&(!!n||o!==i&&t===l)},M={duration:200,easing:"ease"},R="transform",L=k.CSS.Transition.toString({property:R,duration:0,easing:"linear"}),j={roleDescription:"sortable"};function O(e){var t,n,r,i;let{animateLayoutChanges:a=P,attributes:o,disabled:s,data:c,getNewIndex:u=_,id:d,strategy:h,resizeObserverConfig:p,transition:m=M}=e,{items:f,containerId:g,activeIndex:y,disabled:b,disableTransforms:v,sortedRects:w,overIndex:S,useDragOverlay:E,strategy:T}=(0,l.useContext)(N),I=(t=s,n=b,"boolean"==typeof t?{draggable:t,droppable:!1}:{draggable:null!=(r=null==t?void 0:t.draggable)?r:n.draggable,droppable:null!=(i=null==t?void 0:t.droppable)?i:n.droppable}),D=f.indexOf(d),A=(0,l.useMemo)(()=>({sortable:{containerId:g,index:D,items:f},...c}),[g,c,D,f]),O=(0,l.useMemo)(()=>f.slice(f.indexOf(d)),[f,d]),{rect:B,node:F,isOver:H,setNodeRef:U}=(0,x.useDroppable)({id:d,data:A,disabled:I.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...p}}),{active:z,activatorEvent:$,activeNodeRect:V,attributes:q,setNodeRef:G,listeners:W,isDragging:K,over:Y,setActivatorNodeRef:Z,transform:X}=(0,x.useDraggable)({id:d,data:A,attributes:{...j,...o},disabled:I.draggable}),Q=(0,k.useCombinedRefs)(U,G),J=!!z,ee=J&&!v&&C(y)&&C(S),et=!E&&K,en=et&&ee?X:null,er=ee?null!=en?en:(null!=h?h:T)({rects:w,activeNodeRect:V,activeIndex:y,overIndex:S,index:D}):null,ei=C(y)&&C(S)?u({id:d,items:f,activeIndex:y,overIndex:S}):D,ea=null==z?void 0:z.id,eo=(0,l.useRef)({activeId:ea,items:f,newIndex:ei,containerId:g}),es=f!==eo.current.items,el=a({active:z,containerId:g,isDragging:K,isSorting:J,id:d,index:D,items:f,newIndex:eo.current.newIndex,previousItems:eo.current.items,previousContainerId:eo.current.containerId,transition:m,wasDragging:null!=eo.current.activeId}),ec=function(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,l.useState)(null),s=(0,l.useRef)(n);return(0,k.useIsomorphicLayoutEffect)(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=(0,x.getClientRect)(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,l.useEffect)(()=>{a&&o(null)},[a]),a}({disabled:!el,index:D,node:F,rect:B});return(0,l.useEffect)(()=>{J&&eo.current.newIndex!==ei&&(eo.current.newIndex=ei),g!==eo.current.containerId&&(eo.current.containerId=g),f!==eo.current.items&&(eo.current.items=f)},[J,ei,g,f]),(0,l.useEffect)(()=>{if(ea===eo.current.activeId)return;if(null!=ea&&null==eo.current.activeId){eo.current.activeId=ea;return}let e=setTimeout(()=>{eo.current.activeId=ea},50);return()=>clearTimeout(e)},[ea]),{active:z,activeIndex:y,attributes:q,data:A,rect:B,index:D,newIndex:ei,items:f,isOver:H,isSorting:J,isDragging:K,listeners:W,node:F,overIndex:S,over:Y,setNodeRef:Q,setActivatorNodeRef:Z,setDroppableNodeRef:U,setDraggableNodeRef:G,transform:null!=ec?ec:er,transition:ec||es&&eo.current.newIndex===D?L:(!et||(0,k.isKeyboardEvent)($))&&m&&(J||el)?k.CSS.Transition.toString({...m,property:R}):void 0}}function B(e){if(!e)return!1;let t=e.data.current;return!!t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable}let F=[x.KeyboardCode.Down,x.KeyboardCode.Right,x.KeyboardCode.Up,x.KeyboardCode.Left],H=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(F.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];
100a.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case x.KeyboardCode.Down:r.top<a.top&&t.push(n);break;case x.KeyboardCode.Up:r.top>a.top&&t.push(n);break;case x.KeyboardCode.Left:r.left>a.left&&t.push(n);break;case x.KeyboardCode.Right:r.left<a.left&&t.push(n)}});let u=(0,x.closestCorners)({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),d=(0,x.getFirstCollision)(u,"id");if(d===(null==o?void 0:o.id)&&u.length>1&&(d=u[1].id),null!=d){let e=a.get(n.id),t=a.get(d),o=t?i.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&o&&e&&t){var l,c;let n=(0,x.getScrollableAncestors)(u).some((e,t)=>s[t]!==e),i=U(e,t),a=(l=e,c=t,!!B(l)&&!!B(c)&&!!U(l,c)&&l.data.current.sortable.index<c.data.current.sortable.index),d=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},h={x:o.left,y:o.top};return d.x&&d.y?h:(0,k.subtract)(h,d)}}}};function U(e,t){return!!B(e)&&!!B(t)&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}e.s(["SortableContext",0,A,"arrayMove",0,w,"horizontalListSortingStrategy",0,e=>{var t,n,r,i;let a,o,s,{rects:l,activeNodeRect:c,activeIndex:u,overIndex:d,index:h}=e,p=null!=(t=l[u])?t:c;if(!p)return null;let m=(n=l,r=h,i=u,a=n[r],o=n[r-1],s=n[r+1],a&&(o||s)?i<r?o?a.left-(o.left+o.width):s.left-(a.left+a.width):s?s.left-(a.left+a.width):a.left-(o.left+o.width):0);if(h===u){let e=l[d];return e?{x:u<d?e.left+e.width-(p.left+p.width):e.left-p.left,y:0,...S}:null}return h>u&&h<=d?{x:-p.width-m,y:0,...S}:h<u&&h>=d?{x:p.width+m,y:0,...S}:{x:0,y:0,...S}},"sortableKeyboardCoordinates",0,H,"useSortable",0,O,"verticalListSortingStrategy",0,I],76590);let z=e=>{let t,{containerNodeRect:n,draggingNodeRect:r,transform:i}=e;return r&&n?(t={...i},r.top+i.y<=n.top?t.y=n.top-r.top:r.bottom+i.y>=n.top+n.height&&(t.y=n.top+n.height-r.bottom),r.left+i.x<=n.left?t.x=n.left-r.left:r.right+i.x>=n.left+n.width&&(t.x=n.left+n.width-r.right),t):i},$=e=>{let{transform:t}=e;return{...t,x:0}};e.s(["restrictToHorizontalAxis",0,e=>{let{transform:t}=e;return{...t,y:0}},"restrictToParentElement",0,z,"restrictToVerticalAxis",0,$],786350);var V=e.i(857592),q=e.i(784192),G=e.i(206057),W=e.i(617303),K=e.i(276452);let Y=e=>{let r,i,a,o,s,l=(0,n.c)(6);return l[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("rect",{x:"3",y:"4",width:"8",height:"7",rx:"1",fill:"currentColor"}),i=(0,t.jsx)("rect",{x:"13",y:"4",width:"8",height:"7",rx:"1",fill:"currentColor"}),a=(0,t.jsx)("rect",{x:"3",y:"13",width:"8",height:"7",rx:"1",fill:"currentColor"}),o=(0,t.jsx)("rect",{x:"13",y:"13",width:"8",height:"7",rx:"1",fill:"currentColor"}),l[0]=r,l[1]=i,l[2]=a,l[3]=o):(r=l[0],i=l[1],a=l[2],o=l[3]),l[4]!==e?(s=(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r,i,a,o]}),l[4]=e,l[5]=s):s=l[5],s},Z=e=>{let r,i,a,o,s=(0,n.c)(5);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("rect",{x:"2",y:"7",width:"3",height:"10",rx:".75",fill:"currentColor"}),i=(0,t.jsx)("rect",{x:"7",y:"4",width:"10",height:"16",rx:"1",fill:"currentColor"}),a=(0,t.jsx)("rect",{x:"19",y:"7",width:"3",height:"10",rx:".75",fill:"currentColor"}),s[0]=r,s[1]=i,s[2]=a):(r=s[0],i=s[1],a=s[2]),s[3]!==e?(o=(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r,i,a]}),s[3]=e,s[4]=o):o=s[4],o},X=e=>{let r,i,a,o,s=(0,n.c)(5);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("rect",{x:"3",y:"3",width:"18",height:"3",rx:"1",fill:"currentColor"}),i=(0,t.jsx)("rect",{x:"3",y:"8",width:"18",height:"8",rx:"1",fill:"currentColor"}),a=(0,t.jsx)("rect",{x:"3",y:"18",width:"18",height:"3",rx:"1",fill:"currentColor"}),s[0]=r,s[1]=i,s[2]=a):(r=s[0],i=s[1],a=s[2]),s[3]!==e?(o=(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r,i,a]}),s[3]=e,s[4]=o):o=s[4],o};var Q=e.i(69278);function J(e){let i,a,o,s,l,c,u,d,h,p,m=(0,n.c)(26),{rep:f}=(0,r.useReplicache)();m[0]!==e.entityID||m[1]!==f?.mutate?(i=t=>f?.mutate.assertFact({entity:e.entityID,attribute:"gallery/format",data:{type:"gallery-format-union",value:t}}),m[0]=e.entityID,m[1]=f?.mutate,m[2]=i):i=m[2];let g=i;return m[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("h4",{children:"Gallery Format"}),m[3]=a):a=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(o=[{value:"grid",Icon:Y},{value:"carousel",Icon:Z},{value:"strip",Icon:X}],m[4]=o):o=m[4],m[5]!==e.format||m[6]!==g?(s=(0,t.jsx)("div",{className:"flex gap-2 w-full",children:o.map(n=>{let{value:r,Icon:i}=n,a=e.format===r;return(0,t.jsx)("button",{type:"button","aria-label":r,"aria-pressed":a,onMouseDown:et,onClick:()=>g(r),className:`flex-1 flex items-center justify-center py-1.5 px-2 border rounded-md outline-2 ${a?"bg-[var(--accent-light)] border-accent-contrast text-accent-contrast outline-accent-contrast outline-offset-1":"opaque-container border-transparent text-tertiary outline-transparent"}`,children:(0,t.jsx)(i,{})},r)})}),m[5]=e.format,m[6]=g,m[7]=s):s=m[7],m[8]!==e.entityID||m[9]!==e.format||m[10]!==e.gap?(l="strip"===e.format||"grid"===e.format?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"border-border-light "}
100),(0,t.jsx)(en,{entityID:e.entityID,gap:e.gap})]}):null,m[8]=e.entityID,m[9]=e.format,m[10]=e.gap,m[11]=l):l=m[11],m[12]!==e.entityID||m[13]!==e.format||m[14]!==e.maxWidth?(c="grid"===e.format&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"border-border-light "}),(0,t.jsx)(ei,{entityID:e.entityID,maxWidth:e.maxWidth})]}),m[12]=e.entityID,m[13]=e.format,m[14]=e.maxWidth,m[15]=c):c=m[15],m[16]!==s||m[17]!==l||m[18]!==c?(u=(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[a,s,l,c]}),m[16]=s,m[17]=l,m[18]=c,m[19]=u):u=m[19],m[20]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)("hr",{className:"border-border-light my-1"}),m[20]=d):d=m[20],m[21]!==e.onEditImages?(h=(0,t.jsx)(Q.ButtonPrimary,{fullWidth:!0,type:"button",className:"",onMouseDown:ee,onClick:e.onEditImages,children:"Edit Images"}),m[21]=e.onEditImages,m[22]=h):h=m[22],m[23]!==u||m[24]!==h?(p=(0,t.jsxs)(G.BlockSettings,{label:"Image Gallery",className:"w-full sm:w-md",children:[u,d,h]}),m[23]=u,m[24]=h,m[25]=p):p=m[25],p}function ee(e){return e.preventDefault()}function et(e){return e.preventDefault()}function en(e){let i,a,o,s,c,u,d,h,p,m,f,g,y,b,x,k,w,C=(0,n.c)(35),{rep:S}=(0,r.useReplicache)(),[E,T]=(0,l.useState)(e.gap);C[0]!==e.gap?(i=()=>T(e.gap),a=[e.gap],C[0]=e.gap,C[1]=i,C[2]=a):(i=C[1],a=C[2]),(0,l.useEffect)(i,a),C[3]!==E||C[4]!==e.gap?(o=Number.isNaN(E)?e.gap:Math.max(0,Math.min(64,E)),C[3]=E,C[4]=e.gap,C[5]=o):o=C[5];let I=o;C[6]!==e.entityID||C[7]!==e.gap||C[8]!==S?.mutate?(s=t=>{let n=Math.max(0,Number.isNaN(t)?e.gap:t);T(n),S?.mutate.assertFact({entity:e.entityID,attribute:"gallery/gap",data:{type:"number",value:n}})},C[6]=e.entityID,C[7]=e.gap,C[8]=S?.mutate,C[9]=s):s=C[9];let D=s;return C[10]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("span",{className:"font-bold",children:"Gap"}),C[10]=c):c=C[10],C[11]!==E?(u=Number.isNaN(E)?"":String(E),C[11]=E,C[12]=u):u=C[12],C[13]===Symbol.for("react.memo_cache_sentinel")?(d=e=>T(parseInt(e.currentTarget.value)),C[13]=d):d=C[13],C[14]!==D||C[15]!==E?(h=()=>D(E),p=e=>{"Enter"===e.key&&(e.preventDefault(),D(E))},C[14]=D,C[15]=E,C[16]=h,C[17]=p):(h=C[16],p=C[17]),C[18]!==u||C[19]!==h||C[20]!==p?(m=(0,t.jsxs)("label",{className:"flex items-center justify-between gap-2",children:[c,(0,t.jsx)(q.Input,{type:"number",min:0,className:"w-20 input-with-border",value:u,onMouseDown:er,onChange:d,onBlur:h,onKeyDown:p})]}),C[18]=u,C[19]=h,C[20]=p,C[21]=m):m=C[21],C[22]!==I?(f=[I],C[22]=I,C[23]=f):f=C[23],C[24]===Symbol.for("react.memo_cache_sentinel")?(g=e=>T(e[0]),C[24]=g):g=C[24],C[25]!==D?(y=e=>D(e[0]),C[25]=D,C[26]=y):y=C[26],C[27]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(v.Track,{className:"bg-border-light relative grow rounded-full h-[3px] my-2",children:(0,t.jsx)(v.Range,{className:"absolute bg-accent-contrast rounded-full h-full"})}),x=(0,t.jsx)(v.Thumb,{className:"block w-4 h-4 rounded-full border-2 border-bg-page bg-accent-contrast cursor-pointer","aria-label":"Gap"}),C[27]=b,C[28]=x):(b=C[27],x=C[28]),C[29]!==f||C[30]!==y?(k=(0,t.jsxs)(v.Root,{className:"relative flex items-center select-none touch-none w-full h-fit px-1",value:f,min:0,max:64,step:1,onValueChange:g,onValueCommit:y,children:[b,x]}),C[29]=f,C[30]=y,C[31]=k):k=C[31],C[32]!==k||C[33]!==m?(w=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[m,k]}),C[32]=k,C[33]=m,C[34]=w):w=C[34],w}function er(e){return e.stopPropagation()}function ei(e){let i,a,o,s,c,u,d,h,p,m,f,g,b,x,k,w,C,S=(0,n.c)(39),{rep:E,rootEntity:T}=(0,r.useReplicache)(),{data:I,normalizedPublication:D}=(0,y.useLeafletPublicationData)(),N=(0,r.useEntity)(T,"theme/page-width")?.data.value,A=(I?.publications?D?.theme?.pageWidth:N)||624,[_,P]=(0,l.useState)(e.maxWidth);S[0]!==e.maxWidth?(i=()=>P(e.maxWidth),a=[e.maxWidth],S[0]=e.maxWidth,S[1]=i,S[2]=a):(i=S[1],a=S[2]),(0,l.useEffect)(i,a),S[3]!==A||S[4]!==_||S[5]!==e.maxWidth?(o=Number.isNaN(_)?e.maxWidth:Math.max(100,Math.min(A,_)),S[3]=A,S[4]=_,S[5]=e.maxWidth,S[6]=o):o=S[6];let M=o;S[7]!==A||S[8]!==e.entityID||S[9]!==e.maxWidth||S[10]!==E?.mutate?(s=t=>{let n=Math.max(100,Math.min(A,Number.isNaN(t)?e.maxWidth:t));P(n),E?.mutate.assertFact({entity:e.entityID,attribute:"gallery/max-width",data:{type:"number",value:n}})}
100,S[7]=A,S[8]=e.entityID,S[9]=e.maxWidth,S[10]=E?.mutate,S[11]=s):s=S[11];let R=s;return S[12]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("span",{className:"font-bold ",children:"Max Width"}),S[12]=c):c=S[12],S[13]!==_?(u=Number.isNaN(_)?"":String(_),S[13]=_,S[14]=u):u=S[14],S[15]===Symbol.for("react.memo_cache_sentinel")?(d=e=>P(parseInt(e.currentTarget.value)),S[15]=d):d=S[15],S[16]!==R||S[17]!==_?(h=()=>R(_),p=e=>{"Enter"===e.key&&(e.preventDefault(),R(_))},S[16]=R,S[17]=_,S[18]=h,S[19]=p):(h=S[18],p=S[19]),S[20]!==A||S[21]!==u||S[22]!==h||S[23]!==p?(m=(0,t.jsxs)("label",{className:"flex items-center justify-between gap-2",children:[c,(0,t.jsx)(q.Input,{type:"number",min:100,max:A,className:"w-20 input-with-border",value:u,onMouseDown:ea,onChange:d,onBlur:h,onKeyDown:p})]}),S[20]=A,S[21]=u,S[22]=h,S[23]=p,S[24]=m):m=S[24],S[25]!==M?(f=[M],S[25]=M,S[26]=f):f=S[26],S[27]===Symbol.for("react.memo_cache_sentinel")?(g=e=>P(e[0]),S[27]=g):g=S[27],S[28]!==R?(b=e=>R(e[0]),S[28]=R,S[29]=b):b=S[29],S[30]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(v.Track,{className:"bg-border-light relative grow rounded-full h-[3px] my-2",children:(0,t.jsx)(v.Range,{className:"absolute bg-accent-contrast rounded-full h-full"})}),k=(0,t.jsx)(v.Thumb,{className:"block w-4 h-4 rounded-full border-2 border-bg-page bg-accent-contrast cursor-pointer","aria-label":"Max image width"}),S[30]=x,S[31]=k):(x=S[30],k=S[31]),S[32]!==A||S[33]!==f||S[34]!==b?(w=(0,t.jsxs)(v.Root,{className:"relative flex items-center select-none touch-none w-full h-fit px-1",value:f,min:100,max:A,step:10,onValueChange:g,onValueCommit:b,children:[x,k]}),S[32]=A,S[33]=f,S[34]=b,S[35]=w):w=S[35],S[36]!==w||S[37]!==m?(C=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[m,w]}),S[36]=w,S[37]=m,S[38]=C):C=S[38],C}function ea(e){return e.stopPropagation()}function eo(e){let r,i,a=(0,n.c)(8);return a[0]!==e.entityID||a[1]!==e.imageFacts||a[2]!==e.onAddFiles?(r=(0,t.jsx)(es,{entityID:e.entityID,imageFacts:e.imageFacts,onAddFiles:e.onAddFiles}),a[0]=e.entityID,a[1]=e.imageFacts,a[2]=e.onAddFiles,a[3]=r):r=a[3],a[4]!==e.onOpenChange||a[5]!==e.open||a[6]!==r?(i=(0,t.jsx)(V.Modal,{sheetOnMobile:!0,open:e.open,onOpenChange:e.onOpenChange,title:"Edit Images",children:r}),a[4]=e.onOpenChange,a[5]=e.open,a[6]=r,a[7]=i):i=a[7],i}function es(e){let i,a,o,s,l,c,u,d,h,p,m,f,g=(0,n.c)(26),{rep:y}=(0,r.useReplicache)();g[0]===Symbol.for("react.memo_cache_sentinel")?(i={activationConstraint:{distance:6}},g[0]=i):i=g[0],g[1]===Symbol.for("react.memo_cache_sentinel")?(a={coordinateGetter:H},g[1]=a):a=g[1];let v=(0,x.useSensors)((0,x.useSensor)(x.PointerSensor,i),(0,x.useSensor)(x.KeyboardSensor,a));g[2]!==e.imageFacts?(o=e.imageFacts.map(ec),g[2]=e.imageFacts,g[3]=o):o=g[3];let k=o;g[4]!==e.entityID||g[5]!==e.imageFacts||g[6]!==y?.mutate?(s=function(t){let{active:n,over:r}=t;if(!r||n.id===r.id)return;let i=e.imageFacts.findIndex(e=>e.data.value===n.id),a=e.imageFacts.findIndex(e=>e.data.value===r.id);if(-1===i||-1===a)return;let o=w(e.imageFacts,i,a),s=o[a-1]?.data.position??null,l=o[a+1]?.data.position??null,c=e.imageFacts[i];y?.mutate.assertFact({id:c.id,entity:e.entityID,attribute:"gallery/image",data:{type:"ordered-reference",value:c.data.value,position:(0,b.generateKeyBetween)(s,l)}})},g[4]=e.entityID,g[5]=e.imageFacts,g[6]=y?.mutate,g[7]=s):s=g[7];let C=s;return g[8]===Symbol.for("react.memo_cache_sentinel")?(l=[$,z],g[8]=l):l=g[8],g[9]!==e.imageFacts?(c=e.imageFacts.map(el),g[9]=e.imageFacts,g[10]=c):c=g[10],g[11]!==c?(u=(0,t.jsx)("div",{className:"flex flex-col gap-1",children:c}),g[11]=c,g[12]=u):u=g[12],g[13]!==k||g[14]!==u?(d=(0,t.jsx)(A,{items:k,strategy:I,children:u}),g[13]=k,g[14]=u,g[15]=d):d=g[15],g[16]!==C||g[17]!==v||g[18]!==d?(h=(0,t.jsx)(x.DndContext,{sensors:v,collisionDetection:x.closestCenter,modifiers:l,onDragEnd:C,children:d}),g[16]=C,g[17]=v,g[18]=d,g[19]=h):h=g[19],g[20]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(W.AddSmall,{className:"scale-75"}),g[20]=p):p=g[20],g[21]!==e?(m=(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm text-accent-contrast cursor-pointer mt-1",children:[p,"Add an Image",(0,t.jsx)("input",{className:"hidden",type:"file",accept:"image/*",multiple:!0,onChange:t=>{let n=Array.from(t.currentTarget.files||[]);n.length>0&&e.onAddFiles(n),t.currentTarget.value=""}})]}),g[21]=e,g[22]=m):m=g[22],g[23]!==m||g[24]!==h?(f=(0,t.jsxs)("div",{className:"flex flex-col gap-2 min-w-[280px] sm:w-[360
100px]",children:[h,m]}),g[23]=m,g[24]=h,g[25]=f):f=g[25],f}function el(e){return(0,t.jsx)(eu,{entityID:e.data.value},e.data.value)}function ec(e){return e.data.value}function eu(e){let i,a,o,s,l,c,u,h,p,m,f=(0,n.c)(28),{rep:g}=(0,r.useReplicache)();f[0]!==e.entityID?(i={id:e.entityID},f[0]=e.entityID,f[1]=i):i=f[1];let{attributes:y,listeners:b,setNodeRef:v,transform:x,transition:w,isDragging:C}=O(i),S=(0,d.useGalleryImage)(e.entityID),E=(0,r.useEntity)(e.entityID,"image/name")?.data.value||"Untitled image";f[2]!==x?(a=k.CSS.Translate.toString(x),f[2]=x,f[3]=a):a=f[3],f[4]!==a||f[5]!==w?(o={transform:a,transition:w},f[4]=a,f[5]=w,f[6]=o):o=f[6];let T=`flex items-center gap-2 p-1 rounded-md border border-border-light bg-bg-page ${C?"opacity-60":""}`;return f[7]!==y||f[8]!==b?(s=(0,t.jsx)("button",{type:"button","aria-label":"Drag to reorder",className:"shrink-0 px-1 text-tertiary cursor-grab active:cursor-grabbing touch-none",...y,...b,children:"â ¿"}),f[7]=y,f[8]=b,f[9]=s):s=f[9],f[10]!==S?(l=S&&(0,t.jsx)("img",{src:S.src,alt:S.alt,className:"w-8 h-8 object-cover rounded shrink-0"}),f[10]=S,f[11]=l):l=f[11],f[12]!==E?(c=(0,t.jsx)("div",{className:"grow min-w-0 truncate text-sm",children:E}),f[12]=E,f[13]=c):c=f[13],f[14]!==e.entityID||f[15]!==g?.mutate?(u=()=>g?.mutate.removeGalleryImage({imageEntity:e.entityID}),f[14]=e.entityID,f[15]=g?.mutate,f[16]=u):u=f[16],f[17]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)(K.DeleteTiny,{}),f[17]=h):h=f[17],f[18]!==u?(p=(0,t.jsx)("button",{type:"button","aria-label":"Remove image",className:"shrink-0 text-tertiary hover:text-accent-contrast",onClick:u,children:h}),f[18]=u,f[19]=p):p=f[19],f[20]!==v||f[21]!==o||f[22]!==T||f[23]!==s||f[24]!==l||f[25]!==c||f[26]!==p?(m=(0,t.jsxs)("div",{ref:v,style:o,className:T,children:[s,l,c,p]}),f[20]=v,f[21]=o,f[22]=T,f[23]=s,f[24]=l,f[25]=c,f[26]=p,f[27]=m):m=f[27],m}var ed=e.i(295178);function eh(e){let u,y,b,v,x,k,w,C,S,E,T,I=(0,n.c)(53),{rep:D,undoManager:N}=(0,r.useReplicache)(),A=(0,o.useEntitySetContext)(),_=(0,a.useIsBlockSelected)(e.entityID),P=(0,r.useEntity)(e.entityID,"gallery/image"),M=(0,r.useEntity)(e.entityID,"gallery/format")?.data.value??d.DEFAULT_FORMAT,R=(0,r.useEntity)(e.entityID,"gallery/gap")?.data.value??d.DEFAULT_GAP,L=(0,r.useEntity)(e.entityID,"gallery/max-width")?.data.value??d.DEFAULT_MAX_WIDTH,[j,O]=(0,l.useState)(!1),[B,F]=(0,l.useState)(null),[H,U]=(0,l.useState)(!1);I[0]!==P?(u=P.map(ep),I[0]=P,I[1]=u):u=I[1];let z=u;I[2]!==A||I[3]!==e.entityID||I[4]!==D||I[5]!==N?(y=async t=>{D&&await N.withUndoGroup(async()=>{for(let n of t){if(!n.type.startsWith("image/"))continue;let t=(0,c.v7)();await D.mutate.addGalleryImage({galleryEntity:e.entityID,imageEntity:t,factID:(0,c.v7)(),permission_set:A.set}),n.name&&await D.mutate.assertFact({entity:t,attribute:"image/name",data:{type:"string",value:n.name}}),await (0,s.addImage)(n,D,{entityID:t,attribute:"block/image"})}})},I[2]=A,I[3]=e.entityID,I[4]=D,I[5]=N,I[6]=y):y=I[6];let $=y,V=!!_;I[7]!==e.entityID||I[8]!==e.preview||I[9]!==V?(b={entityID:e.entityID,isSelected:V,preview:e.preview},I[7]=e.entityID,I[8]=e.preview,I[9]=V,I[10]=b):b=I[10];let{clickOpensLightbox:q}=(0,ed.useCanOpenLightbox)(b);I[11]!==q?(v=e=>{q()&&(U(!1),F(e))},I[11]=q,I[12]=v):v=I[12];let G=v;I[13]===Symbol.for("react.memo_cache_sentinel")?(x=e=>{U(!0),F(e)},I[13]=x):x=I[13];let W=x,K=!e.preview&&A.permissions.write;if(0===z.length){let e,n;if(!A.permissions.write)return null;let r=!!_,a=!!_;return I[14]!==$||I[15]!==a?(e=(0,t.jsx)(em,{onAddFiles:$,isSelected:a}),I[14]=$,I[15]=a,I[16]=e):e=I[16],I[17]!==r||I[18]!==e?(n=(0,t.jsx)(i.BlockLayout,{hasBackground:"accent",isSelected:r,borderOnHover:!0,className:"group/gallery-block text-tertiary hover:text-accent-contrast hover:font-bold h-[104px] border-dashed rounded-lg",children:e}),I[17]=r,I[18]=e,I[19]=n):n=I[19],n}let Y=!!_;return I[20]!==M||I[21]!==R||I[22]!==L||I[23]!==e.entityID||I[24]!==e.preview?(k=e.preview?void 0:(0,t.jsx)(J,{entityID:e.entityID,format:M,gap:R,maxWidth:L,onEditImages:()=>O(!0)}),I[20]=M,I[21]=R,I[22]=L,I[23]=e.entityID,I[24]=e.preview,I[25]=k):k=I[25],I[26]!==K||I[27]!==M||I[28]!==R||I[29]!==z||I[30]!==_||I[31]!==L||I[32]!==G?(w="carousel"===M?(0,t.jsx)(m.ImageGalleryCarou
100sel,{count:z.length,renderItem:(e,n)=>(0,t.jsx)(g.EditorGalleryImageItem,{entityID:z[e],editable:K,selected:!!_,onClick:()=>G(e),onSeeMoreAlt:()=>W(e),...n})}):"strip"===M?(0,t.jsx)(p.ImageGalleryStrip,{count:z.length,gap:R,renderItem:(e,n)=>(0,t.jsx)(g.EditorGalleryImageItem,{entityID:z[e],editable:K,selected:!!_,onClick:()=>G(e),onSeeMoreAlt:()=>W(e),...n})}):(0,t.jsx)(h.ImageGalleryGrid,{count:z.length,gap:R,maxWidth:L,renderItem:(e,n)=>(0,t.jsx)(g.EditorGalleryImageItem,{entityID:z[e],editable:K,selected:!!_,onClick:()=>G(e),onSeeMoreAlt:()=>W(e),...n})}),I[26]=K,I[27]=M,I[28]=R,I[29]=z,I[30]=_,I[31]=L,I[32]=G,I[33]=w):w=I[33],I[34]!==j||I[35]!==$||I[36]!==P||I[37]!==e.entityID||I[38]!==e.preview?(C=!e.preview&&(0,t.jsx)(eo,{entityID:e.entityID,imageFacts:P,open:j,onOpenChange:O,onAddFiles:$}),I[34]=j,I[35]=$,I[36]=P,I[37]=e.entityID,I[38]=e.preview,I[39]=C):C=I[39],I[40]!==z?(S=e=>(0,t.jsx)(f.EditorLightboxSlide,{entityID:z[e]}),I[40]=z,I[41]=S):S=I[41],I[42]!==z.length||I[43]!==H||I[44]!==B||I[45]!==S?(E=(0,t.jsx)(f.ImageGalleryLightbox,{count:z.length,index:B,altExpanded:H,onIndexChange:F,renderSlide:S}),I[42]=z.length,I[43]=H,I[44]=B,I[45]=S,I[46]=E):E=I[46],I[47]!==E||I[48]!==Y||I[49]!==k||I[50]!==w||I[51]!==C?(T=(0,t.jsxs)(i.BlockLayout,{isSelected:Y,className:"border-transparent! p-0! w-full rounded-none!",extraOptions:k,children:[w,C,E]}),I[47]=E,I[48]=Y,I[49]=k,I[50]=w,I[51]=C,I[52]=T):T=I[52],T}function ep(e){return e.data.value}function em(e){let r,i,a,o,s=(0,n.c)(11);return s[0]!==e?(r=t=>{t.preventDefault(),t.stopPropagation();let n=Array.from(t.dataTransfer.files).filter(ef);n.length>0&&e.onAddFiles(n)},s[0]=e,s[1]=r):r=s[1],s[2]!==e.children||s[3]!==e.isSelected?(i=e.children??(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(u.BlockImageSmall,{className:`shrink-0 group-hover/gallery-block:text-accent-contrast ${e.isSelected?"text-tertiary":"text-border"}`}),"Upload Images"]}),s[2]=e.children,s[3]=e.isSelected,s[4]=i):i=s[4],s[5]!==e?(a=(0,t.jsx)("input",{className:"h-0 w-0 hidden",type:"file",accept:"image/*",multiple:!0,onChange:t=>{let n=Array.from(t.currentTarget.files||[]);n.length>0&&e.onAddFiles(n),t.currentTarget.value=""}}),s[5]=e,s[6]=a):a=s[6],s[7]!==r||s[8]!==i||s[9]!==a?(o=(0,t.jsxs)("label",{className:"w-full h-full hover:cursor-pointer flex flex-col items-center justify-center",onMouseDown:ey,onDragOver:eg,onDrop:r,children:[i,a]}),s[7]=r,s[8]=i,s[9]=a,s[10]=o):o=s[10],o}function ef(e){return e.type.startsWith("image/")}function eg(e){e.preventDefault(),e.stopPropagation()}function ey(e){return e.preventDefault()}},262219,e=>{"use strict";var t=e.i(500932),n=e.i(467592),r=e.i(870370);e.s(["DEFAULT_FORMAT",0,"grid","DEFAULT_GAP",0,8,"DEFAULT_MAX_WIDTH",0,300,"useGalleryImage",0,function(e){let i,a,o=(0,t.c)(8),s=(0,n.useEntity)(e,"block/image"),l=(0,n.useEntity)(e,"image/alt")?.data.value;if(!s)return null;o[0]!==s.data.src?(i=r.localImages.get(s.data.src),o[0]=s.data.src,o[1]=i):i=o[1];let c=i??s.data.src,u=l||"";return o[2]!==s.data.height||o[3]!==s.data.src||o[4]!==s.data.width||o[5]!==c||o[6]!==u?(a={src:c,factSrc:s.data.src,alt:u,width:s.data.width,height:s.data.height},o[2]=s.data.height,o[3]=s.data.src,o[4]=s.data.width,o[5]=c,o[6]=u,o[7]=a):a=o[7],a}])},218199,206057,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(44729),a=e.i(467592),o=e.i(492122),s=e.i(876082),l=e.i(110383);async function c(e,t){let n=(0,l.v7)();await e.mutate.createEntity([{entityID:n,permission_set:t.permission_set}]),t.alt&&await e.mutate.assertFact({entity:n,attribute:"image/alt",data:{type:"string",value:t.alt},ignoreUndo:!0}),await e.mutate.assertFact({entity:n,attribute:"block/image",data:{type:"image",src:t.image.src,width:t.image.width,height:t.image.height,fallback:t.image.fallback},ignoreUndo:!0}),await e.mutate.assertFact({entity:t.rootEntity,attribute:"root/cover-image",data:{type:"reference",value:n},ignoreUndo:!0})}var u=e.i(784192),d=e.i(103136);let h=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29339 0.710621C8.52319 0.574818 7.85522 1.07422 7.63679 1.73718C7.59815 1.85444 7.46828 1.97645 7.25941 2.00195C7.22787 2.0058 7.
10019635 2.0099 7.16486 2.01424C6.95459 2.04326 6.79691 1.95831 6.72935 1.8552C6.34672 1.27127 5.57156 0.961744 4.86275 1.29386C4.47573 1.4752 4.10709 1.68899 3.76034 1.93166C3.11992 2.37986 3.00031 3.20494 3.31462 3.82814C3.37006 3.93806 3.36467 4.11652 3.23453 4.28317C3.21513 4.30802 3.19591 4.33303 3.17688 4.35819C3.04902 4.52728 2.87761 4.57875 2.75677 4.55359C2.07344 4.41128 1.30647 4.74013 1.0396 5.47589C0.896085 5.87156 0.785336 6.28291 0.710626 6.70658C0.574805 7.4768 1.07423 8.14481 1.7372 8.36325C1.85449 8.40189 1.97652 8.53179 2.00201 8.74071C2.00586 8.77227 2.00996 8.80382 2.01431 8.83533C2.04332 9.04561 1.95837 9.20328 1.85525 9.27085C1.27131 9.6535 0.961775 10.4287 1.29392 11.1375C1.47528 11.5245 1.68908 11.8932 1.93177 12.2399C2.37995 12.8803 3.20496 12.9999 3.82811 12.6856C3.938 12.6302 4.11641 12.6356 4.28302 12.7657C4.308 12.7852 4.33314 12.8045 4.35844 12.8236C4.52747 12.9514 4.57891 13.1228 4.55376 13.2435C4.41147 13.9268 4.7403 14.6937 5.476 14.9605C5.87177 15.1041 6.28322 15.2148 6.707 15.2895C7.4771 15.4253 8.14499 14.926 8.3634 14.2631C8.40202 14.1459 8.53184 14.0239 8.74066 13.9984C8.77245 13.9945 8.8042 13.9904 8.83593 13.986C9.04607 13.957 9.20363 14.0419 9.27113 14.1449C9.65372 14.7288 10.4288 15.0383 11.1375 14.7062C11.5246 14.5248 11.8934 14.3109 12.2402 14.0681C12.8805 13.6199 13.0001 12.7951 12.6858 12.172C12.6304 12.0622 12.6358 11.8838 12.7659 11.7173C12.7854 11.6922 12.8048 11.667 12.8241 11.6416C12.9518 11.4726 13.123 11.4212 13.2437 11.4463C13.9269 11.5886 14.6937 11.2598 14.9605 10.5242C15.1041 10.1284 15.2148 9.71681 15.2896 9.29293C15.4253 8.52287 14.926 7.85503 14.2631 7.63664C14.146 7.59804 14.024 7.46823 13.9985 7.25939C13.9946 7.22765 13.9905 7.19593 13.9861 7.16424C13.9571 6.95411 14.042 6.79657 14.145 6.72907C14.7288 6.34649 15.0383 5.57146 14.7062 4.86277C14.5248 4.47562 14.311 4.10688 14.0682 3.76003C13.62 3.11972 12.7951 3.00014 12.172 3.31441C12.0621 3.36981 11.8837 3.36444 11.7172 3.23436C11.6922 3.21487 11.66
10071 3.19558 11.6418 3.17647C11.4728 3.04869 11.4213 2.87736 11.4465 2.75661C11.5888 2.07337 11.26 1.30651 10.5243 1.03966C10.1286 0.89611 9.71715 0.785339 9.29339 0.710621ZM8.82401 2.12834C8.87493 1.97377 8.99885 1.92797 9.07634 1.94163C9.42822 2.00368 9.76968 2.09562 10.0981 2.21474C10.1715 2.24136 10.2559 2.34245 10.2228 2.50176C10.0817 3.1792 10.4066 3.80969 10.888 4.1736C10.9081 4.18876 10.928 4.20408 10.9478 4.21956C11.4237 4.59115 12.1169 4.74213 12.7349 4.43049C12.8796 4.35748 12.9991 4.41254 13.0441 4.4768C13.246 4.76523 13.4237 5.07165 13.5743 5.39313C13.6073 5.4636 13.5958 5.59451 13.4599 5.68354C12.8813 6.06271 12.6654 6.73809 12.7479 7.33525C12.7513 7.36043 12.7546 7.38564 12.7577 7.41088C12.831 8.011 13.2151 8.60744 13.872 8.82386C14.0264 8.87475 14.0722 8.99856 14.0585 9.07596C13.9965 9.42794 13.9045 9.7695 13.7854 10.098C13.7588 10.1713 13.6578 10.2557 13.4986 10.2226C12.8212 10.0815 12.1908 10.4065 11.8269 10.8878C11.8117 10.9079 11.7963 10.928 11.7807 10.9479C11.4091 11.4237 11.2581 12.117 11.5697 12.7349C11.6427 12.8796 11.5877 12.9991 11.5234 13.044C11.235 13.2459 10.9286 13.4236 10.6071 13.5743C10.5366 13.6073 10.4057 13.5957 10.3167 13.4598C9.9375 12.8812 9.26215 12.6653 8.665 12.7478C8.63978 12.7513 8.61454 12.7545 8.58927 12.7576C7.98906 12.8309 7.39261 13.215 7.17618 13.8719C7.12528 14.0264 7.00143 14.0722 6.924 14.0585C6.5721 13.9965 6.23062 13.9046 5.9022 13.7854C5.82879 13.7588 5.74432 13.6577 5.7775 13.4984C5.91858 12.821 5.59364 12.1905 5.11232 11.8266C5.09223 11.8114 5.07227 11.796 5.05243 11.7805C4.57656 11.4089 3.88319 11.2578 3.26521 11.5695C3.12043 11.6425 3.00086 11.5875 2.95587 11.5232C2.75405 11.2348 2.57641 10.9285 2.42582 10.6071C2.39274 10.5365 2.40437 10.4055 2.54036 10.3164C3.11906 9.93717 3.33498 9.26173 3.25258 8.6645C3.24913 8.63946 3.24587 8.61438 3.24281 8.58928C3.16955 7.98901 2.78533 7.39248 2.12837 7.17603C1.97378 7.12509 1.92797 7.00116 1.94163 6.92366C2.00367 6.57185 2.0956 6.23045 2.21469 5.90211C2.24134 5.82864 2.34251 5.74414 2.50192 5.77733C3.17942 5.91843 3.80997 5.59345 4.17394 5.11209C4.18905 5.09212 4.2043 5.07226 4.21971 5.05253C4.59136 4.57663 4.74239 3.88324 4.4307 3.26524C4.35766 3.12041 4.41274 3.00079 4.47706 2.95578C4.76541 2.75398 5.07174 2.57635 5.39312 2.42577C5.46368 2.3927 5.59472 2.40433 5.68382 2.54031C6.06304 3.11901 6.73849 3.33492 7.33573 3.25251C7.36075 3.24906 7.38581 3.2458 7.41089 3.24274C8.01112 3.16946 8.60757 2.78525 8.82401 2.12834ZM5.72699 7.99998C5.72699 6.73322 6.7311 5.72705 7.94439 5.72705C8.3561 5.72705 8.74037 5.84149 9.07046 6.04146C9.36568 6.22032 9.75 6.12599 9.92886 5.83076C10.1077 5.53554 10.0134 5.15122 9.71816 4.97236C9.19924 4.65798 8.59193 4.47705 7.94439 4.47705C6.01805 4.47705 4.47699 6.06578 4.47699 7.99998C4.47699 9.93419 6.01805 11.5229 7.94439 11.5229C9.21716 11.5229 10.3242 10.8266 10.9257 9.79966C11.1002 9.50182 11.0002 9.11894 10.7024 8.94447C10.4045 8.77 10.0216 8.87001 9.84717 9.16785C9.45648 9.83481 8.74748 10.2729 7.94439 10.2729C6.7311 10.2729 5.72699 9.26674 5.72699 7.99998ZM11.4284 7.27829C11.298 6.95872 10.9331 6.80541 10.6136 6.93587C10.3018 7.06316 10.1483 7.41354 10.2621 7.72732L10.2621 7.73332C10.2621 8.0785 10.542 8.35832 10.8871 8.35832C11.2323 8.35832 11.5121 8.0785 11.5121 7.73332L11.5122 7.72295C11.5123 7.67271 11.5124 7.58581 11.497 7.49896C11.4797 7.4014 11.4454 7.31911 11.4317 7.28615L11.4284 7.27829Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};var p=e.i(814649);let m=(0,r.forwardRef)((e,r)=>{let i,a,o,s,l=(0,n.c)(8);l[0]!==e?({"aria-label":a,...i}=e,l[0]=e,l[1]=i,l[2]=a):(i=l[1],a=l[2]);let c=void 0===a?"Settings":a;return l[3]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(h,{}),l[3]=o):o=l[3],l[4]!==c||l[5]!==i||l[6]!==r?(s=(0,t.jsx)("button",{...i,ref:r,onMouseDown:v,"aria-label":c,className:"flex items-center",children:o}),l[4]=c,l[5]=i,l[6]=r,l[7]=s):s=l[7],s});function f(e){let r,i,a,o=(0,n.c)(8),s=`p-0! min-w-xs ${e.className||""}`,l=`${e.label} Settings`;return o[0]!==l?(r=(0,t.jsx)(m,{"aria-label":l,onClick:y}
100),o[0]=l,o[1]=r):r=o[1],o[2]!==e.children?(i=(0,t.jsx)("div",{className:"flex flex-col gap-3 p-3 min-w-[220px] text-primary overflow-y-auto",onClick:g,children:e.children}),o[2]=e.children,o[3]=i):i=o[3],o[4]!==s||o[5]!==r||o[6]!==i?(a=(0,t.jsx)(p.Popover,{asChild:!0,side:"top",align:"end",sideOffset:6,className:s,onOpenAutoFocus:b,trigger:r,children:i}),o[4]=s,o[5]=r,o[6]=i,o[7]=a):a=o[7],a}function g(e){return e.stopPropagation()}function y(e){return e.stopPropagation()}function b(e){return e.preventDefault()}function v(e){return e.preventDefault()}function x(e){let o,l,c,d,h,p,m,f,g,y,b,v,x,w,C,S,E,T,I=(0,n.c)(50),{rep:D,rootEntity:N}=(0,a.useReplicache)(),{data:A,normalizedPublication:_}=(0,s.useLeafletPublicationData)(),P=(0,a.useEntity)(N,"theme/page-width")?.data.value,M=(A?.publications?_?.theme?.pageWidth:P)||624,R=(0,a.useEntity)(e.entityID,"image/max-width")?.data.value,L=M-32,j=Math.min(e.intrinsicWidth,L),[O,B]=(0,r.useState)(R??j);I[0]!==j||I[1]!==R?(o=()=>B(R??j),l=[R,j],I[0]=j,I[1]=R,I[2]=o,I[3]=l):(o=I[2],l=I[3]),(0,r.useEffect)(o,l),I[4]!==L||I[5]!==j||I[6]!==O?(c=Number.isNaN(O)?j:Math.max(10,Math.min(L,O)),I[4]=L,I[5]=j,I[6]=O,I[7]=c):c=I[7];let F=c;I[8]!==L||I[9]!==e?(d=t=>{B(t),Number.isNaN(t)||e.onPreviewWidth?.(Math.max(10,Math.min(L,t)))},I[8]=L,I[9]=e,I[10]=d):d=I[10];let H=d;I[11]!==L||I[12]!==j||I[13]!==e||I[14]!==D?.mutate?(h=t=>{let n=Math.max(10,Math.min(L,Number.isNaN(t)?j:t));B(n),D?.mutate.assertFact({entity:e.entityID,attribute:"image/max-width",data:{type:"number",value:n}}),e.onPreviewWidth?.(null)},I[11]=L,I[12]=j,I[13]=e,I[14]=D?.mutate,I[15]=h):h=I[15];let U=h,z=`flex flex-col gap-1 ${e.disabled?"opacity-50 pointer-events-none":""}`;return I[16]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)("span",{className:"font-bold",children:"Width"}),I[16]=p):p=I[16],I[17]!==O?(m=Number.isNaN(O)?"":String(O),I[17]=O,I[18]=m):m=I[18],I[19]!==H?(f=e=>H(parseInt(e.currentTarget.value)),I[19]=H,I[20]=f):f=I[20],I[21]!==U||I[22]!==O?(y=()=>U(O),g=e=>{"Enter"===e.key&&(e.preventDefault(),U(O))},I[21]=U,I[22]=O,I[23]=g,I[24]=y):(g=I[23],y=I[24]),I[25]!==L||I[26]!==e.disabled||I[27]!==g||I[28]!==m||I[29]!==f||I[30]!==y?(b=(0,t.jsxs)("label",{className:"flex items-center justify-between gap-2 ",children:[p,(0,t.jsx)(u.Input,{type:"number",disabled:e.disabled,min:10,max:L,className:"w-20 input-with-border",value:m,onMouseDown:k,onChange:f,onBlur:y,onKeyDown:g})]}),I[25]=L,I[26]=e.disabled,I[27]=g,I[28]=m,I[29]=f,I[30]=y,I[31]=b):b=I[31],I[32]!==F?(v=[F],I[32]=F,I[33]=v):v=I[33],I[34]!==H?(x=e=>H(e[0]),I[34]=H,I[35]=x):x=I[35],I[36]!==U?(w=e=>U(e[0]),I[36]=U,I[37]=w):w=I[37],I[38]===Symbol.for("react.memo_cache_sentinel")?(C=(0,t.jsx)(i.Track,{className:"bg-border-light relative grow rounded-full h-[3px] my-2",children:(0,t.jsx)(i.Range,{className:"absolute bg-accent-contrast rounded-full h-full"})}),S=(0,t.jsx)(i.Thumb,{className:"block w-4 h-4 rounded-full border-2 border-bg-page bg-accent-contrast cursor-pointer","aria-label":"Image width"}),I[38]=C,I[39]=S):(C=I[38],S=I[39]),I[40]!==L||I[41]!==e.disabled||I[42]!==v||I[43]!==x||I[44]!==w?(E=(0,t.jsxs)(i.Root,{className:"relative flex items-center select-none touch-none w-full h-fit px-1",disabled:e.disabled,value:v,min:10,max:L,step:10,onValueChange:x,onValueCommit:w,
100children:[C,S]}),I[40]=L,I[41]=e.disabled,I[42]=v,I[43]=x,I[44]=w,I[45]=E):E=I[45],I[46]!==b||I[47]!==E||I[48]!==z?(T=(0,t.jsxs)("div",{className:z,children:[b,E]}),I[46]=b,I[47]=E,I[48]=z,I[49]=T):T=I[49],T}function k(e){return e.stopPropagation()}function w(e){let r,i,l,u,h=(0,n.c)(14),{rep:p,rootEntity:m}=(0,a.useReplicache)(),f=(0,o.useEntitySetContext)(),{data:g}=(0,s.useLeafletPublicationData)(),y=(0,s.useLeafletPublicationPage)(),b=(0,a.useEntity)(e.entityID,"block/image"),v=(0,a.useEntity)(e.entityID,"image/alt")?.data.value,x=(0,a.useEntity)(m,"root/cover-image")?.data.value,k=(0,a.useEntity)(x??null,"block/image");if(!g?.publications||!f.permissions.write||y||!b)return null;let w=!!k&&k.data.src===b.data.src;return h[0]!==v||h[1]!==x||h[2]!==f||h[3]!==b||h[4]!==w||h[5]!==p||h[6]!==m?(r=async()=>{p&&(w?x&&await p.mutate.deleteEntity({entity:x}):await c(p,{rootEntity:m,permission_set:f.set,image:b.data,alt:v}))},h[0]=v,h[1]=x,h[2]=f,h[3]=b,h[4]=w,h[5]=p,h[6]=m,h[7]=r):r=h[7],h[8]!==w||h[9]!==r?(i=(0,t.jsx)(d.ToggleWithLabel,{label:"Use as Cover Image",toggle:w,onToggle:r}),h[8]=w,h[9]=r,h[10]=i):i=h[10],h[11]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("hr",{className:"border-border-light"}),h[11]=l):l=h[11],h[12]!==i?(u=(0,t.jsxs)(t.Fragment,{children:[i,l]}),h[12]=i,h[13]=u):u=h[13],u}m.displayName="SettingsTriggerButton",e.s(["BlockSettings",0,f],206057),e.s(["ImageOptions",0,function(e){let r,i,o,s,l,c,u=(0,n.c)(19),{rep:h}=(0,a.useReplicache)(),p=(0,a.useEntity)(e.entityID,"block/image"),m=!!(0,a.useEntity)(e.entityID,"image/full-bleed")?.data.value;return p?(u[0]!==e.entityID?(r=(0,t.jsx)(w,{entityID:e.entityID}),u[0]=e.entityID,u[1]=r):r=u[1],u[2]!==m||u[3]!==e.entityID||u[4]!==h?.mutate?(i=()=>h?.mutate.assertFact({entity:e.entityID,attribute:"image/full-bleed",data:{type:"boolean",value:!m}}),u[2]=m,u[3]=e.entityID,u[4]=h?.mutate,u[5]=i):i=u[5],u[6]!==m||u[7]!==i?(o=(0,t.jsx)(d.ToggleWithLabel,{label:"Make Full Bleed",toggle:m,onToggle:i}),u[6]=m,u[7]=i,u[8]=o):o=u[8],u[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)("hr",{}),u[9]=s):s=u[9],u[10]!==p.data.width||u[11]!==m||u[12]!==e.entityID||u[13]!==e.onPreviewWidth?(l=(0,t.jsx)(x,{entityID:e.entityID,intrinsicWidth:p.data.width,onPreviewWidth:e.onPreviewWidth,disabled:m}),u[10]=p.data.width,u[11]=m,u[12]=e.entityID,u[13]=e.onPreviewWidth,u[14]=l):l=u[14],u[15]!==r||u[16]!==o||u[17]!==l?(c=(0,t.jsxs)(f,{label:"Image",className:"w-sm",children:[r,o,s,l]}),u[15]=r,u[16]=o,u[17]=l,u[18]=c):c=u[18],c):null}],218199)},733600,201274,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(840124),i=e.i(271645);function a(e){return e+1}function o(e){let r,i,a,o,l,c=(0,n.c)(14),u=`imageErrorState absolute inset-0 z-10 light-container flex items-center justify-center text-tertiary text-sm ${e.className??""}`;return c[0]!==e.compact||c[1]!==e.message?(r=!e.compact&&(0,t.jsx)("span",{children:e.message}),c[0]=e.compact,c[1]=e.message,c[2]=r):r=c[2],c[3]!==e?(i=t=>{t.stopPropagation(),e.onAction()},c[3]=e,c[4]=i):i=c[4],c[5]!==e.actionLabel||c[6]!==i?(a=(0,t.jsx)("button",{type:"button",className:"text-accent-contrast font-bold hover:underline",onMouseDown:s,onClick:i,children:e.actionLabel}),c[5]=e.actionLabel,c[6]=i,c[7]=a):a=c[7],c[8]!==r||c[9]!==a?(o=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 items-baseline justify-center text-center px-3",children:[r,a]}),c[8]=r,c[9]=a,c[10]=o):o=c[10],c[11]!==u||c[12]!==o?(l=(0,t.jsx)("div",{className:u,children:o}),c[11]=u,c[12]=o,c[13]=l):l=c[13],l}function s(e){return e.preventDefault()}e.s(["ImageErrorState",0,o,"useImageLoadStatus",0,function(e){let t,r,o,s,l,c,u,d=(0,n.c)(11),[h,p]=(0,i.useState)("loading"),[m,f]=(0,i.useState)(0),g=(0,i.useRef)(null);return d[0]!==e?(t=()=>{if(!e)return;let t=g.current;t?.complete?p(t.naturalWidth>0?"loaded":"error"):p("loading")},d[0]=e,d[1]=t):t=d[1],d[2]!==m||d[3]!==e?(r=[e,m],d[2]=m,d[3]=e,d[4]=r):r=d[4],(0,i.useEffect)(t,r),d[5]===Symbol.for("react.memo_cache_sentinel")?(o=()=>p("loaded"),d[5]=o):o=d[5],d[6]===Symbol.for("react.memo_cache_sentinel")?(s=()=>p("error"),d[6]=s):s=d[6],d[7]===Symbol.for("react.memo_cache_sentinel")?(l={ref:g,onLoad:o,onError:s},d[7]=l):l=d[7],d[8]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{p("loading"),f(a)},d[8]=c):c=d[8],d[9]!==h?(u={status:h,imgProps:l,reset:c}
100,d[9]=h,d[10]=u):u=d[10],u}],201274);var l=e.i(788613);e.s(["ImageStatusOverlay",0,function(e){let i,a=(0,n.c)(11);a[0]!==e.uploadSrc?(i=t=>e.uploadSrc?t.uploads[e.uploadSrc]:void 0,a[0]=e.uploadSrc,a[1]=i):i=a[1];let s=(0,r.useImageUploadStatus)(i);if(s?.state==="uploading"){let e;return a[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"absolute top-1 left-1 z-10 rounded-md bg-bg-page/80 text-secondary pointer-events-none",children:(0,t.jsx)(l.DotLoader,{})}),a[2]=e):e=a[2],e}if(s?.state==="failed"){let n;return a[3]!==e.className||a[4]!==e.compact||a[5]!==s.retry?(n=(0,t.jsx)(o,{message:"Upload didn't finish,",actionLabel:"try again?",onAction:s.retry,compact:e.compact,className:e.className}),a[3]=e.className,a[4]=e.compact,a[5]=s.retry,a[6]=n):n=a[6],n}if("error"===e.loadStatus&&e.onReload){let n;return a[7]!==e.className||a[8]!==e.compact||a[9]!==e.onReload?(n=(0,t.jsx)(o,{message:"Something went wrong,",actionLabel:"reload?",onAction:e.onReload,compact:e.compact,className:e.className}),a[7]=e.className,a[8]=e.compact,a[9]=e.onReload,a[10]=n):n=a[10],n}return null}],733600)},562495,290094,583132,e=>{"use strict";e.s(["MathBlock",()=>g],562495);var t=e.i(843476),n=e.i(467592),r=e.i(173275),i=e.i(716400),a=e.i(271645),o=e.i(813029),s=e.i(885718),l=e.i(500932),c=e.i(741514),u=e.i(267602),d=e.i(394191),h=e.i(468034);function p(e){let n,r,i,a,o,s,p=(0,l.c)(13);return p[0]!==e?({block:n,rep:a,permissionSet:i,...r}=e,p[0]=e,p[1]=n,p[2]=r,p[3]=i,p[4]=a):(n=p[1],r=p[2],i=p[3],a=p[4]),p[5]!==n||p[6]!==i||p[7]!==e.block||p[8]!==a?(o=t=>{if((t.shiftKey||t.ctrlKey||t.metaKey)&&"Enter"===t.key&&a&&i)return t.preventDefault(),(0,h.addBlockBelow)(a,{parent:n.parent,position:n.position,nextPosition:n.nextPosition||null,permission_set:i,type:"text"}).then(h.focusNewTextBlock),!0;if("ArrowUp"===t.key){let n=t.currentTarget.selectionStart;if(-1!==t.currentTarget.value.slice(0,n).lastIndexOf("\n"))return;let r=e.block.previousBlock,i=(0,u.getCoordinatesInTextarea)(t.currentTarget,n);if(r)return(0,d.focusBlock)(r,{left:i.left+t.currentTarget.getBoundingClientRect().left,type:"bottom"}),!0}if("ArrowDown"===t.key){let n=t.currentTarget.selectionStart;if(t.currentTarget.value.lastIndexOf("\n")!==t.currentTarget.value.slice(0,n).lastIndexOf("\n"))return;t.preventDefault();let r=e.block.nextBlock,i=(0,u.getCoordinatesInTextarea)(t.currentTarget,n);if(r)return(0,d.focusBlock)(r,{left:i.left+t.currentTarget.getBoundingClientRect().left,type:"top"}),!0}},p[5]=n,p[6]=i,p[7]=e.block,p[8]=a,p[9]=o):o=p[9],p[10]!==r||p[11]!==o?(s=(0,t.jsx)(c.AsyncValueAutosizeTextarea,{...r,noWrap:!0,onKeyDown:o}),p[10]=r,p[11]=o,p[12]=s):s=p[12],s}var m=e.i(553445),f=e.i(492122);function g(e){let l=(0,n.useEntity)(e.entityID,"block/math"),c=(0,o.useUIState)(t=>t.focusedEntity?.entityID===e.entityID),{rep:u}=(0,n.useReplicache)(),d=(0,f.useEntitySetContext)(),{html:h,error:g}=(0,a.useMemo)(()=>{try{return{html:i.default.renderToString(l?.data.value||"",{displayMode:!0,throwOnError:!1,errorColor:s.theme.colors["accent-contrast"]}),error:void 0}}catch(e){if(e instanceof i.default.ParseError||e instanceof TypeError)return{error:e};throw e}},[l?.data.value]);return c?(0,t.jsx)(r.BlockLayout,{isSelected:c,hasBackground:"accent",className:"min-h-[48px]",children:(0,t.jsx)(p,{id:m.elementId.block(e.entityID).input,block:e,rep:u,permissionSet:d.set,spellCheck:!1,autoCapitalize:"none",autoCorrect:"off",className:"h-full w-full whitespace-nowrap overflow-auto!",placeholder:"write some TeX hereâ¦",value:l?.data.value,onChange:async t=>{await u?.mutate.assertFact({attribute:"block/math",entity:e.entityID,data:{type:"string",value:t.target.value}})}})}):h&&l?.data.value?(0,t.jsx)("div",{className:"text-lg min-h-[48px] w-full border border-transparent",dangerouslySetInnerHTML:{__html:h}}):(0,t.jsx)(r.BlockLayout,{isSelected:c,hasBackground:"accent",className:"min-h-[48px]",children:(0,t.jsx)("div",{className:"text-tertiary italic w-full ",children:"write some TeX here..."})})}e.s(["CodeBlock",()=>k],290094);var y=e.i(785892),b=e.i(361838),v=e.i(785395),x=e.i(716536);function k(e){let{rep:i,rootEntity:s}=(0,n.useReplicache)(),l=(0,n.useEntity)(e.entityID,"block/code"),c=(0,n.useEntity)(e.entityID,"block/code-language")?.data.value||"plaintext",u=(0,n.useEntity)(s,"theme/code-theme")?.data.value||"github-light",h=(0,o.useUIState)(t=>t.focusedEntity?.entityID===e.entityID),g=(0,f.useEntitySetContext)(),{permissions:k}=g,[w,C]=(0,a.useState)(null);(0,a.useLayoutEffect)(()=>{e.preview||l&&(0,v.codeToHtml)(l.data.value,{lang:c,theme:u,structure:"classic"}).then(e=>{C(e.replaceAll("<br>","\n"))})},[l,c,u,e.preview]);let S=(0,a.useCallback)(t=>{(0,d.focusBlock)({parent:e.parent,entityID:e.entityID,type:"code"},{type:"end"})},[]);return(0,t.jsxs)("div",{className:"codeBlock w-full flex flex-col rounded-md gap-0.5 ",children:[(0,t.jsx)(r.BlockLayout,{isSelected:h,hasBackgroun
100d:"accent",borderOnHover:!0,className:"p-0! min-h-10 sm:min-h-12",children:h&&k.write?(0,t.jsx)(p,{placeholder:"write some codeâ¦","data-editable-block":!0,"data-entityid":e.entityID,id:m.elementId.block(e.entityID).input,block:e,rep:i,permissionSet:g.set,spellCheck:!1,autoCapitalize:"none",autoCorrect:"off",className:"codeBlockEditor whitespace-nowrap! overflow-auto! font-mono p-2 sm:p-3",value:l?.data.value,onChange:async t=>{await i?.mutate.assertFact({attribute:"block/code",entity:e.entityID,data:{type:"string",value:t.target.value}})}}):w?(0,t.jsx)("div",{onMouseDown:e=>e.stopPropagation(),onClick:S,"data-lang":c,className:"contents",dangerouslySetInnerHTML:{__html:w||""}}):(0,t.jsx)("pre",{onClick:S,onMouseDown:e=>e.stopPropagation(),className:"codeBlockRendered overflow-auto! font-mono p-2 sm:p-3 w-full h-full",children:l?.data.value===""||l?.data.value===void 0?(0,t.jsx)("div",{className:"text-tertiary italic",children:"write some codeâ¦"}):l?.data.value})}),k.write&&!e.preview&&(0,t.jsxs)("div",{className:"text-sm text-tertiary flex w-full justify-between gap-4",children:[(0,t.jsxs)("div",{className:"codeBlockTheme grow flex gap-1",children:["Theme:"," ",(0,t.jsx)("select",{className:"codeBlockThemeSelect text-left bg-transparent pr-1 w-full min-w-0 truncate underline cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation()},value:u,onChange:async e=>{await i?.mutate.assertFact({attribute:"theme/code-theme",entity:s,data:{type:"string",value:e.target.value}})},children:b.bundledThemesInfo.map(e=>(0,t.jsx)("option",{value:e.id,children:e.displayName},e.id))})]}),(0,t.jsxs)("select",{className:"codeBlockLang grow text-right bg-transparent underline cursor-pointer truncate min-w-0",onClick:e=>{e.preventDefault(),e.stopPropagation()},value:c,onChange:async t=>{localStorage.setItem(x.LAST_USED_CODE_LANGUAGE_KEY,t.target.value),await i?.mutate.assertFact({attribute:"block/code-language",entity:e.entityID,data:{type:"string",value:t.target.value}})},children:[(0,t.jsx)("option",{value:"plaintext",children:"Plaintext"}),y.bundledLanguagesInfo.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]})}e.s(["HorizontalRule",()=>w],583132);let w=e=>{let n,i,a=(0,l.c)(5),s=(0,o.useIsBlockSelected)(e.entityID),c=!!s,u=`my-4 w-full border-border-light 101 ${s?"block-border-selected outline-offset-[3px]!":""} 102 `;return a[0]!==u?(n=(0,t.jsx)("hr",{className:u}),a[0]=u,a[1]=n):n=a[1],a[2]!==c||a[3]!==n?(i=(0,t.jsx)(r.BlockLayout,{isSelected:c,className:"border-transparent! outline-transparent! p-0! overflow-visible!",children:n}),a[2]=c,a[3]=n,a[4]=i):i=a[4],i}},132242,e=>{"use strict";e.s(["BlockPreview",()=>k,"PageLinkBlock",()=>y]);var t=e.i(843476),n=e.i(271645),r=e.i(500932),i=e.i(173275),a=e.i(433823),o=e.i(467592),s=e.i(813029),l=e.i(136297),c=e.i(662661),u=e.i(393991),d=e.i(603136),h=e.i(639341),p=e.i(637777),m=e.i(890882),f=e.i(970827),g=e.i(960622);function y(e){let n=(0,o.useEntity)(e.entityID,"block/card"),r=(0,o.useEntity)(n?.data.value||null,"page/type")?.data.value||"doc",{rep:l}=(0,o.useReplicache)(),c=(0,s.useIsBlockSelected)(e.entityID),u=(0,h.usePageLinkDisplay)(e.entityID),d=(0,s.useUIState)(e=>e.openPages.includes(n?.data.value||"")),g=!!(0,o.useEntity)(n?.data.value||null,"theme/card-background")||!!(0,o.useEntity)((0,f.useCardThemeEntity)(),"theme/card-background");return n?(0,t.jsx)(f.CardThemeProvider,{entityID:n?.data.value,children:(0,t.jsx)(i.BlockLayout,{hasBackground:"page",isSelected:!!c,areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,extraOptions:(0,t.jsx)(h.PageLinkSettingsButton,{entityID:e.entityID}),className:`cursor-pointer 103 pageLinkBlockWrapper relative group/pageLinkBlock 104 flex overflow-clip p-0! 105 ${g?"bg-[rgba(var(--bg-page),var(--bg-page-alpha))]":""} 106 ${d&&"border-accent-contrast! outline-accent-contrast!"} 107 `,children:(0,t.jsx)("div",{className:"w-full h-full",onClick:t=>{!n||t.isDefaultPrevented()||!t.shiftKey&&(t.preventDefault(),t.stopPropagation(),s.useUIState.getState().openPage(e.parent,n.data.value),l&&(0,a.focusPage)(n.data.value,l))},children:"compact"===u?(0,t.jsx)(b,{pageEntity:n.data.value}):"canvas"===r?(0,t.jsx)(m.CanvasLinkPreview,{children:(0,t.jsx)(p.CanvasContent,{entityID:n.data.value,preview:!0})}):(0,t.jsx)(v,{...e})})})}):(0,t.jsx)("div",{children:"An error occurred, there should be a page linked here!"})}
107function b(e){let n,a,o=(0,r.c)(5),[s]=(0,c.usePageMetadata)(e.pageEntity),u=s?.type==="heading";return o[0]!==s?(n=s&&(0,t.jsxs)("div",{className:"flex gap-2",children:[s.listData&&(0,t.jsx)(i.ListMarker,{...s,className:"pt-[8px]!"}),(0,t.jsx)(l.RenderedTextBlock,{entityID:s.entityID,type:"text"})]}),o[0]=s,o[1]=n):n=o[1],o[2]!==u||o[3]!==n?(a=(0,t.jsx)(d.CompactPageLink,{isHeading:u,title:n}),o[2]=u,o[3]=n,o[4]=a):a=o[4],a}function v(e){let n,u,d,h,p,m,f,g,y=(0,r.c)(22),{rep:b}=(0,o.useReplicache)(),v=(0,o.useEntity)(e.entityID,"block/card"),k=v?v.data.value:e.entityID,w=(0,c.usePageMetadata)(k);return y[0]===Symbol.for("react.memo_cache_sentinel")?(n={"--list-marker-width":"20px"},y[0]=n):n=y[0],y[1]!==k||y[2]!==e.parent||y[3]!==b?(u=t=>{t.isDefaultPrevented()||!t.shiftKey&&(t.preventDefault(),t.stopPropagation(),s.useUIState.getState().openPage(e.parent,k),b&&(0,a.focusPage)(k,b))},y[1]=k,y[2]=e.parent,y[3]=b,y[4]=u):u=y[4],y[5]!==w[0]?(d=w[0]&&(0,t.jsxs)("div",{className:`pageBlockOne outline-hidden resize-none align-top flex gap-2 ${"heading"===w[0].type?"font-bold":""}`,children:[w[0].listData&&(0,t.jsx)(i.ListMarker,{...w[0],className:"heading"===w[0].type?"pt-[12px]!":"pt-[8px]!"}),(0,t.jsx)(l.RenderedTextBlock,{entityID:w[0].entityID,type:"text"})]}),y[5]=w[0],y[6]=d):d=y[6],y[7]!==w[1]?(h=w[1]&&(0,t.jsxs)("div",{className:`pageBlockLineTwo outline-hidden resize-none align-top flex gap-2 ${"heading"===w[1].type?"font-bold":""}`,children:[w[1].listData&&(0,t.jsx)(i.ListMarker,{...w[1],className:"pt-[8px]!"}),(0,t.jsx)(l.RenderedTextBlock,{entityID:w[1].entityID,type:"text"})]}),y[7]=w[1],y[8]=h):h=y[8],y[9]!==w[2]?(p=w[2]&&(0,t.jsxs)("div",{className:`pageBlockLineThree outline-hidden resize-none align-top flex gap-2 ${"heading"===w[2].type?"font-bold":""}`,children:[w[2].listData&&(0,t.jsx)(i.ListMarker,{...w[2],className:"pt-[8px]!"}),(0,t.jsx)(l.RenderedTextBlock,{entityID:w[2].entityID,type:"text"})]}),y[9]=w[2],y[10]=p):p=y[10],y[11]!==d||y[12]!==h||y[13]!==p?(m=(0,t.jsxs)("div",{className:"my-2 ml-3 grow min-w-0 text-sm bg-transparent overflow-clip ",children:[d,h,p]}),y[11]=d,y[12]=h,y[13]=p,y[14]=m):m=y[14],y[15]!==k||y[16]!==e.preview?(f=!e.preview&&(0,t.jsx)(x,{entityID:k}),y[15]=k,y[16]=e.preview,y[17]=f):f=y[17],y[18]!==u||y[19]!==m||y[20]!==f?(g=(0,t.jsx)("div",{style:n,className:` 108 w-full h-[104px] 109 `,children:(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"pageLinkBlockContent w-full flex overflow-clip cursor-pointer h-full",onClick:u,children:[m,f]})})}),y[18]=u,y[19]=m,y[20]=f,y[21]=g):g=y[21],g}function x(e){let i,a,s,l,c,d=(0,r.c)(14),h=(0,u.useBlocks)(e.entityID),p=(0,n.useRef)(null),{rootEntity:m}=(0,o.useReplicache)(),f=(0,g.useCardBorderHidden)(e.entityID),y=(0,o.useEntity)(m,"theme/card-background-image"),b=(0,o.useEntity)(m,"theme/card-background-image-repeat"),v=(0,o.useEntity)(m,"theme/card-background-image-opacity"),x=(0,o.useEntity)(e.entityID,"theme/card-background-image"),w=(0,o.useEntity)(e.entityID,"theme/card-background-image-repeat"),C=(0,o.useEntity)(e.entityID,"theme/card-background-image-opacity"),S=x||y,E=x?w?.data?.value:b?.data.value,T=x?C?.data.value:v?.data.value||1,I="var(--page-width-unitless)",D=`pageLinkBlockPreview w-[120px] overflow-clip mx-3 mt-3 -mb-2 border rounded-md shrink-0 border-border-light flex flex-col gap-0.5 rotate-[4deg] origin-center ${f?"":"bg-bg-page"}`;return d[0]===Symbol.for("react.memo_cache_sentinel")?(i={width:`calc(1px * ${I})`,height:"calc(100vh - 64px)",transform:`scale(calc((120 / ${I} )))`,backgroundColor:"rgba(var(--bg-page), var(--bg-page-alpha))"},d[0]=i):i=d[0],d[1]!==S||d[2]!==T||d[3]!==E||d[4]!==f?(a=!f&&(0,t.jsx)("div",{className:`pageLinkBlockBackground 110 absolute top-0 left-0 right-0 bottom-0 111 pointer-events-none 112 `,style:{backgroundImage:S?`url(${S.data.src}), url(${S.data.fallback})`:void 0,backgroundRepeat:E?"repeat":"no-repeat",backgroundPosition:"center",backgroundSize:E||"cover",opacity:S?.data.src?T:1}}),d[1]=S,d[2]=T,d[3]=E,d[4]=f,d[5]=a):a=d[5],d[6]!==h?(s=h.slice(0,20).map((e,t,r)=>(0,n.createElement)(k,{pageType:"doc",previousBlock:r[t-1]||null,nextBlock:r[t+1]||null,nextPosition:"",previewRef:p,...e,key:e.factID})),d[6]=h,d[7]=s):s=d[7],d[8]!==a||d[9]!==s?(l=(0,t.jsxs)("div",{className:"absolute top-0 left-0 origin-top-left pointer-events-none ",style:i,children:[a,s]}
112),d[8]=a,d[9]=s,d[10]=l):l=d[10],d[11]!==D||d[12]!==l?(c=(0,t.jsx)("div",{ref:p,inert:!0,className:D,children:l}),d[11]=D,d[12]=l,d[13]=c):c=d[13],c}function k(e){let a,o,s,l,c=(0,r.c)(8),u=(0,n.useRef)(null),[d,h]=(0,n.useState)(!0);return c[0]!==e.previewRef?(a=()=>{if(!u.current)return;let t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?h(!0):h(!1)})},{threshold:.01,root:e.previewRef.current});return t.observe(u.current),()=>t.disconnect()},o=[e.previewRef],c[0]=e.previewRef,c[1]=a,c[2]=o):(a=c[1],o=c[2]),(0,n.useEffect)(a,o),c[3]!==e||c[4]!==d?(s=d&&(0,t.jsx)(i.Block,{...e,preview:!0}),c[3]=e,c[4]=d,c[5]=s):s=c[5],c[6]!==s?(l=(0,t.jsx)("div",{ref:u,children:s}),c[6]=s,c[7]=l):l=c[7],l}},639341,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(467592),i=e.i(206057),a=e.i(668767),o=e.i(22272),s=e.i(836811),l=e.i(868679),c=e.i(477180);function u(e){let t,i=(0,n.c)(2),a=(0,r.useEntity)(e,"page-link/display"),o=a?.data.value;return i[0]!==o?(t=(0,l.normalizePageLinkDisplay)(o),i[0]=o,i[1]=t):t=i[1],t}let d=e=>{let r,i,o,s=(0,n.c)(4),{selected:l}=e,c=`flex opaque-container border-tertiary! overflow-hidden w-full h-[52px] ${l?"border-accent-contrast!":""}`;return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-2 grow min-w-0",children:[(0,a.PlaceholderText)("lg"),(0,a.PlaceholderText)("md"),(0,a.PlaceholderText)("md","70%")]}),s[0]=r):r=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-1 w-[36px] h-[46px] mt-2 mr-2 shrink-0 border border-border-light rounded-sm rotate-[4deg] bg-bg-page",children:[(0,a.PlaceholderText)("sm"),(0,a.PlaceholderText)("sm"),(0,a.PlaceholderText)("sm","60%")]}),s[1]=i):i=s[1],s[2]!==c?(o=(0,t.jsxs)("div",{className:c,children:[r,i]}),s[2]=c,s[3]=o):o=s[3],o},h=e=>{let r,i,s,l=(0,n.c)(4),{selected:c}=e,u=`flex items-center gap-2 opaque-container border-tertiary! overflow-hidden w-full p-2 ${c?"border-accent-contrast!":""}`;return l[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"grow min-w-0",children:(0,a.PlaceholderText)("lg")}),i=(0,t.jsx)(o.ArrowRightTiny,{className:"shrink-0 text-tertiary"}),l[0]=r,l[1]=i):(r=l[0],i=l[1]),l[2]!==u?(s=(0,t.jsxs)("div",{className:u,children:[r,i]}),l[2]=u,l[3]=s):s=l[3],s};e.s(["PageLinkSettingsButton",0,function(e){let a,o,l,p,m=(0,n.c)(8),{rep:f}=(0,r.useReplicache)(),g=u(e.entityID);return m[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("h4",{children:"Page Style"}),m[0]=a):a=m[0],m[1]===Symbol.for("react.memo_cache_sentinel")?(o=[{value:"full",Icon:d},{value:"compact",Icon:h}],m[1]=o):o=m[1],m[2]!==e.entityID||m[3]!==f?(l=t=>{f&&((0,s.setEditorPref)("pageLinkDisplay",t),f.mutate.assertFact({entity:e.entityID,attribute:"page-link/display",data:{type:"page-link-display-union",value:t}}))},m[2]=e.entityID,m[3]=f,m[4]=l):l=m[4],m[5]!==g||m[6]!==l?(p=(0,t.jsxs)(i.BlockSettings,{label:"Page Link",className:"w-sm",children:[a,(0,t.jsx)(c.BlockSettingOptions,{options:o,value:g,onSelect:l})]}),m[5]=g,m[6]=l,m[7]=p):p=m[7],p},"usePageLinkDisplay",0,u])},132697,e=>{"use strict";e.s(["PostHeaderBlock",()=>u]);var t=e.i(843476),n=e.i(500932),r=e.i(813029),i=e.i(467592),a=e.i(173275),o=e.i(876082),s=e.i(332111),l=e.i(103136),c=e.i(206057);let u=e=>{let l,c,u,h=(0,n.c)(13),p=(0,r.useIsBlockSelected)(e.entityID),m=(0,i.useEntity)(e.entityID,"post-header/compact")?.data.value??!1,{data:f}=(0,o.useLeafletPublicationData)();if(e.preview){let e;return h[0]!==m?(e=(0,t.jsx)(a.BlockLayout,{isSelected:!1,className:"p-0! overflow-visible! bg-bg-page",children:(0,t.jsx)(s.PublicationMetadataPreview,{compact:m})}),h[0]=m,h[1]=e):e=h[1],e}let g=!!p;return h[2]!==e.entityID?(l=(0,t.jsx)(d,{entityID:e.entityID}),h[2]=e.entityID,h[3]=l):l=h[3],h[4]!==m||h[5]!==f?.publications?(c=f?.publications?(0,t.jsx)(s.PublicationMetadata,{compact:m}):(0,t.jsx)("div",{className:"px-3 py-2 sm:px-4 text-sm text-tertiary italic",children:"The post title appears here once this doc is in a publication."}),h[4]=m,h[5]=f?.publications,h[6]=c):c=h[6],h[7]!==e.areYouSure||h[8]!==e.setAreYouSure||h[9]!==g||h[10]!==l||h[11]!==c?(u=(0,t.jsx)(a.BlockLayout,{isSelected:g,areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,className:"p-0! overflow-visible! bg-bg-page",extraOptions:l,children:c}),h[7]=e.areYouSure,h[8]=e.setAreYouSure,h[9]=g,h[10]=l,h[11]=c,h[12]=u):u=h[12],u};function d(e){let r,a,o=(0,n.c)(7),{rep:s}=(0,i.useReplicache)(),u=(0,i.useEntity)(e.entityID,"post-header/compact")?.data.value??!1;return o[0]!==u||o[1]!==e.entityID||o[2]!==s?(r=()=>{s&&s.mutate.assertFact({entity:e.entityID,attribute:"post-header/compact",data:{type:"boolean",value:!u}})},o[0]=u,o[1]=e.entityID,o[2]=s,o[3]=r):r=o[3],o[4]!==u||o[5]!==r?(a=(0,t.jsx)(c.BlockSettings,{label:"Post Title",className:"w-xs",children:(0,t.jsx)(l.ToggleWithLabel,{label:"Compact",helpText:"Show just the title and byline, without the description.",toggle:u,onToggle:r})}),o[4]=u,o[5]=r,o[6]=a):a=o[6],a}},668767,e=>{"use strict";var t=e.i(843476),n=e.i(500932);function r(e,n){return(0,t.jsx)("div",{style:{width:n||"100%"},className:` 113 114 ${"sm"===e?"h-1.5! shrink bg-border-light":"lg"===e?"h-3 bg-border":"w-full h-1.5 bg-border"} 115 rounded-[2px]`})}e.s(["LargeIcon",0,e=>{let i,a,o,s,l,c,u=(0,n.c)(7),{selected:d}=e,h=`flex flex-col w-full gap-1 opaque-container border-tertiary! overflow-hidden ${d&&"border-accent-contrast!"}`;return u[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"w-full aspect-4/1 sm:aspect-2/1 bg-border bg-cover bg-center border-b border-border",style:{backgroundImage:"url(/imagePlaceholder.png)",backgroundBlendMode:"hard-light"}}),u[0]=i):i=u[0],u[1]===Symbol.for("react.memo_cache_sentinel")?(a=r("lg"),o=r("md"),s=r("md","80%"),u[1]=a,u[2]=o,u[3]=s):(a=u[1],o=u[2],s=u[3]),u[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-2 pt-0.5!",children:[a,o,s,(0,t.jsx)("div",{className:"flex justify-between mt-2 w-full",children:r("sm","60%")})]}),u[4]=l):l=u[4],u[5]!==h?(c=(0,t.jsxs)("div",{className:h,children:[i,l]}),u[5]=h,u[6]=c):c=u[6],c},"MedIcon",0,e=>{let i,a,o,s,l,c,u=(0,n.c)(7),{selected:d}=e,h=`flex opaque-container border-tertiary! overflow-hidden w-full ${d&&"border-accent-contrast!"}`;return u[0]===Symbol.for("react.memo_cache_sentinel")?(i=r("lg"),a=r("md"),o=r("md","80%"),u[0]=i,u[1]=a,u[2]=o):(i=u[0],a=u[1],o=u[2]),u[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-2 grow min-w-0",children:[i,a,o,(0,t.jsx)("div",{className:"flex justify-between mt-2 w-full",children:r("sm","60%")})]}),u[3]=s):s=u[3],u[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("div",{className:"sm:aspect 1/2 aspect-square h-[68px] bg-border border-l border-border shrink-0 bg-cover bg-center",style:{backgroundImage:"url(/imagePlaceholder.png)",backgroundBlendMode:"hard-light"}}),u[4]=l):l=u[4],u[5]!==h?(c=(0,t.jsxs)("div",{className:h,children:[s,l]}),u[5]=h,u[6]=c):c=u[6],c},"PlaceholderText",0,r,"SmallIcon",0,e=>{let i,a,o,s=(0,n.c)(4),{selected:l}=e,c=`flex gap-2 p-2 w-full overflow-hidden opaque-container border-tertiary! ${l&&"border-accent-contrast!"}`;return s[0]===Symbol.for("react.memo_cache_sentinel")?(i=r("lg"),s[0]=i):i=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)("div",{className:"flex flex-col gap-1 grow min-w-0",children:[i,(0,t.jsx)("div",{className:"flex justify-between mt-1 w-full",children:r("sm","60%")})]}),s[1]=a):a=s[1],s[2]!==c?(o=(0,t.jsx)("div",{className:c,children:a}),s[2]=c,s[3]=o):o=s[3],o}])},320526,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(248787),a=e.i(265658),o=e.i(663623);function s(e){return!e}function l(e){let i,a,o,s,l,u=(0,n.c)(13),[d,h]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),f=(0,r.useRef)(null);u[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{let e=f.current;if(!e)return;let t=()=>h(e.scrollHeight>e.clientHeight+1);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},u[0]=i):i=u[0],u[1]!==e.alt?(a=[e.alt],u[1]=e.alt,u[2]=a):a=u[2],(0,r.useEffect)(i,a);let g=p?"max-h-40 overflow-y-auto":"line-clamp-4";return u[3]!==e.alt||u[4]!==g?(o=(0,t.jsx)("div",{ref:f,className:g,children:e.alt}),u[3]=e.alt,u[4]=g,u[5]=o):o=u[5],u[6]!==p||u[7]!==d||u[8]!==e?(s=d&&!p&&(0,t.jsx)("button",{className:"absolute bottom-0 right-0 bg-bg-page pl-2 text-accent-contrast ",onMouseDown:c,onClick:t=>{t.stopPropagation(),e.onSeeMore?e.onSeeMore():m(!0)},children:"See more"}),u[6]=p,u[7]=d,u[8]=e,u[9]=s):s=u[9],u[10]!==o||u[11]!==s?(l=(0,t.jsx)("div",{className:"opaque-container leading-snug text-secondary border-none! text-sm px-1.5 p-1 shrink-0",children:(0,t.jsxs)("div",{className:"relative",children:[o,s]})}),u[10]=o,u[11]=s,u[12]=l):l=u[12],l}function c(e){return e.stopPropagation()}e.s(["AltTextBody",0,l,"ReadOnlyAltText",0,function(e){let c,u,d,h,p,m,f,g,y,b=(0,n.c)(20),[v,x]=(0,r.useState)(!1),[k,w]=(0,o.default)(),{height:C}=w,S=v?C:0,E=+!!v;b[0]===Symbol.for("react.memo_cache_sentinel")?(c={tension:450,friction:30,clamp:!0},b[0]=c):c=b[0],b[1]!==S||b[2]!==E?(u={height:S,opacity:E,config:c},b[1]=S,b[2]=E,b[3]=u):u=b[3];let T=(0,a.useSpring)(u);if(!e.alt)return null;b[4]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{let t=e.currentTarget;requestAnimationFrame(()=>{t.contains(document.activeElement)||x(!1)})},b[4]=d):d=b[4];let I=`imageAltButton absolute bottom-1.5 right-1.5 left-1.5 flex flex-col h-fit ${e.className||""}`;return b[5]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)("div",{className:"flex gap-1 items-center justify-end",children:(0,t.jsx)("button",{onMouseDown:e=>{e.stopPropagation(),x(s)},children:(0,t.jsx)("div",{className:"text-xs font-bold px-1 leading-tight opaque-container border-2! border-secondary! text-secondary rounded-md! h-5",children:"ALT"})})}
115),b[5]=h):h=b[5],b[6]!==T?(p={...T,overflow:"hidden"},b[6]=T,b[7]=p):p=b[7],b[8]!==e.alt||b[9]!==e.onSeeMore?(m=(0,t.jsx)(l,{alt:e.alt,onSeeMore:e.onSeeMore}),b[8]=e.alt,b[9]=e.onSeeMore,b[10]=m):m=b[10],b[11]!==k||b[12]!==m?(f=(0,t.jsx)("div",{className:"pt-1",ref:k,children:m}),b[11]=k,b[12]=m,b[13]=f):f=b[13],b[14]!==f||b[15]!==p?(g=(0,t.jsx)(i.animated.div,{style:p,children:f}),b[14]=f,b[15]=p,b[16]=g):g=b[16],b[17]!==g||b[18]!==I?(y=(0,t.jsxs)("div",{onBlur:d,className:I,children:[h,g]}),b[17]=g,b[18]=I,b[19]=y):y=b[19],y}])},890882,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["CanvasLinkPreview",0,function(e){let r,i,a,o=(0,n.c)(4),s="var(--page-width-unitless)";return o[0]===Symbol.for("react.memo_cache_sentinel")?(r={contain:"size layout paint"},o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(i={width:`calc(1px * ${s})`,height:"calc(1150px * 2)",transform:`scale(calc(((${s} - 36) / 1272 )))`},o[1]=i):i=o[1],o[2]!==e.children?(a=(0,t.jsx)("div",{style:r,className:"pageLinkBlockPreview shrink-0 h-[200px] w-full overflow-clip relative",children:(0,t.jsx)("div",{className:"absolute top-0 left-0 origin-top-left pointer-events-none w-full",style:i,children:e.children})}),o[2]=e.children,o[3]=a):a=o[3],a},"ScaledCanvas",0,function(e){let r,i,a,o,s=(0,n.c)(15),l=e.alt?"img":void 0,c=e.alt||void 0,u=`${e.size.width} / ${e.size.height}`;s[0]!==u?(r={aspectRatio:u,containerType:"inline-size"}
115,s[0]=u,s[1]=r):r=s[1];let d=`scale(tan(atan2(var(--canvas-box-width), ${e.size.width}px)))`;s[2]!==e.size.height||s[3]!==e.size.width||s[4]!==d?(i={width:e.size.width,height:e.size.height,"--canvas-box-width":"100cqw",transform:d},s[2]=e.size.height,s[3]=e.size.width,s[4]=d,s[5]=i):i=s[5];let h=i;return s[6]!==e.children||s[7]!==e.inert||s[8]!==h?(a=(0,t.jsx)("div",{inert:e.inert,className:"absolute top-0 left-0 origin-top-left",style:h,children:e.children}),s[6]=e.children,s[7]=e.inert,s[8]=h,s[9]=a):a=s[9],s[10]!==l||s[11]!==c||s[12]!==r||s[13]!==a?(o=(0,t.jsx)("div",{role:l,"aria-label":c,className:"relative w-full overflow-clip",style:r,children:a}),s[10]=l,s[11]=c,s[12]=r,s[13]=a,s[14]=o):o=s[14],o}])},132711,e=>{"use strict";e.s(["StandardSitePostItem",()=>b,"StandardSitePostItemPlaceholder",()=>v,"StandardSitePostItemView",()=>x]);var t=e.i(843476),n=e.i(500932),r=e.i(593302),i=e.i(522016);e.i(875981);var a=e.i(514085),o=e.i(191544),s=e.i(114366),l=e.i(465477),c=e.i(250209),u=e.i(927895),d=e.i(124670),h=e.i(510285),p=e.i(467592),m=e.i(229770),f=e.i(634622),g=e.i(425481),y=e.i(192506);function b(e){let r,i=(0,n.c)(10),{uri:a,size:o,currentPublicationUri:s,pageWidth:l,hideInteractions:c}=e,u=void 0===o?"medium":o,{data:d,isLoading:m}=(0,h.useStandardSitePost)(a),{rootEntity:f}=(0,p.useReplicache)(),g=(0,p.useEntity)(f,"theme/page-width")?.data.value;if(m){let e,n=l||g;return i[0]!==u||i[1]!==n?(e=(0,t.jsx)(v,{size:u,pageWidth:n}),i[0]=u,i[1]=n,i[2]=e):e=i[2],e}if(!d){let e;return i[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("p",{className:"text-sm italic text-tertiary",children:"Post not found."}),i[3]=e):e=i[3],e}return i[4]!==s||i[5]!==d||i[6]!==c||i[7]!==l||i[8]!==u?(r=(0,t.jsx)(x,{post:d,size:u,pageWidth:l,currentPublicationUri:s,hideInteractions:c}),i[4]=s,i[5]=d,i[6]=c,i[7]=l,i[8]=u,i[9]=r):r=i[9],r}function v(e){let r,i,a,o,s,l,c,u,d,h,p=(0,n.c)(27),{size:m,pageWidth:f}=e;if("small"===m){let e;return p[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"transparent-container flex w-full grow flex-col gap-1 p-3 ",children:[(0,t.jsx)("div",{className:"h-7 w-2/3 bg-border-light rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-32 bg-border-light rounded animate-pulse"})]}),(0,t.jsx)("hr",{className:"last:hidden border-border-light"})]}),p[0]=e):e=p[0],e}if("medium"===m){let e;return p[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"transparent-container flex w-full gap-3 items-stretch sm:min-h-36",children:[(0,t.jsxs)("div",{className:"flex w-full gap-2 grow flex-col justify-between min-w-0 pl-3 p-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"h-7 w-2/3 bg-border-light rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-full bg-border-light rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-5/6 bg-border-light rounded animate-pulse"})]}),(0,t.jsx)("div",{className:"h-4 w-32 bg-border-light rounded animate-pulse"})]}),(0,t.jsx)("div",{className:"self-start shrink-0 aspect-square w-16 sm:w-36 bg-border-light rounded animate-pulse"})]}),(0,t.jsx)("hr",{className:"last:hidden border-border-light"})]}),p[1]=e):e=p[1],e}let g=(f??0)>=768,y=`transparent-container flex flex-col items-stretch ${g?"sm:flex-row sm:gap-2 gap-0":""} w-full items-start`,b=`bg-border-light rounded animate-pulse shrink-0 ${g?"w-full sm:w-auto sm:h-[244px] aspect-[3/2]":"w-full aspect-[1.91/1]"}`;p[2]!==b?(r=(0,t.jsx)("div",{className:b}),p[2]=b,p[3]=r):r=p[3];let v=`flex w-full grow flex-col gap-2 justify-between p-3 pb-2 ${g?"sm:pb-3":""}`,x=`h-7 w-1/3 bg-border-light rounded animate-pulse ${g?"sm:h-8":""}`;p[4]!==x?(i=(0,t.jsx)("div",{className:x}),p[4]=x,p[5]=i):i=p[5];let k=`h-5 w-full bg-border-light rounded animate-pulse ${g?"sm:h-6":""}`;p[6]!==k?(a=(0,t.jsx)("div",{className:k}),p[6]=k,p[7]=a):a=p[7];let w=`h-5 w-5/6 bg-border-light rounded animate-pulse ${g?"sm:h-6":""}`;p[8]!==w?(o=(0,t.jsx)("div",{className:w}),p[8]=w,p[9]=o):o=p[9],p[10]!==o||p[11]!==i||p[12]!==a?(s=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[i,a,o]}),p[10]=o,p[11]=i,p[12]=a,p[13]=s):s=p[13];let C=`h-4 w-32 bg-border-light rounded animate-pulse ${g?"sm:h-5":""}`;return p[14]!==C?(l=(0,t.jsx)("div",{className:C}),p[14]=C,p[15]=l):l=p[15],p[16]!==s||p[17]!==l||p[18]!==v?(c=(0,t.jsxs)("div",{className:v,children:[s,l]}),p[16]=s,p[17]=l,p[18]=v,p[19]=c):c=p[19],p[20]!==y||p[21]!==c||p[22]!==r?(u=(0,t.jsxs)("div",{className:y,children:[r,c]}),p[20]=y,p[21]=c,p[22]=r,p[23]=u):u=p[23],p[24]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)("hr",{className:"last:hidden border-border-light"}),p[24]=d):d=p[24],p[25]!==u?(h=(0,t.jsxs)(t.Fragment,{children:[u,d]}),p[25]=u,p[26]=h):h=p[26],h}function x(e){let i,h,f,b,v,x,S,E,T,I,D,N=(0,n.c)(59),{post:A,size:_,currentPublicationUri:P,hideInteractions:M,pageWidth:R}=e,L=void 0===_?"medium":_,j=A.publication??void 0;N[0]!==A.record||N[1]!==A.uri||N[2]!==j?(i=(0,c.getDocumentURL)(A.record,A.uri,j),N[0]=A.record,N[1]=A.uri,N[2]=j,N[3]=i):i=N[3];let O=i,B=w;N[4]!==A.author||N[5]!==A.contributors?(h=A.contributors.length>0?(0,g.formatBylineNames)(A.contributors.map(B).filter(k))||void 0:B(A.author??{displayName:null,handle:null}),N[4]=A.author,N[5]=A.contributors,N[6]=h):h=N[6];let F=h;N[7]!==A.record.publishedAt?(f=A.record.publishedAt?(0,t.jsx)(l.L
115ocalizedDate,{dateString:A.record.publishedAt,omitYear:!0,options:{year:"2-digit",month:"short",day:"numeric"}}):void 0,N[7]=A.record.publishedAt,N[8]=f):f=N[8];let H=f;N[9]!==A.record?(b=A.record.description||(0,u.getFirstParagraph)(A.record),N[9]=A.record,N[10]=b):b=N[10];let U=b;if(N[11]!==A.record.coverImage||N[12]!==A.uri||N[13]!==L){let e;try{e=new r.AtUri(A.uri).host}catch{e=void 0}v=A.record.coverImage&&e?(0,d.blobRefToSrc)(A.record.coverImage.ref,e,void 0,{width:"large"===L?d.COVER_THUMBNAIL_WIDTH.large:d.COVER_THUMBNAIL_WIDTH.medium}):void 0,N[11]=A.record.coverImage,N[12]=A.uri,N[13]=L,N[14]=v}else v=N[14];let z=v,{rootEntity:$}=(0,p.useReplicache)(),V=(0,p.useEntity)($,"theme/page-width")?.data.value,q=R??V,G=A.publication?.record?.preferences,W=G?.showComments!==!1,K=G?.showMentions!==!1,Y=G?.showRecommends!==!1,Z=W?A.commentsCount:0,X=!W&&!K&&!Y;N[15]!==Z||N[16]!==O||N[17]!==M||N[18]!==X||N[19]!==A.mentionsCount||N[20]!==A.publication?.record||N[21]!==A.publication?.uri||N[22]!==A.recommendsCount||N[23]!==A.record||N[24]!==A.uri||N[25]!==W||N[26]!==K||N[27]!==Y?(x=M||X?void 0:(0,t.jsx)(m.InteractionPreview,{postRecord:A.record,quotesCount:A.mentionsCount,commentsCount:Z,recommendsCount:A.recommendsCount,documentUri:A.uri,tags:A.record.tags||[],postUrl:O,pubUri:A.publication?.uri,publication:A.publication?.record||void 0,showComments:W,showMentions:K,showRecommends:Y}),N[15]=Z,N[16]=O,N[17]=M,N[18]=X,N[19]=A.mentionsCount,N[20]=A.publication?.record,N[21]=A.publication?.uri,N[22]=A.recommendsCount,N[23]=A.record,N[24]=A.uri,N[25]=W,N[26]=K,N[27]=Y,N[28]=x):x=N[28];let Q=x,J=!!A.publication?.record&&(!P||A.publication.uri!==P);N[29]!==A.publication||N[30]!==J?(S=J&&A.publication?(0,t.jsx)(C,{publication:A.publication}):null,N[29]=A.publication,N[30]=J,N[31]=S):S=N[31];let ee=S;N[32]!==A.record?(E=(0,y.postHasMembersDelimiter)(A.record),N[32]=A.record,N[33]=E):E=N[33];let et=A.publication?.uri;N[34]!==A.record?(T=(0,y.getGatedPostPolicy)(A.record),N[34]=A.record,N[35]=T):T=N[35],N[36]!==F||N[37]!==H||N[38]!==O||N[39]!==Q||N[40]!==A.record.title||N[41]!==ee||N[42]!==E||N[43]!==et||N[44]!==T?(I={href:O,membersOnly:E,publicationUri:et,gatePolicy:T,title:A.record.title,author:F,date:H,interactions:Q,pubInfo:ee},N[36]=F,N[37]=H,N[38]=O,N[39]=Q,N[40]=A.record.title,N[41]=ee,N[42]=E,N[43]=et,N[44]=T,N[45]=I):I=N[45];let en=I;if("large"===L){let e;return N[46]!==en||N[47]!==z||N[48]!==U||N[49]!==q||N[50]!==A.record.title?(e=(0,t.jsx)(s.PublicationPostItemLarge,{...en,description:U,coverImageSrc:z,coverImageAlt:A.record.title,pageWidth:q}),N[46]=en,N[47]=z,N[48]=U,N[49]=q,N[50]=A.record.title,N[51]=e):e=N[51],e}if("medium"===L){let e;return N[52]!==en||N[53]!==z||N[54]!==U||N[55]!==A.record.title?(e=(0,t.jsx)(o.PublicationPostItemMedium,{...en,description:U,coverImageSrc:z,coverImageAlt:A.record.title}
115),N[52]=en,N[53]=z,N[54]=U,N[55]=A.record.title,N[56]=e):e=N[56],e}return N[57]!==en?(D=(0,t.jsx)(a.PublicationPostItemSmall,{...en}),N[57]=en,N[58]=D):D=N[58],D}function k(e){return!!e}function w(e){return e.displayName||e.handle||void 0}function C(e){let a,o,s,l,u,h=(0,n.c)(14),{publication:p}=e;if(!p.record)return null;h[0]!==p?(a=(0,c.getPublicationURL)(p),h[0]=p,h[1]=a):a=h[1];let m=a;return h[2]!==p.record.icon||h[3]!==p.uri?(o=p.record.icon?(0,d.blobRefToSrc)(p.record.icon.ref,new r.AtUri(p.uri).host):void 0,h[2]=p.record.icon,h[3]=p.uri,h[4]=o):o=h[4],h[5]!==p.record.name||h[6]!==o?(s=(0,t.jsx)(f.PubIcon,{tiny:!0,className:"w-3! h-3!",icon:o,pubName:p.record.name}),h[5]=p.record.name,h[6]=o,h[7]=s):s=h[7],h[8]!==p.record.name?(l=(0,t.jsx)("span",{className:"min-w-0 truncate",children:p.record.name}),h[8]=p.record.name,h[9]=l):l=h[9],h[10]!==m||h[11]!==s||h[12]!==l?(u=(0,t.jsxs)(i.default,{href:m,className:"relative w-fit max-w-full flex items-center gap-1.5 text-accent-contrast font-bold no-underline! text-sm",children:[s,l]}),h[10]=m,h[11]=s,h[12]=l,h[13]=u):u=h[13],u}},344290,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(593302),i=e.i(522016),a=e.i(634622),o=e.i(250209),s=e.i(124670),l=e.i(425481),c=e.i(66016);function u(){let e,r,i=(0,n.c)(2);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"shrink-0 w-12 h-12 rounded-full bg-border-light animate-pulse"}),i[0]=e):e=i[0],i[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsxs)("div",{className:"transparent-container flex w-full gap-3 items-start p-3",children:[e,(0,t.jsxs)("div",{className:"flex flex-col gap-2 grow min-w-0 pt-1",children:[(0,t.jsx)("div",{className:"h-6 w-1/2 bg-border-light rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-full bg-border-light rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-32 bg-border-light rounded animate-pulse"})]})]}),i[1]=r):r=i[1],r}function d(e){let c,u,d,p,m,f,g,y,b,v=(0,n.c)(24),{publication:x}=e,{record:k,author:w}=x;v[0]!==x?(c=(0,o.getPublicationURL)(x),v[0]=x,v[1]=c):c=v[1];let C=c;if(v[2]!==x.uri||v[3]!==k.icon){let e;try{e=new r.AtUri(x.uri).host}catch{e=void 0}u=k.icon&&e?(0,s.blobRefToSrc)(k.icon.ref,e):void 0,v[2]=x.uri,v[3]=k.icon,v[4]=u}else u=v[4];let S=u;v[5]!==w?(d=w&&(0,l.formatBylineNames)([w.displayName||w.handle].filter(h))||void 0,v[5]=w,v[6]=d):d=v[6];let E=d;return v[7]!==S||v[8]!==k.name?(p=(0,t.jsx)(a.PubIcon,{large:!0,icon:S,pubName:k.name,className:"shrink-0 mt-0.5"}),v[7]=S,v[8]=k.name,v[9]=p):p=v[9],v[10]!==k.name?(m=(0,t.jsx)("h3",{className:"text-accent-contrast leading-tight",children:k.name}),v[10]=k.name,v[11]=m):m=v[11],v[12]!==k.description?(f=k.description&&(0,t.jsx)("p",{className:"text-secondary text-sm line-clamp-3",children:k.description}),v[12]=k.description,v[13]=f):f=v[13],v[14]!==E?(g=E&&(0,t.jsx)("p",{className:"text-tertiary text-sm",children:E}),v[14]=E,v[15]=g):g=v[15],v[16]!==m||v[17]!==f||v[18]!==g?(y=(0,t.jsxs)("div",{className:"flex flex-col gap-1 grow min-w-0",children:[m,f,g]}),v[16]=m,v[17]=f,v[18]=g,v[19]=y):y=v[19],v[20]!==C||v[21]!==p||v[22]!==y?(b=(0,t.jsxs)(i.default,{href:C,className:"standardSitePublicationItem flex w-full gap-3 items-start p-3 text-primary no-underline! hover:no-underline",children:[p,y]}),v[20]=C,v[21]=p,v[22]=y,v[23]=b):b=v[23],b}function h(e){return!!e}e.s(["StandardSitePublicationItem",0,function(e){let r,i=(0,n.c)(4),{uri:a}=e,{data:o,isLoading:s}=(0,c.useStandardSitePublication)(a);if(s){let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(u,{}),i[0]=e):e=i[0],e}if(!o){let e;return i[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("p",{className:"text-sm italic text-tertiary p-4",children:"Publication not found."}),i[1]=e):e=i[1],e}return i[2]!==o?(r=(0,t.jsx)(d,{publication:o}),i[2]=o,i[3]=r):r=i[3],r},"StandardSitePublicationItemPlaceholder",0,u,"StandardSitePublicationItemView",0,d])},30552,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(616009),i=e.i(271645),a=e.i(885718),o=e.i(734582),s=e.i(702599),l=e.i(535903);let c=e=>{let r=(0,n.c)(18);if(null===e.wrapper&&null===e.children){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("br",{}),r[0]=e):e=r[0],e}if(null===e.wrapper){let n;return r[1]!==e.children?(n=(0,t.jsx)(t.Fragment,{children:e.children}),r[1]=e.children,r[2]=n):n=r[2],n}switch(e.wrapper){case"p":{let n;return r[3]!==e.attrs||r[4]!==e.children?(n=(0,t.jsx)("p",{...e.attrs,children:e.children}),r[3]=e.attrs,r[4]=e.children,r[5]=n):n=r[5],n}case"blockquote":{let n;return r[6]!==e.attrs||r[7]!==e.children?(n=(0,t.jsx)("blockquote",{...e.attrs,children:e.children}),r[6]=e.attrs,r[7]=e.children,r[8]=n):n=r[8],n}case"h1":{let n;return r[9]!==e.attrs||r[10]!==e.children?(n=(0,t.jsx)("h1",{...e.attrs,children:e.children}),r[9]=e.attrs,r[10]=e.children,r[11]=n):n=r[11],n}case"h2":{let n;return r[12]!==e.attrs||r[13]!==e.children?(n=(0,t.jsx)("h2",{...e.attrs,children:e.children}),r[12]=e.attrs,r[13]=e.children,r[14]=n):n=r[14],n}case"h3":{let n;return r[15]!==e.attrs||r[16]!==e.children?(n=(0,t.jsx)("h3",{...e.attrs,children:e.children}),r[15]=e.attrs,r[16]=e.children,r[17]=n):n=r[17],n}}};function u(e,t=!0){let n={style:{},className:""};return e.attributes?.code&&(n.className+=" inline-code"),e.attributes?.strong&&(n.style.fontWeight="700"),e.attributes?.em&&(n.style.fontStyle="italic"),e.attributes?.underline&&(n.style.textDecoration="underline"),e.attributes?.strikethrough&&(n.style.textDecoration="line-through",n.style.textDecorationColor=a.theme.colors.tertiary),e.attributes?.highlight&&(n.className+=" highlight",n["data-color"]=e.attributes.highlight.color,n.style.backgroundColor=e.attributes?.highlight.color==="1"?a.theme.colors["highlight-1"]:"2"===e.attributes.highlight.color?a.theme.colors["highlight-2"]:a.theme.colors["highlight-3"]),t&&e.attributes?.comment&&(n.className+=" comment-anchor",n["data-comment-id"]=e.attributes.comment.commentID),n}e.s(["RenderYJSFragment",0,function(e){let a,d,h=(0,n.c)(15),{value:p,wrapper:m,attrs:f,renderComments:g,footnoteDefs:y}=e,b=void 0===g||g;if(!p){let e;return h[0]!==f||h[1]!==m?(e=(0,t.jsx)(c,{wrapper:m,attrs:f}),h[0]=f,h[1]=m,h[2]=e):e=h[2],e}if(h[3]!==f||h[4]!==y||h[5]!==b||h[6]!==p||h[7]!==m){a=Symbol.for("react.early_return_sentinel");e:{let e=new r.Doc,n=o.toByteArray(p);(0,r.applyUpdate)(e,n);let[d]=e.getXmlElement("prosemirror").toArray();if(d.constructor===r.XmlElement)switch(d.nodeName){case"paragraph":{let e,n=0===d.toArray().length?(0,t.jsx)("br",{}):d.toArray().map((e,n)=>{if(e.constructor===r.XmlText){let r=e.toDelta();return 0===r.length?(0,t.jsx)("br",{},n):(0,t.jsx)(i.Fragment,{children:r.map((e,n)=>e.attributes?.link?(0,t.jsx)("a",{href:e.attributes.link.href,...u(e,b),children:e.insert},n):(0,t.jsx)("span",{...u(e,b),...f,children:e.insert},n))},n)}
115if(e.constructor===r.XmlElement&&"hard_break"===e.nodeName)return(0,t.jsx)("br",{},n);if(e.constructor===r.XmlElement&&"didMention"===e.nodeName){let r=e.getAttribute("did")||"",i=e.getAttribute("text")||"";return(0,t.jsx)("a",{href:(0,s.didToBlueskyUrl)(r),target:"_blank",rel:"noopener noreferrer",className:"mention",children:i},n)}if(e.constructor===r.XmlElement&&"footnote"===e.nodeName){let r=e.getAttribute("footnoteEntityID")||"";return(0,t.jsx)("span",{className:"footnote-ref","data-footnote-id":r,"data-footnote-def":y?.[r]},n)}if(e.constructor===r.XmlElement&&"atMention"===e.nodeName){let r=e.getAttribute("atURI")||"",i=e.getAttribute("text")||"",a=e.getAttribute("href")||void 0,o=e.getAttribute("icon")||void 0;return(0,t.jsx)(l.AtMentionLink,{atURI:r,href:a,icon:o,children:i},n)}return null});h[9]!==f||h[10]!==n||h[11]!==m?(e=(0,t.jsx)(c,{wrapper:m,attrs:f,children:n}),h[9]=f,h[10]=n,h[11]=m,h[12]=e):e=h[12],a=e;break e}case"hard_break":{let e;h[13]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{}),h[13]=e):e=h[13],a=e;break e}default:a=null;break e}}h[3]=f,h[4]=y,h[5]=b,h[6]=p,h[7]=m,h[8]=a}else a=h[8];return a!==Symbol.for("react.early_return_sentinel")?a:(h[14]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)("br",{}),h[14]=d):d=h[14],d)}])},734255,e=>{"use strict";var t=e.i(827121);e.i(571141),e.i(929987);var n=e.i(428762),r=e.i(674729),i=e.i(172604);function a(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}class o{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,l=e||i.tr,c=()=>(s||!t||l.getMeta("preventDispatch")||this.hasCustomState||a.dispatch(l),o.every(e=>!0===e)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(l,t),i=n(...e)(r);return o.push(i),u}])),run:c};return u}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:e,editor:r,view:o,state:a({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(s)]))}};return s}}function s(e,t,n){return void 0===e.config[t]&&e.parent?s(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?s(e.parent,t,n):null}):e.config[t]}function l(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function c(e,t,...n){return"function"==typeof e?t?e.bind(t)(...n):e(...n):e}function u(e){return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}class d{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=c(s(this,"addOptions",{name:this.name}))),this.storage=c(s(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new d(e)}configure(e={}){let t=this.extend({...this.config,addOptions:()=>(function e(t,n){let r={...t};
115return u(t)&&u(n)&&Object.keys(n).forEach(i=>{u(n[i])&&u(t[i])?r[i]=e(t[i],n[i]):r[i]=n[i]}),r})(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new d({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=c(s(t,"addOptions",{name:t.name})),t.storage=c(s(t,"addStorage",{name:t.name,options:t.options})),t}}function h(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>{var i;return n.strict?t[r]===e[r]:(i=t[r],"[object RegExp]"===Object.prototype.toString.call(i))?t[r].test(e[r]):t[r]===e[r]})}function p(e,t,n={}){return e.find(e=>e.type===t&&h(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function m(e,t,n={}){return!!p(e,t,n)}function f(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if(i.node&&i.node.marks.some(e=>e.type===t)||(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(e=>e.type===t)||(n=n||(null==(r=i.node.marks[0])?void 0:r.attrs),!p([...i.node.marks],t,n)))return;let a=i.index,o=e.start()+i.offset,s=a+1,l=o+i.node.nodeSize;for(;a>0&&m([...e.parent.child(a-1).marks],t,n);)a-=1,o-=e.parent.child(a).nodeSize;for(;s<e.parent.childCount&&m([...e.parent.child(s).marks],t,n);)l+=e.parent.child(s).nodeSize,s+=1;return{from:o,to:l}}function g(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function y(e){return e instanceof t.TextSelection}function b(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function v(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}d.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new t.Plugin({key:new t.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:a}=i,o=Math.min(...a.map(e=>e.$from.pos)),s=Math.max(...a.map(e=>e.$to.pos)),l=Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]));return function(e,t,n){let{from:r,to:i}=t,{blockSeparator:a="\n\n",textSerializers:o={}}=n||{},s="";return e.nodesBetween(r,i,(e,n,l,c)=>{var u;e.isBlock&&n>r&&(s+=a);let d=null==o?void 0:o[e.type.name];if(d)return l&&(s+=d({node:e,pos:n,parent:l,index:c,range:t})),!1;e.isText&&(s+=null==(u=null==e?void 0:e.text)?void 0:u.slice(Math.max(r,n)-n,i-n))}),s}(r,{from:o,to:s},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}});let x=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&x(r)}return e};function k(e){let t=`<body>${e}</body>`;return x(new window.DOMParser().parseFromString(t,"text/html").body)}function w(e,t,r){if(e instanceof n.Node||e instanceof n.Fragment)return e;r={slice:!0,parseOptions:{},...r};let i="object"==typeof e&&null!==e,a="string"==typeof e;if(i)try{if(Array.isArray(e)&&e.length>0)return n.Fragment.fromArray(e.map(e=>t.nodeFromJSON(e)));let i=t.nodeFromJSON(e);return r.errorOnInvalidContent&&i.check(),i}catch(n){if(r.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:n});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",n),w("",t,r)}if(a){if(r.errorOnInvalidContent){let i=!1,a="",o=new n.Schema({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:e=>(i=!0,a="string"==typeof e?e:e.outerHTML,null)}]}})});if(r.slice?n.DOMParser.fromSchema(o).parseSlice(k(e),r.parseOptions):n.DOMParser.fromSchema(o).parse(k(e),r.parseOptions),r.errorOnInvalidContent&&i)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${a}`)})}let i=n.DOMParser.fromSchema(t);return r.slice?i.parseSlice(k(e),r.parseOptions).content:i.parse(k(e),r.parseOptions)}return w("",t,r)}function C(){return"u">typeof navigator&&/Mac/.test(navigator.platform)}function S(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?l(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,u=s.filter(e=>
115!o||o.name===e.node.type.name).filter(e=>h(e.node.attrs,n,{strict:!1}));return a?!!u.length:u.reduce((e,t)=>e+t.to-t.from,0)>=c}function E(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function T(e,t){let n="string"==typeof t?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}function I(e){return t=>(function(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}})(t.$from,e)}function D(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return!!r&&r.attribute.keepOnSplit}))}function N(e,t){let n,{nodeExtensions:r}=(n=t.filter(e=>"extension"===e.type),{baseExtensions:n,nodeExtensions:t.filter(e=>"node"===e.type),markExtensions:t.filter(e=>"mark"===e.type)}),i=r.find(t=>t.name===e);if(!i)return!1;let a={name:i.name,options:i.options,storage:i.storage},o=c(s(i,"group",a));return"string"==typeof o&&o.split(" ").includes("list")}function A(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>null==t?void 0:t.includes(e.type.name));e.tr.ensureMarks(r)}}let _=(e,t)=>{let n=I(e=>e.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===i)return!0;let a=e.doc.nodeAt(i);return!(n.node.type===(null==a?void 0:a.type)&&(0,r.canJoin)(e.doc,n.pos))||(e.join(n.pos),!0)},P=(e,t)=>{let n=I(e=>e.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(n.start).after(n.depth);if(void 0===i)return!0;let a=e.doc.nodeAt(i);return!(n.node.type===(null==a?void 0:a.type)&&(0,r.canJoin)(e.doc,i))||(e.join(i),!0)};var M=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),null==(n=null==window?void 0:window.getSelection())||n.removeAllRanges())}),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{let{selection:i}=t,{ranges:a}=i;return!n||(a.forEach(({$from:n,$to:i})=>{e.doc.nodesBetween(n.pos,i.pos,(e,n)=>{if(e.type.isText)return;let{doc:i,mapping:a}=t,o=i.resolve(a.map(n)),s=i.resolve(a.map(n+e.nodeSize)),l=o.blockRange(s);if(!l)return;let c=(0,r.liftTarget)(l);if(e.type.isTextblock){let{defaultType:e}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(l.start,e)}(c||0===c)&&t.lift(l,c)})}),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>(0,i.createParagraphNear)(e,t),cut:(e,n)=>({editor:r,tr:i})=>{let{state:a}=r,o=a.doc.slice(e.from,e.to);i.deleteRange(e.from,e.to);let s=i.mapping.map(n);return i.insert(s,o.content),i.setSelection(new t.TextSelection(i.doc.resolve(s-1))),!0},deleteCurrentNode:()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;n-=1)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1},deleteNode:e=>({tr:t,state:n,dispatch:r})=>{let i=l(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;e-=1)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},deleteSelection:()=>({state:e,dispatch:t})=>(0,i.deleteSelection)(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>(0,i.exitCode)(e,t),extendMarkRange:(e,n={})=>({tr:r,state:i,dispatch:a})=>{let o=g(e,i.schema),{doc:s,selection:l}=r,{$from:c,from:u,to:d}=l;if(a){let e=f(c,o,n);if(e&&e.from<=u&&e.to>=d){let n=t.TextSelection.create(s,e.from,e.to);r.setSelection(n)}}return!0},first:e=>t=>{let n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,n={})=>({editor:r,view:i,tr:a,dispatch:o})=>{n={scrollIntoView:!0,...n};let s=()=>{(v()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&i.dom.focus(),requestAnimationFrame(()=>{!r.isDestroyed&&(i.focus(),(null==n?void 0:n.scrollIntoView)&&r.commands.scrollIntoView())})};if(i.hasFocus()&&null===e||!1===e)return!0;
115if(o&&null===e&&!y(r.state.selection))return s(),!0;let l=function(e,n=null){if(!n)return null;let r=t.Selection.atStart(e),i=t.Selection.atEnd(e);if("start"===n||!0===n)return r;if("end"===n)return i;let a=r.from,o=i.to;return"all"===n?t.TextSelection.create(e,b(0,a,o),b(e.content.size,a,o)):t.TextSelection.create(e,b(n,a,o),b(n,a,o))}(a.doc,e)||r.state.selection,c=r.state.selection.eq(l);return o&&(c||a.setSelection(l),c&&a.storedMarks&&a.setStoredMarks(a.storedMarks),s()),!0},forEach:(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,i,a)=>({tr:o,dispatch:s,editor:l})=>{var c;if(s){let s,u;a={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...a};try{s=w(i,l.schema,{parseOptions:{preserveWhitespace:"full",...a.parseOptions},errorOnInvalidContent:null!=(c=a.errorOnInvalidContent)?c:l.options.enableContentCheck})}catch(e){return l.emit("contentError",{editor:l,error:e,disableCollaboration:()=>{l.storage.collaboration&&(l.storage.collaboration.isDisabled=!0)}}),!1}let{from:d,to:h}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},p=!0,m=!0;if((!("type"in s)?s:[s]).forEach(e=>{e.check(),p=!!p&&e.isText&&0===e.marks.length,m=!!m&&e.isBlock}),d===h&&m){let{parent:e}=o.doc.resolve(d);!e.isTextblock||e.type.spec.code||e.childCount||(d-=1,h+=1)}if(p){if(Array.isArray(i))u=i.map(e=>e.text||"").join("");else if(i instanceof n.Fragment){let e="";i.forEach(t=>{t.text&&(e+=t.text)}),u=e}else u="object"==typeof i&&i&&i.text?i.text:i;o.insertText(u,d,h)}else u=s,o.replaceWith(d,h,u);a.updateSelection&&function(e,n){let i=e.steps.length-1;if(i<n)return;let a=e.steps[i];if(!(a instanceof r.ReplaceStep||a instanceof r.ReplaceAroundStep))return;let o=e.mapping.maps[i],s=0;o.forEach((e,t,n,r)=>{0===s&&(s=r)}),e.setSelection(t.Selection.near(e.doc.resolve(s),-1))}(o,o.steps.length-1),a.applyInputRules&&o.setMeta("applyInputRules",{from:d,text:u}),a.applyPasteRules&&o.setMeta("applyPasteRules",{from:d,text:u})}return!0},joinBackward:()=>({state:e,dispatch:t})=>(0,i.joinBackward)(e,t),joinDown:()=>({state:e,dispatch:t})=>(0,i.joinDown)(e,t),joinForward:()=>({state:e,dispatch:t})=>(0,i.joinForward)(e,t),joinItemBackward:()=>({state:e,dispatch:t,tr:n})=>{try{let i=(0,r.joinPoint)(e.doc,e.selection.$from.pos,-1);if(null==i)return!1;return n.join(i,2),t&&t(n),!0}catch{return!1}},joinItemForward:()=>({state:e,dispatch:t,tr:n})=>{try{let i=(0,r.joinPoint)(e.doc,e.selection.$from.pos,1);if(null==i)return!1;return n.join(i,2),t&&t(n),!0}catch{return!1}},joinTextblockBackward:()=>({state:e,dispatch:t})=>(0,i.joinTextblockBackward)(e,t),joinTextblockForward:()=>({state:e,dispatch:t})=>(0,i.joinTextblockForward)(e,t),joinUp:()=>({state:e,dispatch:t})=>(0,i.joinUp)(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=(function(e){let t,n,r,i,a=e.split(/-(?!$)/),o=a[a.length-1];"Space"===o&&(o=" ");for(let e=0;e<a.length-1;e+=1){let o=a[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))v()||C()?i=!0:n=!0;else throw Error(`Unrecognized modifier name: ${o}`)}return t&&(o=`Alt-${o}`),n&&(o=`Ctrl-${o}`),i&&(o=`Meta-${o}`),r&&(o=`Shift-${o}`),o})(e).split(/-(?!$)/),o=a.find(e=>!["Alt","Ctrl","Meta","Shift"].includes(e)),s=new KeyboardEvent("keydown",{key:"Space"===o?" ":o,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",e=>e(n,s))});return null==l||l.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0},lift:(e,t={})=>({state:n,dispatch:r})=>{let a=l(e,n.schema);return!!S(n,a,t)&&(0,i.lift)(n,r)},liftEmptyBlock:()=>({state:e,dispatch:t})=>(0,i.liftEmptyBlock)(e,t),liftListItem:e=>({state:t,dispatch:i})=>{var a;return(a=l(e,t.schema),function(e,t){let{$from:i,$to:o}=e.selection,s=i.blockRange(o,e=>e.childCount>0&&e.firstChild.type==a);return!!s&&(!t||(i.node(s.depth-1).type==a?function(e,t,i,a){let o=e.tr,s=a.end,l=a.$to.end(a.depth);s<l&&(o.step(new r.ReplaceAroundStep(s-1,l,s,l,new n.Slice(n.Fragment.from(i.create(null,a.parent.copy())),1,0),1,!0)),a=new n.NodeRange(o.doc.resolve(a.$from.pos),o.doc.resolve(l),a.depth));let c=(0,r.liftTarget)(a);if(null==c)return!1;o.lift(a,c);let u=o.doc.resolve(o.mapping.map(s,-1)-1);return(0,r.canJoin)(o.doc,u.pos)&&u.nodeBefore.type==u.nodeAfter.type&&o.join(u.pos),t(o.scrollIntoView()),!0}(e,t,a,s):function(e,t,i){let a=e.tr,o=i.parent;for(let e=i.end,t=i.endIndex-1,n=i.startIndex;t>n;t--)e-=o.child(t).nodeSize,a.delete(e-1,e+1);let s=a.doc.resolve(i.start),l=s.nodeAfter;if(a.mapping.map(i.end)!=i.start+s.nodeAfter.nodeSize)return!1;let c=0==i.startIndex,u=i.endIndex==o.childCount,d=s.node(-1),h=s.index(-1);if(!d.canReplace(h+ +!c,h+1,l.content.append(u?n.Fragment.empty:n.Fragment.from(o))))return!1;let p=s.pos,m=p+l.nodeSize;return a.step(new r.ReplaceAroundStep(p-!!c,m+ +!!u,p+1,m-1,new n.Slice((c?n.Fragment.empty:n.Fragment.from(o.copy(n.Fragment.empty))).append(u?n.Fragment.empty:n.Fragment.from(o.copy(n.Fragment.empty))),+!c,+!u),+!c)),t(a.scrollIntoView()),!0}(e,t,s)))})(t,i)},newlineInCode:()=>({state:e,dispatch:t})=>(0,i.newlineInCode)(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=E("string"==typeof e?e:e.name,r.schema);return!!s&&("node"===s&&(a=l(e,r.schema)),"mark"===s&&(o=g(e,r.schema)),i&&n.selection.ranges.forEac
115h(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&n.setNodeMarkup(r,void 0,T(e.attrs,t)),o&&e.marks.length&&e.marks.forEach(i=>{o===i.type&&n.addMark(r,r+e.nodeSize,o.create(T(i.attrs,t)))})})}),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,dispatch:n})=>{if(n){let n=new t.AllSelection(e.doc);e.setSelection(n)}return!0},selectNodeBackward:()=>({state:e,dispatch:t})=>(0,i.selectNodeBackward)(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>(0,i.selectNodeForward)(e,t),selectParentNode:()=>({state:e,dispatch:t})=>(0,i.selectParentNode)(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>(0,i.selectTextblockEnd)(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>(0,i.selectTextblockStart)(e,t),setContent:(e,t=!1,n={},r={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{var l,c;let{doc:u}=a;if("full"!==n.preserveWhitespace){let s=function(e,t,n={},r={}){return w(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}(e,i.schema,n,{errorOnInvalidContent:null!=(l=r.errorOnInvalidContent)?l:i.options.enableContentCheck});return o&&a.replaceWith(0,u.content.size,s).setMeta("preventUpdate",!t),!0}return o&&a.setMeta("preventUpdate",!t),s.insertContentAt({from:0,to:u.content.size},e,{parseOptions:n,errorOnInvalidContent:null!=(c=r.errorOnInvalidContent)?c:i.options.enableContentCheck})},setMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,l=g(e,r.schema);if(i)if(o){let e=function(e,t){let n=g(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}(r,l);n.addStoredMark(l.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===l)?e.marks.forEach(e=>{l===e.type&&n.addMark(o,s,l.create({...e.attrs,...t}))}):n.addMark(o,s,l.create(t))})});return function(e,t,n){var r;let{selection:i}=t,a=null;
115if(y(i)&&(a=i.$cursor),a){let t=null!=(r=e.storedMarks)?r:a.marks();return!!n.isInSet(t)||!t.some(e=>e.type.excludes(n))}let{ranges:o}=i;return o.some(({$from:t,$to:r})=>{let i=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}(r,n,l)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:a})=>{let o,s=l(e,n.schema);return(n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),s.isTextblock)?a().command(({commands:e})=>!!(0,i.setBlockType)(s,{...o,...t})(n)||e.clearNodes()).command(({state:e})=>(0,i.setBlockType)(s,{...o,...t})(e,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:n,dispatch:r})=>{if(r){let{doc:r}=n,i=b(e,0,r.content.size),a=t.NodeSelection.create(r,i);n.setSelection(a)}return!0},setTextSelection:e=>({tr:n,dispatch:r})=>{if(r){let{doc:r}=n,{from:i,to:a}="number"==typeof e?{from:e,to:e}:e,o=t.TextSelection.atStart(r).from,s=t.TextSelection.atEnd(r).to,l=b(i,o,s),c=b(a,o,s),u=t.TextSelection.create(r,l,c);n.setSelection(u)}return!0},sinkListItem:e=>({state:t,dispatch:i})=>{var a;return(a=l(e,t.schema),function(e,t){let{$from:i,$to:o}=e.selection,s=i.blockRange(o,e=>e.childCount>0&&e.firstChild.type==a);if(!s)return!1;let l=s.startIndex;if(0==l)return!1;let c=s.parent,u=c.child(l-1);if(u.type!=a)return!1;if(t){let i=u.lastChild&&u.lastChild.type==c.type,o=n.Fragment.from(i?a.create():null),l=new n.Slice(n.Fragment.from(a.create(null,n.Fragment.from(c.type.create(null,o)))),i?3:1,0),d=s.start,h=s.end;t(e.tr.step(new r.ReplaceAroundStep(d-(i?3:1),h,d,h,l,1,!0)).scrollIntoView())}return!0})(t,i)},splitBlock:({keepMarks:e=!0}={})=>({tr:n,state:i,dispatch:a,editor:o})=>{let{selection:s,doc:l}=n,{$from:c,$to:u}=s,d=D(o.extensionManager.attributes,c.node().type.name,c.node().attrs);if(s instanceof t.NodeSelection&&s.node.isBlock)return!!c.parentOffset&&!!(0,r.canSplit)(l,c.pos)&&(a&&(e&&A(i,o.extensionManager.splittableMarks),n.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;let h=u.parentOffset===u.parent.content.size,p=0===c.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(c.node(-1).contentMatchAt(c.indexAfter(-1))),m=h&&p?[{type:p,attrs:d}]:void 0,f=(0,r.canSplit)(n.doc,n.mapping.map(c.pos),1,m);if(!m&&!f&&(0,r.canSplit)(n.doc,n.mapping.map(c.pos),1,p?[{type:p}]:void 0)&&(f=!0,m=p?[{type:p,attrs:d}]:void 0),a){if(f&&(s instanceof t.TextSelection&&n.deleteSelection(),n.split(n.mapping.map(c.pos),1,m),p&&!h&&!c.parentOffset&&c.parent.type!==p)){let e=n.mapping.map(c.before()),t=n.doc.resolve(e);c.node(-1).canReplaceWith(t.index(),t.index()+1,p)&&n.setNodeMarkup(n.mapping.map(c.before()),p)}e&&A(i,o.extensionManager.splittableMarks),n.scrollIntoView()}return f},splitListItem:(e,i={})=>({tr:a,state:o,dispatch:s,editor:c})=>{var u;let d=l(e,o.schema),{$from:h,$to:p}=o.selection,m=o.selection.node;if(m&&m.isBlock||h.depth<2||!h.sameParent(p))return!1;let f=h.node(-1);if(f.type!==d)return!1;let g=c.extensionManager.attributes;if(0===h.parent.content.size&&h.node(-1).childCount===h.indexAfter(-1)){if(2===h.depth||h.node(-3).type!==d||h.index(-2)!==h.node(-2).childCount-1)return!1;if(s){let e=n.Fragment.empty,r=h.index(-1)?1:h.index(-2)?2:3;for(let t=h.depth-r;t>=h.depth-3;t-=1)e=n.Fragment.from(h.node(t).copy(e));let o=h.indexAfter(-1)<h.node(-2).childCount?1:h.indexAfter(-2)<h.node(-3).childCount?2:3,s={...D(g,h.node().type.name,h.node().attrs),...i},l=(null==(u=d.contentMatch.defaultType)?void 0:u.createAndFill(s))||void 0;e=e.append(n.Fragment.from(d.createAndFill(null,l)||void 0));let c=h.before(h.depth-(r-1));a.replace(c,h.after(-o),new n.Slice(e,4-r,0));let p=-1;a.doc.nodesBetween(c,a.doc.content.size,(e,t)=>{if(p>-1)return!1;e.isTextblock&&0===e.content.size&&(p=t+1)}),p>-1&&a.setSelection(t.TextSelection.near(a.doc.resolve(p))),a.scrollIntoView()}return!0}let y=p.pos===h.end()?f.contentMatchAt(0).defaultType:null,b={...D(g,f.type.n
115ame,f.attrs),...i},v={...D(g,h.node().type.name,h.node().attrs),...i};a.delete(h.pos,p.pos);let x=y?[{type:d,attrs:b},{type:y,attrs:v}]:[{type:d,attrs:b}];if(!(0,r.canSplit)(a.doc,h.pos,2))return!1;if(s){let{selection:e,storedMarks:t}=o,{splittableMarks:n}=c.extensionManager,r=t||e.$to.parentOffset&&e.$from.marks();if(a.split(h.pos,2,x).scrollIntoView(),!r||!s)return!0;let i=r.filter(e=>n.includes(e.type.name));a.ensureMarks(i)}return!0},toggleList:(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:u,can:d})=>{let{extensions:h,splittableMarks:p}=i.extensionManager,m=l(e,o.schema),f=l(t,o.schema),{selection:g,storedMarks:y}=o,{$from:b,$to:v}=g,x=b.blockRange(v),k=y||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;let w=I(e=>N(e.type.name,h))(g);if(x.depth>=1&&w&&x.depth-w.depth<=1){if(w.node.type===m)return u.liftListItem(f);if(N(w.node.type.name,h)&&m.validContent(w.node.content)&&s)return c().command(()=>(a.setNodeMarkup(w.pos,m),!0)).command(()=>_(a,m)).command(()=>P(a,m)).run()}return n&&k&&s?c().command(()=>{let e=d().wrapInList(m,r),t=k.filter(e=>p.includes(e.type.name));return a.ensureMarks(t),!!e||u.clearNodes()}).wrapInList(m,r).command(()=>_(a,m)).command(()=>P(a,m)).run():c().command(()=>!!d().wrapInList(m,r)||u.clearNodes()).wrapInList(m,r).command(()=>_(a,m)).command(()=>P(a,m)).run()},toggleMark:(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=g(e,r.schema);return!function(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?g(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>h(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);o+=a-n,s.push(...e.marks.map(e=>({mark:e,from:n,to:a})))})}),0===o)return!1;let l=s.filter(e=>!a||a.name===e.mark.type.name).filter(e=>h(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),c=s.filter(e=>!a||e.mark.type!==a&&e.mark.type.excludes(a)).reduce((e,t)=>e+t.to-t.from,0);return(l>0?l+c:l)>=o}(r,o,t)?i.setMark(o,t):i.unsetMark(o,{extendEmptyMarkRange:a})},toggleNode:(e,t,n={})=>({state:r,commands:i})=>{let a,o=l(e,r.schema),s=l(t,r.schema),c=S(r,o,n);return(r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),c)?i.setNode(s,a):i.setNode(o,{...a,...n})},toggleWrap:(e,t={})=>({state:n,commands:r})=>{let i=l(e,n.schema);return S(n,i,t)?r.lift(i):r.wrapIn(i,t)},undoInputRule:()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i,a=n[r];if(a.spec.isInputRules&&(i=a.getState(e))){if(t){let t=e.tr,n=i.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(i.text){let n=t.doc.resolve(i.from).marks();t.replaceWith(i.from,i.to,e.schema.text(i.text,n))}else t.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:i}=n;
115return!!r||(t&&i.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0)},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{var a;let{extendEmptyMarkRange:o=!1}=t,{selection:s}=n,l=g(e,r.schema),{$from:c,empty:u,ranges:d}=s;if(!i)return!0;if(u&&o){let{from:e,to:t}=s,r=null==(a=c.marks().find(e=>e.type===l))?void 0:a.attrs,i=f(c,l,r);i&&(e=i.from,t=i.to),n.removeMark(e,t,l)}else d.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,l)});return n.removeStoredMark(l),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=E("string"==typeof e?e:e.name,r.schema);return!!s&&("node"===s&&(a=l(e,r.schema)),"mark"===s&&(o=g(e,r.schema)),i&&n.selection.ranges.forEach(e=>{let i,s,l,c,u=e.$from.pos,d=e.$to.pos;n.selection.empty?r.doc.nodesBetween(u,d,(e,t)=>{a&&a===e.type&&(l=Math.max(t,u),c=Math.min(t+e.nodeSize,d),i=t,s=e)}):r.doc.nodesBetween(u,d,(e,r)=>{r<u&&a&&a===e.type&&(l=Math.max(r,u),c=Math.min(r+e.nodeSize,d),i=r,s=e),r>=u&&r<=d&&(a&&a===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),o&&e.marks.length&&e.marks.forEach(i=>{if(o===i.type){let a=Math.max(r,u),s=Math.min(r+e.nodeSize,d);n.addMark(a,s,o.create({...i.attrs,...t}))}}))}),s&&(void 0!==i&&n.setNodeMarkup(i,void 0,{...s.attrs,...t}),o&&s.marks.length&&s.marks.forEach(e=>{o===e.type&&n.addMark(l,c,o.create({...e.attrs,...t}))}))}),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>{let a=l(e,n.schema);return(0,i.wrapIn)(a,t)(n,r)},wrapInList:(e,t={})=>({state:i,dispatch:a})=>(function(e,t=null){return function(i,a){let{$from:o,$to:s}=i.selection,l=o.blockRange(s);if(!l)return!1;let c=a?i.tr:null;return!!function(e,t,i,a=null){let o=!1,s=t,l=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(i)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=l.resolve(t.start-2);s=new n.NodeRange(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new n.NodeRange(t.$from,l.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let c=(0,r.findWrapping)(s,i,a,t);return!!c&&(e&&function(e,t,i,a,o){let s=n.Fragment.empty;for(let e=i.length-1;e>=0;e--)s=n.Fragment.from(i[e].type.create(i[e].attrs,s));e.step(new r.ReplaceAroundStep(t.start-2*!!a,t.end,t.start,t.end,new n.Slice(s,0,0),i.length,!0));let l=0;for(let e=0;e<i.length;e++)i[e].type==o&&(l=e+1);let c=i.length-l,u=t.start+i.length-2*!!a,d=t.parent;for(let n=t.startIndex,i=t.endIndex,a=!0;n<i;n++,a=!1)!a&&(0,r.canSplit)(e.doc,u,c)&&(e.split(u,c),u+=2*c),u+=d.child(n).nodeSize}(e,t,c,o,i),!0)}(c,l,e,t)&&(a&&a(c.scrollIntoView()),!0)}})(l(e,i.schema),t)(i,a)});d.create({name:"commands",addCommands:()=>({...M})}),d.create({name:"drop",addProseMirrorPlugins(){return[new t.Plugin({key:new t.PluginKey("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),d.create({name:"editable",addProseMirrorPlugins(){return[new t.Plugin({key:new t.PluginKey("editable"),props:{editable:()=>this.editor.options.editable}})]}}),d.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new t.Plugin({key:new t.PluginKey("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),d.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:n})=>{let{selection:r,doc:i}=n,{empty:a,$anchor:o}=r,{pos:s,parent:l}=o,c=o.parent.isTextblock&&s>0?n.doc.resolve(s-1):o,u=c.parent.type.spec.isolating,d=o.pos-o.parentOffset,h=u&&1===c.parent.childCount?d===o.pos:t.Selection.atStart(i).from===s;return!!a&&!!l.type.isTextblock&&!l.textContent.length&&!!h&&(!h||"paragraph"!==o.parent.type.name)&&e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),n=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:n,"Mod-Delete":n,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},a={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":n,"Ctrl-Alt-Backspace":n,"Alt-Delete":n,"Alt-d":n,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return v()||C()?a:i},addProseMirrorPlugins(){return[new t.Plugin({key:new t.PluginKey("clearDocument"),appendTransaction:(e,n,r)=>{if(e.some(e=>e.getMeta("composition")))return;let i=e.some(e=>e.docChanged)&&!n.doc.eq(r.doc),s=e.some(e=>e.getMeta("preventClearDocument"));if(!i||s)return;let{empty:l,from:c,to:u}=n.selection,d=t.Selection.atStart(n.doc).from,h=t.Selection.atEnd(n.doc).to;
115if(l||c!==d||u!==h||!function e(t,{checkChildren:n=!0,ignoreWhitespace:r=!1}={}){var i;if(r){if("hardBreak"===t.type.name)return!0;if(t.isText)return/^\s*$/m.test(null!=(i=t.text)?i:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(0===t.content.childCount)return!0;if(n){let i=!0;return t.content.forEach(t=>{!1===i||e(t,{ignoreWhitespace:r,checkChildren:n})||(i=!1)}),i}return!1}(r.doc))return;let p=r.tr,m=a({state:r,transaction:p}),{commands:f}=new o({editor:this.editor,state:m});if(f.clearNodes(),p.steps.length)return p}})]}}),d.create({name:"paste",addProseMirrorPlugins(){return[new t.Plugin({key:new t.PluginKey("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),d.create({name:"tabindex",addProseMirrorPlugins(){return[new t.Plugin({key:new t.PluginKey("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var R=e.i(487461);e.s(["autolink",0,function(e){return new t.Plugin({key:new t.PluginKey("autolink"),appendTransaction:(t,n,i)=>{var a,o;let s,l=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),c=t.some(e=>e.getMeta("preventAutolink"));if(!l||c)return;let{tr:u}=i;if((function(e){let t,{mapping:n,steps:r}=e,i=[];return n.maps.forEach((e,t)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:n}=r[t];if(void 0===e||void 0===n)return;a.push({from:e,to:n})}a.forEach(({from:e,to:r})=>{let a=n.slice(t).map(e,-1),o=n.slice(t).map(r),s=n.invert().map(a,-1),l=n.invert().map(o);i.push({oldRange:{from:s,to:l},newRange:{from:a,to:o}})})}),1===(t=function(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)})}(i)).length?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))})((a=n.doc,o=[...t],s=new r.Transform(a),o.forEach(e=>{e.steps.forEach(e=>{s.step(e)})}),s)).forEach(({newRange:t})=>{var n,r;let a,o,s,l=(n=i.doc,r=e=>e.isTextblock,s=[],n.nodesBetween(t.from,t.to,(e,t)=>{r(e)&&s.push({node:e,pos:t})}),s);if(l.length>1?(a=l[0],o=i.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):l.length&&i.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(a=l[0],o=i.doc.textBetween(a.pos,t.to,void 0," ")),a&&o){let t=o.split(" ").filter(e=>""!==e);if(t.length<=0)return!1;let n=t[t.length-1],r=a.pos+o.lastIndexOf(n);if(!n)return!1;let s=(0,R.tokenize)(n).map(t=>t.toObject(e.defaultProtocol));if(!(1===s.length?s[0].isLink:3===s.length&&!!s[1].isLink&&["()","[]"].includes(s[0].value+s[2].value)))return!1;s.filter(e=>e.isLink).map(e=>({...e,from:r+e.start+1,to:r+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{var n,r,a;let o;(n=t.from,r=t.to,a=i.doc,o=[],n===r?a.resolve(n).marks().forEach(e=>{let t=f(a.resolve(n),e.type);t&&o.push({mark:e,...t})}):a.nodesBetween(n,r,(e,t)=>{e&&(null==e?void 0:e.nodeSize)!==void 0&&o.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),o).some(t=>t.mark.type===e.type)||u.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),u.steps.length)return u}})}],734255)},580714,e=>{"use strict";var t=e.i(827121),n=e.i(571141);let r=new t.PluginKey("commentDraft"),i=new t.Plugin({key:r,state:{init:()=>n.DecorationSet.empty,apply(e,t){let i=e.getMeta(r);return null===i?n.DecorationSet.empty:i?n.DecorationSet.create(e.doc,[n.Decoration.inline(i.from,i.to,{class:"comment-anchor comment-draft-anchor"})]):t.map(e.mapping,e.doc)}},props:{decorations:e=>r.getState(e)}});e.s(["commentDraftKey",0,r,"commentDraftPlugin",0,i,"getCommentDraftRange",0,function(e){let t=r.getState(e),n=t?.find()[0];return n?{from:n.from,to:n.to}:null}])},136297,300781,e=>{"use strict";e.s(["RenderedTextBlock",()=>eE,"TextBlock",()=>ew],136297);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(680915),a=e.i(553445),o=e.i(619469),s=e.i(467592),l=e.i(834732),c=e.i(827121),u=e.i(30552),d=e.i(301107),h=e.i(173275),p=e.i(394191),m=e.i(468034),f=e.i(813029),g=e.i(170685),y=e.i(339012),b=e.i(988314),v=e.i(492122),x=e.i(69278),k=e.i(447440),w=e.i(438424),C=e.i(793610),S=e.i(450030),E=e.i(861370),T=e.i(750590),I=e.i(760524),D=e.i(851181),N=e.i(876082),A=e.i(788613),_=e.i(78448),P=e.i(38226),M=e.i(612192),R=e.i(939904),L=e.i(670751),j=e.i(593302),O=e.i(283599),B=e.i(178761),F=e.i(935593),H=e.i(22272),U=e.i(226810),z=e.i(432801);function $(e){let i,a,o,s,l,c,u,d,h,p,m,f,g,y,b,v,x,k,w,C,S,E=(0,n.c)(62),[T,I]=(0,r.useState)(""),D=(0,r.useRef)(null),N=(0,r.useRef)(null),{suggestionIndex:A,setSuggestionIndex:_,suggestions:P,scope:M,setScope:R,searchComplete:L,hasDidScopableServices:j}=function(e,t){let[i,a]=(0,r.useState)(0),[o,s]=(0,r.useState)([]),[l,c]=(0,r.useState)({type:"default"}),[u,d]=(0,r.useState)(!1),h=function(e){let t,r=(0,n.c)(1);r[0]===Symbol.for("react.memo_cache_sentinel")?(t={revalidateOnFocus:!1,revalidateOnReconnect:!1},r[0]=t):t=r[0];let{data:i}=(0,O.default)(e?"mention_services":null,ep,t);return i||eh}(t),p=(0,r.useMemo)(()=>h.length>0?[es,el,...h]:eh,[h]),m=p.length>0,f=(0,r.useMemo)(()=>h.filter(e=>"service"===e.type&&e.canBeScopedToDid),[h]),g=f.length>0,y=(0,r.useCallback)(e=>{s([]),c(e)},[]);return(0,r.useEffect)(()=>{let n=!1;if(d(!1),"did_services"===l.type){s(f.filter(t=>"service"!==t.type||t.name.toLowerCase().includes((e||"").toLowerCase()))),d(!0);return}if(m&&"default"===l.type){let t=p.filter(t=>"service"!==t.type||t.name.toLowerCase().includes((e||"").toLowerCase()));if(s(t),d(!0),!e||t.length>0)return;d(!1)}let r=setTimeout(async()=>{let r;if(!n&&t){if("identities"===l.type)r=await eu(e||"",10);else if("publications"===l.type)r=await ed(e||"",10);else if("publication"===l.type){let t=await (0,F.callRPC)("search_publication_documents",{publication_uri:l.uri,query:e||"",limit:10});r=(t?.result?.documents??[]).map(e=>
115({type:"post",uri:e.uri,title:e.title,url:e.url}))}else if("service"===l.type){let t=await (0,F.callRPC)("proxy_mention_search",{service_uri:l.serviceUri,search:e||"",...l.scope?{scope:l.scope}:{}});r=(t?.result?.results??[]).map(e=>({type:"service_result",uri:e.uri,name:e.name,description:e.description,labels:e.labels,href:e.href,icon:e.icon,embed:e.embed,subscope:e.subscope}))}else if(m)r=await eu(e||"",10);else{let[t,n]=await Promise.all([eu(e||"",8),ed(e||"",8)]);r=[...t,...n]}n||(s(r),d(!0))}},300);return()=>{n=!0,clearTimeout(r)}},[e,l,t,m,p,f]),(0,r.useEffect)(()=>{i>o.length-1&&a(Math.max(0,o.length-1))},[i,o.length]),{suggestions:o,suggestionIndex:i,setSuggestionIndex:a,scope:l,setScope:y,searchComplete:u,hasDidScopableServices:g}}(T,e.open),H=L&&""!==T&&0===P.length;E[0]===Symbol.for("react.memo_cache_sentinel")?(a=["did","publication","post","service","service_result"],E[0]=a):a=E[0];let z=a;if(E[1]!==P){let e;E[3]===Symbol.for("react.memo_cache_sentinel")?(e=(e,t)=>z.indexOf(e.type)-z.indexOf(t.type),E[3]=e):e=E[3],o=[...P].sort(e),E[1]=P,E[2]=o}else o=E[2];i=o,E[4]!==R||E[5]!==_?(s=e=>{I(""),_(0),R(e)},E[4]=R,E[5]=_,E[6]=s):s=E[6];let $=s;E[7]!==e.open?(l=()=>{e.open&&D.current&&setTimeout(()=>D.current?.focus(),0)},c=[e.open],E[7]=e.open,E[8]=l,E[9]=c):(l=E[8],c=E[9]),(0,r.useEffect)(l,c),E[10]!==e.open||E[11]!==R||E[12]!==_?(u=()=>{e.open||(I(""),R({type:"default"}),_(0))},d=[e.open,R,_],E[10]=e.open,E[11]=R,E[12]=_,E[13]=u,E[14]=d):(u=E[13],d=E[14]),(0,r.useEffect)(u,d),E[15]!==$||E[16]!==j||E[17]!==e||E[18]!==M||E[19]!==T||E[20]!==_||E[21]!==i||E[22]!==A?(h=t=>{if("Escape"===t.key||"Backspace"===t.key&&""===T){t.preventDefault(),e.onOpenChange(!1),e.view.current?.focus();return}let n=N.current?.dataset.side==="top";if(t.key===(n?"ArrowDown":"ArrowUp"))t.preventDefault(),A>0&&_(X);else if(t.key===(n?"ArrowUp":"ArrowDown"))t.preventDefault(),A<i.length-1&&_(Z);else if("Tab"===t.key){let e=i[A];e?.type==="publication"?(t.preventDefault(),$({type:"publication",uri:e.uri,name:e.name})):e?.type==="did"&&j?(t.preventDefault(),$({type:"did_services",did:e.did,name:e.displayName||e.handle})):e?.type==="service"&&"did_services"===M.type?(t.preventDefault(),$({type:"service",serviceUri:e.serviceUri,name:e.name,scope:M.did,serviceName:e.name,scopedDid:M.did,scopedDidName:M.name})):e?.type==="service"?(t.preventDefault(),$(eo(e))):e?.type==="service_result"&&e.subscope&&"service"===M.type&&(t.preventDefault(),$({type:"service",serviceUri:M.serviceUri,name:e.name,scope:e.subscope.scope,serviceName:M.serviceName??M.name,scopedDid:M.scopedDid,scopedDidName:M.scopedDidName}))}else if("Enter"===t.key){t.preventDefault();let n=i[A];n?.type==="service"&&"did_services"===M.type?$({type:"service",serviceUri:n.serviceUri,name:n.name,scope:M.did,serviceName:n.name,scopedDid:M.did,scopedDidName:M.name}):n?.type==="service"?$(eo(n)):(t.ctrlKey||t.metaKey)&&n?.type==="service_result"&&n.embed&&e.onEmbed?(e.onEmbed(n),e.onOpenChange(!1)):n&&(e.onSelect(n),e.onOpenChange(!1))}else if(" "===t.key&&""===T&&"default"===M.type&&(t.preventDefault(),e.onOpenChange(!1),e.view.current)){let t=e.view.current,n=t.state.tr.insertText(" ");t.dispatch(n),t.focus()}},E[15]=$,E[16]=j,E[17]=e,E[18]=M,E[19]=T,E[20]=_,E[21]=i,E[22]=A,E[23]=h):h=E[23];let Q=h;if(!e.open||!e.coords)return null;E[24]!==$?(p=(e,n)=>{if(n?.type==="identities"||n?.type==="publications"||n?.type==="publication"||n?.type==="service"||n?.type==="did_services")return(0,t.jsx)(ea,{scope:n,handleScopeChange:()=>{"service"===n.type&&n.scopedDid?$({type:"did_services",did:n.scopedDid,name:n.scopedDidName??n.scopedDid}):"service"===n.type&&n.scope?$({type:"service",serviceUri:n.serviceUri,name:n.serviceName??n.name}):$({type:"default"})}});switch(e){case"did":return"People";case"publication":return"Publications";case"post":return"Posts";case"service":return"Services";case"service_result":return null}},E[24]=$,E[25]=p):p=E[25];let J=p,ec=e.coords.top-24;return E[26]!==e.coords.left||E[27]!==ec?(m=(0,t.jsx)(B.Anchor,{style:{top:ec,left:e.coords.left,height:24,position:"absolute"}}),E[26]=e.coords.left,E[27]=ec,E[28]=m):m=E[28],E[29]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)("div",{className:"text-tertiary",children:(0,t.jsx)(U.SearchTiny,{className:"w-4 h-4 shrink-0"})}),E[29]=f):f=E[29],E[30]!==_?(g=e=>{I(e.target.value),_(0)},E[30]=_,E[31]=g):g=E[31],E[32]!==e.placeholder||E[33]!==M?(y=function(e,t){switch(e.type){case"identities":return"Search peopleâ¦";case"publications":return"Search publicationsâ¦";case"publication":return"Search postsâ¦";case"service":return`Search ${e.name}...`;case"did_services":return`Search ${e.name} with...`;default:return t??"Search people & publicationsâ¦"}}(M,e.placeholder),E[32]=e.placeholder,E[33]=M,E[34]=y):y=E[34],E[35]!==Q||E[36]!==T||E[37]!==g||E[38]!==y?(b=(0,t.jsx)("div",{className:"flex flex-col items-center gap-2 px-2 py-1 border-b group-data-[side=top]/mention-menu:border-b-0 group-data-[side=top]/mention-menu:border-t border-border-light bg-bg-page sticky top-0 group-data-[side=top]/mention-menu:sticky group-data-[side=top]/mention-menu:bottom-0 group-data-[side=top]/mention-menu:top-auto z-10 shrink-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-1 min-w-0 text-primary",children:[f,(0,t.jsx)("input",{ref:D,size:100,type:"text",value:T,onChange:g,onKeyDown:Q,autoFocus:!0,placeholder:y,className:"flex-1 w-full min-w-0 bg-transparent border-none outline-none text-sm placeholder:text-tertiary"})]})}),E[35]=Q,E[36]=T,E[37]=g,E[38]=y,E[39]=b):b=E[39],E[40]!==H||E[41]!==i.length?(v=0===i.length&&H&&(0,t.jsx)("div",{className:"text-sm text-tertiary italic px-3 py-1 text-center",children:"No results found"}),E[40]=H,E[41]=i.length,E[42]=v):v=E[42],E[43]!==J||E[44]!==$||E[45]!==j||E[46]!==e||E[47]!==M||E[48]!==i||E[49]!==A?(x=i.map((n,a)=>{let o=i[a-1],s=0===a||o&&o.type!==n.type,l="did"===n.type?n.did:"service"===n.type?n.serviceUri:n.uri;return(0,t.jsxs)(r.Fragment,{children:[s&&(0,t.jsxs)(t.Fragment,{children:[a>0&&(0,t.jsx)("hr",{className:"border-border-light mx-1 my-1"}),(0,t.jsx)("div",{className:"text-xs text-tertiary font-bold pt-1 px-2",children:J(n.type,M)})]}),"did"===n.type?(0,t.jsx)(ee,{onClick:()=>{e.onSelect(n),e.onOpenChange(!1)},onMouseDown:K,displayName:n.displayName,handle:n.handle,avatar:n.avatar,selected:a===A,onServicesClick:j?()=>{$({type:"did_services",did:n.did,name:n.displayName||n.handle})}:void 0}):"publication"===n.type?(0,t.jsx)(et,{onClick:()=>{e.onSelect(n),e.onOpenChange(!1)},onMouseDown:W,pubName:n.name,uri:n.uri,selected:a===A,onPostsClick:()=>{$({type:"publication",uri:n.uri,name:n.name})}}):"service"===n.type?(0,t.jsx)(er,{onClick:()=>{"did_services"===M.type?$({type:"service",serviceUri:n.serviceUri,name:n.name,scope:M.did,serviceName:n.name,scopedDid:M.did,scopedDidName:M.name}):$(eo(n))},onMouseDown:G,name:n.name,description:n.description,selected:a===A}):"service_result"===n.type?(0,t.jsx)(ei,{onClick:()=>{e.onSelect(n),e.onOpenChange(!1)},onMouseDown:q,name:n.name,description:n.description,labels:n.labels,icon:n.icon,hasEmbed:!!n.embed,onEmbedClick:n.embed&&e.onEmbed?()=>{e.onEmbed(n),e.onOpenChange(!1)}:void 0,subscope:n.subscope,onSubscopeClick:n.subscope&&"service"===M.type?()=>{$({type:"service",serviceUri:M.serviceUri,name:n.name,scope:n.subscope.scope,serviceName:M.serviceName??M.name})}:void 0,selected:a===A}):(0,t.jsx)(en,{onClick:()=>{e.onSelect(n),e.onOpenChange(!1)},onMouseDown:V,title:n.title,selected:a===A})]},l)}),E[43]=J,E[44]=$,E[45]=j,E[46]=e,E[47]=M,E[48]=i,E[49]=A,E[50]=x):x=E[50],E[51]!==x?(k=(0,t.jsx)("ul",{className:"list-none p-0 text-sm flex flex-col group-data-[side=top]/mention-menu:flex-col-reverse",children:x}),E[51]=x,E[52]=k):k=E[52],E[53]!==v||E[54]!==k?(w=(0,t.jsxs)("div",{className:"overflow-y-auto flex-1 min-h-0",children:[v,k]}),E[53]=v,E[54]=k,E[55]=w):w=E[55],E[56]!==b||E[57]!==w?(C=(0,t.jsx)(B.Portal,{children:(0,t.jsxs)(B.Content,{ref:N,align:"start",sideOffset:4,collisionPadding:32,onOpenAutoFocus:Y,className:`dropdownMenu portalStyles group/mention-menu z-[60] bg-bg-page 116 flex data-[side=top]:flex-col-reverse flex-col 117 p-1 gap-1 text-primary 118 border border-border rounded-md shadow-md 119 sm:max-w-xs w-[1000px] max-w-(--radix-popover-content-available-width) 120 max-h-(--radix-popover-content-available-height) 121 overflow-hidden`,children:[b,w]})}),E[56]=b,E[57]=w,E[58]=C):C=E[58],E[59]!==m||E[60]!==C?(S=(0,t.jsxs)(B.Root,{open:!0,children:[m,C]}),E[59]=m,E[60]=C,E[61]=S):S=E[61],S}function V(e){return e.preventDefault()}function q(e){return e.preventDefault()}function G(e){return e.preventDefault()}function W(e){return e.preventDefault()}function K(e){return e.preventDefault()}function Y(e){return e.preventDefault()}function Z(e){return e+1}function X(e){return e-1}let Q=e=>{let r,i,a,o,s,l,c=(0,n.c)(16),u=` 122 menuItem w-full flex-row! gap-2! 123 text-secondary leading-snug text-sm 124 ${e.subtext?"py-1!":"py-2!"} 125 ${e.selected?"bg-[var(--accent-light)]!":""}`;return c[0]!==e?(r=()=>{e.onClick()},i=t=>e.onMouseDown(t),c[0]=e,c[1]=r,c[2]=i):(r=c[1],i=c[2]),c[3]!==e.result?(a=(0,t.jsx)("div",{className:"flex gap-2 items-center w-full truncate justify-between",children:e.result}),c[3]=e.result,c[4]=a):a=c[4],c[5]!==e.subtext?(o=e.subtext&&(0,t.jsx)("div",{className:"text-tertiary text-xs font-normal min-w-0 pb-[1px]",children:e.subtext}),c[5]=e.subtext,c[6]=o):o=c[6],c[7]!==a||c[8]!==o?(s=(0,t.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[a,o]}),c[7]=a,c[8]=o,c[9]=s):s=c[9],c[10]!==e.icon||c[11]!==u||c[12]!==r||c[13]!==i||c[14]!==s?(l=(0,t.jsxs)("button",{className:u,onClick:r,onMouseDown:i,children:[e.icon,s]}),c[10]=e.icon,c[11]=u,c[12]=r,c[13]=i,c[14]=s,c[15]=l):l=c[15],l},J=e=>{let r,i,a,o=(0,n.c)(6);return o[0]!==e?(r=t=>{t.preventDefault(),t.stopPropagation(),e.onClick()},o[0]=e,o[1]=r):r=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(H.ArrowRightTiny,{className:"scale-80"}),o[2]=i):i=o[2],o[3]!==e.children||o[4]!==r?(a=(0,t.jsxs)("span",{className:"flex flex-row items-center h-full shrink-0 text-xs font-normal text-tertiary hover:text-accent-contrast cursor-pointer",onClick:r,onMouseDown:eg,children:[e.children," ",i]}),o[3]=e.children,o[4]=r,o[5]=a):a=o[5],a},ee=e=>{let r,i,a,o,s=(0,n.c)(15),l=e.displayName?e.displayName:e.handle;return s[0]!==e.avatar?(r=e.avatar?(0,t.jsx)("img",{src:e.avatar,alt:"",className:"w-5 h-5 rounded-full shrink-0"}):(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-border shrink-0"}),s[0]=e.avatar,s[1]=r):r=s[1],s[2]!==l||s[3]!==e.onServicesClick?(i=e.onServicesClick?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"truncate w-full grow min-w-0",children:l}),(0,t.jsx)(J,{onClick:e.onServicesClick,children:"Search"})]}):l,s[2]=l,s[3]=e.onServicesClick,s[4]=i):i=s[4],s[5]!==e.displayName||s[6]!==e.handle?(a=e.displayName&&(0,t.jsx)("span",{className:"truncate italic",children:`@${e.handle}`}),s[5]=e.displayName,s[6]=e.handle,s[7]=a):a=s[7],s[8]!==e.onClick||s[9]!==e.onMouseDown||s[10]!==e.selected||s[11]!==r||s[12]!==i||s[13]!==a?(o=(0,t.jsx)(Q,{icon:r,result:i,subtext:a,onClick:e.onClick,onMouseDown:e.onMouseDown,selected:e.selected}),s[8]=e.onClick,s[9]=e.onMouseDown,s[10]=e.selected,s[11]=r,s[12]=i,s[13]=a,s[14]=o):o=s[14],o},et=e=>{let r,i,a,o,s,l=(0,n.c)(15),c=`/api/pub_icon?at_uri=${encodeURIComponent(e.uri)}`;return l[0]!==c?(r=(0,t.jsx)("img",{src:c,alt:"",className:"w-5 h-5 rounded-full shrink-0"}),l[0]=c,l[1]=r):r=l[1],l[2]!==e.pubName?(i=(0,t.jsx)("div",{className:"truncate w-full grow min-w-0",children:e.pubName}),l[2]=e.pubName,l[3]=i):i=l[3],l[4]!==e.onPostsClick?(a=(0,t.jsx)(J,{onClick:e.onPostsClick,children:"Posts"}),l[4]=e.onPostsClick,l[5]=a):a=l[5],l[6]!==i||l[7]!==a?(o=(0,t.jsxs)(t.Fragment,{children:[i,a]}),l[6]=i,l[7]=a,l[8]=o):o=l[8],l[9]!==e.onClick||l[10]!==e.onMouseDown||l[11]!==e.selected||l[12]!==r||l[13]!==o?(s=(0,t.jsx)(Q,{icon:r,result:o,onClick:e.onClick,onMouseDown:e.onMouseDown,selected:e.selected}
125),l[9]=e.onClick,l[10]=e.onMouseDown,l[11]=e.selected,l[12]=r,l[13]=o,l[14]=s):s=l[14],s},en=e=>{let r,i,a=(0,n.c)(7);return a[0]!==e.title?(r=(0,t.jsx)("div",{className:"truncate w-full",children:e.title}),a[0]=e.title,a[1]=r):r=a[1],a[2]!==e.onClick||a[3]!==e.onMouseDown||a[4]!==e.selected||a[5]!==r?(i=(0,t.jsx)(Q,{result:r,onClick:e.onClick,onMouseDown:e.onMouseDown,selected:e.selected}),a[2]=e.onClick,a[3]=e.onMouseDown,a[4]=e.selected,a[5]=r,a[6]=i):i=a[6],i},er=e=>{let r,i,a,o,s,l=(0,n.c)(15);return l[0]!==e.name?(r=(0,t.jsx)("div",{className:"truncate w-full grow min-w-0",children:e.name}),l[0]=e.name,l[1]=r):r=l[1],l[2]!==e.onClick?(i=(0,t.jsx)(J,{onClick:e.onClick,children:"Search"}),l[2]=e.onClick,l[3]=i):i=l[3],l[4]!==r||l[5]!==i?(a=(0,t.jsxs)(t.Fragment,{children:[r,i]}),l[4]=r,l[5]=i,l[6]=a):a=l[6],l[7]!==e.description?(o=e.description&&(0,t.jsx)("span",{className:"truncate italic",children:e.description}),l[7]=e.description,l[8]=o):o=l[8],l[9]!==e.onClick||l[10]!==e.onMouseDown||l[11]!==e.selected||l[12]!==a||l[13]!==o?(s=(0,t.jsx)(Q,{result:a,subtext:o,onClick:e.onClick,onMouseDown:e.onMouseDown,selected:e.selected}),l[9]=e.onClick,l[10]=e.onMouseDown,l[11]=e.selected,l[12]=a,l[13]=o,l[14]=s):s=l[14],s},ei=e=>{let r,i,a,o,s=(0,n.c)(23),l=e.hasEmbed&&e.onEmbedClick||e.subscope&&e.onSubscopeClick,c=e.labels&&e.labels.length>0,u=!!e.description,d=c||u;return s[0]!==e.icon?(r=e.icon?(0,t.jsx)("img",{src:e.icon,alt:"",className:"w-5 h-5 rounded-full shrink-0"}):void 0,s[0]=e.icon,s[1]=r):r=s[1],s[2]!==l||s[3]!==d||s[4]!==e.hasEmbed||s[5]!==e.name||s[6]!==e.onEmbedClick||s[7]!==e.onSubscopeClick||s[8]!==e.subscope?(i=l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:`grow min-w-0 ${d?"line-clamp-2 whitespace-normal":"truncate w-full"}`,children:e.name}),e.subscope&&e.onSubscopeClick&&(0,t.jsx)(J,{onClick:e.onSubscopeClick,children:e.subscope.label}),e.hasEmbed&&e.onEmbedClick&&(0,t.jsx)(J,{onClick:e.onEmbedClick,children:"Embed"})]}):(0,t.jsx)("div",{className:`min-w-0 ${d?"line-clamp-2 whitespace-normal":"truncate w-full"}`,children:e.name}),s[2]=l,s[3]=d,s[4]=e.hasEmbed,s[5]=e.name,s[6]=e.onEmbedClick,s[7]=e.onSubscopeClick,s[8]=e.subscope,s[9]=i):i=s[9],s[10]!==u||s[11]!==c||s[12]!==d||s[13]!==e.description||s[14]!==e.labels?(a=d?(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[c&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 items-center text-tertiary text-xs leading-normal",children:e.labels.flatMap(ey)}),u&&(0,t.jsx)("span",{className:"text-secondary text-xs truncate",children:e.description})]}):void 0,s[10]=u,s[11]=c,s[12]=d,s[13]=e.description,s[14]=e.labels,s[15]=a):a=s[15],s[16]!==e.onClick||s[17]!==e.onMouseDown||s[18]!==e.selected||s[19]!==r||s[20]!==i||s[21]!==a?(o=(0,t.jsx)(Q,{icon:r,result:i,subtext:a,onClick:e.onClick,onMouseDown:e.onMouseDown,selected:e.selected}),s[16]=e.onClick,s[17]=e.onMouseDown,s[18]=e.selected,s[19]=r,s[20]=i,s[21]=a,s[22]=o):o=s[22],o},ea=e=>{let r,i,a,o,s=(0,n.c)(8);if("default"===e.scope.type)return;let l="identities"===e.scope.type?"People":"publications"===e.scope.type?"Publications":"publication"===e.scope.type?`Posts from ${e.scope.name}`:"did_services"===e.scope.type?`Services for ${e.scope.name}`:`Results from ${e.scope.name}`;return s[0]!==e?(r=()=>e.handleScopeChange(),s[0]=e,s[1]=r):r=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(z.GoBackTiny,{className:"shrink-0 "}),s[2]=i):i=s[2],s[3]!==l?(a=(0,t.jsx)("div",{className:"grow w-full truncate text-left",children:l}),s[3]=l,s[4]=a):a=s[4],s[5]!==r||s[6]!==a?(o=(0,t.jsxs)("button",{className:"w-full flex flex-row gap-2 pt-1 rounded text-tertiary hover:text-accent-contrast shrink-0 text-xs",onClick:r,onMouseDown:eb,children:[i,a]}),s[5]=r,s[6]=a,s[7]=o):o=s[7],o};function eo(e){return e.serviceUri===es.serviceUri?{type:"identities"}:e.serviceUri===el.serviceUri?{type:"publications"}:{type:"service",serviceUri:e.serviceUri,name:e.name}}let es={type:"service",serviceUri:"builtin:identities",name:"Identities",description:"Search people on Bluesky"},el={type:"service",serviceUri:"builtin:publications",name:"Publications",description:"Search publications on Leaflet"},ec=new j.Agent("https://public.api.bsky.app");async function eu(e,t){return(await ec.searchActorsTypeahead({q:e,limit:t})).data.actors.map(e=>({type:"did",handle:e.handle,did:e.did,displayName:e.displayName,avatar:e.avatar}))}async function ed(e,t){return(await (0,F.callRPC)("search_publication_names",{query:e,limit:t})).result.publications.map(e=>
125({type:"publication",uri:e.uri,name:e.name,url:e.url}))}let eh=[];async function ep(){try{return(await (0,F.callRPC)("get_user_mention_services",{})).result.services.map(ef).sort(em)}catch{return eh}}function em(e,t){return e.name.localeCompare(t.name,void 0,{sensitivity:"base"})}function ef(e){return{type:"service",serviceUri:e.uri,name:e.name,description:e.description,canBeScopedToDid:e.canBeScopedToDid}}function eg(e){e.preventDefault(),e.stopPropagation()}function ey(e,n){return e.text?[...n>0?[(0,t.jsx)("span",{className:"text-border-light",children:"|"},`sep-${n}`)]:[],(0,t.jsx)("span",{children:e.text},n)]:[]}function eb(e){return e.preventDefault()}e.s(["MentionAutocomplete",0,$],300781);var ev=e.i(69497);let ex={1:"font-bold leading-tight pb-1 [font-family:var(--theme-heading-font)]",2:"font-bold leading-tight pb-1 [font-family:var(--theme-heading-font)]",3:"font-bold leading-tight pb-1 [font-family:var(--theme-heading-font)]",4:"font-bold leading-snug pb-1 text-secondary [font-family:var(--theme-heading-font)]"},ek={1:R.blockTextSize.h1,2:R.blockTextSize.h2,3:R.blockTextSize.h3,4:R.blockTextSize.h4};function ew(e){let r,i,a,o,s=(0,n.c)(26),l=(0,d.useHasPageLoaded)(),c=null===e.previousBlock,u=(0,v.useEntitySetContext)().permissions.write,p=(0,P.useStaleClient)(eC),m=(0,f.useIsBlockSelected)(e.entityID);s[0]!==c||s[1]!==l||s[2]!==u||s[3]!==e.className||s[4]!==e.entityID||s[5]!==e.pageType||s[6]!==e.parent||s[7]!==e.preview||s[8]!==e.previousBlock||s[9]!==e.type||s[10]!==p?(r=(!l||!u||e.preview||p)&&(0,t.jsx)(eE,{type:e.type,entityID:e.entityID,className:e.className,first:c,pageType:e.pageType,previousBlock:e.previousBlock,pageID:e.parent}),s[0]=c,s[1]=l,s[2]=u,s[3]=e.className,s[4]=e.entityID,s[5]=e.pageType,s[6]=e.parent,s[7]=e.preview,s[8]=e.previousBlock,s[9]=e.type,s[10]=p,s[11]=r):r=s[11],s[12]!==l||s[13]!==u||s[14]!==e||s[15]!==p?(i=u&&!e.preview&&!p&&(0,t.jsxs)("div",{className:`yjs-cursor-clip w-full box-content px-1.5 -mx-1.5 relative group ${!l?"hidden":""}`,children:[(0,t.jsx)(eS,{...e}),(0,t.jsx)(eT,{...e})]}),s[12]=l,s[13]=u,s[14]=e,s[15]=p,s[16]=i):i=s[16],s[17]!==r||s[18]!==i?(a=(0,t.jsxs)(t.Fragment,{children:[r,i]}),s[17]=r,s[18]=i,s[19]=a):a=s[19];let g=a;if("doc"===e.pageType||e.preview)return g;let y=!!m,b=`p-0! overflow-visible! bg-bg-page ${!m&&"border-transparent! bg-transparent"}`;return s[20]!==g||s[21]!==e.areYouSure||s[22]!==e.setAreYouSure||s[23]!==y||s[24]!==b?(o=(0,t.jsx)(h.BlockLayout,{isSelected:y,areYouSure:e.areYouSure,setAreYouSure:e.setAreYouSure,className:b,children:g}),s[20]=g,s[21]=e.areYouSure,s[22]=e.setAreYouSure,s[23]=y,s[24]=b,s[25]=o):o=s[25],o}function eC(e){return e.stale}function eS(e){let o,s,c,u=(0,n.c)(4),[d,h]=(0,r.useState)(!0);return(u[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{h(!1)},s=[],u[0]=o,u[1]=s):(o=u[0],s=u[1]),(0,r.useEffect)(o,s),d||!(0,I.isIOS)())?null:(u[2]!==e?(c=(0,t.jsx)("div",{className:"h-full w-full absolute z-[1] cursor-text group-focus-within:hidden py-[18px]",onPointerUp:t=>{(0,D.didBodyDragJustEnd)()||(t.preventDefault(),(0,p.focusBlock)(e,{type:"coord",top:t.clientY,left:t.clientX}),setTimeout(async()=>{let t=document.getElementById(a.elementId.block(e.entityID).container);if(!await (0,l.isVisible)(t)){let t=document.getElementById(a.elementId.page((0,i.pageOfParent)(e.parent)).container);if(!t)return;t?.scrollBy({top:250,behavior:"smooth"})}},100))}}),u[2]=e,u[3]=c):c=u[3],c)}function eE(e){let r,a,o,l,c=(0,n.c)(17),d=(0,s.useEntity)(e.entityID,"block/text"),h=(0,s.useEntity)(e.entityID,"block/heading-level"),p="heading"===e.type?h?.data.value||1:void 0,m=(0,s.useEntity)(e.entityID,"block/text-size"),f=(0,s.useEntity)(e.entityID,"block/text-alignment")?.data.value||"left",g=m?.data.value==="small"?"textSizeSmall":m?.data.value==="large"?"textSizeLarge":"",{permissions:y}=(0,v.useEntitySetContext)();c[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("br",{}),c[0]=r):r=c[0];let b=r;if(d){let e;c[5]!==d.data.value||c[6]!==y.write?(e=(0,t.jsx)(u.RenderYJSFragment,{value:d.data.value,wrapper:"p",renderComments:y.write}),c[5]=d.data.value,c[6]=y.write,c[7]=e):e=c[7],b=e}else if(y.write&&(e.first||"canvas"===e.pageType)){let n,r,i=`${e.className} 126 pointer-events-none italic text-tertiary flex flex-col `,a=1===p?"Title":2===p?"Header":3===p?"Subheader":"write somethingâ¦";c[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("div",{className:" text-xs font-normal",children:'or type "/" for commands'}),c[1]=n):n=c[1],c[2]!==i||c[3]!==a?(r=(0,t.jsxs)("div",{className:i,children:[a,n]}),c[2]=i,c[3]=a,c[4]=r):r=c[4],b=r}c[8]!==p?(a={wordBreak:"break-word",...p?{fontSize:ek[p]}:{}},c[8]=p,c[9]=a):a=c[9],c[10]!==e.pageID?(o=t=>{let n=t.target.closest(".footnote-ref");if(!n)return;let r=n.dataset.footnoteId;if(!r)return;let a=M.useFootnotePopoverStore.getState();a.activeFootnoteID===r?a.close():a.open(r,n,(0,i.pageOfParent)(e.pageID))},c[10]=e.pageID,c[11]=o):o=c[11];let x=` 127 ${{left:"text-left",right:"text-right",center:"text-center",justify:"text-ju
127stify"}[f]} 128 ${"blockquote"===e.type&&!p?e.previousBlock?.type==="blockquote"?"blockquote pt-3 ":"blockquote":""} 129 ${p?ex[p]:g} 130 w-full whitespace-pre-wrap outline-hidden ${e.className} `;return c[12]!==b||c[13]!==a||c[14]!==o||c[15]!==x?(l=(0,t.jsx)("div",{style:a,onClick:o,className:x,children:b}),c[12]=b,c[13]=a,c[14]=o,c[15]=x,c[16]=l):l=c[16],l}function eT(e){let r,i,o,l,c,u,d,h,p,m,g,y,b,v=(0,n.c)(51),x=(0,s.useEntity)(e.entityID,"block/heading-level"),k="heading"===e.type?x?.data.value||1:void 0,w=(0,s.useEntity)(e.entityID,"block/text-size"),C=(0,s.useEntity)(e.entityID,"block/text-alignment")?.data.value||"left",S=(0,f.useIsBlockSelected)(e.entityID);v[0]!==e.entityID?(r=t=>t.focusedEntity?.entityID===e.entityID,v[0]=e.entityID,v[1]=r):r=v[1];let E=(0,f.useUIState)(r);v[2]===Symbol.for("react.memo_cache_sentinel")?(i={left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},v[2]=i):i=v[2];let T=i[C],I=w?.data.value==="small"?"textSizeSmall text-secondary":w?.data.value==="large"?"textSizeLarge text-primary":"text-primary",{viewRef:D,mentionOpen:N,mentionCoords:A,openMentionAutocomplete:P,handleMentionSelect:M,handleMentionEmbed:R,handleMentionOpenChange:L}=e_(e.entityID,e);v[3]!==P||v[4]!==e?(o={props:e,openMentionAutocomplete:P},v[3]=P,v[4]=e,v[5]=o):o=v[5];let{mountRef:j,overlay:O}=(0,_.useMountProsemirror)(o),B=`relative flex items-center justify-between 131 ${S&&"canvas"===e.pageType&&"bg-bg-page rounded-md"} 132 ${"blockquote"===e.type&&!k?e.previousBlock?.type==="blockquote"&&!e.listData?"blockquote w-auto pt-3":"blockquote w-auto":"w-full"}`,F=e.entityID;v[6]!==L||v[7]!==e.entityID||v[8]!==e.parent?(l=()=>{L(!1),setTimeout(()=>{f.useUIState.getState().focusAndSelectBlock({entityID:e.entityID,parent:e.parent})},5)},v[6]=L,v[7]=e.entityID,v[8]=e.parent,v[9]=l):l=v[9],v[10]!==e.entityID?(c=a.elementId.block(e.entityID),v[10]=e.entityID,v[11]=c):c=v[11];let H=k?"var(--theme-heading-font)":"var(--theme-font)";v[12]!==k?(u=k?{fontSize:ek[k]}:{},v[12]=k,v[13]=u):u=v[13],v[14]!==H||v[15]!==u?(d={wordBreak:"break-word",fontFamily:H,...u},v[14]=H,v[15]=u,v[16]=d):d=v[16];let U=` 133 ${T} 134 grow resize-none align-top whitespace-pre-wrap bg-transparent 135 outline-hidden 136 ${E?"block-focused":""} 137 138 ${k?ex[k]:I} 139 ${e.className}`;return v[17]!==j||v[18]!==e.entityID||v[19]!==U||v[20]!==l||v[21]!==c.text||v[22]!==d?(h=(0,t.jsx)("pre",{"data-entityid":F,onFocus:l,id:c.text,style:d,className:U,ref:j}),v[17]=j,v[18]=e.entityID,v[19]=U,v[20]=l,v[21]=c.text,v[22]=d,v[23]=h):h=v[23],v[24]!==E||v[25]!==R||v[26]!==L||v[27]!==M||v[28]!==A||v[29]!==N||v[30]!==D?(p=E&&(0,t.jsx)($,{open:N,onOpenChange:L,view:D,onSelect:M,onEmbed:R,coords:A}),v[24]=E,v[25]=R,v[26]=L,v[27]=M,v[28]=A,v[29]=N,v[30]=D,v[31]=p):p=v[31],v[32]!==T||v[33]!==E||v[34]!==k||v[35]!==e||v[36]!==S||v[37]!==I?(m=(null===e.previousBlock&&null===e.nextBlock||E||S)&&(0,t.jsx)(eI,{...e,focused:E,selected:S,headingLevel:k,alignmentClass:T,textStyle:I}),v[32]=T,v[33]=E,v[34]=k,v[35]=e,v[36]=S,v[37]=I,v[38]=m):m=v[38],v[39]!==O||v[40]!==h||v[41]!==p||v[42]!==m||v[43]!==B?(g=(0,t.jsxs)("div",{className:B,children:[O,h,p,m]}),v[39]=O,v[40]=h,v[41]=p,v[42]=m,v[43]=B,v[44]=g):g=v[44],v[45]!==E||v[46]!==e.entityID?(y=E&&(0,t.jsx)(eN,{entityID:e.entityID}),v[45]=E,v[46]=e.entityID,v[47]=y):y=v[47],v[48]!==g||v[49]!==y?(b=(0,t.jsxs)(t.Fragment,{children:[g,y]}),v[48]=g,v[49]=y,v[50]=b):b=v[50],b}let eI=e=>{let r,i,a,o,s=(0,n.c)(11);s[0]!==e.entityID?(r=t=>t.editorStates[e.entityID]?.editor.doc.textContent,s[0]=e.entityID,s[1]=r):r=s[1];let l=(0,b.useEditorStates)(r);return void 0===l?null:(s[2]!==e||s[3]!==l.length?(i=0===l.length&&null===e.previousBlock&&null===e.nextBlock?(0,t.jsxs)("div",{style:e.headingLevel?{fontSize:ek[e.headingLevel]}:void 0,className:`${e.className} ${e.alignmentClass} w-full pointer-events-none absolute top-0 left-0 italic text-tertiary flex flex-col 140 ${e.headingLevel?ex[e.headingLevel]:e.textStyle} 141 `,children:[3===e.headingLevel?"Subheader":2===e.headingLevel?"Header":1===e.headingLevel?"Title":"write somethingâ¦",(0,t.jsx)("div",{className:" text-xs font-normal",children:'or type "/" to add a block'})]}):0===l.length&&e.focused?(0,t.jsx)(eA,{...e,className:e.className}):null,s[2]=e,s[3]=l.length,s[4]=i):i=s[4],s[5]!==e||s[6]!==l?(a=l.startsWith("/")&&e.selected&&(0,t.jsx)(y.BlockCommandBar,{props:e,searchValue:l.slice(1)}),s[5]=e,s[6]=l,s[7]=a):a=s[7],s[8]!==i||s[9]!==a?(o=(0,t.jsxs)(t.Fragment,{children:[i,a]}),s[8]=i,s[9]=a,s[10]=o):o=s[10],o)},eD=["blacksky.community/","bsky.app/","witchsky.app/","anisota.net/","mu.social/","bluepy.social/","reddwarf.app/","catsky.social/","deer.social/"],eN=e=>{let i,a,o=(0,n.c)(16),[l,c]=(0,r.useState)(!1),u=(0,s.useReplicache)(),d=(0,C.useSmoker)();o[0]!==e.entityID?(i=t=>t.editorStates[e.entityID]?.editor.doc.textContent,o[0]=e.entityID,o[1]=i):i=o[1];let h=(0,b.useEditorStates)(i);o[2]!==h?(a=void 0!==h&&eD.some(e=>h.includes(e))&&h.includes("post"),o[2]=h,o[3]=a):a=o[3];let p=a;if(!(void 0!==h&&(0,w.betterIsUrl)(h))||h.includes(" "))return null;{let n,r,i;return o[4]!==h||o[5]!==p||o[6]!==e.entityID||o[7]!==u.rep||o[8]!==u.undoM
141anager||o[9]!==d?(n=async t=>{u.rep&&await u.undoManager.withUndoGroup(async()=>{p?await (0,g.addBlueskyPostBlock)(h,e.entityID,u.rep)||d({error:!0,text:"post not found!",position:{x:t.clientX+12,y:t.clientY}}):(c(!0),await (0,g.addLinkBlock)(h,e.entityID,u.rep),c(!1))})},o[4]=h,o[5]=p,o[6]=e.entityID,o[7]=u.rep,o[8]=u.undoManager,o[9]=d,o[10]=n):n=o[10],o[11]!==l?(r=l?(0,t.jsx)(A.DotLoader,{}):"embed",o[11]=l,o[12]=r):r=o[12],o[13]!==n||o[14]!==r?(i=(0,t.jsx)("button",{onClick:n,className:"absolute right-0 top-0 px-1 py-0.5 text-xs text-tertiary sm:hover:text-accent-contrast border border-border-light sm:hover:border-accent-contrast rounded-md bg-bg-page h-6 flex items-center",children:r}),o[13]=n,o[14]=r,o[15]=i):i=o[15],i}},eA=e=>{let r,i,a,l,u,d,h,m,f,g,y=(0,n.c)(31),w=(0,s.useReplicache)(),C=(0,v.useEntitySetContext)(),{data:I}=(0,N.useLeafletPublicationData)(),D=(0,o.useTutorialOpen)("text",!0),A=`absolute top-0 right-0 w-fit flex gap-[6px] items-center font-bold rounded-md text-sm text-border ${"canvas"===e.pageType&&"mr-[6px]"}`;return y[0]!==C||y[1]!==e||y[2]!==w.rep||y[3]!==w.undoManager?(r=async()=>{let t=k.blockCommands.find(eP);w.rep&&await t?.onSelect(w.rep,{...e,entity_set:C.set},w.undoManager)},y[0]=C,y[1]=e,y[2]=w.rep,y[3]=w.undoManager,y[4]=r):r=y[4],y[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"flex gap-1 font-bold",children:"Add an Image"}),a=(0,t.jsx)(T.BlockImageSmall,{className:"hover:text-accent-contrast text-border"}),y[5]=i,y[6]=a):(i=y[5],a=y[6]),y[7]!==e.className||y[8]!==r?(l=(0,t.jsx)(x.TooltipButton,{className:e.className,onMouseDown:r,side:"bottom",tooltipContent:i,children:a}),y[7]=e.className,y[8]=r,y[9]=l):l=y[9],y[10]!==C||y[11]!==e||y[12]!==I||y[13]!==w.rep||y[14]!==w.undoManager?(u=!I&&(0,t.jsx)(x.TooltipButton,{className:e.className,onMouseDown:async()=>{let t=k.blockCommands.find(eM);w.rep&&await t?.onSelect(w.rep,{...e,entity_set:C.set},w.undoManager)},side:"bottom",tooltipContent:(0,t.jsx)("div",{className:"flex gap-1 font-bold",children:"Add a Subpage"}),children:(0,t.jsx)(E.BlockDocPageSmall,{className:"hover:text-accent-contrast text-border"})}),y[10]=C,y[11]=e,y[12]=I,y[13]=w.rep,y[14]=w.undoManager,y[15]=u):u=y[15],y[16]!==e.entityID||y[17]!==e.parent||y[18]!==e.type?(d=t=>{t.preventDefault();let n=b.useEditorStates.getState().editorStates[e.entityID],r=n?.editor;if(r&&n?.view){n.view.focus();let e=r.tr.insertText("/",1);e.setSelection(c.TextSelection.create(e.doc,2)),n.view.dispatch(e)}(0,p.focusBlock)({type:e.type,entityID:e.entityID,parent:e.parent},{type:"end"})},y[16]=e.entityID,y[17]=e.parent,y[18]=e.type,y[19]=d):d=y[19],y[20]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)("div",{className:"flex gap-1 font-bold",children:"Add More!"}),y[20]=h):h=y[20],y[21]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("div",{className:"w-6 h-6 flex place-items-center justify-center",children:(0,t.jsx)(S.AddTiny,{className:"text-accent-contrast"})}),y[21]=m):m=y[21],y[22]!==D||y[23]!==e.className||y[24]!==d?(f=(0,t.jsx)(o.CustomizeTutorialTooltip,{target:"text",className:"flex",blockFocused:!0,children:(0,t.jsx)(x.TooltipButton,{className:e.className,onMouseDown:d,side:"bottom",hideTooltip:D,tooltipContent:h,children:m})}),y[22]=D,y[23]=e.className,y[24]=d,y[25]=f):f=y[25],y[26]!==A||y[27]!==l||y[28]!==u||y[29]!==f?(g=(0,t.jsxs)("div",{className:A,children:[l,u,f]}),y[26]=A,y[27]=l,y[28]=u,y[29]=f,y[30]=g):g=y[30],g},e_=(e,t)=>{let n=(0,b.useEditorStates)(t=>t.editorStates[e]?.view),i=(0,r.useRef)(n||null);i.current=n||null;let{rep:a,undoManager:o}=(0,s.useReplicache)(),l=(0,v.useEntitySetContext)(),c=(0,r.useRef)(t);c.current=t;let[u,d]=(0,r.useState)(!1),[h,p]=(0,r.useState)(null),[g,y]=(0,r.useState)(null),x=(0,f.useUIState)(t=>t.focusedEntity?.entityID===e);(0,r.useEffect)(()=>{x||(d(!1),p(null),y(null))},[x]);let k=(0,r.useCallback)(()=>{let t=b.useEditorStates.getState().editorStates[e]?.view;if(!t)return;let n=t.state.selection.from;y(n);let r=t.coordsAtPos(n-1),i=t.dom.closest(".relative");if(i){let e=i.getBoundingClientRect();
141p({top:r.bottom-e.top,left:r.left-e.left})}else p({top:r.bottom,left:r.left});d(!0)},[e]),w=(0,r.useCallback)(t=>{let n=b.useEditorStates.getState().editorStates[e]?.view;n&&null!==g&&(((e,t,n)=>{if(!n)return;let{from:r,to:i}=t,a=n.state.tr;if("did"==e.type){a.delete(r,i);let t="@"+e.handle,n=ev.schema.nodes.didMention.create({did:e.did,text:t});a.insert(r,n)}if("publication"===e.type||"post"===e.type||"service_result"===e.type){a.delete(r,i);let t="post"===e.type?e.title:e.name,n=ev.schema.nodes.atMention.create({atURI:e.uri,text:t,..."post"===e.type&&/^https?:\/\//.test(e.url)&&{href:e.url},..."service_result"===e.type&&{href:e.href,icon:e.icon}});a.insert(r,n)}a.insertText(" ",r+1),n.dispatch(a),n.focus()})(t,{from:g-1,to:g},n),n.focus())},[e,g]);return{viewRef:i,mentionOpen:u,mentionCoords:h,openMentionAutocomplete:k,handleMentionSelect:w,handleMentionEmbed:(0,r.useCallback)(async t=>{if(!a||!t.embed)return;let n=t.embed,r=c.current,i=b.useEditorStates.getState().editorStates[e]?.editor,s=i&&""===i.doc.textContent.replace("@","").trim();await o.withUndoGroup(async()=>{let t;if(s)t=r.entityID,await a.mutate.assertFact({entity:t,attribute:"block/type",data:{type:"block-type-union",value:"embed"}}),await a.mutate.retractAttribute({entity:t,attribute:"block/text"});else{t=await (0,m.addBlockBelow)(a,{parent:r.parent,position:r.position,nextPosition:r.nextPosition,permission_set:l.set,type:"embed"});let n=b.useEditorStates.getState().editorStates[e]?.view;if(n&&null!==g){let e=g-1,t=n.state.tr.delete(e,g);t.setMeta("bulkOp",!0),n.dispatch(t)}}let i=[{entity:t,attribute:"embed/url",data:{type:"string",value:n.src}}],o=(0,L.getAspectRatio)(n.aspectRatio?n.aspectRatio:n.width&&n.height?{width:n.width,height:n.height}:void 0);o?i.push({entity:t,attribute:"embed/aspect-ratio",data:{type:"string",value:o}}):i.push({entity:t,attribute:"embed/height",data:{type:"number",value:n.height||360}}),await a.mutate.assertFact(i)})},[a,e,l.set,g,o]),handleMentionOpenChange:(0,r.useCallback)(e=>{d(e),e||(p(null),y(null))},[])}};function eP(e){return"Image"===e.name}function eM(e){return"New Page"===e.name}},651806,416330,e=>{"use strict";var t=e.i(98640),n=e.i(394191),r=e.i(468034),i=e.i(113554),a=e.i(110383),o=e.i(69497),s=e.i(813029),l=e.i(174080),c=e.i(716536),u=e.i(346594),d=e.i(988314);let h=(e,t,n)=>{let r=e.schema.marks.code;if(!r)return!1;let i=e.doc.resolve(t).marks(),a=e.doc.resolve(n).marks();return!!r.isInSet(i)||!!r.isInSet(a)},p=()=>[new t.InputRule(/\~\~([^*]+)\~\~$/,(e,t,n,r)=>{if(h(e,n,r))return null;let[i,a]=t,{tr:s}=e;return a?(s.replaceWith(n,r,e.schema.text(a)).addMark(n,n+a.length,o.schema.marks.strikethrough.create()).removeStoredMark(o.schema.marks.strikethrough),s):null}),new t.InputRule(/\=\=([^*]+)\=\=$/,(e,t,n,r)=>{if(h(e,n,r))return null;let[i,a]=t,{tr:l}=e;return a?(l.replaceWith(n,r,e.schema.text(a)).addMark(n,n+a.length,o.schema.marks.highlight.create({color:s.useUIState.getState().lastUsedHighlight||"1"})).removeStoredMark(o.schema.marks.highlight),l):null}),new t.InputRule(/\*\*([^*]+)\*\*$/,(e,t,n,r)=>{if(h(e,n,r))return null;let[i,a]=t,{tr:s}=e;return a?(s.replaceWith(n,r,e.schema.text(a)).addMark(n,n+a.length,o.schema.marks.strong.create()).removeStoredMark(o.schema.marks.strong),s):null}),new t.InputRule(/\`([^`]+)\`$/,(e,t,n,r)=>{if(h(e,n,r))return null;let[i,a]=t,{tr:s}=e;if(a){let t=n+i.indexOf("`");return s.replaceWith(t,r,e.schema.text(a)).addMark(t,t+a.length,o.schema.marks.code.create()).removeStoredMark(o.schema.marks.code),s}return null}),new t.InputRule(/(?:^|[^*])\*([^*]+)\*$/,(e,t,n,r)=>{if(h(e,n,r))return null;let[i,a]=t,{tr:s}=e;if(a){let t=n+i.indexOf("*");return s.replaceWith(t,r,e.schema.text(a)).addMark(t,t+a.length,o.schema.marks.em.create()).removeStoredMark(o.schema.marks.em),s}return null})];e.s(["footnoteInputRules",0,()=>(0,t.inputRules)({rules:p()}),"inputrules",0,(e,o,s,m)=>(0,t.inputRules)({rules:[...p(),new t.InputRule(/^```\s$/,(t,r)=>((0,l.flushSync)(()=>{o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/type",data:{type:"block-type-union",value:"code"}});let t=localStorage.getItem(c.LAST_USED_CODE_LANGUAGE_KEY);t&&o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/code-language",data:{type:"string",value:t}})}),setTimeout(()=>{(0,n.focusBlock)({...e.current,type:"code"},{type:"start"})},20),null)),new t.InputRule(/^\-?\[(\ |x)?\]\s$/,(t,n)=>{e.current.listData||o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/is-list",data:{type:"boolean",value:!0}});let r=t.tr;return r.delete(0,n[0].length),o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/check-list",data:{type:"boolean",value:"x"===n[1]}}),r}),new t.InputRule(/^([-+*])\s$/,t=>{if(e.current.listData)return null;let n=t.tr;return n.delete(0,2),o.current?.mutate.assertFact([{entity:e.current.entityID,attribute:"block/is-list",data:{type:"boolean",value:!0}},{entity:e.current.entityID,attribute:"block/list-style",data:{type:"list-style-union",value:"unordered"}}]),n}),new t.InputRule(/^(\d+)[.)]\s$/,(t,n)=>{if(e.current.listData)return null;let r=t.tr;r.delete(0,n[0].length);let i=parseInt(n[1],10);return o.current?.mutate.assertFact([{entity:e.current.entityID,attribute:"block/is-list",data:{type:"boolean",value:!0}},{entity:e.current.entityID,attribute:"block/list-style",data:{type:"list-style-union",value:"ordered"}}]),i>1&&o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/list-number",data:{type:"number",value:i}}),r}),new t.InputRule(/^(---|\*\*\*|___)$/,(t,l)=>{if(e.current.listData)return null;
141let c=o.current;if(!c)return null;let{entityID:u,parent:d,entity_set:h}=e.current;return"canvas"===e.current.pageType?s.withUndoGroup(async()=>{let e=await (0,i.groupCanvasBlockAndAddAbove)(c,s,{page:d,blockEntity:u,newEntityID:(0,a.v7)(),permission_set:h.set,type:"horizontal-rule"});(0,n.focusBlock)({entityID:u,parent:e,type:"text"},{type:"start"})}):(0,r.addBlockBelow)(c,{parent:d,position:e.current.previousBlock?.position||null,nextPosition:e.current.position,permission_set:h.set,type:"horizontal-rule"}),t.tr.delete(0,l[0].length)}),new t.InputRule(/^([>]{1})\s$/,(t,n)=>{let r=t.tr;return r.delete(0,2),o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/type",data:{type:"block-type-union",value:"blockquote"}}),r}),new t.InputRule(/^([#]{1,4})\s$/,(t,n)=>{let r=t.tr;r.delete(0,n[0].length);let i=n[1].length;return o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/type",data:{type:"block-type-union",value:"heading"}}),o.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/heading-level",data:{type:"number",value:i}}),r}
141),new t.InputRule(/\[\^$/,(t,n,r,i)=>{if(h(t,r,i))return null;let a=t.tr.delete(r,i);return setTimeout(()=>{let t=d.useEditorStates.getState().editorStates[e.current.entityID]?.view;t&&o.current&&(0,u.insertFootnote)(t,e.current.entityID,o.current,e.current.entity_set.set)},0),a}),new t.InputRule(/(?:^|\s)@$/,(e,t,n,r)=>(!m||h(e,n,r)||setTimeout(()=>m(),0),null)),new t.InputRule(/@$/,(e,t,n,r)=>{if(!m||h(e,n,r))return null;let i=e.doc.resolve(n).nodeBefore;return i&&"hard_break"===i.type.name&&setTimeout(()=>m(),0),null})]})],651806);var m=e.i(571141);let f=new(e.i(827121)).Plugin({state:{init:(e,{doc:t})=>m.DecorationSet.empty,apply(e,t,n,r){if(!e.docChanged&&!e.getMeta("updateSelectionHighlight"))return t;let i=[],{from:a,to:o}=r.selection;return a!==o&&i.push(m.Decoration.inline(a,o,{class:"selection-highlight"})),m.DecorationSet.create(r.doc,i)}},props:{handleDOMEvents:{blur:e=>(e.dispatch(e.state.tr.setMeta("updateSelectionHighlight",!0)),!1)},decorations(e){return this.getState(e)}}});e.s(["highlightSelectionPlugin",0,f],416330)},346594,e=>{"use strict";var t=e.i(110383),n=e.i(69497),r=e.i(478802),i=e.i(64572);async function a(e,a,o,s){let l=(0,t.v7)(),c=await o.query(async e=>(0,i.scanIndex)(e).eav(a,"block/footnote")),u={};for(let e of c)u[e.data.value]=e.data.position;let{from:d}=e.state.selection,h=null,p=null,m=!1;e.state.doc.descendants((e,t)=>{if("footnote"===e.type.name){let n=u[e.attrs.footnoteEntityID];void 0!==n&&(t<d?(null===h||n>h)&&(h=n):m?null!==p&&n<p&&(p=n):(p=n,m=!0))}});let f=(0,r.generateKeyBetween)(h,p);await o.mutate.createFootnote({footnoteEntityID:l,blockID:a,permission_set:s,footnoteFactID:(0,t.v7)(),position:f});let g=n.schema.nodes.footnote.create({footnoteEntityID:l}),y=e.state.tr.insert(d,g);return e.dispatch(y),l}e.s(["insertFootnote",0,a])},684201,e=>{"use strict";var t=e.i(680915),n=e.i(394191),r=e.i(478802),i=e.i(172604),a=e.i(38168),o=e.i(827121),s=e.i(69497),l=e.i(813029),c=e.i(988314),u=e.i(110383),d=e.i(506356),h=e.i(64572),p=e.i(293297),m=e.i(308054),f=e.i(901982),g=e.i(762268),y=e.i(113554);let b=(e,t,n)=>{let r="before"===n?e.selection.$from.nodeBefore:e.selection.$from.nodeAfter;if(r?.type!==s.schema.nodes.footnote)return!1;let i="before"===n?-r.nodeSize:r.nodeSize;return t&&t(e.tr.setSelection(o.TextSelection.create(e.doc,e.selection.from+i))),!0},v=(e,t)=>0!==(e.storedMarks??e.selection.$from.marks()).length&&(t&&t(e.tr.setStoredMarks([])),!0),x=(e,t,r=!1)=>(t,i,a)=>{if(!a||t.doc.textContent.startsWith("/")||l.useUIState.getState().selectedBlocks.length>1)return!0;if(a.state.selection.from!==a.state.selection.to)return!1;let o=a.dom.getBoundingClientRect(),s=a.coordsAtPos(a.state.selection.anchor);if(o.bottom-s.bottom<12||r){let t=e.current.nextBlock;return t?(a.dom.blur(),(0,n.focusBlock)(t,{left:s.left,type:"top"}),!0):r}return!1},k=(e,t,r=!1)=>(t,i,a)=>{if(!a)return!1;if(t.doc.textContent.startsWith("/")||l.useUIState.getState().selectedBlocks.length>1)return!0;if(a.state.selection.from!==a.state.selection.to)return!1;let o=a.dom.getBoundingClientRect(),s=a.coordsAtPos(a.state.selection.anchor);if(s.top-o.top<12||r){let t=e.current.previousBlock;return t?(a.dom.blur(),(0,n.focusBlock)(t,{left:s.left,type:"bottom"}),!0):r}return!1},w=e=>(t,n,r)=>(!l.useUIState.getState().zoomedBlocks[e.current.parent]||!t.selection.empty||!(t.selection.from<=1))&&C(e,-1,!0)(t,n,r),C=(e,t,r)=>(i,a,c)=>{if(l.useUIState.getState().selectedBlocks.length>1)return!0;if(!i.selection.empty){let e=-1===t?i.selection.from:i.selection.to;return a?.(i.tr.setSelection(o.TextSelection.create(i.doc,e))),!0}if(!r&&b(i,a,-1===t?"before":"after"))return!0;let u=i.selection.$head,d=null;if(r){let e=u.parent,n=e.textBetween(0,e.content.size,void 0,e=>e.type===s.schema.nodes.hard_break?"\n":""),r=u.parentOffset;if(-1===t){for(;r>0&&/\s/.test(n[r-1]);)r--;for(;r>0&&!/\s/.test(n[r-1]);)r--}else{for(;r<n.length&&/\s/.test(n[r]);)r++;for(;r<n.length&&!/\s/.test(n[r]);)r++}r!==u.parentOffset&&(d=u.start()+r)}else -1===t&&u.parentOffset>0&&(d=u.pos-1),1===t&&u.parentOffset<u.parent.content.size&&(d=u.pos+1);if(null!==d)return a?.(i.tr.setSelection(o.TextSelection.create(i.doc,d)).scrollIntoView()),!0;let h=-1===t?e.current.previousBlock:e.current.nextBlock;return h&&(c?.dom.blur(),(0,n.focusBlock)(h,{type:-1===t?"end":"start"})),!0},S=(e,r,i)=>(a,s,u)=>{let d=!1,h=[],p=e=>{d||(i.startGroup(),d=!0),e&&h.push(e)},m=e=>(d&&Promise.all(h).finally(()=>i.endGroup()),e);
141if(l.useUIState.getState().selectedBlocks.length>1||a.selection.anchor>1||a.selection.content().size>0)return m(!1);if((0,l.isZoomedBlockRoot)(e.current.entityID))return m(!0);if(e.current.listData){if(e.current.listData.checklist)return p(r.current?.mutate.retractAttribute({entity:e.current.entityID,attribute:"block/check-list"})),m(!0);let t=e.current.listData.depth;p(r.current?.mutate.moveChildren({oldParent:e.current.entityID,newParent:e.current.previousBlock?.listData?e.current.previousBlock.entityID:e.current.listData.parent||e.current.parent,after:e.current.previousBlock?.listData?.path.find(e=>e.depth===t)?.entity||e.current.previousBlock?.entityID||null}))}if(!e.current.previousBlock){if(e.current.listData)return p(r.current?.mutate.retractAttribute({entity:e.current.entityID,attribute:"block/is-list"})),m(!0);if("heading"===e.current.type)return p(r.current?.mutate.assertFact({entity:e.current.entityID,attribute:"block/type",data:{type:"block-type-union",value:"text"}})),setTimeout(()=>(0,n.focusBlock)({entityID:e.current.entityID,type:"text",parent:e.current.parent},{type:"start"}),10),m(!1);if("canvas"===e.current.pageType&&p(r.current?.mutate.removeBlock({blockEntity:e.current.entityID})),(0,t.isBlockGroup)(e.current.parent)&&0===a.doc.textContent.length){let i=e.current.nextBlock;p(r.current?.mutate.removeBlock({blockEntity:e.current.entityID,parent:e.current.parent})),i?(0,n.focusBlock)(i,{type:"start"}):l.useUIState.getState().setFocusedBlock({entityType:"page",entityID:(0,t.pageOfParent)(e.current.parent)})}return m(!0)}let f=e.current.previousBlock?c.useEditorStates.getState().editorStates[e.current.previousBlock.entityID]:null;if(f&&e.current.previousBlock&&0===f.editor.doc.textContent.length&&!e.current.previousBlock?.listData)return p(r.current?.mutate.removeBlock({blockEntity:e.current.previousBlock.entityID})),m(!0);if(0===a.doc.textContent.length)return p(r.current?.mutate.removeBlock({blockEntity:e.current.entityID})),e.current.previousBlock?(0,n.focusBlock)(e.current.previousBlock,{type:"end"}):l.useUIState.getState().setFocusedBlock({entityType:"page",entityID:e.current.parent}),m(!0);if(e.current.previousBlock&&!g.isTextBlock[e.current.previousBlock?.type])return(0,n.focusBlock)(e.current.previousBlock,{type:"end"}),u?.dom.blur(),m(!0);if(!f||!e.current.previousBlock)return m(!1);let y=e.current.previousBlock,b={entityID:e.current.entityID,type:e.current.type,parent:e.current.parent};p(r.current?.mutate.removeBlock({blockEntity:e.current.entityID})),i.add({undo:()=>{let e=0,t=()=>{let r=c.useEditorStates.getState().editorStates[b.entityID];if(!r?.view||r.editor.doc.content.size<=2){e++<50&&setTimeout(t,10);return}(0,n.focusBlock)(b,{type:"start"})};t()},redo:()=>{}});let v=f.editor.tr;f.view?.focus();let x=a.doc.content.firstChild?.content;if(x&&(v.insert(v.doc.content.size-1,x),v.setSelection(o.TextSelection.create(v.doc,v.doc.content.size-x?.size-1))),v.setMeta("externalUndoGroup",!0),f.view)f.view.dispatch(v);else{let e=f.editor.apply(v);(0,c.setEditorState)(y.entityID,{editor:e})}return m(!0)},E=Promise.resolve(),T=async(e,t)=>{let n,i=t.current;if(!i)return;let a=e.current.listData,o=a?a.parent:e.current.parent,s=(await i.query(e=>(0,h.scanIndex)(e).eav(o,"card/block"))).sort(d.byPosition),l=s.findIndex(t=>t.data.value===e.current.entityID),c=(0,r.generateKeyBetween)(s[l-1]?.data.position||null,s[l]?.data.position||e.current.position);if(a){let[t]=await i.query(t=>(0,h.scanIndex)(t).eav(e.current.entityID,"block/list-style")),[r]=await i.query(t=>(0,h.scanIndex)(t).eav(e.current.entityID,"block/check-list"));n={listStyle:t?.data.value,checklist:r?.data.value}}let p=(0,u.v7)();await i.mutate.addBlock({newEntityID:p,factID:(0,u.v7)(),permission_set:e.current.entity_set.set,parent:o,type:"text",position:c,list:n}),"left"!==e.current.alignment&&await i.mutate.assertFact({entity:p,attribute:"block/text-alignment",data:{type:"text-alignment-type-union",value:e.current.alignment}});let[m]=await i.query(t=>(0,h.scanIndex)(t).eav(e.current.entityID,"block/text-size"));m&&await i.mutate.assertFact({entity:p,attribute:"block/text-size",data:{type:"text-size-union",value:m.data.value}})},I=(e,t)=>(n,r,i)=>(t.current?.mutate.toggleTodoState({entityID:e.current.entityID}),!0),D=(e,t)=>(n,r,i)=>{let{from:a,to:s}=n.selection;if(0!==a||s!==n.doc.content.size)return!1;if(i?.dispatch(n.tr.setSelection(o.TextSelection.create(n.doc,a))),i?.dom.blur(),t.current){let n="canvas"===e.current.pageType?[e.current]:(0,f.getViewBlocks)(t.current,e.current.parent);l.useUIState.setState({selectedBlocks:n.map(t=>({entityID:t.entityID,parent:e.current.parent}))})}return!0};e.s(["TextBlockKeymap",0,(e,f,g,N)=>({...(0,a.formattingKeymap)(s.schema.marks),"Ctrl-Meta-h":(...e)=>(0,i.toggleMark)(s.schema.marks.highlight,{color:l.useUIState.getState().lastUsedHighlight})(...e),"Ctrl-a":D(e,f),"Meta-a":D(e,f),Escape:(n,r,i)=>(i?.dom.blur(),l.useUIState.setState(()=>({focusedEntity:{entityType:"page",entityID:(0,t.pageOfParent)(e.current.parent)},selectedBlocks:[]})),!1),"Shift-ArrowDown":(t,n,r)=>{if((t.doc.content.size-1===t.selection.from||t.doc.content.size-1===t.selection.to)&&e.current.nextBlock){let t=e.current.nextBlock;
141return l.useUIState.setState({selectedBlocks:[{entityID:e.current.entityID,parent:e.current.parent},{entityID:t.entityID,parent:t.parent}],focusedEntity:{entityType:"block",entityID:t.entityID,parent:e.current.parent}}),document.getSelection()?.removeAllRanges(),r?.dom.blur(),!0}return!1},"Shift-ArrowUp":(t,n,r)=>{if((t.selection.from<=1||t.selection.to<=1)&&e.current.previousBlock){let t=e.current.previousBlock;return l.useUIState.setState({selectedBlocks:[{entityID:e.current.entityID,parent:e.current.parent},{entityID:t.entityID,parent:t.parent}],focusedEntity:{entityType:"block",entityID:t.entityID,parent:e.current.parent}}),document.getSelection()?.removeAllRanges(),r?.dom.blur(),!0}return!1},"Ctrl-k":k(e,f,!0),ArrowUp:k(e,f),"Ctrl-j":x(e,f,!0),ArrowDown:x(e,f),"Ctrl-h":C(e,-1,!1),"Meta-h":C(e,-1,!1),"Ctrl-l":C(e,1,!1),"Meta-l":C(e,1,!1),"Ctrl-Shift-h":w(e),"Meta-Shift-h":w(e),"Ctrl-Shift-l":C(e,1,!0),"Meta-Shift-l":C(e,1,!0),ArrowLeft:(t,r,i)=>{if(!t.selection.empty)return!1;if(b(t,r,"before"))return!0;if(t.selection.anchor>1)return!1;if(v(t,r))return!0;let a=e.current.previousBlock;return a&&(i?.dom.blur(),(0,n.focusBlock)(a,{type:"end"})),!0},ArrowRight:(t,r,i)=>{if(!t.selection.empty)return!1;if(b(t,r,"after"))return!0;if(t.doc.content.size-t.selection.anchor>1)return!1;if(v(t,r))return!0;let a=e.current.nextBlock;return a&&(i?.dom.blur(),(0,n.focusBlock)(a,{type:"start"})),!0},Backspace:(t,n,r)=>S(e,f,g)(t,n,r),"Shift-Backspace":S(e,f,g),Enter:(t,i,a)=>{let s,b,v;return(s=e,b=f,v=g,(e,t,i)=>{let a;if(e.doc.textContent.startsWith("/"))return!0;if(s.current.listData&&e.doc.content.size<=2)return v.startGroup(),(async()=>!(l.useUIState.getState().selectedBlocks.length>1)&&!!b.current&&(await (0,p.outdent)(s.current,s.current.previousBlock,b.current),!0))().finally(()=>v.endGroup()),!0;if(e.selection.empty&&e.selection.anchor<=1&&"canvas"!==s.current.pageType)return!!(0,l.isZoomedBlockRoot)(s.current.entityID)||(E=E.then(async()=>{v.startGroup();try{await T(s,b)}finally{v.endGroup()}}),!0);v.startGroup();let f=e.tr,g=f.doc.slice(e.selection.anchor);f.delete(e.selection.anchor,e.doc.content.size),f.setMeta("externalUndoGroup",!0),t?.(f);let x=(0,u.v7)(),k=s.current.parent,w=()=>{let e=0,t=()=>{let r=c.useEditorStates.getState().editorStates[x];if(!r){e++<50&&setTimeout(t,10);return}let i=r.editor.tr;if(g.content.size>2){i.replaceWith(0,i.doc.content.size,g.content),i.setSelection(o.TextSelection.create(i.doc,0));let e=r.editor.apply(i);(0,c.setEditorState)(x,{editor:e})}(0,n.focusBlock)({entityID:x,parent:k,type:"text"},{type:"start"})};t()};return(async()=>{let t,n="heading"===s.current.type&&e.selection.anchor<=2?"heading":"text";if(s.current.listData){let[n]=await b.current?.query(e=>(0,h.scanIndex)(e).eav(s.current.entityID,"block/list-style"))||[],[r]=await b.current?.query(e=>(0,h.scanIndex)(e).eav(s.current.entityID,"block/check-list"))||[];t={listStyle:n?.data.value,checklist:r?1===e.selection.anchor&&r.data.value:void 0}}if("canvas"===s.current.pageType){let e=b.current;if(!e)return;k=await (0,y.groupCanvasBlockAndAddBelow)(e,v,{page:s.current.parent,blockEntity:s.current.entityID,newEntityID:x,permission_set:s.current.entity_set.set,type:n,list:t})}else if(s.current.listData){let i=(0,l.isZoomedBlockRoot)(s.current.entityID)||s.current.nextBlock?.listData&&s.current.nextBlock.listData.depth>s.current.listData.depth&&e.selection.anchor===e.doc.content.size-1&&!l.useUIState.getState().foldedBlocks.includes(s.current.entityID);if(i){let e=(await b.current?.query(e=>(0,h.scanIndex)(e).eav(s.current.entityID,"card/block"))||[]).sort(d.byPosition);a=(0,r.generateKeyBetween)(i?null:s.current.position,e[0]?.data.position||null)}else{let e=s.current.listData.parent,t=(await b.current?.query(t=>(0,h.scanIndex)(t).eav(e,"card/block"))||[]).sort(d.byPosition),n=t.findIndex(e=>e.data.value===s.current.entityID);a=(0,r.generateKeyBetween)(t[n]?.data.position||s.current.position,t[n+1]?.data.position||null)}await b.current?.mutate.addBlock({newEntityID:x,factID:(0,u.v7)(),permission_set:s.current.entity_set.set,parent:i?s.current.entityID:s.current.listData.parent,type:n,position:a,list:t}),i||l.useUIState.getState().foldedBlocks.includes(s.current.entityID)&&1!==e.selection.anchor||await b.current?.mutate.moveChildren({oldParent:s.current.entityID,newParent:x,after:null})}else a=(0,r.generateKeyBetween)(s.current.position,s.current.nextPosition),await b.current?.mutate.addBlock({newEntityID:x,factID:(0,u.v7)(),permission_set:s.current.entity_set.set,parent:s.current.parent,type:n,position:a}),(0,m.unfoldBlocks)(b.current,[s.current.entityID]);if("heading"===n){await b.current?.mutate.assertFact({entity:s.current.entityID,attribute:"block/type",data:{type:"block-type-union",value:"text"}});let[e]=await b.current?.query(e=>(0,h.scanIndex)(e).eav(s.current.entityID,"block/heading-level"))||[];await b.current?.mutate.assertFact({entity:x,attribute:"block/heading-level",data:{type:"number",value:e.data.value||0}})}"left"!==s.current.alignment&&await b.current?.mutate.assertFact({entity:x,attribute:"block/text-alignment",data:{type:"text-alignment-type-union",value:s.current.alignment}});let[i]=await b.current?.query(e=>(0,h.scanIndex)(e).eav(s.current.entityID,"block/text-size"))||[];i&&await b.current?.mutate.assertFact({entity:x,attribute:"block/text-size",data:{type:"text-size-union",value:i.data.value}})})().then(()=>{l.useUIState.getState().setSelectedBlock({entityID:x,parent:k}),v.add({undo:()=>{},redo:()=>{setTimeout(w,10)}}),setTimeout(w,10)}).finally(()=>v.endGroup()),!0})(t,i,a)},"Shift-Enter":(e,t,n)=>{let r=s.schema.nodes.hard_break.create();return t&&t(e.tr.replaceSelectionWith(r).scrollIntoView()),!0},"Ctrl-Enter":I(e,f),"Meta-Enter":I(e,f)})])},78448,e=>{"use strict";e.s(["trackUndoRedo",()=>I,"useMountProsemirror",()=>T]);var t=e.i(271645),n=e.i(680915),r=e.i(827121),i=e.i(571141),a=e.i(172604),o=e.i(929987),s=e.i(818560),l=e.i(998104),c=e.i(69497),u=e.i(684201),d=e.i(651806),h=e.i(416330),p=e.i(734255),m=e.i(988314),f=e.i(467592),g=e.i(878964),y=e.i(492122),b=e.i(702599),v=e.i(612192),x=e.i(434988),k=e.i(975191),w=e.i(216425),C=e.i(580714),S=e.i(6
14157460),E=e.i(101065);function T({props:e,openMentionAutocomplete:D}){let{entityID:N}=e,A=(0,f.useReplicache)(),_=(0,t.useRef)(null),P=(0,t.useRef)(null),{yText:M,cursorPlugin:R,overlay:L}=(0,E.useCollabText)(N),j=(0,y.useEntitySetContext)(),O=(0,f.useEntity)(N,"block/text-alignment")?.data.value||"left",B=(0,t.useRef)({...e,entity_set:j,alignment:O}),F=(0,g.useHandlePaste)(N,B);return B.current={...e,entity_set:j,alignment:O},P.current=A.rep,(0,t.useLayoutEffect)(()=>{if(!_.current)return;let e=(0,u.TextBlockKeymap)(B,P,A.undoManager,D),t=r.EditorState.create({schema:c.schema,plugins:[(0,s.ySyncPlugin)(M),R,(0,o.keymap)(e),(0,d.inputrules)(B,P,A.undoManager,D),(0,o.keymap)(a.baseKeymap),h.highlightSelectionPlugin,C.commentDraftPlugin,(0,p.autolink)({type:c.schema.marks.link,shouldAutoLink:()=>!0,defaultProtocol:"https"})]}),f=new i.EditorView({mount:_.current},{state:t,handlePaste:F,transformCopied:S.stripCommentMarks,transformPasted:S.stripCommentMarks,handleDOMEvents:{click:(e,t)=>{if(!(t.metaKey||t.ctrlKey)){let e=function(e){let t=e.target?.closest(".comment-anchor[data-comment-id]");if(!t)return null;let n=t.getAttribute("data-comment-id").split(" ").filter(Boolean);return 0===n.length?null:{anchor:t,commentIDs:n}}(t);if(e&&B.current.entity_set.permissions.write){let{anchor:r,commentIDs:i}=e;if(!window.matchMedia("(min-width: 1280px)").matches){let e=w.useEditorCommentPopoverStore.getState();return e.commentIDs?.join(" ")===i.join(" ")?e.close():e.open(i,r,(0,n.pageOfParent)(B.current.parent)),t.preventDefault(),!0}if("canvas"===B.current.pageType||(0,n.isBlockGroup)(B.current.parent))return k.useEditorCommentSheetStore.getState().openSheet((0,n.pageOfParent)(B.current.parent),i[0]),t.preventDefault(),!0}return!1}let r=t.target?.closest("a"),i=r?.getAttribute("href");return!!i&&(window.open(i,"_blank","noopener,noreferrer"),t.preventDefault(),!0)}},handleClickOn:(e,t,r,i,a,o)=>{if(!o)return;if(r?.type===c.schema.nodes.footnote){let e=r.attrs.footnoteEntityID,t=a.target.closest(".footnote-ref");if(!t)return;let i=window.matchMedia("(min-width: 1280px)").matches,o="canvas"===B.current.pageType||(0,n.isBlockGroup)(B.current.parent);if(!i||o){let r=v.useFootnotePopoverStore.getState();r.activeFootnoteID===e?r.close():r.open(e,t,(0,n.pageOfParent)(B.current.parent));return}let s=document.querySelector(".footnote-side-column"),l=s?.querySelector(`[data-footnote-editor="${e}"]`);if(l||(l=document.querySelector(`[data-footnote-editor="${e}"]`)),l){l.scrollIntoView({behavior:"smooth",block:"nearest"});let e=l.querySelector(".ProseMirror");e&&setTimeout(()=>e.focus(),100)}return}if(r?.type===c.schema.nodes.didMention)return void window.open((0,b.didToBlueskyUrl)(r.attrs.did),"_blank","noopener,noreferrer");if(r?.type===c.schema.nodes.atMention){if(r.attrs.href)window.open(r.attrs.href,"_blank","noopener,noreferrer");else{let e=(0,b.atUriToUrl)(r.attrs.atURI);window.open(e,"_blank","noopener,noreferrer")}return}if(r.nodeSize-2<=t)return;let s=r.nodeAt(t-1),l=r.nodeAt(Math.max(t-2,0)),u=s?.marks.find(e=>e.type===c.schema.marks.link)||l?.marks.find(e=>e.type===c.schema.marks.link);if(u){if(a.metaKey||a.ctrlKey)return!0;let e=a.target.closest("a");return void(e&&x.useLinkPopoverStore.getState().open(u.attrs.href,e,N,(0,n.pageOfParent)(B.current.parent)))}},dispatchTransaction:function(t){m.useEditorStates.setState(n=>{let r=this.state,i=this.state.apply(t),a=0!==t.steps.length||t.docChanged,o=!!t.getMeta(l.ySyncPluginKey)?.isChangeOrigin;if(a&&!o){let e=new Set,t=new Set;for(let n of(r.doc.descendants(t=>{"footnote"===t.type.name&&e.add(t.attrs.footnoteEntityID)}),i.doc.descendants(e=>{"footnote"===e.type.name&&t.add(e.attrs.footnoteEntityID)}),e))t.has(n)||P.current?.mutate.deleteFootnote({footnoteEntityID:n,blockID:N});let n=(e,t)=>{e.descendants(e=>{for(let n of e.marks)if("comment"===n.type.name)for(let e of(n.attrs.commentID||"").split(" "))e&&t.add(e)})},a=new Set,o=new Set;for(let e of(n(r.doc,a),n(i.doc,o),a))o.has(e)||P.current?.mutate.deleteEditorComment({commentEntityID:e,blockID:N})}let s=t.getMeta("bulkOp"),c=e=>()=>{let t=m.useEditorStates.getState().editorStates[N]?.view;t?.hasFocus()||s||t?.focus(),(0,m.restoreEditorState)(N,e)};return I(t,A.undoManager,N,c(r),c(i)),{editorStates:{...n.editorStates,[N]:{editor:i,view:this,initial:!1,keymap:e}}}})}}),g=m.useEditorStates.subscribe(e=>e.editorStates[N],e=>{!e?.initial&&e?.editor&&e.view?.updateState(e.editor)}),y=m.useEditorStates.getState().editorStates[N];return y?.editor&&!y.initial&&y.view?.updateState(y.editor),()=>{g(),f.destroy(),m.useEditorStates.setState(e=>({...e,editorStates:{...e.editorStates,[N]:void 0}}))}},[N,M,R,F,A]),{mountRef:_,overlay:L}}function I(e,t,n,r,i){let a=e.getMeta("addToHistory"),o=e.getMeta("bulkOp")||e.getMeta("externalUndoGroup"),s=0!==e.steps.length||e.docChanged;!1!==a&&s&&(o?t.add({undo:r,redo:i}):t.addGrouped({undo:r,redo:i},n))}},878964,135537,657460,e=>{"use strict";var t=e.i(271645),n=e.i(467592),r=e.i(988314),i=e.i(69497),a=e.i(478802),o=e.i(870370),s=e.i(394191),l=e.i(492122),c=e.i(110383),u=e.i(774753),d=e.i(438424),h=e.i(358940),p=e.i(810545),m=e.i(397587),f=e.i(64572),g=e.i(113554);async function y({children:e,rep:t,undoManager:n,entity_set:i,propsRef:l,pasteParent:u,position:d,nextPosition:p,prepareParent:m}){let f,g=(0,h.buildBlocksFromElements)(e,{parent:u,permission_set:i.set});if(0===g.blocks.length)return;let b=g.blocks[0],v=l.current.type,x=null;b&&b.parent===u&&b.parsedContent&&("text"===b.type||"heading"===b.type||"blockquote"===b.type)&&("heading"===v||"blockquote"===v||v===b.type)&&(x={content:b.parsedContent,type:b.type});let k=[];if(x){let e=b.entityID,t=l.current.entityID;for(let n of(f=g.blocks.slice(1).map(n=>n.parent===e?{...n,parent:t}:n),b.facts)){if(n.entity!==e){k.push(n);continue}if("block/type"===n.attribute||"block/text"===n.attribute)continue;let r={...n,entity:t};k.push(r)}}else f=g.blocks;let w=f.filter(e=>e.parent===u),C=w.length>0?(0,a.generateNKeysBetween)(d||null,p||null,w.length):[],S=new Map;
141w.forEach((e,t)=>S.set(e.entityID,C[t]));let E=[...f.map(e=>({entityID:e.entityID,permission_set:i.set})),...g.extraEntities],T=[];for(let e of f){T.push(...e.facts);let t=S.get(e.entityID);void 0!==t&&T.push({id:(0,c.v7)(),entity:e.parent,attribute:"card/block",data:{type:"ordered-reference",value:e.entityID,position:t}})}T.push(...k);let I=null;if(x){let e=l.current.entityID,t=r.useEditorStates.getState().editorStates[e];if(t){let n=t.editor,i=t.editor.tr,a=t.editor.selection;a.empty||i.delete(a.from,a.to),i.replaceSelectionWith(x.content);let o=t.editor.apply(i);(0,r.setEditorState)(e,{editor:o}),I={oldEditorState:n,newEditorState:o}}}let D=l.current.entityID,N=E.map(e=>e.entityID);for(let e of(await n.withUndoGroup(async()=>{if(w.length>0&&m&&await m(),E.ignoreUndo=!0,T.ignoreUndo=!0,E.length>0&&await t.mutate.createEntity(E),T.length>0&&await t.mutate.assertFact(T),I){let{oldEditorState:e,newEditorState:t}=I;n.add({undo:()=>{let t=r.useEditorStates.getState().editorStates[D]?.view;t&&!t.hasFocus()&&t.focus(),(0,r.restoreEditorState)(D,e)},redo:()=>{let e=r.useEditorStates.getState().editorStates[D]?.view;e&&!e.hasFocus()&&e.focus(),(0,r.restoreEditorState)(D,t)}})}if(N.length>0){let e=T.slice();n.add({undo:async()=>{for(let e of N)await t.mutate.deleteEntity({entity:e,ignoreUndo:!0})},redo:async()=>{let n=E.slice(),r=e.slice();n.ignoreUndo=!0,r.ignoreUndo=!0,await t.mutate.createEntity(n),await t.mutate.assertFact(r)}})}}),g.imageTasks))fetch(e.url).then(e=>e.blob()).then(n=>{let r=new File([n],"image.png",{type:n.type});return(0,o.addImage)(r,t,{attribute:e.attribute,entityID:e.entityID,ignoreUndo:!0})}).catch(()=>{});let A=f[f.length-1];A?(0,s.focusBlock)({entityID:A.entityID,type:A.type,parent:A.parent},{type:"end"}):x&&(0,s.focusBlock)({entityID:l.current.entityID,type:x.type,parent:l.current.parent},{type:"end"})}e.s(["useHandlePaste",0,(e,b)=>{let{rep:v,undoManager:x}=(0,n.useReplicache)(),k=(0,l.useEntitySetContext)();return(0,t.useCallback)((t,n)=>{let l;if(!v||!n.clipboardData)return;let w=n.clipboardData.getData("text/html"),C=n.clipboardData.getData("text"),S=r.useEditorStates.getState().editorStates[e];if(!S)return;if(C&&(0,d.betterIsUrl)(C)){let n=t.state.selection,a=t.state.tr,{from:o,to:s}=n;n.empty?(a.insertText(C,n.from),a.addMark(o,o+C.length,i.schema.marks.link.create({href:C}))):a.addMark(o,s,i.schema.marks.link.create({href:C}));let l=t.state,c=t.state.apply(a);return x.add({undo:()=>{t?.hasFocus()||t?.focus(),(0,r.setEditorState)(e,{editor:l})},redo:()=>{t?.hasFocus()||t?.focus(),(0,r.setEditorState)(e,{editor:c})}}
141),(0,r.setEditorState)(e,{editor:c}),!0}let{listData:E,parent:T,position:I,nextPosition:D}=b.current,N="canvas"===b.current.pageType?(0,c.v7)():null,A=N?()=>l??=(0,g.groupCanvasBlock)(v,x,{page:T,blockEntity:b.current.entityID,groupEntity:N,permission_set:k.set}):void 0,_=N?(0,a.generateKeyBetween)(null,null):I,P=N?null:D,M=new DOMParser().parseFromString(w,"text/html");if(w&&M.children.length||!C||(w=(0,u.markdownToHtml)(C)),w){let e=(0,h.parsePasteHTMLToElements)(w),t=!1;for(let e of n.clipboardData.items)e.type.includes("image")&&(t=!0);1===e.length&&"IMG"===e[0].tagName&&t||(0,p.resolveCopiedFootnoteRefs)(e,e=>v.query(async t=>{let[n]=await (0,f.scanIndex)(t).eav(e,"block/text");return n?(0,m.renderFootnoteDefHTML)(n.data.value):null})).then(()=>y({children:e,rep:v,undoManager:x,entity_set:k,propsRef:b,pasteParent:N??(E?E.parent:T),position:_,nextPosition:P,prepareParent:A}))}for(let e of n.clipboardData.items)if(e?.type.includes("image")){let t=e.getAsFile();if(t){let e=0===S.editor.doc.textContent.length,n=e?b.current.entityID:(0,c.v7)();return(0,o.prepareImage)(t,v,{attribute:"block/image",entityID:n,ignoreUndo:!0}).then(async({imageFact:t,finishUpload:r})=>{try{e?await x.withUndoGroup(async()=>{await v.mutate.assertFact([{entity:n,attribute:"block/type",data:{type:"block-type-union",value:"image"}},t]),await v.mutate.retractAttribute({entity:n,attribute:"block/text"})}):(await v.mutate.createEntity([{entityID:n,permission_set:k.set}]),await x.withUndoGroup(async()=>{await A?.(),await v.mutate.assertFact([{entity:N??T,id:(0,c.v7)(),attribute:"card/block",data:{type:"ordered-reference",value:n,position:(0,a.generateKeyBetween)(_,P)}},{entity:n,attribute:"block/type",data:{type:"block-type-union",value:"image"}},t])}),N&&(0,s.focusBlock)({entityID:b.current.entityID,type:b.current.type,parent:N},{type:"end"}))}finally{await r()}}).catch(()=>{}),!0}return}return n.preventDefault(),n.stopPropagation(),!0},[v,k,e,b,x])}],878964);let b=(0,t.createContext)({pageID:"",footnotes:[],indexMap:{}});e.s(["FootnoteContext",0,b,"useFootnoteContext",0,function(){return(0,t.useContext)(b)}],135537);var v=e.i(428762);e.s(["stripCommentMarks",0,function(e){return new v.Slice(function e(t){let n=[];return t.forEach(t=>{let r=t.mark(t.marks.filter(e=>"comment"!==e.type.name));r.content.childCount&&(r=r.copy(e(r.content))),n.push(r)}),v.Fragment.fromArray(n)}(e.content),e.openStart,e.openEnd)},"stripFootnoteRefs",0,function(e){return new v.Slice(function e(t){let n=[];return t.forEach(t=>{"footnote"!==t.type.name&&n.push(t.content.childCount?t.copy(e(t.content)):t)}),v.Fragment.fromArray(n)}(e.content),e.openStart,e.openEnd)}],657460)},845118,998104,818560,220511,101065,113554,781553,752316,219746,619469,834732,e=>{"use strict";var t=e.i(271645),n=e.i(813029),r=e.i(988314),i=e.i(762268),a=e.i(394191),o=e.i(293297),s=e.i(468034),l=e.i(478802),c=e.i(110383),u=e.i(467592),d=e.i(492122),h=e.i(993417),p=e.i(843476),m=e.i(500932),f=e.i(616009),g=e.i(442957),y=e.i(734582),b=e.i(867854),v=e.i(571141),x=e.i(827121);e.s(["absolutePositionToRelativePosition",()=>ei,"prosemirrorToYDoc",()=>es,"relativePositionToAbsolutePosition",()=>eo,"setMeta",()=>er,"yDocToProsemirror",()=>el],220511),e.s(["createNodeFromYElement",()=>H,"updateYFragment",()=>Q,"ySyncPlugin",()=>j],818560);var k=e.i(428762),w=e.i(399993),C=e.i(218961),S=e.i(786581);e.i(709646);let E=/[\uD800-\uDBFF]/,T=/[\uDC00-\uDFFF]/;var I=e.i(765381);let D=new x.PluginKey("y-sync"),N=new x.PluginKey("y-undo");new x.PluginKey("yjs-cursor"),e.s(["ySyncPluginKey",0,D,"yUndoPluginKey",0,N],998104);var A=e.i(789522),_=e.i(597016),P=e.i(152820),M=e.i(22175);let R=(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!f.isDeleted(t.ds,e.id),L=[{light:"#ecd44433",dark:"#ecd444"}],j=(e,{colors:t=L,colorMapping:n=new Map,permanentUserData:r=null,onFirstRender:i=()=>{}}={})=>{let a=!1,o=new x.Plugin({props:{editable:e=>{let t=D.getState(e);return null==t.snapshot&&null==t.prevSnapshot}},key:D,state:{init:(i,a)=>({type:e,doc:e.doc,binding:null,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:r}),apply:(e,t)=>{let n=e.getMeta(D);if(void 0!==n)for(let e in t=Object.assign({},t),n)t[e]=n[e];return t.addToHistory=!1!==e.getMeta("addToHistory"),t.isChangeOrigin=void 0!==n&&!!n.isChangeOrigin,t.isUndoRedoOperation=void 0!==n&&!!n.isChangeOrigin&&!!n.isUndoRedoOperation,null!==t.binding&&void 0!==n&&(null!=n.snapshot||null!=n.prevSnapshot)&&M.timeout(0,
141()=>{null==t.binding||t.binding.isDestroyed||(null==n.restore?t.binding._renderSnapshot(n.snapshot,n.prevSnapshot,t):(t.binding._renderSnapshot(n.snapshot,n.snapshot,t),delete t.restore,delete t.snapshot,delete t.prevSnapshot,t.binding.mux(()=>{t.binding._prosemirrorChanged(t.binding.prosemirrorView.state.doc)})))}),t}},view:t=>{let n=new B(e,t);return n._forceRerender(),i(),{update:()=>{let e=o.getState(t.state);if(null==e.snapshot&&null==e.prevSnapshot&&(a||null!==t.state.doc.content.findDiffStart(t.state.doc.type.createAndFill().content))){if(a=!0,!1===e.addToHistory&&!e.isChangeOrigin){let e=N.getState(t.state),n=e&&e.undoManager;n&&n.stopCapturing()}n.mux(()=>{e.doc.transact(r=>{r.meta.set("addToHistory",e.addToHistory),n._prosemirrorChanged(t.state.doc)},D)})}},destroy:()=>{n.destroy()}}}});return o},O=(e,t)=>({anchor:ei(t.selection.anchor,e.type,e.mapping),head:ei(t.selection.head,e.type,e.mapping)});class B{constructor(e,t){this.type=e,this.prosemirrorView=t,this.mux=(()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else void 0!==n&&n()}})(),this.isDestroyed=!1,this.mapping=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{null===this.beforeTransactionSelection&&(this.beforeTransactionSelection=O(this,t.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),e.observeDeep(this._observeFunction),this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return!!this.prosemirrorView.hasFocus()&&(_.isBrowser&&null===this._domSelectionInView&&(M.timeout(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView)}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection(),t=this.prosemirrorView._root.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),0===t.getClientRects().length&&t.startContainer&&t.collapsed&&t.selectNodeContents(t.startContainer);let n=t.getBoundingClientRect(),r=P.doc.documentElement;return n.bottom>=0&&n.right>=0&&n.left<=(window.innerWidth||r.clientWidth||0)&&n.top<=(window.innerHeight||r.clientHeight||0)}renderSnapshot(e,t){t||(t=f.createSnapshot(f.createDeleteSet(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(D,{snapshot:e,prevSnapshot:t}))}unrenderSnapshot(){this.mapping=new Map,this.mux(()=>{let e=this.type.toArray().map(e=>H(e,this.prosemirrorView.state.schema,this.mapping)).filter(e=>null!==e),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new k.Slice(k.Fragment.from(e),0,0));t.setMeta(D,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(t)})}_forceRerender(){this.mapping=new Map,this.mux(()=>{let e=this.type.toArray().map(e=>H(e,this.prosemirrorView.state.schema,this.mapping)).filter(e=>null!==e),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new k.Slice(k.Fragment.from(e),0,0));this.prosemirrorView.dispatch(t.setMeta(D,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,t,n){e||(e=f.snapshot(this.doc)),this.mapping=new Map,this.mux(()=>{this.doc.transact(r=>{let i=n.permanentUserData;i&&i.dss.forEach(e=>{f.iterateDeletedStructs(r,e,e=>{})});let a=(e,t)=>{let r="added"===e?i.getUserByClientId(t.client):i.getUserByDeletedId(t);return{user:r,type:e,color:((e,t,n)=>{if(!e.has(n)){if(e.size<t.length){let n=S.create();e.forEach(e=>n.add(e)),t=t.filter(e=>!n.has(e))}e.set(n,A.oneOf(t))}return e.get(n)})(n.colorMapping,n.colors,r)}},o=f.typeListToArraySnapshot(this.type,new f.Snapshot(t.ds,e.sv)).map(n=>!n._item.deleted||R(n._item,e)||R(n._item,t)?H(n,this.prosemirrorView.state.schema,new Map,e,t,a):null).filter(e=>null!==e),s=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new k.Slice(k.Fragment.from(o),0,0));this.prosemirrorView.dispatch(s.setMeta(D,{isChangeOrigin:!0}))},D)})}_typeChanged(e,t){let n=D.getState(this.prosemirrorView.state);0===e.length||null!=n.snapshot||null!=n.prevSnapshot?this.renderSnapshot(n.snapshot,n.prevSnapshot):this.mux(()=>{let e=(e,t)=>
141this.mapping.delete(t);f.iterateDeletedStructs(t,t.deleteSet,e=>{if(e.constructor===f.Item){let t=e.content.type;t&&this.mapping.delete(t)}}),t.changed.forEach(e),t.changedParentTypes.forEach(e);let n=this.type.toArray().map(e=>F(e,this.prosemirrorView.state.schema,this.mapping)).filter(e=>null!==e),r=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new k.Slice(k.Fragment.from(n),0,0));((e,t,n)=>{if(null!==t&&null!==t.anchor&&null!==t.head){let r=eo(n.doc,n.type,t.anchor,n.mapping),i=eo(n.doc,n.type,t.head,n.mapping);null!==r&&null!==i&&(e=e.setSelection(x.TextSelection.create(e.doc,r,i)))}})(r,this.beforeTransactionSelection,this),r=r.setMeta(D,{isChangeOrigin:!0,isUndoRedoOperation:t.origin instanceof f.UndoManager}),null!==this.beforeTransactionSelection&&this._isLocalCursorInView()&&r.scrollIntoView(),this.prosemirrorView.dispatch(r)})}_prosemirrorChanged(e){this.doc.transact(()=>{Q(this.doc,this.type,e,this.mapping),this.beforeTransactionSelection=O(this,this.prosemirrorView.state)},D)}destroy(){this.isDestroyed=!0,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions)}}let F=(e,t,n,r,i,a)=>{let o=n.get(e);if(void 0===o)if(e instanceof f.XmlElement)return H(e,t,n,r,i,a);else throw I.methodUnimplemented();return o},H=(e,t,n,r,i,a)=>{let o=[],s=e=>{if(e.constructor===f.XmlElement){let s=F(e,t,n,r,i,a);null!==s&&o.push(s)}else{let s=U(e,t,n,r,i,a);null!==s&&s.forEach(e=>{null!==e&&o.push(e)})}};void 0===r||void 0===i?e.toArray().forEach(s):f.typeListToArraySnapshot(e,new f.Snapshot(i.ds,r.sv)).forEac
141h(s);try{let s=e.getAttributes(r);void 0!==r&&(R(e._item,r)?R(e._item,i)||(s.ychange=a?a("added",e._item.id):{type:"added"}):s.ychange=a?a("removed",e._item.id):{type:"removed"});let l=t.node(e.nodeName,s,o);return n.set(e,l),l}catch(t){return e.doc.transact(t=>{e._item.delete(t)},D),n.delete(e),null}},U=(e,t,n,r,i,a)=>{let o=[],s=e.toDelta(r,i,a);try{for(let e=0;e<s.length;e++){let n=s[e],r=[];for(let e in n.attributes)r.push(t.mark(e,n.attributes[e]));o.push(t.text(n.insert,r))}}catch(t){return e.doc.transact(t=>{e._item.delete(t)},D),null}return o},z=(e,t)=>{let n,r;return e instanceof Array?(n=new f.XmlText,r=e.map(e=>({insert:e.text,attributes:X(e.marks)})),n.applyDelta(r),t.set(n,e),n):((e,t)=>{let n=new f.XmlElement(e.type.name);for(let t in e.attrs){let r=e.attrs[t];null!==r&&"ychange"!==t&&n.setAttribute(t,r)}return n.insert(0,q(e).map(e=>z(e,t))),t.set(n,e),n})(e,t)},$=e=>"object"==typeof e&&null!==e,V=(e,t)=>{let n=Object.keys(e).filter(t=>null!==e[t]),r=n.length===Object.keys(t).filter(e=>null!==t[e]).length;for(let i=0;i<n.length&&r;i++){let a=n[i],o=e[a],s=t[a];r="ychange"===a||o===s||$(o)&&$(s)&&V(o,s)}return r},q=e=>{let t=e.content.content,n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.isText){let r=[];for(let n=t[e];e<t.length&&n.isText;n=t[++e])r.push(n);e--,n.push(r)}else n.push(r)}return n},G=(e,t)=>{let n=e.toDelta();return n.length===t.length&&n.every((e,n)=>e.insert===t[n].text&&C.keys(e.attributes||{}).length===t[n].marks.length&&t[n].marks.every(t=>V(e.attributes[t.type.name]||{},t.attrs)))},W=(e,t)=>{if(e instanceof f.XmlElement&&!(t instanceof Array)&&J(e,t)){let n=q(t);return e._length===n.length&&V(e.getAttributes(),t.attrs)&&e.toArray().every((e,t)=>W(e,n[t]))}return e instanceof f.XmlText&&t instanceof Array&&G(e,t)},K=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((e,n)=>t[n]===e),Y=(e,t,n)=>{let r=e.toArray(),i=q(t),a=i.length,o=r.length,s=w.min(o,a),l=0,c=0,u=!1;for(;l<s;l++){let e=r[l],t=i[l];if(K(n.get(e),t))u=!0;else if(!W(e,t))break}for(;l+c<s;c++){let e=r[o-c-1],t=i[a-c-1];if(K(n.get(e),t))u=!0;else if(!W(e,t))break}return{equalityFactor:l+c,foundMappedChild:u}},Z=(e,t,n)=>{n.set(e,t);let{nAttrs:r,str:i}=(e=>{let t="",n=e._start,r={};for(;null!==n;)!n.deleted&&(n.countable&&n.content instanceof f.ContentString?t+=n.content.str:n.content instanceof f.ContentFormat&&(r[n.content.key]=null)),n=n.right;return{str:t,nAttrs:r}})(e),a=t.map(e=>({insert:e.text,attributes:Object.assign({},r,X(e.marks))})),{insert:o,remove:s,index:l}=((e,t)=>{let n=0,r=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;for(n>0&&E.test(e[n-1])&&n--;r+n<e.length&&r+n<t.length&&e[e.length-r-1]===t[t.length-r-1];)r++;return r>0&&T.test(e[e.length-r])&&r--,{index:n,remove:e.length-n-r,insert:t.slice(n,t.length-r)}})(i,a.map(e=>e.insert).join(""));e.delete(l,s),e.insert(l,o),e.applyDelta(a.map(e=>({retain:e.insert.length,attributes:e.attributes})))},X=e=>{let t={};return e.forEach(e=>{"ychange"!==e.type.name&&(t[e.type.name]=e.attrs)}),t},Q=(e,t,n,r)=>{if(t instanceof f.XmlElement&&t.nodeName!==n.type.name)throw Error("node name mismatch!");if(r.set(t,n),t instanceof f.XmlElement){let e=t.getAttributes(),r=n.attrs;for(let n in r)null!==r[n]?e[n]!==r[n]&&"ychange"!==n&&t.setAttribute(n,r[n]):t.removeAttribute(n);for(let n in e)void 0===r[n]&&t.removeAttribute(n)}let i=q(n),a=i.length,o=t.toArray(),s=o.length,l=w.min(a,s),c=0,u=0;for(;c<l;c++){let e=o[c],t=i[c];if(!K(r.get(e),t))if(W(e,t))r.set(e,t);else break}for(;u+c+1<l;u++){let e=o[s-u-1],t=i[a-u-1];if(!K(r.get(e),t))if(W(e,t))r.set(e,t);else break}e.transact(()=>{for(;s-c-u>0&&a-c-u>0;){let n=o[c],l=i[c],d=o[s-u-1],h=i[a-u-1];if(n instanceof f.XmlText&&l instanceof Array)G(n,l)||Z(n,l,r),c+=1;else{let i=n instanceof f.XmlElement&&J(n,l),a=d instanceof f.XmlElement&&J(d,h);if(i&&a){let e=Y(n,l,r),t=Y(d,h,r);e.foundMappedChild&&!t.foundMappedChild?a=!1:!e.foundMappedChild&&t.foundMappedChild||e.equalityFactor<t.equalityFactor?i=!1:a=!1}i?(Q(e,n,l,r),c+=1):a?(Q(e,d,h,r),u+=1):(r.delete(t.get(c)),t.delete(c,1),t.insert(c,[z(l,r)]),c+=1)}}let n=s-c-u;if(1===s&&0===a&&o[0]instanceof f.XmlText?(r.delete(o[0]),o[0].delete(0,o[0].length)):n>
1410&&(t.slice(c,c+n).forEach(e=>r.delete(e)),t.delete(c,n)),c+u<a){let e=[];for(let t=c;t<a-u;t++)e.push(z(i[t],r));t.insert(c,e)}},D)},J=(e,t)=>!(t instanceof Array)&&e.nodeName===t.type.name;var ee=e.i(877116);let et=null,en=()=>{let e=et;et=null,e.forEach((e,t)=>{let n=t.state.tr,r=D.getState(t.state);r&&r.binding&&!r.binding.isDestroyed&&(e.forEach((e,t)=>{n.setMeta(t,e)}),t.dispatch(n))})},er=(e,t,n)=>{et||(et=new Map,M.timeout(0,en)),ee.setIfUndefined(et,e,ee.create).set(t,n)},ei=(e,t,n)=>{if(0===e)return f.createRelativePositionFromTypeIndex(t,0);let r=null===t._first?null:t._first.content.type;for(;null!==r&&t!==r;){if(r instanceof f.XmlText){if(r._length>=e)return f.createRelativePositionFromTypeIndex(r,e);if(e-=r._length,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{do r=null===r._item?null:r._item.parent,e--;while(r!==t&&null!==r&&null!==r._item&&null===r._item.next)null!==r&&r!==t&&(r=null===r._item?null:r._item.next.content.type)}}else{let i=(n.get(r)||{nodeSize:0}).nodeSize;if(null!==r._first&&e<i)r=r._first.content.type,e--;else{if(1===e&&0===r._length&&i>1)return new f.RelativePosition(null===r._item?null:r._item.id,null===r._item?f.findRootTypeKey(r):null,null);if(e-=i,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{if(0===e)return r=null===r._item?r:r._item.parent,new f.RelativePosition(null===r._item?null:r._item.id,null===r._item?f.findRootTypeKey(r):null,null);do r=r._item.parent,e--;while(r!==t&&null===r._item.next)r!==t&&(r=r._item.next.content.type)}}}if(null===r)throw I.unexpectedCase();if(0===e&&r.constructor!==f.XmlText&&r!==t)return ea(r._item.parent,r._item)}return f.createRelativePositionFromTypeIndex(t,t._length)},ea=(e,t)=>{let n=null,r=null;return null===e._item?r=f.findRootTypeKey(e):n=f.createID(e._item.id.client,e._item.id.clock),new f.RelativePosition(n,r,t.id)},eo=(e,t,n,r)=>{let i=f.createAbsolutePositionFromRelativePosition(n,e);if(null===i||i.type!==t&&!f.isParentOf(t,i.type._item))return null;let a=i.type,o=0;if(a.constructor===f.XmlText)o=i.index;else if(null===a._item||!a._item.deleted){let e=a._first,t=0;for(;t<a._length&&t<i.index&&null!==e;){if(!e.deleted){let n=e.content.type;t++,n instanceof f.XmlText?o+=n._length:o+=r.get(n).nodeSize}e=e.right}o+=1}for(;a!==t&&null!==a._item;){let e=a._item.parent;if(null===e._item||!e._item.deleted){o+=1;let t=e._first;for(;null!==t;){let e=t.content.type;if(e===a)break;t.deleted||(e instanceof f.XmlText?o+=e._length:o+=r.get(e).nodeSize),t=t.right}}a=e}return o-1};function es(e,t="prosemirror"){var n;let r,i=new f.Doc,a=i.get(t,f.XmlFragment);return a.doc?(n=e,Q((r=a||new f.XmlFragment).doc?r.doc:{transact:e=>e(void 0)},r,n,new Map),a.doc):i}function el(e,t){let n=function(e,t="prosemirror"){return{type:"doc",content:e.getXmlFragment(t).toArray().map(function e(t){let n;if(t.nodeName){n={type:t.nodeName};let r=t.getAttributes();Object.keys(r).length&&(n.attrs=r);let i=t.toArray();i.length&&(n.content=i.map(e).flat())}else n=t.toDelta().map(e=>{let t={type:"text",text:e.insert};return e.attributes&&(t.marks=Object.keys(e.attributes).map(t=>{let n=e.attributes[t],r={type:t};return Object.keys(n)&&(r.attrs=n),r})),t});return n})}}(t);return k.Node.fromJSON(e,n)}let ec=null,eu=["#30bced","#6eeb83","#ffbc42","#ecd444","#ee6352","#9ac2c9","#8acb88","#1be7ff"],ed=null;function eh(e){if(null===ed&&(ed="u">typeof CSS&&CSS.supports("color","oklch(from red l c h)")),!ed){let t=(Math.round(e/45)%eu.length+eu.length)%eu.length;return{color:eu[t],text:"rgba(0, 0, 0, 0.8)",selection:`${eu[t]}59`}}let t=`clamp(0.55, l, 0.75) clamp(0.08, c, 0.16) calc(h + ${e})`;return{color:`oklch(from rgb(var(--accent-contrast)) ${t})`,text:"oklch(from rgb(var(--accent-contrast)) clamp(0.13, (0.66 - clamp(0.55, l, 0.75)) * 1000, 0.985) 0 0)",selection:`oklch(from rgb(var(--accent-contrast)) ${t} / 0.35)`}}let ep=new x.PluginKey("yjs-remote-cursors"),em=(e,t)=>{let n=new Set;
141return e.getStates().forEach((r,i)=>{i!==e.clientID&&r.cursor?.entityID===t&&n.add(i)}),r=>{let i=!1;for(let a of r.added.concat(r.updated,r.removed)){if(a===e.clientID)continue;let r=e.getStates().get(a)?.cursor?.entityID===t;(r||n.has(a))&&(i=!0),r?n.add(a):n.delete(a)}return i}},ef=(e,t,n)=>{let r=D.getState(e),i=[];return null!=r.snapshot||null!=r.prevSnapshot||null===r.binding?v.DecorationSet.create(e.doc,[]):(t.getStates().forEach((a,o)=>{if(o===t.clientID||null==a.cursor||a.cursor.entityID!==n)return;let s=eo(r.doc,r.type,f.createRelativePositionFromJSON(a.cursor.anchor),r.binding.mapping),l=eo(r.doc,r.type,f.createRelativePositionFromJSON(a.cursor.head),r.binding.mapping);if(null===s||null===l)return;let c=Math.max(e.doc.content.size-1,0);(s=Math.min(s,c))!==(l=Math.min(l,c))&&i.push(v.Decoration.inline(Math.min(s,l),Math.max(s,l),{style:`background-color: ${eh(a.user?.hue??0).selection}`,class:"ProseMirror-yjs-selection"},{inclusiveEnd:!0,inclusiveStart:!1}))}),v.DecorationSet.create(e.doc,i))};function eg(e){let n,i,a,o,s,l=(0,m.c)(10),c=(0,t.useRef)(null);l[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],l[0]=n):n=l[0];let[u,d]=(0,t.useState)(n);if(l[1]!==e.awareness||l[2]!==e.entityID?(i=()=>{let t,n;!function(){if(document.getElementById("yjs-cursor-goo-svg"))return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.id="yjs-cursor-goo-svg",e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width="0",e.style.height="0",e.innerHTML=`<defs><filter id="yjs-cursor-goo"> 142 <feGaussianBlur in="SourceGraphic" stdDeviation="1.25" result="blur" /> 143 <feComponentTransfer in="blur" result="goo"><feFuncA type="discrete" tableValues="0 1" /></feComponentTransfer> 144 <feComposite in="SourceGraphic" in2="goo" operator="over" /> 145 </filter></defs>`,document.body.appendChild(e)}(),t=null,n=null;let i=new ResizeObserver(()=>o()),a=()=>{t=null;let a=c.current,o=r.useEditorStates.getState().editorStates[e.entityID]?.view,s=[];if(a&&o&&o.docView){o.dom!==n&&(n&&i.unobserve(n),n=o.dom,i.observe(o.dom));let t=D.getState(o.state);if(t?.binding&&null==t.snapshot&&null==t.prevSnapshot){let n=a.getBoundingClientRect(),r=a.closest(".yjs-cursor-clip")?.getBoundingClientRect();
145e.awareness.getStates().forEach((i,a)=>{let l;if(a===e.awareness.clientID||null==i.cursor||i.cursor.entityID!==e.entityID)return;let c=eo(t.doc,t.type,f.createRelativePositionFromJSON(i.cursor.head),t.binding.mapping);if(null!==c){c=Math.min(c,Math.max(o.state.doc.content.size-1,0));try{l=o.coordsAtPos(c)}catch{return}s.push({clientId:a,name:i.user?.name||"Anonymous",hue:i.user?.hue??0,left:l.left-n.left,top:l.top-n.top,height:l.bottom-l.top,spaceLeft:r?l.left-r.left:1/0,spaceRight:r?r.right-l.left:1/0})}})}}d(e=>e.length===s.length&&e.every((e,t)=>{let n=s[t];return e.clientId===n.clientId&&e.name===n.name&&e.hue===n.hue&&e.left===n.left&&e.top===n.top&&e.height===n.height&&e.spaceLeft===n.spaceLeft&&e.spaceRight===n.spaceRight})?e:s)},o=()=>{null===t&&(t=window.requestAnimationFrame(a))},s=em(e.awareness,e.entityID),l=e=>{s(e)&&o()};e.awareness.on("change",l);let u=r.useEditorStates.subscribe((t,n)=>{t.editorStates[e.entityID]!==n.editorStates[e.entityID]&&o()});return window.addEventListener("resize",o),o(),()=>{e.awareness.off("change",l),u(),window.removeEventListener("resize",o),i.disconnect(),null!==t&&window.cancelAnimationFrame(t)}},a=[e.entityID,e.awareness],l[1]=e.awareness,l[2]=e.entityID,l[3]=i,l[4]=a):(i=l[3],a=l[4]),(0,t.useEffect)(i,a),0===u.length){let e;return l[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,p.jsx)("div",{className:"yjs-cursor-layer",ref:c,"aria-hidden":!0}),l[5]=e):e=l[5],e}return l[6]!==u?(o=u.map(ey),l[6]=u,l[7]=o):o=l[7],l[8]!==o?(s=(0,p.jsx)("div",{className:"yjs-cursor-layer",ref:c,"aria-hidden":!0,children:o}),l[8]=o,l[9]=s):s=l[9],s}function ey(e){return(0,p.jsx)(eb,{cursor:e},e.clientId)}function eb(e){let n,r,i,a,o,s,l,c,u,d,h,f,g,y,b=(0,m.c)(33),{cursor:v}=e,[x,k]=(0,t.useState)("rest"),[w,C]=(0,t.useState)(""),S=(0,t.useRef)(null),E=(0,t.useRef)(null);b[0]===Symbol.for("react.memo_cache_sentinel")?(n=function(){if(ec)return ec;if(!("u">typeof CSS&&CSS.supports("transition-timing-function","linear(0, 0.5, 1)")))return ec={easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",duration:400};let e=Math.sqrt(280),t=14/(2*Math.sqrt(280)),n=e*Math.sqrt(1-t*t),r=Math.min(6,Math.max(.15,Math.log(1e3)/(t*e))),i=[];for(let a=0;a<=100;a++){let o=a/100*r,s=1-Math.exp(-t*e*o)*(Math.cos(n*o)+t*e/n*Math.sin(n*o));i.push(s.toFixed(4))}return ec={easing:`linear(${i.join(",")})`,duration:Math.round(700*r)}}(),b[0]=n):n=b[0];let T=n;b[1]!==v.hue?(r=eh(v.hue),b[1]=v.hue,b[2]=r):r=b[2];let I=r;b[3]!==v.spaceLeft||b[4]!==v.spaceRight?(i=()=>{null!==S.current&&window.clearTimeout(S.current);let e=Math.min(E.current?.offsetWidth??0,240);C(v.spaceLeft<e/2?"right":v.spaceRight<e/2?"left":""),k("contract"),S.current=window.setTimeout(()=>{S.current=null,k("open")},112)},b[3]=v.spaceLeft,b[4]=v.spaceRight,b[5]=i):i=b[5];let D=i;b[6]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{null!==S.current&&window.clearTimeout(S.current),S.current=null,k("rest")},b[6]=a):a=b[6];let N=a;b[7]===Symbol.for("react.memo_cache_sentinel")?(o=()=>()=>{null!==S.current&&window.clearTimeout(S.current)},s=[],b[7]=o,b[8]=s):(o=b[7],s=b[8]),(0,t.useEffect)(o,s);let A=`ProseMirror-yjs-cursor ${"contract"===x?"yjs-cursor-contract":""} ${"open"===x?"yjs-cursor-open":""} ${w?`yjs-cursor-expand-${w}`:""}`,_=`${Math.round(.22*v.height*100)/100}px`;b[9]!==I.color||b[10]!==I.text||b[11]!==v.height||b[12]!==v.left||b[13]!==v.top||b[14]!==_?(l={left:v.left,top:v.top,height:v.height,"--cursor-color":I.color,"--cursor-text-color":I.text,"--cursor-contract-shift":_,"--yjs-spring-ease":T.easing,"--yjs-spring-dur":`${T.duration}ms`},b[9]=I.color,b[10]=I.text,b[11]=v.height,b[12]=v.left,b[13]=v.top,b[14]=_,b[15]=l):l=b[15];let P=l;return b[16]===Symbol.for("react.memo_cache_sentinel")?(c=(0,p.jsx)("div",{className:"yjs-cursor-stub"}),b[16]=c):c=b[16],b[17]!==v.name?(u=(0,p.jsxs)("div",{className:"yjs-cursor-goo",children:[c,(0,p.jsx)("div",{className:"yjs-cursor-pill",children:(0,p.jsx)("span",{className:"yjs-cursor-text yjs-cursor-sizer",children:v.name})})]}),b[17]=v.name,b[18]=u):u=b[18],b[19]===Symbol.for("react.memo_cache_sentinel")?(d=(0,p.jsx)("div",{className:"yjs-cursor-line"}),b[19]=d):d=b[19],b[20]!==v.name?(h=(0,p.jsx)("div",{className:"yjs-cursor-hit",tabIndex:0,role:"button","aria-label":v.name}),b[20]=v.name,b[21]=h):h=b[21],b[22]!==v.name?(f=(0,p.jsx)("div",{className:"yjs-cursor-pill yjs-cursor-label",children:(0,p.jsx)("span",{ref:E,className:"yjs-cursor-text",children:v.name})}),b[22]=v.name,b[23]=f):f=b[23],b[24]!==h||b[25]!==f?(g=(0,p.jsxs)("div",{className:"yjs-cursor-overlay",children:[h,f]}),b[24]=h,b[25]=f,b[26]=g):g=b[26],b[27]!==D||b[28]!==P||b[29]!==u||b[30]!==g||b[31]!==A?(y=(0,p.jsxs)("div",{className:A,style:P,onMouseEnter:D,onMouseLeave:N,onFocus:D,onBlur:N,children:[u,d,g]}),b[27]=D,b[28]=P,b[29]=u,b[30]=g,b[31]=A,b[32]=y):y=b[32],y}var ev=e.i(69497),ex=e.i(38226);let ek=new Set;async function ew(){let e=[...ek];ek.clear(),await Promise.all(e.map(e=>e()))}let eC=new Map,eS=new WeakMap;
145async function eE(e,t,n){await ew();let r={...n,childFactID:(0,c.v7)(),ignoreUndo:!0};await e.mutate.groupCanvasBlock(r),t.add({undo:()=>e.mutate.ungroupCanvasBlock({page:n.page,blockEntity:n.blockEntity,groupEntity:n.groupEntity,ignoreUndo:!0}),redo:()=>e.mutate.groupCanvasBlock(r)})}async function eT(e,t,n,r){let i=(0,c.v7)();return await eE(e,t,{page:n.page,blockEntity:n.blockEntity,groupEntity:i,permission_set:n.permission_set}),await e.mutate.addBlock({newEntityID:n.newEntityID,factID:(0,c.v7)(),permission_set:n.permission_set,parent:i,type:n.type,position:"above"===r?(0,l.generateKeyBetween)(null,(0,l.generateKeyBetween)(null,null)):(0,l.generateKeyBetween)((0,l.generateKeyBetween)(null,null),null),list:n.list}),i}e.s(["flushPendingTextWrites",0,ew,"useCollabText",0,function(e){let n,r,i,a,o=(0,m.c)(11),{yText:s,awareness:l}=function(e){let n,r,i,a,o,s,l,c,d,h,p,v,x,k,w,C=(0,m.c)(34);C[0]!==e?(n=()=>{let t=new f.Doc,n=eC.get(e);return n&&f.applyUpdate(t,f.encodeStateAsUpdate(n)),t},C[0]=e,C[1]=n):n=C[1];let[S]=(0,t.useState)(n);C[2]!==e||C[3]!==S?(r=()=>(eC.set(e,S),eS.set(S,(eS.get(S)??0)+1),()=>{eS.set(S,eS.get(S)-1),setTimeout(()=>{0===eS.get(S)&&eC.get(e)===S&&eC.delete(e)},2e3)}),i=[e,S],C[2]=e,C[3]=S,C[4]=r,C[5]=i):(r=C[4],i=C[5]),(0,t.useEffect)(r,i);let E=(0,u.useEntity)(e,"block/text"),T=(0,u.useReplicache)(),I=(0,b.useYjsRealtime)();C[6]!==I?(a=()=>I?null:new g.Awareness(new f.Doc),C[6]=I,C[7]=a):a=C[7];let[D]=(0,t.useState)(a),N=I?.awareness??D;C[8]!==D?(o=()=>()=>D?.destroy(),s=[D],C[8]=D,C[9]=o,C[10]=s):(o=C[9],s=C[10]),(0,t.useEffect)(o,s),C[11]!==S?(l=()=>S.getXmlFragment("prosemirror"),C[11]=S,C[12]=l):l=C[12];let[A]=(0,t.useState)(l),_=E?.data.value;if(c=!!_&&(0,ex.updateSchemaVersion)(y.toByteArray(_))>ev.SCHEMA_VERSION,C[13]!==c?(d=()=>{c&&(0,ex.markClientStale)()},h=[c],C[13]=c,C[14]=d,C[15]=h):(d=C[14],h=C[15]),(0,t.useEffect)(d,h),E&&!c){let e=y.toByteArray(E.data.value);f.applyUpdate(S,e)}let P=I?.connection??null;return C[16]!==P||C[17]!==e||C[18]!==S?(p=()=>
145{if(P)return P.register(e,S)},v=[P,e,S],C[16]=P,C[17]=e,C[18]=S,C[19]=p,C[20]=v):(p=C[19],v=C[20]),(0,t.useEffect)(p,v),C[21]!==e||C[22]!==T.rep||C[23]!==A||C[24]!==S?(x=()=>{let t;if(!T.rep)return;t=null;let n=async()=>{if(ex.useStaleClient.getState().stale)return;(0,ex.stampDocSchemaVersion)(S);let t=f.encodeStateAsUpdate(S);await T.rep?.mutate.assertFact({ignoreUndo:!0,entity:e,attribute:"block/text",data:{value:y.fromByteArray(t),type:"text"}})},r=async()=>{t&&clearTimeout(t),t=null,await n()},i=async(e,i)=>{!i.origin||i.origin instanceof b.YjsRealtimeConnection||(t&&clearTimeout(t),ek.add(r),t=window.setTimeout(async()=>{t=null,ek.delete(r),n()},300))};return A.observeDeep(i),()=>{A.unobserveDeep(i),ek.delete(r)}},C[21]=e,C[22]=T.rep,C[23]=A,C[24]=S,C[25]=x):x=C[25],C[26]!==e||C[27]!==T||C[28]!==A||C[29]!==S?(k=[A,e,T,S],C[26]=e,C[27]=T,C[28]=A,C[29]=S,C[30]=k):k=C[30],(0,t.useEffect)(x,k),C[31]!==N||C[32]!==A?(w={yText:A,awareness:N},C[31]=N,C[32]=A,C[33]=w):w=C[33],w}(e);if(o[0]!==l||o[1]!==e){let t;t=crypto.randomUUID(),r=new x.Plugin({key:ep,state:{init:(t,n)=>ef(n,l,e),apply(t,n,r,i){let a=D.getState(i),o=t.getMeta(ep);return a&&a.isChangeOrigin||o&&o.awarenessUpdated?ef(i,l,e):n.map(t.mapping,t.doc)}},props:{decorations:e=>ep.getState(e)},view:n=>{let r=em(l,e),i=e=>{r(e)&&n.docView&&er(n,ep,{awarenessUpdated:!0})},a=()=>{let r=D.getState(n.state),i=l.getLocalState()||{};if(null!=r.binding)if(n.hasFocus()){let a=n.state.selection,o=ei(a.anchor,r.type,r.binding.mapping),s=ei(a.head,r.type,r.binding.mapping);null!=i.cursor&&i.cursor.entityID===e&&i.cursor.editorId===t&&f.compareRelativePositions(f.createRelativePositionFromJSON(i.cursor.anchor),o)&&f.compareRelativePositions(f.createRelativePositionFromJSON(i.cursor.head),s)||l.setLocalStateField("cursor",{entityID:e,editorId:t,anchor:o,head:s})}else i.cursor?.editorId===t&&l.setLocalStateField("cursor",null)};return l.on("change",i),n.dom.addEventListener("focusin",a),n.dom.addEventListener("focusout",a),{update:a,destroy:()=>{n.dom.removeEventListener("focusin",a),n.dom.removeEventListener("focusout",a),l.off("change",i),l.getLocalState()?.cursor?.editorId===t&&l.setLocalStateField("cursor",null)}}}}),o[0]=l,o[1]=e,o[2]=r}else r=o[2];n=r,o[3]!==l||o[4]!==e?(i=(0,p.jsx)(eg,{entityID:e,awareness:l}),o[3]=l,o[4]=e,o[5]=i):i=o[5];let c=i;return o[6]!==l||o[7]!==n||o[8]!==c||o[9]!==s?(a={yText:s,awareness:l,cursorPlugin:n,overlay:c},o[6]=l,o[7]=n,o[8]=c,o[9]=s,o[10]=a):a=o[10],a}],101065);let eI=(e,t,n)=>eT(e,t,n,"below");e.s(["groupCanvasBlock",0,eE,"groupCanvasBlockAndAddAbove",0,(e,t,n)=>eT(e,t,n,"above"),"groupCanvasBlockAndAddBelow",0,eI],113554);var eD=e.i(680915);let eN=["Tab"];async function eA({e,props:t,rep:r}){if(n.useUIState.getState().selectedBlocks.length>1)return!1;e.shiftKey?(e.preventDefault(),await (0,o.outdent)(t,t.previousBlock,r)):(e.preventDefault(),t.previousBlock&&await (0,o.indent)(t,t.previousBlock,r))}function e_(e){(e.e.ctrlKey||e.e.metaKey)&&eP(e)}function eP({e,props:t}){e.preventDefault();let i=t.nextBlock;if(i&&n.useUIState.getState().selectedBlocks.length<=1&&(0,a.focusBlock)(i,{type:"top",left:r.useEditorStates.getState().lastXPosition}),!i)return}function eM(e){(e.e.ctrlKey||e.e.metaKey)&&eR(e)}function eR({e,props:t}){e.preventDefault();let i=t.previousBlock;if(i&&n.useUIState.getState().selectedBlocks.length<=1&&(0,a.focusBlock)(i,{type:"bottom",left:r.useEditorStates.getState().lastXPosition}),!i)return}let eL=null;async function ej({e,props:t,rep:r,areYouSure:i,setAreYouSure:o}){let s=e.target;if(("LABEL"===s.tagName||"INPUT"===s.tagName||"TEXTAREA"===s.tagName||"true"===s.contentEditable)&&""!==s.value)return;if("card"===t.type||"embedded-canvas"===t.type||"mailbox"===t.type||"rsvp"===t.type||"poll"===t.type){if(!i){o(!0),eL=window.setTimeout(()=>{eL=null},300);return}if(i){if(e.preventDefault(),eL){window.clearTimeout(eL),eL=window.setTimeout(()=>{eL=null},300);return}return(0,h.deleteBlock)([t.entityID].flat(),r)}}e.preventDefault(),await r.mutate.removeBlock({blockEntity:t.entityID,parent:t.parent}),n.useUIState.getState().closePage(t.entityID);let l=t.previousBlock;l?(0,a.focusBlock)(l,{type:"end"}):(0,eD.isBlockGroup)(t.parent)&&!t.nextBlock&&n.useUIState.getState().setFocusedBlock({entityType:"page",entityID:(0,eD.pageOfParent)(t.parent)})}async function eO({e,props:t,rep:n,entity_set:r,undoManager:i}){let a,o=(0,c.v7)(),u=e.target;if("LABEL"!==u.tagName&&"INPUT"!==u.tagName&&"TEXTAREA"!==u.tagName&&"true"!==u.contentEditable){if(e.ctrlKey||e.metaKey){t.listData&&n?.mutate.toggleTodoState({entityID:t.entityID});return}if("canvas"===t.pageType){if("group"===t.type)return;await eI(n,i,{page:t.parent,blockEntity:t.entityID,newEntityID:o,permission_set:r.set,type:"text"}),(0,s.focusNewTextBlock)(o);return}if(t.listData){let e=t.nextBlock?.listData&&t.nextBlock.listData.depth>t.listData.depth;a=(0,l.generateKeyBetween)(e?null:t.position,t.nextPosition),await n?.mutate.addBlock({newEntityID:o,factID:(0,c.v7)(),permission_set:r.set,parent:e?t.entityID:t.listData.parent,type:"text",position:a}),await n?.mutate.assertFact({entity:o,attribute:"block/is-list",data:{type:"boolean",value:!0}})}t.listData||(o=await (0,s.addBlockBelow)(n,{parent:t.parent,position:t.position,nextPosition:t.nextPosition,permission_set:r.set,type:"text"})),(0,s.focusNewTextBlock)(o)}}function eB({e,props:t,areYouSure:r,setAreYouSure:i}){e.preventDefault(),r&&(i(!1),(0,a.focusBlock)({type:"card",entityID:t.entityID,parent:t.parent},{type:"start"})),n.useUIState.setState({selectedBlocks:[]}),n.useUIState.setState({focusedEntity:{entityType:"page",entityID:(0,eD.pageOfParent)(t.parent)}})}e.s(["useBlockKeyboardHandlers",0,function(e,r,a){let{rep:o,undoManager:s}=(0,u.useReplicache)(),l=(0,d.useEntitySetContext)(),c=(0,n.useUIState)(t=>t.selectedBlocks.some(t=>t.entityID===e.entityID)),h=(0,t.useRef)({props:e,entity_set:l,areYouSure:r,setAreYouSure:a});h.current={props:e,entity_set:l,areYouSure:r,setAreYouSure:a},(0,t.useEffect)(()=>
145{if(e.preview||!c||!o)return;let t=async e=>{let{props:t,entity_set:n,areYouSure:r,setAreYouSure:a}=h.current;if(e.defaultPrevented||!n.permissions.write)return;let l={Tab:eA,ArrowUp:eR,ArrowDown:eP,Backspace:ej,Enter:eO,Escape:eB,j:e_,k:eM}[e.key],c=e.target;("LABEL"!==c.tagName&&"INPUT"!==c.tagName&&"TEXTAREA"!==c.tagName&&"SELECT"!==c.tagName&&"true"!==c.contentEditable||i.isTextBlock[t.type]||""===c.value&&"Tab"!==e.key)&&(eN.includes(e.key)||!i.isTextBlock[t.type])&&await s.withUndoGroup(()=>l?.({e,props:t,rep:o,undoManager:s,entity_set:n,areYouSure:r,setAreYouSure:a}))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[c,o,s])}],845118),e.s(["LONG_PRESS_DELAY",0,500,"LONG_PRESS_TOLERANCE",0,16,"useLongPress",0,(e,n)=>{let r,i,a,o,s,l,c=(0,m.c)(9),u=(0,t.useRef)(void 0),d=(0,t.useRef)(!1),h=(0,t.useRef)(null),p=(0,t.useRef)(null),f=(0,t.useRef)(null);c[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{h.current=null,window.clearTimeout(u.current),u.current=void 0,p.current&&(window.removeEventListener("mousemove",p.current),p.current=null),f.current&&(window.removeEventListener("touchmove",f.current),f.current=null)},c[0]=r):r=c[0];let g=r;c[1]!==e?(i=t=>{"SELECT"===t.target.tagName||2!==t.button&&(h.current={x:t.clientX,y:t.clientY},d.current=!1,u.current=window.setTimeout(()=>{d.current=!0,e(),g()},500),p.current=e=>{!h.current||Math.sqrt(Math.pow(e.clientX-h.current.x,2)+Math.pow(e.clientY-h.current.y,2))>16&&g()},f.current=e=>{h.current&&e.touches[0]&&Math.sqrt(Math.pow(e.touches[0].clientX-h.current.x,2)+Math.pow(e.touches[0].clientY-h.current.y,2))>16&&g()},window.addEventListener("mousemove",p.current),window.addEventListener("touchmove",f.current))},c[1]=e,c[2]=i):i=c[2];let y=i;c[3]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{d.current&&e.preventDefault(),e.shiftKey&&e.preventDefault()},c[3]=a):a=c[3];let b=a;return c[4]!==n?(o=()=>{n&&g()},s=[n,g],c[4]=n,c[5]=o,c[6]=s):(o=c[5],s=c[6]),(0,t.useEffect)(o,s),c[7]!==y?(l={isLongPress:d,longPressHandlers:{onPointerDown:y,onPointerUp:g,onClickCapture:b}},c[7]=y,c[8]=l):l=c[8],l}],781553);var eF=e.i(870370);e.s(["useHandleDrop",0,e=>{let{rep:n,undoManager:r}=(0,u.useReplicache)(),i=(0,d.useEntitySetContext)();return(0,t.useCallback)(async t=>{if(t.preventDefault(),t.stopPropagation(),!n)return;let a=t.dataTransfer.files;if(!a||0===a.length)return;let o=Array.from(a).filter(e=>e.type.startsWith("image/"));if(0===o.length)return;let s=e.position,u=o.map(t=>{let n=(0,c.v7)(),r=(0,l.generateKeyBetween)(s,e.nextPosition);return s=r,{file:t,entity:n,position:r}});return await r.withUndoGroup(async()=>{await Promise.all(u.map(t=>n.mutate.addBlock({parent:e.parent,factID:(0,c.v7)(),permission_set:i.set,type:"image",position:t.position,newEntityID:t.entity}))),await Promise.all(u.map(e=>(0,eF.addImage)(e.file,n,{entityID:e.entity,attribute:"block/image"})))}),!0},[n,e.position,e.nextPosition,e.parent,i.set,r])}],752316);var eH=e.i(806398);let eU=(0,t.createContext)(null);function ez(){let e,n,r=(0,m.c)(7),i=(0,t.useContext)(eU),{identity:a}=(0,eH.useIdentityData)(),{rootEntity:o,permission_token:s}=(0,u.useReplicache)(),l=s.permission_token_rights?.some(e$)?a?.atp_did??i:null,c=(0,u.useEntity)(l?o:null,"root/collapsed-blocks");return r[0]!==l||r[1]!==c?(e=l?c.find(e=>e.author_did===l):void 0,r[0]=l,r[1]=c,r[2]=e):e=r[2],r[3]!==l||r[4]!==o||r[5]!==e?(n={did:l,rootEntity:o,fact:e},r[3]=l,r[4]=o,r[5]=e,r[6]=n):n=r[6],n}function e$(e){return e.write}let eV=[];function eq(){let{did:e,fact:t}=ez(),r=(0,n.useUIState)(eG);return e?t?.data.value??eV:r}function eG(e){return e.foldedBlocks}function eW(){let e,r,i,a=(0,m.c)(9),{did:o,rootEntity:s,fact:l}=ez();a[0]!==l?.data.value?(e=JSON.stringify(l?.data.value??[]),a[0]=l?.data.value,a[1]=e):e=a[1];let c=e;return a[2]!==o||a[3]!==c?(r=()=>{if(!o)return;let e=JSON.parse(c),t=n.useUIState.getState().foldedBlocks;e.length===t.length&&e.every(e=>t.includes(e))||n.useUIState.setState({foldedBlocks:e})},a[2]=o,a[3]=c,a[4]=r):r=a[4],a[5]!==o||a[6]!==s||a[7]!==c?(i=[c,o,s],a[5]=o,a[6]=s,a[7]=c,a[8]=i):i=a[8],(0,t.useEffect)(r,i),null}e.s(["FoldStateProvider",0,function(e){let t,n,r=(0,m.c)(4),i=e.serverDid??null;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,p.jsx)(eW,{}),r[0]=t):t=r[0],r[1]!==e.children||r[2]!==i?(n=(0,p.jsxs)(eU.Provider,{value:i,children:[t,e.children]}),r[1]=e.children,r[2]=i,r[3]=n):n=r[3],n},"useFoldedBlocks",0,eq,"useIsFolded",0,function(e){let t,n=(0,m.c)(3),r=eq();return n[0]!==e||n[1]!==r?(t=r.includes(e),n[0]=e,n[1]=r,n[2]=t):t=n[2],t}],219746);var eK=e.i(174080),eY=e.i(768834),eZ=e.i(268046),eX=e.i(970827),eQ=e.i(133564),eJ=e.i(227086),e1=e.i(159495);let e0=["theme","new-page","content","text","posts-list"],e2=(0,eY.create)(e=>({active:!1,targets:[],descriptions:{},contentFocused:!1,dismissed:[],setActive:(t,n,r)=>e(n?{active:t,targets:n,descriptions:r??{}}:{active:t}),setContentFocused:t=>e(e=>({contentFocused:t,dismissed:t&&!e.dismissed.includes("content")?[...e.dismissed,"content"]:e.dismissed})),dismiss:t=>e(e=>e.dismissed.includes(t)?e:{dismissed:[...e.dismissed,t]})}));function e4(e){return e.setContentFocused}function e3(e){return e.setActive}let e5={theme:{title:"Set a theme",description:"Colors, font, background!",side:"bottom",align:"center"},"new-page":{title:"Add pages",description:"Like an about page, annoucements, or subsets of posts.",side:"right",align:"center",mobile:{side:"top",align:"center",xOffset:0,yOffset:4}}
145,content:{title:"Edit your content",description:'Click to write something! Type "/" in an empty line to add images, embeds, post lists and more',side:"right",align:"center",yOffset:48,fixed:!0,mobile:{description:'Tap the content area to write something! Type "/" in an empty line to add images, embeds, post lists and more.'}},text:{title:"Add content blocks",description:'Click the +, or type "/" to add images, post lists, reccs, and more.',side:"right",align:"center"},"posts-list":{title:"Your posts",description:"Your published posts show up here. Change how it looks with the gear icon",side:"right",align:"center",mobile:{side:"top",align:"end",yOffset:0}},"canvas-add":{title:"Add blocks",description:"Click the + or double click anywhere to add text, images, embeds, etc",side:"top",align:"end"}},e6=["theme","new-page","content"],e7=[e1.default.delay0,e1.default.delay1,e1.default.delay2],e8=["text","posts-list"];function e9(e,t){let n,r=(0,m.c)(3),i=void 0!==t&&t;return r[0]!==i||r[1]!==e?(n=t=>t.active&&t.targets.includes(e)&&!t.dismissed.includes(e)&&(e8.includes(e)?i&&t.contentFocused:!t.contentFocused),r[0]=i,r[1]=e,r[2]=n):n=r[2],e2(n)}function te(e){let t,n,r,i,a,o,s,l,c=(0,m.c)(18),u=(0,eJ.useIsMobile)(),{title:d,description:h,mobile:f}=e5[e.target],g=e2(tr);c[0]!==e.target?(t=t=>t.descriptions[e.target],c[0]=e.target,c[1]=t):t=c[1];let y=e2(t);c[2]!==d?(n=(0,p.jsx)("div",{className:"font-bold",children:d}),c[2]=d,c[3]=n):n=c[3],c[4]!==g||c[5]!==e.target?(r=t=>{t.stopPropagation(),g(e.target)},c[4]=g,c[5]=e.target,c[6]=r):r=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,p.jsx)(eQ.CloseTiny,{className:"w-3 h-3"}),c[7]=i):i=c[7],c[8]!==r?(a=(0,p.jsx)("button",{type:"button","aria-label":"Close",className:"shrink-0 mt-1 text-tertiary hover:text-primary",onPointerDown:tn,onMouseDown:tt,onClick:r,children:i}),c[8]=r,c[9]=a):a=c[9],c[10]!==n||c[11]!==a?(o=(0,p.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[n,a]}),c[10]=n,c[11]=a,c[12]=o):o=c[12];let b=y||u&&f?.description||h;return c[13]!==b?(s=(0,p.jsx)("div",{className:"text-secondary text-sm leading-snug",children:b}),c[13]=b,c[14]=s):s=c[14],c[15]!==o||c[16]!==s?(l=(0,p.jsxs)(p.Fragment,{children:[o,s]}),c[15]=o,c[16]=s,c[17]=l):l=c[17],l}function tt(e){e.stopPropagation(),e.preventDefault()}function tn(e){return e.stopPropagation()}function tr(e){return e.dismiss}function ti(e){let t,n,r=(0,m.c)(5);if(!e.open)return null;let i=e7[e6.indexOf(e.target)]??e1.default.delay0,a=`${e1.default.tooltip} ${i} portalStyles light-container fixed z-20 bottom-4 sm:bottom-8 inset-x-4 mx-auto max-w-sm px-3 py-2 bg-bg-page border border-border rounded-md shadow-md text-left`;return r[0]!==e.target?(t=(0,p.jsx)(te,{target:e.target}),r[0]=e.target,r[1]=t):t=r[1],r[2]!==a||r[3]!==t?(n=(0,eK.createPortal)((0,p.jsx)(eX.NestedCardThemeProvider,{children:(0,p.jsx)("div",{role:"tooltip",className:a,onPointerDown:ta,onMouseDown:ta,onClick:ta,children:t})}),document.body),r[2]=a,r[3]=t,r[4]=n):n=r[4],n}function ta(e){return e.stopPropagation()}function to(e){let t,n,r,i,a,o,s,l=(0,m.c)(26),c=(0,eJ.useIsMobile)(),u=e5[e.target];if(l[0]!==u){let{mobile:e,fixed:i,title:a,description:o,...s}=u;r=e,n=i,t=s,l[0]=u,l[1]=t,l[2]=n,l[3]=r}else t=l[1],n=l[2],r=l[3];if(n){let t,n;return l[4]!==e.open||l[5]!==e.target?(t=(0,p.jsx)(ti,{target:e.target,open:e.open}),l[4]=e.open,l[5]=e.target,l[6]=t):t=l[6],l[7]!==e.trigger||l[8]!==t?(n=(0,p.jsxs)(p.Fragment,{children:[e.trigger,t]}),l[7]=e.trigger,l[8]=t,l[9]=n):n=l[9],n}l[10]!==t||l[11]!==c||l[12]!==r?(i=c?{...t,...r}:t,l[10]=t,l[11]=c,l[12]=r,l[13]=i):i=l[13];let{side:d,align:h,xOffset:f,yOffset:g}=i,y=e7[e6.indexOf(e.target)]??e1.default.delay0,b=`${e1.default.tooltip} ${y} w-fit max-w-56! text-left`,v=`${f??0}px ${g??0}px`;return l[14]!==v?(a={translate:v},l[14]=v,l[15]=a):a=l[15],l[16]!==e.target?(o=(0,p.jsx)(te,{target:e.target}),l[16]=e.target,l[17]=o):o=l[17],l[18]!==h||l[19]!==e.open||l[20]!==e.trigger||l[21]!==d||l[22]!==b||l[23]!==a||l[24]!==o?(s=(0,p.jsx)(eZ.Tooltip,{asChild:!0,open:e.open,side:d,align:h,className:b,style:a,trigger:e.trigger,children:o}),l[18]=h,l[19]=e.open,l[20]=e.trigger,l[21]=d,l[22]=b,l[23]=a,l[24]=o,l[25]=s):s=l[25],s}function ts(e){return e.dismiss}function tl(e){return e.active}async function tc(e){return new Promise(t=>{new IntersectionObserver((e,n)=>
145{e.forEach(e=>{t(e.isIntersecting),n.unobserve(e.target)})},{root:null,threshold:.1}).observe(e)})}e.s(["CustomizeTutorialTooltip",0,function(e){let t,n,r,i=(0,m.c)(12),a=e2(tl),o=e9(e.target,e.blockFocused),s=e2(ts);i[0]!==s||i[1]!==o||i[2]!==e.target?(t=o||!e8.includes(e.target)?()=>s(e.target):void 0,i[0]=s,i[1]=o,i[2]=e.target,i[3]=t):t=i[3],i[4]!==e.children||i[5]!==e.className||i[6]!==t?(n=(0,p.jsx)("div",{className:e.className,onPointerDown:t,children:e.children}),i[4]=e.children,i[5]=e.className,i[6]=t,i[7]=n):n=i[7];let l=n;return a?(i[8]!==l||i[9]!==o||i[10]!==e.target?(r=(0,p.jsx)(to,{target:e.target,open:o,trigger:l}),i[8]=l,i[9]=o,i[10]=e.target,i[11]=r):r=i[11],r):l},"useActivateCustomizeTutorial",0,function(e,r,i){let a,o,s,l,c,u=(0,m.c)(13),d=void 0===r?e0:r;u[0]!==i?(a=void 0===i?{}:i,u[0]=i,u[1]=a):a=u[1];let h=a,p=e2(e3),f=e2(e4);u[2]!==d?(o=d.join(","),u[2]=d,u[3]=o):o=u[3];let g=o;u[4]!==h?(s=JSON.stringify(h),u[4]=h,u[5]=s):s=u[5];let y=s;u[6]!==y||u[7]!==e||u[8]!==p||u[9]!==f||u[10]!==g?(l=()=>{if(!e)return;p(!0,g.split(","),JSON.parse(y));let t=(e,t)=>{t&&e.focusedEntity===t.focusedEntity||f(e.focusedEntity?.entityType==="block")};t(n.useUIState.getState());let r=n.useUIState.subscribe(t),i=e=>{let t=e.target;t.closest(".pubWrapper .blocks")?f(!0):t.closest(".pubWrapper, .publicationEditHeader")&&f(!1)};return window.addEventListener("pointerdown",i,!0),()=>{r(),window.removeEventListener("pointerdown",i,!0),p(!1)}},c=[e,g,y,p,f],u[6]=y,u[7]=e,u[8]=p,u[9]=f,u[10]=g,u[11]=l,u[12]=c):(l=u[11],c=u[12]),(0,t.useEffect)(l,c)},"useCustomizeTutorial",0,e2,"useTutorialOpen",0,e9],619469),e.s(["isVisible",0,tc],834732)},223001,e=>{"use strict";var t=e.i(901982),n=e.i(680915),r=e.i(271645),i=e.i(813029),a=e.i(762268),o=e.i(492122),s=e.i(467592),l=e.i(680016),c=e.i(227086),u=e.i(482448),d=e.i(553445);let h=null,p=!1,m=null;window.addEventListener("scroll",()=>{p=!0,m&&window.clearTimeout(m),m=window.setTimeout(()=>{p=!1},150)},!0),e.s(["useBlockMouseHandlers",0,function(e){let m=(0,o.useEntitySetContext)(),f=(0,c.useIsMobile)(),{rep:g}=(0,s.useReplicache)(),y=(0,r.useRef)({props:e,write:m.permissions.write,isMobile:f,rep:g});return y.current={props:e,write:m.permissions.write,isMobile:f,rep:g},{onMouseDown:(0,r.useCallback)(e=>{let{props:r,write:o,isMobile:s}=y.current;if(!e.target.getAttribute("data-draggable")&&"BUTTON"!==e.target.tagName&&"SELECT"!==e.target.tagName&&"OPTION"!==e.target.tagName&&(!s||!p)&&o)if(t.useSelectingMouse.setState({start:r.entityID}),e.shiftKey){if(i.useUIState.getState().selectedBlocks[0]?.entityID===r.entityID&&1===i.useUIState.getState().selectedBlocks.length)return;e.preventDefault(),i.useUIState.getState().addBlockToSelection(r)}else{if(e.isDefaultPrevented()||a.isTextBlock[r.type])return;i.useUIState.getState().focusAndSelectBlock(r);let t=d.elementId.page((0,n.pageOfParent)(r.parent)).container;setTimeout(()=>{(0,u.scrollIntoViewIfNeeded)(document.getElementById(t),!1,"smooth")},50)}},[]),onMouseEnter:(0,r.useCallback)(async e=>{let{props:n,write:r,isMobile:a,rep:o}=y.current;a&&p||r&&(h&&window.clearTimeout(h),h=window.setTimeout(async()=>{if(h=null,1!==e.buttons)return;let r=t.useSelectingMouse.getState();if(!r.start)return;let a=o?(0,l.getPageBlocks)(o,n.parent):[],s=a.findIndex(e=>e.entityID===r.start);if(-1===s)return;let c=a.findIndex(e=>e.entityID===n.entityID),u=Math.min(s,c),d=Math.max(s,c),p=a.slice(u,d+1).map(e=>({entityID:e.entityID,parent:n.parent}));i.useUIState.getState().setSelectedBlocks(p)},15))},[])}}])},527971,e=>{"use strict";var t=e.i(500932),n=e.i(271645),r=e.i(467592),i=e.i(492122),a=e.i(110383),o=e.i(870370),s=e.i(669590),l=e.i(813029),c=e.i(553445),u=e.i(213250);let d=e=>Array.from(e?.files??[]).filter(e=>e.type.startsWith("image/")),h=async e=>{let t=await createImageBitmap(e),n=t.height*(360/t.width);return t.close(),n},p=e=>{let{rep:t,undoManager:s}=(0,r.useReplicache)(),l=(0,i.useEntitySetContext)();return(0,n.useCallback)(async(n,r)=>{if(!t||0===n.length)return;let i=await Promise.all(n.map(h)),c=Math.ceil(Math.sqrt(n.length)),u=[];i.forEach((e,t)=>{let n=Math.floor(t/c);u[n]=Math.max(u[n]||0,e)});let d=r({width:360*c,height:u.reduce((e,t)=>
145e+t,0)});await s.withUndoGroup(async()=>{let r=n.map(()=>(0,a.v7)());for(let[n,i]of r.entries()){let r=d.y;for(let e=0;e<Math.floor(n/c);e++)r+=u[e];await t.mutate.addCanvasBlock({newEntityID:i,parent:e,position:{x:d.x+n%c*360,y:r},factID:(0,a.v7)(),type:"image",permission_set:l.set})}await Promise.all(n.map((e,n)=>(0,o.addImage)(e,t,{entityID:r[n],attribute:"block/image"})))})},[t,e,l.set,s])};e.s(["useHandleCanvasDrop",0,e=>{let n,r=(0,t.c)(3),i=p(e);return r[0]!==i||r[1]!==e?(n=async t=>{t.preventDefault(),t.stopPropagation();let n=d(t.dataTransfer);if(0===n.length)return;let r=(0,s.clientToCanvas)(t.currentTarget,e,t),a={x:Math.max(r.x,0),y:Math.max(r.y,0)};await i(n,()=>a)},r[0]=i,r[1]=e,r[2]=n):n=r[2],n},"useHandleCanvasPaste",0,(e,r,i,a)=>{let o,h,m=(0,t.c)(7),f=p(e);m[0]!==f||m[1]!==i||m[2]!==r||m[3]!==a||m[4]!==e?(o=()=>{if(!a)return;let t=t=>{let n=l.useUIState.getState().focusedEntity;if(n?.entityType!=="page"||n.entityID!==e)return;let a=document.activeElement;if(t.defaultPrevented||a instanceof HTMLElement&&(a.isContentEditable||a.matches("input, textarea, select")))return;let o=d(t.clipboardData),h=document.getElementById(c.elementId.page(e).canvasScrollArea);if(0===o.length||!r.current||!h)return;t.preventDefault();let p=h.getBoundingClientRect(),m=(0,s.clientToCanvas)(r.current,e,{clientX:(Math.max(p.left,0)+Math.min(p.right,window.innerWidth))/2,clientY:(Math.max(p.top,0)+Math.min(p.bottom,window.innerHeight))/2});f(o,e=>{let t=(0,u.clampToCanvas)({x:m.x-e.width/2,y:m.y-e.height/2},e,i);return{x:Math.max(t.x,0),y:Math.max(t.y,0)}})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},h=[f,e,r,i,a],m[0]=f,m[1]=i,m[2]=r,m[3]=a,m[4]=e,m[5]=o,m[6]=h):(o=m[5],h=m[6]),(0,n.useEffect)(o,h)}])},637777,e=>{"use strict";e.s(["Canvas",()=>Y,"CanvasBackgroundPattern",()=>es,"CanvasContent",()=>Z]);var t=e.i(843476),n=e.i(500932),r=e.i(467592),i=e.i(492122),a=e.i(110383),o=e.i(173275),s=e.i(680915),l=e.i(271645),c=e.i(851181),u=e.i(762268),d=e.i(394191),h=e.i(553445),p=e.i(813029),m=e.i(663623),f=e.i(69278),g=e.i(845118),y=e.i(617303),b=e.i(246146),v=e.i(814649),x=e.i(859015),k=e.i(88891),w=e.i(332111),C=e.i(960622),S=e.i(876082),E=e.i(527971),T=e.i(223001),I=e.i(838854),D=e.i(789606),N=e.i(134087),A=e.i(929495),_=e.i(195040),P=e.i(619469),M=e.i(393991),R=e.i(864293),L=e.i(669590),j=e.i(512197),O=e.i(921491),B=e.i(731313),F=e.i(255960),H=e.i(570613),U=e.i(416504),z=e.i(303873),$=e.i(853915),V=e.i(270069),q=e.i(150631),G=e.i(12802),W=e.i(792834),K=e.i(213250);function Y(e){let a,o,s,l,c,u,d,p,m,f,g,y,b=(0,n.c)(47),{permissions:v}=(0,i.useEntitySetContext)(),x=!!(0,r.useEntity)(e.entityID,"canvas/lock-viewer-zoom")?.data.value&&!v.write,k=(0,W.useCanvasSize)(e.entityID),w=(0,r.useEntity)(e.entityID,"canvas/mobile-view")?.data.value;b[0]!==k.width||b[1]!==w?(a=(0,H.mobileViewArea)(w,k.width),b[0]=k.width,b[1]=w,b[2]=a):a=b[2];let S=a,E=(0,C.useCardBorderHidden)()&&!e.pageScroll,T=String(x),I=e.entityID,D=e.pageScroll,N=k.width,A=k.fixed,_=!v.write;b[3]!==E||b[4]!==v.write||b[5]!==e.entityID||b[6]!==e.first||b[7]!==k.fixed?(o=!k.fixed&&(0,t.jsxs)("div",{className:`absolute ${E?"top-9":"top-6"} right-3 sm:top-4 sm:right-4 z-20 flex flex-row gap-2 items-start`,children:[v.write&&(0,t.jsx)(ee,{entityID:e.entityID}),(0,t.jsx)(en,{entityID:e.entityID,isSubpage:!e.first})]}),b[3]=E,b[4]=v.write,b[5]=e.entityID,b[6]=e.first,b[7]=k.fixed,b[8]=o):o=b[8],b[9]!==v.write||b[10]!==e.entityID?(s=v.write&&(0,t.jsx)(q.InkToolbar,{pageID:e.entityID}),b[9]=v.write,b[10]=e.entityID,b[11]=s):s=b[11],b[12]!==o||b[13]!==s?(l=(0,t.jsxs)(B.CanvasOverlay,{edge:"top",children:[o,s]}),b[12]=o,b[13]=s,b[14]=l):l=b[14],b[15]!==v.write||b[16]!==e.entityID?(c=v.write&&(0,t.jsx)(O.CanvasFocusZoom,{pageEntityID:e.entityID}),b[15]=v.write,b[16]=e.entityID,b[17]=c):c=b[17],b[18]!==e.entityID?(u=h.elementId.page(e.entityID),b[18]=e.entityID,b[19]=u):u=b[19];let P=k.fixed?"bg-border-light":"";return b[20]!==e?(d=(0,t.jsx)(Z,{...e}),b[20]=e,b[21]=d):d=b[21],b[22]!==S||b[23]!==k.height||b[24]!==u.canvasScrollArea||b[25]!==P||b[26]!==d?(p=(0,t.jsx)(j.CanvasZoomLayer,{id:u.canvasScrollArea,className:P,contentHeight:k.height,mobileArea:S,children:d}),b[22]=S,b[23]=k.height,b[24]=u.canvasScrollArea,b[25]=P,b[26]=d,b[27]=p):p=b[27],b[28]!==e.entityID||b[29]!==k?(m=(0,t.jsx)(er,{entityID:e.entityID,canvas:k}),b[28]=e.entityID,b[29]=k,b[30]=m):m=b[30],b[31]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(F.CanvasZoomControls,{className:"absolute left-2 bottom-2 sm:left-4 sm:bottom-4 z-10 bg-bg-page rounded-md px-1 py-0.5"}),b[31]=f):f=b[31],b[32]!==m?(g=(0,t.jsxs)(B.CanvasOverlay,{edge:"bottom",children:[m,f]}),b[32]=m,b[33]=g):g=b[33],b[34]!==x||b[35]!==S||b[36]!==e.entityID||b[37]!==e.pageScroll||b[38]!==k.fixed||b[39]!==k.width||b[40]!==l||b[41]!==c||b[42]!==p||b[43]!==g||b[44]!==T||b[45]!==_?(y=(0,t.jsxs)(R.CanvasZoomProvider,{pageKey:I,pageScroll:D,contentWidth:N,centered:A,initialArea:S,lockViewerZoom:x,doubleTapZoom:_,children:[l,c,p,g]},T),b[34]=x,b[35]=S,b[36]=e.entityID,b[37]=e.pageScroll,b[38]=k.fixed,b[39]=k.width,b[40]=l,b[41]=c,b[42]=p,b[43]=g,b[44]=T,b[45]=_,b[46]=y):y=b[46],y}function Z(e){let a,o,s,c,u,d,m,f,g=(0,n.c)(44),y=(0,r.useEntity)(e.entityID,"canvas/block"),{rep:b,undoManager:v}=(0,r.useReplicache)(),x=(0,i.useEntitySetContext)(),k=(0,W.useCanvasSize)(e.entityID),w=(0,E.useHandleCanvasDrop)(e.entityID),C=(0,l.useRef)(null),S=!e.preview&&x.permissions.write;(0,E.useHandleCanvasPaste)(e.entityID,C,k,S);let T=(0,_.useCanvasPaintOrder)(e.entityID);g[0]!==e.entityID?(a=t=>t.page===e.entityID,g[0]=e.entityID,g[1]=a):a=g[1];let I=(0,G.useInkSession)(a);g[2]!==S||g[3]!==x||g[4]!==e.entityID||g[5]!==b||g[6]!==k||g[7]!==v?(o=async t=>{if(t.currentTarget===t.target&&(p.useUIState.setState(()=>({selectedBlocks:[],focusedEntity:{entityType:"page",entityID:e.entityID}})),document.getElementById(h.elementId.page(e.entityID).container)?.scrollIntoView({behavior:"smooth",inline:"nearest"}),S&&(2===t.detail||t.ctrlKey||t.metaKey)&&b)){let n=(0,L.clientToCanvas)(t.currentTarget,e.entityID,t);await eh(b,v,{parent:e.entityID,canvas:k,position:{x:Math.max(n.x,0),y:Math.max(n.y-12,0)},permission_set:x.set})}},g[2]=S,g[3]=x,g[4]=e.entityID,g[5]=b,g[6]=k,g[7]=v,g[8]=o):o=g[8];let D=S?Q:void 0,N=S?w:void 0,A=k.fixed?k.height:"100%";g[9]!==k.height||g[10]!==k.width||g[11]!==A?(s={width:k.width,minHeight:k.height,height:A,contain:"size layout paint"},g[9]=k.height,g[10]=k.width,g[11]=A,g[12]=s):s=g[12];let P=`relative ${k.fixed?`bg-bg-page ${e.preview?"":"shadow-sm"}`:""}`,M=k.fixed&&e.preview?"plain":"grid";
145if(g[13]!==e.entityID||g[14]!==M?(c=(0,t.jsx)(eo,{entityID:e.entityID,defaultPattern:M}),g[13]=e.entityID,g[14]=M,g[15]=c):c=g[15],g[16]!==S||g[17]!==e.entityID?(u=S&&(0,t.jsx)(et,{entityID:e.entityID}),g[16]=S,g[17]=e.entityID,g[18]=u):u=g[18],g[19]!==S||g[20]!==I||g[21]!==e.entityID?(d=S&&I&&(0,t.jsx)(V.CanvasInkLayer,{pageID:e.entityID}),g[19]=S,g[20]=I,g[21]=e.entityID,g[22]=d):d=g[22],g[23]!==y||g[24]!==T||g[25]!==e.entityID||g[26]!==e.preview||g[27]!==k){let n;g[29]!==T||g[30]!==e.entityID||g[31]!==e.preview||g[32]!==k?(n=n=>(0,t.jsx)(ei,{preview:e.preview,parent:e.entityID,entityID:n.data.value,position:{...n.data.position,x:(0,K.visibleCanvasX)(n.data.position.x,k.width)},factID:n.id,stackOrder:T.indexOf(n.data.value)+1||void 0,canvas:k},n.data.value),g[29]=T,g[30]=e.entityID,g[31]=e.preview,g[32]=k,g[33]=n):n=g[33],m=[...y].sort(X).map(n),g[23]=y,g[24]=T,g[25]=e.entityID,g[26]=e.preview,g[27]=k,g[28]=m}else m=g[28];return g[34]!==o||g[35]!==d||g[36]!==m||g[37]!==D||g[38]!==N||g[39]!==s||g[40]!==P||g[41]!==c||g[42]!==u?(f=(0,t.jsxs)("div",{ref:C,onClick:o,onDragOver:D,onDrop:N,style:s,className:P,children:[c,u,d,m]}),g[34]=o,g[35]=d,g[36]=m,g[37]=D,g[38]=N,g[39]=s,g[40]=P,g[41]=c,g[42]=u,g[43]=f):f=g[43],f}function X(e,t){return(0,A.canvasBlockOrder)(e.data.position,t.data.position)}function Q(e){e.preventDefault(),e.stopPropagation()}let J={unconstrained:"Fit whole canvas",left:"Anchor to left edge",center:"Anchor to center"},ee=e=>{let i,a,o,s,l,c,u,d,h,p,m,f=(0,n.c)(28),{rep:g}=(0,r.useReplicache)(),y=(0,r.useEntity)(e.entityID,"canvas/mobile-view"),b=y?.data.value||"unconstrained",v=(0,r.useEntity)(e.entityID,"canvas/lock-viewer-zoom"),x=!!v?.data.value,k=`flex items-center rounded-md p-1 bg-bg-page border border-border-light hover:text-accent-contrast ${"unconstrained"===b?"text-tertiary":"text-accent-contrast"}`;return f[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(z.MobileViewSmall,{}),f[0]=i):i=f[0],f[1]!==k?(a=(0,t.jsx)("button",{"aria-label":"Mobile view",title:"Mobile view",className:k,children:i}),f[1]=k,f[2]=a):a=f[2],f[3]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("div",{className:"px-2 pt-1 pb-0.5 text-xs text-tertiary",children:"Mobile view"}),f[3]=o):o=f[3],f[4]!==y?.id||f[5]!==e.entityID||f[6]!==g?.mutate?(s=t=>{g?.mutate.assertFact({id:y?.id,entity:e.entityID,attribute:"canvas/mobile-view",data:{type:"canvas-mobile-view-union",value:t}})},f[4]=y?.id,f[5]=e.entityID,f[6]=g?.mutate,f[7]=s):s=f[7],f[8]===Symbol.for("react.memo_cache_sentinel")?(l=Object.keys(J),f[8]=l):l=f[8],f[9]!==b?(c=l.map(e=>(0,t.jsx)(U.RadioMenuItem,{value:e,selected:e===b,children:J[e]},e)),f[9]=b,f[10]=c):c=f[10],f[11]!==s||f[12]!==c||f[13]!==b?(u=(0,t.jsx)(U.RadioMenuGroup,{value:b,onValueChange:s,children:c}),f[11]=s,f[12]=c,f[13]=b,f[14]=u):u=f[14],f[15]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(U.MenuSeparator,{}),f[15]=d):d=f[15],f[16]!==v?.id||f[17]!==x||f[18]!==e.entityID||f[19]!==g?.mutate?(h=t=>{t.preventDefault(),g?.mutate.assertFact({id:v?.id,entity:e.entityID,attribute:"canvas/lock-viewer-zoom",data:{type:"boolean",value:!x}})},f[16]=v?.id,f[17]=x,f[18]=e.entityID,f[19]=g?.mutate,f[20]=h):h=f[20],f[21]!==x||f[22]!==h?(p=(0,t.jsx)(U.CheckboxMenuItem,{compact:!0,checked:x,onSelect:h,children:"Lock viewer zoom and scroll"}),f[21]=x,f[22]=h,f[23]=p):p=f[23],f[24]!==p||f[25]!==a||f[26]!==u?(m=(0,t.jsx)("div",{children:(0,t.jsxs)(U.Menu,{asChild:!0,side:"bottom",align:"end",trigger:a,children:[o,u,d,p]})}),f[24]=p,f[25]=a,f[26]=u,f[27]=m):m=f[27],m},et=e=>{let i,a,o=(0,n.c)(6),s=(0,r.useEntity)(e.entityID,"canvas/mobile-view")?.data.value,l=(0,W.useCanvasSize)(e.entityID);o[0]!==s||o[1]!==l.width?(i=(0,H.mobileViewArea)(s,l.width),o[0]=s,o[1]=l.width,o[2]=i):i=o[2];let c=i;return c?(o[3]!==c.left||o[4]!==c.width?(a=(0,t.jsx)("div",{"aria-hidden":!0,className:"canvasMobileViewGuides absolute top-0 bottom-0 pointer-events-none border-x border-dashed border-accent-1",style:{left:c.left,width:c.width}}),o[3]=c.left,o[4]=c.width,o[5]=a):a=o[5],a):null},en=e=>{let i,a,o,s,l,c,u=(0,n.c)(17),{data:d,normalizedPublication:h}=(0,S.useLeafletPublicationData)(),p=!!(0,S.useLeafletPublicationPage)(),{rep:m}=(0,r.useReplicache)(),f=(0,M.useCanvasBlocksWithType)(e.entityID).some(ef),g=(0,D.useSubscribe)(m,eg);if(!d?.publications||!h||f||p)return null;let y=(0,N.mergePreferences)(g||void 0,h.preferences),C=!1!==y.showComments,E=!1!==y.showMentions,T=!1!==y.showRecommends;return u[0]!==T?(i=T&&(0,t.jsxs)("div",{className:"flex gap-1 text-tertiary items-center",children:[(0,t.jsx)(I.RecommendEmptyTiny,{className:"text-border"})," â"]}),u[0]=T,u[1]=i):i=u[1],u[2]!==C||u[3]!==E?(a=(C||E)&&(0,t.jsxs)("div",{className:"flex gap-1 text-tertiary items-center",children:[(0,t.jsx)(k.CommentTiny,{className:"text-border"})," â"]}),u[2]=C,u[3]=E,u[4]=a):a=u[4],u[5]!==C||u[6]!==E||u[7]!==T?(o=(E||C||!T)&&(0,t.jsx)(x.Separator,{classname:"h-4!"}),u[5]=C,u[6]=E,u[7]=T,u[8]=o):o=u[8],u[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(w.AddTags,{}),u[9]=s):s=u[9],u[10]!==e.isSubpage?(l=!e.isSubpage&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Separator,{classname:"h-5"}),(0,t.jsx)(v.Popover,{side:"left",align:"start",className:"flex flex-col gap-2 p-0! max-w-sm w-[1000px]",trigger:(0,t.jsx)(b.InfoSmall,{}),children:(0,t.jsx)(w.PublicationMetadata,{noInteractions:!0})})]}),u[10]=e.isSubpage,u[11]=l):l=u[11],u[12]!==i||u[13]!==a||u[14]!==o||u[15]!==l?(c=(0,t.jsxs)("div",{className:"flex flex-row gap-3 items-center bg-bg-page border-border-light rounded-md px-2 py-1 h-fit",children:[i,a,o,s,l]}),u[12]=i,u[13]=a,u[14]=o,u[15]=l,u[16]=c):c=u[16],c},er=e=>{let a,o,s,l,c,u,d,h,p,m=(0,n.c)(22),{rep:g,undoManager:b}=(0,r.useReplicache)(),v=(0,i.useEntitySetContext)(),x=(0,R.useCanvasZoomEngine)(),k=(0,r.useEntity)(e.entityID,"canvas/block"),w=(0,P.useTutorialOpen)("canvas-add");if(!v.permissions.write)return null;let C=0===k.length||void 0;return m[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)("div",{className:"flex flex-col justify-end text-center px-1 leading-snug ",children:[(0,t.jsx)("div",{children:"Add a Block!"}),(0,t.jsx)("div",{className:"font-normal",children:"or double click anyw
145here"})]}),m[0]=a):a=m[0],m[1]!==x||m[2]!==v.set||m[3]!==e.canvas||m[4]!==e.entityID||m[5]!==g||m[6]!==b?(o=()=>{let t=x.boxRef.current;if(!t||!g)return;let n=parseFloat(getComputedStyle(t).getPropertyValue("--canvas-nav-bottom"))||0,r=x.canvasPointAt({x:x.viewportRect().width,y:n});eh(g,b,{parent:e.entityID,canvas:e.canvas,position:{x:r.x-468,y:Math.max(0,r.y+32)},permission_set:v.set})},m[1]=x,m[2]=v.set,m[3]=e.canvas,m[4]=e.entityID,m[5]=g,m[6]=b,m[7]=o):o=m[7],m[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(y.AddSmall,{}),m[8]=s):s=m[8],m[9]!==C||m[10]!==o||m[11]!==w?(l=(0,t.jsx)(P.CustomizeTutorialTooltip,{target:"canvas-add",className:"flex",children:(0,t.jsx)(f.TooltipButton,{side:"left",open:C,hideTooltip:w,tooltipContent:a,className:"w-fit p-2 rounded-full bg-accent-1 border-2 outline-solid outline-transparent hover:outline-1 hover:outline-accent-1 border-accent-1 text-accent-2",onMouseDown:o,children:s})}),m[9]=C,m[10]=o,m[11]=w,m[12]=l):l=m[12],m[13]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("div",{className:"px-1",children:"Draw"}),m[13]=c):c=m[13],m[14]!==e.entityID?(u=()=>G.useInkSession.getState().start(e.entityID),m[14]=e.entityID,m[15]=u):u=m[15],m[16]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)($.EditTiny,{}),m[16]=d):d=m[16],m[17]!==u?(h=(0,t.jsx)(f.TooltipButton,{side:"left",tooltipContent:c,className:"w-fit p-3 rounded-full bg-bg-page border-2 border-accent-1 outline-solid outline-transparent hover:outline-1 hover:outline-accent-1 text-accent-1",onMouseDown:u,children:d}),m[17]=u,m[18]=h):h=m[18],m[19]!==l||m[20]!==h?(p=(0,t.jsxs)("div",{className:"absolute right-2 sm:bottom-4 sm:right-4 bottom-2 sm:top-auto z-10 flex flex-col gap-1 justify-center",children:[l,h]}),m[19]=l,m[20]=h,m[21]=p):p=m[21],p};function ei(e){let a,f,y,b,v,x,k,w,C,S,E,I,D,N,_,P,M,R,j,O,B,F,H=(0,n.c)(92),U=(0,r.useEntity)(e.entityID,"canvas/block/width")?.data.value||360,z=Math.round((0,r.useEntity)(e.entityID,"canvas/block/rotation")?.data.value||0),[$,V]=(0,m.default)(),q=(0,r.useEntity)(e.entityID,"block/type"),G=q?.data.value==="group",{rep:W}=(0,r.useReplicache)();H[0]!==G||H[1]!==e.entityID||H[2]!==e.parent?(a=()=>{if(G)return(0,s.registerBlockGroup)(e.entityID,e.parent)},f=[G,e.entityID,e.parent],H[0]=G,H[1]=e.entityID,H[2]=e.parent,H[3]=a,H[4]=f):(a=H[3],f=H[4]),(0,l.useLayoutEffect)(a,f);let{permissions:Y}=(0,i.useEntitySetContext)();H[5]!==e.canvas||H[6]!==e.entityID||H[7]!==e.factID||H[8]!==e.parent||H[9]!==e.position.x||H[10]!==e.position.y||H[11]!==V||H[12]!==W?.mutate||H[13]!==U?(y=t=>{let n=(0,L.getCanvasZoom)(e.parent);W?.mutate.assertFact({id:e.factID,entity:e.parent,attribute:"canvas/block",data:{type:"spatial-reference",value:e.entityID,position:(0,K.clampToCanvas)({x:e.position.x+t.x/n,y:e.position.y+t.y/n}
145,{width:U,height:V.height/n},e.canvas)}})},H[5]=e.canvas,H[6]=e.entityID,H[7]=e.factID,H[8]=e.parent,H[9]=e.position.x,H[10]=e.position.y,H[11]=V,H[12]=W?.mutate,H[13]=U,H[14]=y):y=H[14];let Z=y;H[15]!==G||H[16]!==e.entityID?(b=t=>t.focusedEntity?.entityID===e.entityID||G&&t.focusedEntity?.entityType==="block"&&t.focusedEntity.parent===e.entityID,H[15]=G,H[16]=e.entityID,H[17]=b):b=H[17];let X=(0,p.useUIState)(b),Q=G||!!q&&!!u.isTextBlock[q.data.value],J=!e.preview&&Y.write,ee=J&&!!q&&!(Q&&X),et=Q?G?`${el}, ${ec}, ${eu}`:`${el}, ${ec}`:`${el}, [contenteditable]`;H[18]!==Q||H[19]!==G||H[20]!==e.entityID||H[21]!==e.parent?(v=Q?{onClick:t=>{let{target:n,x:r,y:i}=t,a=n.closest("[data-entityid]")?.getAttribute("data-entityid");a&&(0,d.focusBlock)({type:"text",entityID:a,parent:G?e.entityID:e.parent},{type:"coord",left:r,top:i})}}:void 0,H[18]=Q,H[19]=G,H[20]=e.entityID,H[21]=e.parent,H[22]=v):v=H[22],H[23]!==Z||H[24]!==et||H[25]!==v?(x={onDragEnd:Z,bodyIgnore:et,bodyText:v},H[23]=Z,H[24]=et,H[25]=v,H[26]=x):x=H[26];let{dragDelta:en,handlers:er,bodyHandlers:ei}=(0,c.useDrag)(x);H[27]!==e.entityID||H[28]!==e.parent||H[29]!==W?.mutate||H[30]!==U?(k={onDragEnd:t=>W?.mutate.assertFact({entity:e.entityID,attribute:"canvas/block/width",data:{type:"number",value:U+t.x/(0,L.getCanvasZoom)(e.parent)}})},H[27]=e.entityID,H[28]=e.parent,H[29]=W?.mutate,H[30]=U,H[31]=k):k=H[31];let eo=(0,c.useDrag)(k);H[32]!==e.entityID||H[33]!==V||H[34]!==W?.mutate||H[35]!==z?(w={onDragEnd:t=>W?.mutate.assertFact({entity:e.entityID,attribute:"canvas/block/rotation",data:{type:"number",value:Math.round(z+em(V,t))%360}})},H[32]=e.entityID,H[33]=V,H[34]=W?.mutate,H[35]=z,H[36]=w):w=H[36];let es=(0,c.useDrag)(w),eh=es.dragDelta?em(V,es.dragDelta):0,ep=(0,L.getCanvasZoom)(e.parent),ef=e.position.x+(en?.x||0)/ep,eg=e.position.y+(en?.y||0)/ep,ey=`translate(${ef}px, ${eg}px) rotate(${Math.round(z+eh)}deg) scale(${!en?"1.0":"1.02"})`,[eb,ev]=(0,l.useState)(!1),ex=!!(0,r.useEntity)(e.entityID,"block/is-list")?.data.value;q?.data.value;let ek=q?.data.value||"text";H[37]!==ex||H[38]!==e.parent?(S=ex?{path:[],parent:e.parent,depth:1}:void 0,H[37]=ex,H[38]=e.parent,H[39]=S):S=H[39],H[40]!==e.entityID||H[41]!==e.factID||H[42]!==e.parent||H[43]!==e.preview||H[44]!==ek||H[45]!==S?(E={pageType:"canvas",preview:e.preview,type:ek,value:e.entityID,factID:e.factID,position:"",nextPosition:"",entityID:e.entityID,parent:e.parent,nextBlock:null,previousBlock:null,listData:S},H[40]=e.entityID,H[41]=e.factID,H[42]=e.parent,H[43]=e.preview,H[44]=ek,H[45]=S,H[46]=E):E=H[46],C=E,(0,g.useBlockKeyboardHandlers)(C,eb,ev);let ew=(0,T.useBlockMouseHandlers)(C);H[47]!==ew||H[48]!==G?(I=G?{...ew,onMouseDown:e=>{e.target===e.currentTarget&&ew.onMouseDown(e)}}:ew,H[47]=ew,H[48]=G,H[49]=I):I=H[49];let eC=I;H[50]!==eC||H[51]!==e.preview?(D=e.preview?{}:eC,H[50]=eC,H[51]=e.preview,H[52]=D):D=H[52],H[53]!==e.entityID||H[54]!==e.preview?(N=e.preview?void 0:h.elementId.block(e.entityID).container,H[53]=e.entityID,H[54]=e.preview,H[55]=N):N=H[55];let eS=en?A.CANVAS_DRAG_STACK_ORDER:e.stackOrder,eE=U+(eo.dragDelta?.x||0)/ep;H[56]!==eS||H[57]!==eE||H[58]!==ey?(_={top:0,left:0,zIndex:eS,width:eE,transform:ey},H[56]=eS,H[57]=eE,H[58]=ey,H[59]=_):_=H[59],H[60]!==er||H[61]!==J||H[62]!==X?(P=J&&(0,t.jsx)(ed,{isFocused:X,handlers:er}),H[60]=er,H[61]=J,H[62]=X,H[63]=P):P=H[63],H[64]!==ee||H[65]!==ei?(M=ee?ei:{},H[64]=ee,H[65]=ei,H[66]=M):M=H[66];let eT=` w-full ${ee?"[-webkit-touch-callout:none]":""} ${en||eo.dragDelta||es.dragDelta?"pointer-events-none":""} `;return H[67]!==eb||H[68]!==C||H[69]!==q?(R=q&&(0,t.jsx)(o.BaseBlock,{...C,areYouSure:eb,setAreYouSure:ev}),H[67]=eb,H[68]=C,H[69]=q,H[70]=R):R=H[70],H[71]!==M||H[72]!==eT||H[73]!==R?(j=(0,t.jsx)("div",{...M,className:eT,children:R}),H[71]=M,H[72]=eT,H[73]=R,H[74]=j):j=H[74],H[75]!==J||H[76]!==X||H[77]!==eo.handlers?(O=J&&(0,t.jsx)("div",{className:`resizeHandle touch-none 146 cursor-e-resize shrink-0 z-10 147 group-hover/canvas-block:block 148 sm:w-[5px] w-3 sm:h-6 h-8 149 absolute top-1/2 sm:right-2 right-1 -translate-y-1/2 150 rounded-full bg-white border-2 border-[#8C8C8C] shadow-[0_0_0_1px_white,inset_0_0_0_1px_white] 151 ${X?"block":"hidden"} 152 153 `,...eo.handlers}),H[75]=J,H[76]=X,H[77]=eo.handlers,H[78]=O):O=H[78],H[79]!==J||H[80]!==X||H[81]!==es.handlers?(B=J&&(0,t.jsx)("div",{className:`rotateHandle touch-none 154 cursor-grab shrink-0 z-10 155 group-hover/canvas-block:block 156 sm:w-[8px] sm:h-[8px] w-4 h-4 157 absolute sm:bottom-0 sm:right-0 -bottom-1 -right-1 158 -translate-y-1/2 -translate-x-1/2 159 rounded-full bg-white border-2 border-[#8C8C8C] shadow-[0_0_0_1px_white,inset_0_0_0_1px_white] 160 ${X?"block":"hidden"} 161`,...es.handlers}),H[79]=J,H[80]=X,H[81]=es.handlers,H[82]=B):B=H[82],H[83]!==$||H[84]!==D||H[85]!==N||H[86]!==_||H[87]!==P||H[88]!==j||H[89]!==O||H[90]!==B?(F=(0,t.jsxs)("div",{ref:$,...D,onClickCapture:ea,id:N,className:"canvasBlockWrapper absolute group/canvas-block rounded-lg flex items-stretch origin-center p-3",style:_,children:[P,j,O,B]}),H[83]=$,H[84]=D,H[85]=N,H[86]=_,H[87]=P,H[88]=j,H[89]=O,H[90]=B,H[91]=F):F=H[91],F}function ea(e){return e.shiftKey&&e.preventDefault()}let eo=e=>{let i,a,o,s=(0,n.c)(9),l=(0,r.useEntity)(e.entityID,"theme/card-background-image"),c=(0,r.useEntity)(e.entityID,"theme/card-background-image-repeat"),u=(0,r.useEntity)(e.entityID,"theme/card-background-image-opacity")?.data.value||1,d=(0,r.useEntity)(e.entityID,"canvas/background-pattern")?.data.value||e.defaultPattern,h=l?`url(${l.data.src}), url(${l.data.fallback})`:void 0,p=c?.data.value||500,m=l?.data.src?u:1;return s[0]!==h||s[1]!==p||s[2]!==m?(i={backgroundImage:h,backgroundRepeat:"repeat",backgroundPosition:"center",backgroundSize:p,opacity:m},s[0]=h,s[1]=p,s[2]=m,s[3]=i):i=s[3],s[4]!==d?(a=(0,t.jsx)(es,{pattern:d}),s[4]=d,s[5]=a):a=s[5],s[6]!==i||s[7]!==a?(o=(0,t.jsx)("div",{className:"w-full h-full pointer-events-none",style:i,children:a}),s[6]=i,s[7]=a,s[8]=o):o=s[8],o},es=e=>{let r,i,a,o,s=(0,n.c)(14);if("plain"===e.pattern)return null;let l=`canvasPattern-${e.pattern}-${e.scale}`,c="grid"===e.pattern,u=(c?32:24)*(e.scale||1),d=e.scale?16*e.scale:0,h=`pointer-events-none ${c?"text-border-light":"text-border"}`,p=c?`${d} ${d} ${u} ${u}`:void 0;s[0]!==c||s[1]!==u?(r=c?(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5 0H15.5L15.5 2.06061C15.5 2.33675 15.7239 2.56061 16 2.56061C16.2761 2.56061 16.5 2.33675 16.5 2.06061V0ZM0 16.5V15.5L2.06061 15.5C2.33675 15.5 2.56061 15.7239 2.56061 16C2.56061 16.2761 2.33675 16.5 2.06061 16.5L0 16.5ZM16.5 32H15.5V29.9394C15.5 29.6633 15.7239 29.4394 16 29.4394C16.2761 29.4394 16.5 29.6633 16.5 29.9394V32ZM32 15.5V16.5L29.9394 16.5C29.6633 16.5 29.4394 16.2761 29.4394 16C29.4394 15.7239 29.6633 15.5 29.9394 15.5H32ZM5.4394 16C5.4394 15.7239 5.66325 15.5 5.93939 15.5H10.0606C10.3367 15.5 10.5606 15.7239 10.5606 16C10.5606 16.2761 10.3368 16.5 10.0606 16.5H5.9394C5.66325 16.5 5.4394 16.2761 5.4394 16ZM13.4394 16C13.4394 15.7239 13.6633 15.5 13.9394 15.5H15.5V13.9394C15.5 13.6633 15.7239 13.4394 16 13.4394C16.2761 13.4394 16.5 13.6633 16.5 13.9394V15.5H18.0606C18.3367 15.5 18.5606 15.7239 18.5606 16C18.5606 16.2761 18.3367 16.5 18.0606 16.5H16.5V18.0606C16.5 18.3367 16.2761 18.5606 16 18.5606C15.7239 18.5606 15.5 18.3367 15.5 18.0606V16.5H13.9394C13.6633 16.5 13.4394 16.2761 13.4394 16ZM21.4394 16C21.4394 15.7239 21.6633 15.5 21.9394 15.5H26.0606C26.3367 15.5 26.5606 15.7239 26.5606 16C26.5606 16.2761 26.3367 16.5 26.0606 16.5H21.9394C21.6633 16.5 21.4394 16.2761 21.4394 16ZM16 5.4394C16.2761 5.4394 16.5 5.66325 16.5 5.93939V10.0606C16.5 10.3367 16.2761 10.5606 16 10.5606C15.7239 10.5606 15.5 10.3368 15.5 10.0606V5.9394C15.5 5.66325 15.7239 5.4394 16 5.4394ZM16 21.4394C16.2761 21.4394 16.5 21.6633 16.5 21.9394V26.0606C16.5 26.3367 16.2761 26.5606 16 26.5606C15.7239 26.5606 15.5 26.3367 15.5 26.0606V21.9394C15.5 21.6633 15.7239 21.4394 16 21.4394Z",fill:"currentColor"}):(0,t.jsx)("circle",{cx:u/2,cy:u/2,r:"1",fill:"currentColor"}),s[0]=c,s[1]=u,s[2]=r):r=s[2],s[3]!==l||s[4]!==u||s[5]!==p||s[6]!==r?(i=(0,t.jsx)("defs",{children:(0,t.jsx)("pattern",{id:l,x:"0",y:"0",width:u,height:u,viewBox:p,patternUnits:"userSpaceOnUse",children:r})}),s[3]=l,s[4]=u,s[5]=p,s[6]=r,s[7]=i):i=s[7];let m=`url(#${l})`;return s[8]!==m?(a=(0,t.jsx)("rect",{width:"100%",height:"100%",x:"0",y:"0",fill:m}),s[8]=m,s[9]=a):a=s[9],s[10]!==h||s[11]!==i||s[12]!==a?(o=(0,t.jsxs)("svg",{width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",className:h,children:[i,a]}),s[10]=h,s[11]=i,s[12]=a,s[13]=o):o=s[13],o},el="button:not([data-block-body]), input, textarea, select, iframe, [data-draggable]",ec="a, .mention, .footnote-ref, .comment-anchor",eu=".nonTextBlockAndControl
161s, [data-drag-handle]",ed=e=>{let r,i,a,o,s,l,c=(0,n.c)(12),u=`h-full col-start-1 col-end-2 row-start-1 row-end-2 bg-bg-page group-hover/canvas-block:block ${e.isFocused?"block":"hidden"}`;c[0]===Symbol.for("react.memo_cache_sentinel")?(r={maskImage:"var(--gripperSVG2)",maskRepeat:"repeat"},c[0]=r):r=c[0],c[1]!==u?(i=(0,t.jsx)("div",{className:u,style:r}),c[1]=u,c[2]=i):i=c[2];let d=`h-full col-start-1 col-end-2 row-start-1 row-end-2 bg-tertiary group-hover/canvas-block:block ${e.isFocused?"block":"hidden"}`;return c[3]===Symbol.for("react.memo_cache_sentinel")?(a={maskImage:"var(--gripperSVG)",maskRepeat:"repeat"},c[3]=a):a=c[3],c[4]!==d?(o=(0,t.jsx)("div",{className:d,style:a}),c[4]=d,c[5]=o):o=c[5],c[6]!==i||c[7]!==o?(s=(0,t.jsxs)("div",{className:"h-full grid grid-cols-1 grid-rows-1 ",children:[i,o]}),c[6]=i,c[7]=o,c[8]=s):s=c[8],c[9]!==e.handlers||c[10]!==s?(l=(0,t.jsx)("div",{...e.handlers,className:"gripper absolute z-10 left-0 top-3 bottom-3 w-[9px] py-1 cursor-grab touch-none",children:s}),c[9]=e.handlers,c[10]=s,c[11]=l):l=c[11],l};async function eh(e,t,{canvas:n,...r}){let i=(0,a.v7)();await t.withUndoGroup(()=>e.mutate.addCanvasBlock({...r,position:(0,K.clampToCanvas)(r.position,ep,n),newEntityID:i,factID:(0,a.v7)(),type:"text"})),setTimeout(()=>(0,d.focusBlock)({type:"text",entityID:i,parent:r.parent},{type:"start"}),20)}let ep={width:360,height:48};function em(e,t){let n=e.width/2+t.x,r=e.height/2+t.y;return n||r?(Math.atan2(r,n)-Math.atan2(e.height,e.width))*(180/Math.PI):0}function ef(e){return"post-header"===e.type}function eg(e){return e.get("post_preferences")}},381677,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(248787),i=e.i(265658),a=e.i(663623);e.s(["CollapsibleReplies",0,e=>{let[o,{height:s}]=(0,a.default)(),l=(0,n.useRef)(!1),c=(0,i.useSpring)({height:e.open?s:0,opacity:+!!e.open,immediate:!l.current,config:{tension:280,friction:30}});return(0,n.useEffect)(()=>{s>0&&(l.current=!0)},[s]),(0,t.jsx)(r.animated.div,{className:"pl-2 -ml-2",style:{...c,overflow:"hidden"},children:(0,t.jsx)("div",{ref:o,children:e.children})})}])},216425,18421,310845,917718,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(768834),a=e.i(202145),o=e.i(467592),s=e.i(229008),l=e.i(645522);let c=(0,r.createContext)({pageID:"",comments:[]});function u(){return(0,r.useContext)(c)}e.s(["EditorCommentContext",0,c,"useEditorCommentContext",0,u],18421);var d=e.i(975191),h=e.i(616009),p=e.i(734582);function m(e){return e.constructor===h.XmlElement?"hard_break"===e.nodeName?"\n":"didMention"===e.nodeName||"atMention"===e.nodeName?e.getAttribute("text")||"":"footnote"===e.nodeName?"*":e.toArray().map(e=>m(e)).join(""):e.constructor===h.XmlText?e.toDelta().map(e=>e.insert).join(""):""}function f(e){let t=new h.Doc;return(0,h.applyUpdate)(t,p.toByteArray(e)),t}function g(e){return e?f(e).getXmlElement("prosemirror").toArray().map(e=>m(e)).join("\n"):""}e.s(["YJSFragmentToString",0,m],310845),e.s(["getEditorCommentPlaintext",0,g,"getEditorCommentQuoteText",0,function(e,t){if(!e)return"";let n=f(e),r=[],i=e=>{if(e instanceof h.XmlText)for(let n of e.toDelta())(n.attributes?.comment?.commentID||"").split(" ").includes(t)&&r.push(n.insert);else if(e instanceof h.XmlElement)for(let t of e.toArray())i(t)};for(let e of n.getXmlElement("prosemirror").toArray())i(e);return r.join("")}],917718);var y=e.i(88891);let b=(0,i.create)(e=>({commentIDs:null,anchorElement:null,pageID:null,open:(t,n,r)=>e({commentIDs:t,anchorElement:n,pageID:r}),close:()=>e({commentIDs:null,anchorElement:null,pageID:null})}));e.s(["EditorCommentPopover",0,function(){let e,i,c,h,p,m,f,v,x,k,w,C,S,E=(0,n.c)(38),{commentIDs:T,anchorElement:I,pageID:D,close:N}=b(),{pageID:A,comments:_}=u();E[0]!==T||E[1]!==_?(e=T?_.find(e=>T.includes(e.commentEntityID)):void 0,E[0]=T,E[1]=_,E[2]=e):e=E[2];let P=e,M=!!P&&!!I&&D===A,R=(0,o.useEntity)(P?.commentEntityID??null,"block/text"),L=(0,o.useEntity)(P?.commentEntityID??null,"comment/reply"),j=(0,o.useEntity)(P?.commentEntityID??null,"comment/author"),{data:O}=(0,s.useRecordFromDid)(j?.data.value);R?.data.value;let B=R?.data.value;E[3]!==B?(c=g(B),E[3]=B,E[4]=c):c=E[4],i=c;let[F,H]=(0,r.useState)();if(E[5]!==I||E[6]!==N||E[7]!==T||E[8]!==M?(h=()=>
161{if(!M||!I||!T)return void H(void 0);let e=()=>{let e=I;e.isConnected||(e=document.querySelector(`.comment-anchor[data-comment-id~="${T[0]}"]`))?H(e.getBoundingClientRect()):N()};e();let t=I.closest(".pageScrollWrapper");t?.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e),window.visualViewport?.addEventListener("resize",e),window.visualViewport?.addEventListener("scroll",e);let n=new MutationObserver(e);return t&&n.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{t?.removeEventListener("scroll",e),window.removeEventListener("resize",e),window.visualViewport?.removeEventListener("resize",e),window.visualViewport?.removeEventListener("scroll",e),n.disconnect()}},p=[M,I,T,N],E[5]=I,E[6]=N,E[7]=T,E[8]=M,E[9]=h,E[10]=p):(h=E[9],p=E[10]),(0,r.useEffect)(h,p),!P)return null;let U=P.commentEntityID;E[11]!==I||E[12]!==F?(m=F??I?.getBoundingClientRect(),E[11]=I,E[12]=F,E[13]=m):m=E[13];let z=m,$=L.length>0?"Open thread":"Open comment";E[14]!==N||E[15]!==U||E[16]!==A?(f=()=>{d.useEditorCommentSheetStore.getState().openSheet(A,U),N()},E[14]=N,E[15]=U,E[16]=A,E[17]=f):f=E[17];let V=O?.avatar,q=O?.displayName||O?.handle;E[18]!==q||E[19]!==V?(v=(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(l.Avatar,{src:V,displayName:q,size:"small"})}),E[18]=q,E[19]=V,E[20]=v):v=E[20],E[21]!==i?(x=(0,t.jsx)("div",{className:"grow min-w-0 text-sm text-secondary whitespace-nowrap overflow-hidden truncate",children:i}),E[21]=i,E[22]=x):x=E[22];let G=L.length>0&&L.length+1;return E[23]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsx)(y.CommentTiny,{}),E[23]=k):k=E[23],E[24]!==G?(w=(0,t.jsxs)("div",{className:"shrink-0 text-accent-contrast flex flex-row text-sm items-center gap-0.5",children:[G,k]}),E[24]=G,E[25]=w):w=E[25],E[26]!==v||E[27]!==x||E[28]!==w||E[29]!==$||E[30]!==f?(C=(0,t.jsxs)("button",{className:"flex items-center gap-2 px-2 py-1.5 w-full text-left",title:$,onClick:f,children:[v,x,w]}),E[26]=v,E[27]=x,E[28]=w,E[29]=$,E[30]=f,E[31]=C):C=E[31],E[32]!==I||E[33]!==N||E[34]!==M||E[35]!==z||E[36]!==C?(S=(0,t.jsx)(a.AnchoredPopover,{open:M,anchorElement:I,onClose:N,rect:z,dismissOnScroll:!1,dismissOnFocusOutside:!1,className:"editor-comment-popover ",children:C}),E[32]=I,E[33]=N,E[34]=M,E[35]=z,E[36]=C,E[37]=S):S=E[37],S},"useEditorCommentPopoverStore",0,b],216425)},975191,e=>{"use strict";var t=e.i(768834);let n=(0,t.create)(()=>({draft:null}));(0,t.create)(e=>({drafts:{},setDraft:(t,n)=>e(e=>{if(null===n){if(!(t in e.drafts))return e;let{[t]:n,...r}=e.drafts;return{drafts:r}}return{drafts:{...e.drafts,[t]:n}}})}));let r=(0,t.create)(()=>({hoveredCommentIDs:[]})),i=(0,t.create)(e=>({pageID:null,focusedCommentID:null,openSheet:(t,n)=>e({pageID:t,focusedCommentID:n??null}),close:()=>e({pageID:null,focusedCommentID:null})}));e.s(["useEditorCommentDraftStore",0,n,"useEditorCommentSheetStore",0,i,"useHoveredEditorCommentStore",0,r])},615184,566312,630090,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(88046);let i={Lora:"@font-face {\n font-family: 'Lora Fallback';\n src: local('Georgia');\n size-adjust: 104.980%;\n ascent-override: 95.828%;\n descent-override: 26.100%;\n line-gap-override: 0.000%;\n}","Atkinson Hyperlegible Next":"@font-face {\n font-family: 'Atkinson Hyperlegible Next Fallback';\n src: local('Arial');\n size-adjust: 99.596%;\n ascent-override: 98.799%;\n descent-override: 31.728%;\n line-gap-override: 0.000%;\n}","Sometype Mono":"@font-face {\n font-family: 'Sometype Mono Fallback';\n src: local('Courier New');\n size-adjust: 96.651%;\n ascent-override: 95.705%;\n descent-override: 28.453%;\n line-gap-override: 0.000%;\n}",Montserrat:"@font-face {\n font-family: 'Montserrat Fallback';\n src: local('Arial');\n size-adjust: 112.831%;\n ascent-override: 85.792%;\n descent-override: 22.246%;\n line-gap-override: 0.000%;\n}","Source Sans 3":"@font-face {\n font-family: 'Source Sans 3 Fallback';\n src: local('Arial');\n size-adjust: 93.764%;\n ascent-override: 109.211%;\n descent-override: 42.660%;\n line-gap-override: 0.000%;\n}"};async function a(e){try{let t=await fetch(e,{headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"},next:{revalidate:86400}});if(!t.ok)return null;let n=await t.text();if(!n.includes("@font-face"))return null;return n}catch{return null}}let o=new Map;async function s(e){let i,a,o,s,v,x,k,w,C,S=(0,n.c)(21),{headingFontId:E,body
161FontId:T}=e;if(S[0]!==T||S[1]!==E){let e=(0,r.getFontConfig)(E),n=(0,r.getFontConfig)(T),k=e.id===r.defaultFontId,w=n.id===r.defaultFontId,C=[e,n].filter(b),I=[...new Set(C.map(y).filter(g))],D=k?w?null:"var(--font-quattro)":(0,r.getFontFamilyValue)(e),N=w?k?null:"var(--font-quattro)":(0,r.getFontFamilyValue)(n),A=w?null:(0,r.getFontBaseSize)(n),_=[D&&` --theme-heading-font: ${D};`,N&&` --theme-font: ${N};`,A&&` --theme-font-base-size: ${A}px;`].filter(Boolean);i=_.length>0?`.leafletWrapper { 162${_.join("\n")} 163}`:"";let P=await Promise.all(I.map(f)),M=P.filter(m),R=P.filter(p),L=[...new Set(M.flatMap(h))];a=C.map(d).filter(Boolean).join("\n"),o=I.length>0&&(0,t.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),S[8]!==L?(s=L.map(u),S[8]=L,S[9]=s):s=S[9],v=M.map(c),x=R.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),R.map(l)]}),S[0]=T,S[1]=E,S[2]=i,S[3]=a,S[4]=o,S[5]=s,S[6]=v,S[7]=x}else i=S[2],a=S[3],o=S[4],s=S[5],v=S[6],x=S[7];return S[10]!==a?(k=a&&(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:a}}),S[10]=a,S[11]=k):k=S[11],S[12]!==i?(w=i&&(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:i}}),S[12]=i,S[13]=w):w=S[13],S[14]!==o||S[15]!==s||S[16]!==v||S[17]!==x||S[18]!==k||S[19]!==w?(C=(0,t.jsxs)(t.Fragment,{children:[o,s,v,x,k,w]}),S[14]=o,S[15]=s,S[16]=v,S[17]=x,S[18]=k,S[19]=w,S[20]=C):C=S[20],C}function l(e){let{url:n}=e;return(0,t.jsx)("link",{rel:"stylesheet",href:n},n)}function c(e){let{url:n,css:r}=e;return(0,t.jsx)("style",{"data-google-fonts":n,dangerouslySetInnerHTML:{__html:r}},n)}function u(e){return(0,t.jsx)("link",{rel:"preload",href:e,as:"font",type:"font/woff2",crossOrigin:"anonymous"},e)}function d(e){return(0,r.getMetricFallbackName)(e)?i[e.fontFamily]??null:null}function h(e){let{css:t}=e,n=[];for(let[,e]of t.matchAll(/\/\*\s*latin\s*\*\/\s*@font-face\s*\{([^}]+)\}/g)){if(!/font-style:\s*normal/.test(e))continue;let t=e.match(/url\((https:\/\/fonts\.gstatic\.com\/[^)]+\.woff2)\)/);t&&n.push(t[1])}return n}function p(e){return null===e.css}function m(e){return null!==e.css}async function f(e){let t;return{url:e,css:await (!(t=o.get(e))&&(t=a(e).then(t=>(null===t&&o.delete(e),t)),o.set(e,t)),t)}}function g(e){return null!==e}function y(e){return(0,r.getGoogleFontsUrl)(e)}function b(e,t,n){return e.id!==r.defaultFontId&&n.findIndex(t=>t.id===e.id)===t}e.s(["FontLoader",0,s],615184);var v=e.i(124670);e.s(["wordmarkFromTheme",0,function(e,t){let n=e?.wordmark;return n?.image?.ref?{src:(0,v.blobRefToSrc)(n.image.ref,t),width:n.width??void 0,aspectRatio:n.aspectRatio?{width:n.aspectRatio.width,height:n.aspectRatio.height}:void 0}:null}],566312),e.s(["publishedNavPages",0,function(e){return(e??[]).flatMap(e=>e.path?[{id:e.id,path:e.path,title:e.title??"",sort_order:e.sort_order}]:[])}],630090)},612192,202145,453386,182193,640682,473080,e=>{"use strict";e.s(["FootnotePopover",()=>V,"useFootnotePopoverStore",()=>$],612192);var t=e.i(843476),n=e.i(500932),r=e.i(768834),i=e.i(135537);e.s(["FootnoteEditor",()=>j],640682);var a=e.i(271645),o=e.i(827121),s=e.i(571141),l=e.i(172604),c=e.i(929987),u=e.i(818560),d=e.i(69497),h=e.i(38168),p=e.i(651806),m=e.i(416330),f=e.i(657460),g=e.i(467592),y=e.i(64572),b=e.i(394191),v=e.i(734255),x=e.i(438424),k=e.i(78448),w=e.i(101065),C=e.i(38226),S=e.i(30552),E=e.i(276452),T=e.i(178761),I=e.i(979944),D=e.i(885718);function N(e){let r,i,o,s,l,c,u,d,h,p=(0,n.c)(28),{open:m,anchorElement:f,onClose:g,rect:y,dismissOnScroll:b,dismissOnFocusOutside:v,className:x,children:k}=e,w=void 0===b||b,C=void 0===v||v;p[0]!==f||p[1]!==w||p[2]!==g||p[3]!==m?(r=()=>{if(!w||!m||!f)return;let e=()=>g(),t=f.closest(".pageScrollWrapper");return t?.addEventListener("scroll",e),window.addEventListener("resize",g),()=>{t?.removeEventListener("scroll",e),window.removeEventListener("resize",g)}},i=[w,m,f,g],p[0]=f,p[1]=w,p[2]=g,p[3]=m,p[4]=r,p[5]=i):(r=p[4],i=p[5]),(0,a.useEffect)(r,i),p[6]!==f?(s=f?.getBoundingClientRect(),p[6]=f,p[7]=s):s=p[7],o=s;let S=y??o,E=S?.top??0,N=S?.left??0,_=S?.width??0,P=S?.height??0;p[8]!==E||p[9]!==N||p[10]!==_||p[11]!==P?(l=(0,t.jsx)(T.Anchor,{style:{position:"fixed",top:E,left:N,width:_,height:P,pointerEvents:"none"}}),p[8]=E,p[9]=N,p[10]=_,p[11]=P,p[12]=l):l=p[12],p[13]!==f||p[14]!==C||p[15]!==g?(c=e=>
163{if(!C&&"focusin"===e.detail.originalEvent.type)return;let t=e.detail.originalEvent.target;f&&t&&f.contains(t)||g()},p[13]=f,p[14]=C,p[15]=g,p[16]=c):c=p[16];let M=`portalStyles z-50 bg-bg-page border border-border rounded-lg shadow-md w-[min(calc(100vw-24px),320px)] ${x??""}`;return p[17]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(T.Arrow,{asChild:!0,width:16,height:8,children:(0,t.jsx)(I.PopoverArrow,{arrowFill:D.theme.colors["bg-page"],arrowStroke:D.theme.colors.border})}),p[17]=u):u=p[17],p[18]!==k||p[19]!==e.onMouseEnter||p[20]!==e.onMouseLeave||p[21]!==c||p[22]!==M?(d=(0,t.jsx)(T.Portal,{children:(0,t.jsxs)(T.Content,{side:"top",align:"center",sideOffset:4,collisionPadding:12,onOpenAutoFocus:A,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onInteractOutside:c,className:M,children:[k,u]})}),p[18]=k,p[19]=e.onMouseEnter,p[20]=e.onMouseLeave,p[21]=c,p[22]=M,p[23]=d):d=p[23],p[24]!==m||p[25]!==l||p[26]!==d?(h=(0,t.jsxs)(T.Root,{open:m,children:[l,d]}),p[24]=m,p[25]=l,p[26]=d,p[27]=h):h=p[27],h}function A(e){return e.preventDefault()}function _(e,n){let r=(0,a.useRef)(null),[i,o]=(0,a.useState)(!1),s=(0,a.useRef)(null),l=(0,a.useRef)(null),c=()=>{null!==s.current&&(window.clearTimeout(s.current),s.current=null)},u=()=>{c(),o(!0)},d=()=>{c(),o(!1)},h=()=>{c(),s.current=window.setTimeout(d,150)};return((0,a.useEffect)(()=>c,[]),(0,a.useEffect)(()=>{if(!i)return;let e=e=>{e.target instanceof Element&&e.target.closest(".footnote-source-preview")||d()};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[i]),e)?{triggerProps:{ref:e=>{r.current=e},onPointerDown:e=>{l.current=e.pointerType},onPointerEnter:e=>{"mouse"===e.pointerType&&(c(),s.current=window.setTimeout(u,200))},onPointerLeave:e=>{"mouse"===e.pointerType&&h()},onClick:e=>{let t="touch"===l.current||"pen"===l.current;if(l.current=null,t&&!i){e.preventDefault(),u();return}d(),n?.()}},popover:(0,t.jsx)(N,{open:i,anchorElement:i?r.current:null,onClose:d,onMouseEnter:c,onMouseLeave:h,className:"footnote-popover footnote-source-preview",children:(0,t.jsx)(P,{footnoteID:e.footnoteID,onClick:()=>{d();let t=Array.from(document.querySelectorAll(e.sourceSelector)).find(e=>!e.closest(".pageLinkBlockWrapper, .footnote-source-preview"));t?.scrollIntoView({behavior:"smooth",block:"center"})},children:e.content})})}:{triggerProps:{onClick:n},popover:null}}function P(e){let r,i,o,s,l,c=(0,n.c)(9),u=(0,a.useRef)(null);return c[0]!==e.footnoteID?(r=()=>{let t=u.current;if(!t)return;let n=t.querySelector(`[data-footnote-id="${CSS.escape(e.footnoteID)}"]`);if(!n)return;n.classList.add("footnote-preview-target");let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();t.scrollTop=t.scrollTop+(i.top-r.top-t.clientHeight/2+i.height/2)},i=[e.footnoteID],c[0]=e.footnoteID,c[1]=r,c[2]=i):(r=c[1],i=c[2]),(0,a.useLayoutEffect)(r,i),c[3]!==e?(o=t=>{t.target.closest("a")||e.onClick()},c[3]=e,c[4]=o):o=c[4],c[5]===Symbol.for("react.memo_cache_sentinel")?(s={wordBreak:"break-word"},c[5]=s):s=c[5],c[6]!==e.children||c[7]!==o?(l=(0,t.jsx)("div",{ref:u,role:"button",tabIndex:-1,title:"Jump to footnote in text",onClick:o,className:"max-h-36 overflow-y-auto px-3 py-2 text-sm text-secondary whitespace-pre-wrap cursor-pointer rounded-lg",style:s,children:e.children}),c[6]=e.children,c[7]=o,c[8]=l):l=c[8],l}function M(e){let r,i,a,o,s,l=(0,n.c)(16),{triggerProps:c,popover:u}=_(e.sourcePreview,e.indexAction);l[0]!==e.index?(r=(0,t.jsxs)(t.Fragment,{children:[e.index,"."]}),l[0]=e.index,l[1]=r):r=l[1];let d=r,h=`footnote-item flex items-start gap-2 text-sm group/footnote${e.className??""}`;return l[2]!==d||l[3]!==e.indexHref||l[4]!==c?(i=e.indexHref?(0,t.jsx)("a",{href:e.indexHref,className:"text-tertiary font-medium shrink-0 text-sm leading-normal no-underline hover:underline cursor-pointer w-7 text-right",...c,children:d}):(0,t.jsx)("button",{className:"text-tertiary font-medium shrink-0 text-sm leading-normal no-underline hover:underline cursor-pointer w-7 text-right",title:"Jump to footnote in text",...c,children:d}),l[2]=d,l[3]=e.indexHref,l[4]=c,l[5]=i):i=l[5],l[6]===Symbol.for("react.memo_cache_sentinel")?(a={wordBreak:"break-word"},l[6]=a):a=l[6],l[7]!==e.children?(o=(0,t.jsx)("div",{className:"grow min-w-0 text-secondary whitespace-pre-wrap [&_.ProseMirror]:outline-hidden",style:a,children:e.children}),l[7]=e.children,l[8]=o):o=l[8],l[9]!==u||l[10]!==e.id||l[11]!==e.trailing||l[12]!==h||l[13]!==i||l[14]!==o?(s=(0,t.jsxs)("div",{id:e.id,className:h,children:[i,u,o,e.trailing]}),l[9]=u,l[10]=e.id,l[11]=e.trailing,l[12]=h,l[13]=i,l[14]=o,l[15]=s):s=l[15],s}e.s(["AnchoredPopover",0,N],202145),e.s(["EditorFootnoteSourcePreview",0,function(e){let r,a,o,s=(0,n.c)(8),l=(0,g.useEntity)(e.blockID,"block/text"),c=(0,g.useEntity)(e.blockID,"block/type")?.data.value,{footnotes:u}=(0,i.useFootnoteContext)(),d=u.find(t=>t.blockID===e.blockID)?.index??1;if(!l)return null;let h="heading"===c?"font-bold":"",p=`footnote ${d-1}`;return s[0]!==p?(r={counterReset:p},s[0]=p,s[1]=r):r=s[1],s[2]!==l.data.value?(a=(0,t.jsx)(S.RenderYJSFragment,{value:l.data.value,wrapper:"p",renderComments:!1}),s[2]=l.data.value,s[3]=a):a=s[3],s[4]!==h||s[5]!==r||s[6]!==a?(o=(0,t.jsx)("div",{className:h,style:r,children:a}),s[4]=h,s[5]=r,s[6]=a,s[7]=o):o=s[7],o},"useFootnoteSourcePreview",0,_],453386),e.s(["FootnoteItemLayout",0,M,"FootnoteSectionLayout",0,function(e){let r,i,a,o=(0,n.c)(6),s=`footnote-section px-3 sm:px-4 pb-2 ${e.className??""}`;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("hr",{className:"border-border-light mb-3"}),o[0]=r):r=o[0],o[1]!==e.children?(i=(0,t.jsx)("div",{className:"flex flex-col gap-2",children:e.children}),o[1]=e.children,o[2]=i):i=o[2],o[3]!==s||o[4]!==i?(a=(0,t.jsxs)("div",{className:s,children:[r,i]}),o[3]=s,o[4]=i,o[5]=a):a=o[5],a}],182193);var R=e.i(988314),L=e.i(813029);function j(e){let r,i=(0,n.c)(6),a=(0,C.useStaleClient)(O);if(!e.editable||a){let n;return i[0]!==e.footnoteEntityID||i[1]!==e.index||i[2]!==e.sourcePreview?(n=(0,t.jsx)(B,{footnoteEntityID:e.footnoteEntityID,index:e.index,sourcePreview:e.sourcePreview}),i[0]=e.footnoteEntityID,i[1]=e.index,i[2]=e.sourcePreview,i[3]=n):n=i[3],n}return i[4]!==e?(r=(0,t.jsx)(F,{...e}),i[4]=e,i[5]=r):r=i[5],r}function O(e){return e.stale}function B(e){let r,i,a,o=(0,n.c)(9),s=(0,g.useEntity)(e.footnoteEntityID,"block/text");return o[0]!==s?(r=s?(0,t.jsx)(S.RenderYJSFragment,{value:s.data.value,wrapper:"p"}):(0,t.jsx)("span",{className:"italic text-tertiary",children:"Empty footnote"}),o[0]=s,o[1]=r):r=o[1],o[2]!==e.index||o[3]!==e.sourcePreview||o[4]!==r?(i=(0,t.jsx)(M,{index:e.index,sourcePreview:e.sourcePreview,children:r}),o[2]=e.index,o[3]=e.sourcePreview,o[4]=r,o[5]=i):i=o[5],o[6]!==e.footnoteEntityID||o[7]!==i?(a=(0,t.jsx)("div",{"data-footnote-editor":e.footnoteEntityID,children:i}),o[6]=e.footnoteEntityID,o[7]=i,o[8]=a):a=o[8],a}function F(e){let n=(0,a.useRef)(null),r=(0,g.useReplicache)(),{yText:C,cursorPlugin:S,overlay:E}=(0,w.useCollabText)(e.footnoteEntityID),{pageID:T,footnotes:I}=(0,i.useFootnoteContext)(),D=(0,a.useRef)(I);return D.current=I,(0,a.useLayoutEffect)(()=>
163{if(!n.current||!C)return;let t=[(0,u.ySyncPlugin)(C),S,(0,c.keymap)({...(0,h.formattingKeymap)(d.schema.marks),"Ctrl-Meta-h":(...e)=>(0,l.toggleMark)(d.schema.marks.highlight,{color:L.useUIState.getState().lastUsedHighlight})(...e),"Shift-Enter":(e,t)=>{let n=d.schema.nodes.hard_break.create();return t&&t(e.tr.replaceSelectionWith(n).scrollIntoView()),!0},Enter:(e,t,n)=>(n?.dom.blur(),!0),ArrowLeft:(t,n,i)=>{if(!t.selection.empty||t.selection.anchor>1)return!1;let a=D.current.find(t=>t.footnoteEntityID===e.footnoteEntityID);if(!a||!r.rep)return!1;let o=a.blockID;return i?.dom.blur(),r.rep.query(async e=>{let t=(0,y.scanIndex)(e);return(await t.eav(o,"block/type"))[0]?.data.value}).then(t=>{t&&(0,b.focusBlock)({entityID:o,type:t,parent:T},{type:"afterFootnote",footnoteEntityID:e.footnoteEntityID})}),!0}}),(0,p.footnoteInputRules)(),(0,c.keymap)(l.baseKeymap),m.highlightSelectionPlugin,(0,v.autolink)({type:d.schema.marks.link,shouldAutoLink:()=>!0,defaultProtocol:"https"})],i=o.EditorState.create({schema:d.schema,plugins:t}),a=new s.EditorView({mount:n.current},{state:i,editable:()=>e.editable,transformPasted:e=>(0,f.stripFootnoteRefs)((0,f.stripCommentMarks)(e)),handlePaste:(e,t)=>
163{let n=t.clipboardData?.getData("text");if(n&&(0,x.betterIsUrl)(n)){let t=e.state.selection,r=e.state.tr,{from:i,to:a}=t;return t.empty?(r.insertText(n,t.from),r.addMark(i,i+n.length,d.schema.marks.link.create({href:n}))):r.addMark(i,a,d.schema.marks.link.create({href:n})),e.dispatch(r),!0}},handleClickOn:(e,t,n,r,i,a)=>{if(!a||n.nodeSize-2<=t)return;let o=n.nodeAt(t-1),s=n.nodeAt(Math.max(t-2,0)),l=o?.marks.find(e=>e.type===d.schema.marks.link)||s?.marks.find(e=>e.type===d.schema.marks.link);if(l)return void window.open(l.attrs.href,"_blank")},dispatchTransaction(t){let n=this.state,i=this.state.apply(t);this.updateState(i),R.useEditorStates.setState(t=>({editorStates:{...t.editorStates,[e.footnoteEntityID]:{editor:i,view:this}}})),(0,k.trackUndoRedo)(t,r.undoManager,e.footnoteEntityID,()=>{this.focus(),this.updateState(n)},()=>{this.focus(),this.updateState(i)})}});R.useEditorStates.setState(t=>({editorStates:{...t.editorStates,[e.footnoteEntityID]:{editor:a.state,view:a}}}));let g=R.useEditorStates.subscribe(t=>t.editorStates[e.footnoteEntityID],e=>{e?.editor&&e.view?.updateState(e.editor)}),w=()=>{L.useUIState.setState({focusedEntity:{entityType:"footnote",entityID:e.footnoteEntityID,parent:T}})};return a.dom.addEventListener("focus",w),e.autoFocus&&setTimeout(()=>a.focus(),50),()=>{g(),a.dom.removeEventListener("focus",w),a.destroy(),R.useEditorStates.setState(t=>{let{[e.footnoteEntityID]:n,...r}=t.editorStates;return{editorStates:r}})}},[e.footnoteEntityID,C,S,e.editable,e.autoFocus,r.undoManager,T]),(0,t.jsx)("div",{"data-footnote-editor":e.footnoteEntityID,children:(0,t.jsxs)(M,{index:e.index,sourcePreview:e.sourcePreview,indexAction:()=>{let e=n.current?.querySelector(".ProseMirror");e&&e.focus()},trailing:e.editable&&e.onDelete?(0,t.jsx)(H,{footnoteEntityID:e.footnoteEntityID,onDelete:e.onDelete}):void 0,children:[E,(0,t.jsx)("div",{ref:n,className:"outline-hidden"})]})})}function H(e){let r,i,a,o=(0,n.c)(6);o[0]!==e.footnoteEntityID?(r=t=>t.focusedEntity?.entityType==="footnote"&&t.focusedEntity.entityID===e.footnoteEntityID,o[0]=e.footnoteEntityID,o[1]=r):r=o[1];let s=(0,L.useUIState)(r),l=`shrink-0 mt-0.5 text-tertiary hover:text-accent-contrast transition-opacity ${s?"opacity-100":"opacity-0"}`;return o[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(E.DeleteTiny,{}),o[2]=i):i=o[2],o[3]!==e.onDelete||o[4]!==l?(a=(0,t.jsx)("button",{className:l,onClick:e.onDelete,title:"Delete footnote",children:i}),o[3]=e.onDelete,o[4]=l,o[5]=a):a=o[5],a}var U=e.i(492122);function z(e,t,n){if(!n)return;let r=R.useEditorStates.getState().editorStates[t];if(r?.view){let t=r.view,{doc:n}=t.state,i=t.state.tr,a=!1;n.descendants((t,n)=>{a||"footnote"!==t.type.name||t.attrs.footnoteEntityID!==e||(a=!0,i.delete(n,n+t.nodeSize))}),a&&t.dispatch(i)}n.mutate.deleteFootnote({footnoteEntityID:e,blockID:t})}e.s(["deleteFootnoteFromBlock",0,z],473080);let $=(0,r.create)(e=>({activeFootnoteID:null,anchorElement:null,pageID:null,open:(t,n,r)=>e({activeFootnoteID:t,anchorElement:n,pageID:r??null}),close:()=>e({activeFootnoteID:null,anchorElement:null,pageID:null})}));function V(e){let r,a,o,s,l=(0,n.c)(20),{activeFootnoteID:c,anchorElement:u,pageID:d,close:h}=$(),{footnotes:p}=(0,i.useFootnoteContext)(),{permissions:m}=(0,U.useEntitySetContext)(),f=(0,g.useReplicache)();if(l[0]!==c||l[1]!==p){let e;l[3]!==c?(e=e=>e.footnoteEntityID===c,l[3]=c,l[4]=e):e=l[4],r=p.find(e),l[0]=c,l[1]=p,l[2]=r}else r=l[2];let y=r;e:{let e;if(!u||!y){a=y?.index??0;break e}if(l[5]!==u||l[6]!==y){let t=u.closest(".footnote-scope");if(!t){a=y.index;break e}e=Array.from(t.querySelectorAll(".footnote-ref")).filter(q),l[5]=u,l[6]=y,l[7]=e,l[8]=a}else e=l[7],a=l[8];let t=e.indexOf(u);a=t>=0?t+1:y.index}let b=a,v=!!c&&!!y&&d===e.pageID;return l[9]!==h||l[10]!==b||l[11]!==y||l[12]!==m||l[13]!==f?(o=y&&(0,t.jsx)(j,{footnoteEntityID:y.footnoteEntityID,index:b,editable:m.write,autoFocus:m.write,onDelete:m.write?()=>{z(y.footnoteEntityID,y.blockID,f.rep),h()}:void 0}),l[9]=h,l[10]=b,l[11]=y,l[12]=m,l[13]=f,l[14]=o):o=l[14],l[15]!==u||l[16]!==h||l[17]!==v||l[18]!==o?(s=(0,t.jsx)(N,{open:v,anchorElement:u,onClose:h,className:"footnote-popover px-3 py-2",children:o}),l[15]=u,l[16]=h,l[17]=v,l[18]=o,l[19]=s):s=l[19],s}function q(e){return!e.closest(".pageLinkBlockWrapper")}},750590,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["BlockImageSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.2652 2.56494C20.8254 2.56494 22.0902 3.82974 22.0902 5.38994V18.6099C22.0902 20.1701 20.8254 21.4349 19.2652 21.4349H4.73516C3.17495 21.4349 1.91016 20.1701 1.91016 18.6099V5.38994C1.91016 3.82974 3.17495 2.56494 4.73516 2.56494H19.2652ZM20.8402 5.38994C20.8402 4.52009 20.135 3.81494 19.2652 3.81494L4.73516 3.81494C3.86531 3.81494 3.16016 4.52009 3.16016 5.38994
163L3.16016 18.6099C3.16016 19.4798 3.86531 20.1849 4.73516 20.1849H19.2652C20.135 20.1849 20.8402 19.4798 20.8402 18.6099V5.38994ZM18.585 4.68457C19.3444 4.68457 19.96 5.30018 19.96 6.05957V17.9406C19.96 18.7 19.3444 19.3156 18.585 19.3156H5.41549C4.65609 19.3156 4.04049 18.7 4.04049 17.9406L4.04049 6.05957C4.04049 5.30018 4.6561 4.68457 5.41549 4.68457L18.585 4.68457ZM18.71 6.05957C18.71 5.99053 18.654 5.93457 18.585 5.93457L5.41549 5.93457C5.34645 5.93457 5.29049 5.99054 5.29049 6.05957L5.29049 13.4913L7.14816 11.8333C7.4881 11.5298 7.99016 11.4946 8.36915 11.7475L11.4035 13.7726L15.948 9.05501C16.33 8.65847 16.9607 8.64532 17.3588 9.0256L18.71 10.316V6.05957ZM18.71 11.6988L16.6682 9.74878L13.8004 12.7258L13.9119 12.8594C14.0785 13.059 14.3703 13.0976 14.5831 12.9482L16.0566 11.9134C16.5024 11.6002 17.083 11.5535 17.5732 11.7912L18.71 12.3425V11.6988ZM18.71 13.4539L17.1369 12.691C16.9735 12.6117 16.7799 12.6273 16.6313 12.7317L15.1578 13.7665C14.5195 14.2148 13.644 14.099 13.1442 13.5002L13.1025 13.4503L12.2739 14.3105L14.7323 15.4676C14.9822 15.5852 15.0894 15.8831 14.9718 16.133C14.8542 16.3828 14.5563 16.49 14.3065 16.3724L11.5916 15.0946C11.5597 15.0796 11.5301 15.0616 11.503 15.0412L10.5445 14.4015L9.75598 15.1606C9.20763 15.6886 8.35079 15.7221 7.76287 15.2386L7.40631 14.9454C7.26576 14.8298 7.07351 14.7997 6.90436 14.8668L5.29049 15.507L5.29049 17.9406C5.29049 18.0096 5.34645 18.0656 5.41549 18.0656L18.585 18.0656C18.654 18.0656 18.71 18.0096 18.71 17.9406V13.4539ZM7.81405 12.5793L9.69292 13.8332L9.06241 14.4403C8.87963 14.6162 8.59401 14.6274 8.39804 14.4663L8.04147 14.173C7.61983 13.8263 7.04308 13.736 6.53564 13.9373L6.09815 14.1108L7.81405 12.5793ZM9.38337 8.58893C9.38337 8.2421 9.66453 7.96094 10.0114 7.96094C10.3582 7.96094 10.6393 8.2421 10.6393 8.58893C10.6393 8.93576 10.3582 9.21692 10.0114 9.21692C9.66453 9.21692 9.38337 8.93576 9.38337 8.58893ZM10.0114 6.96094C9.11225 6.96094 8.38337 7.68981 8.38337 8.58893C8.38337 9.48804 9.11225 10.2169 10.0114 10.2169C10.9105 10.2169 11.6393 9.48804 11.6393 8.58893C11.6393 7.68981 10.9105 6.96094 10.0114 6.96094Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},516904,8127,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["BlockMathSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M20.0457 3.03378C20.376 2.7842 20.8457 2.8492 21.0955 3.17928C21.6323 3.88971 22.2815 5.32017 22.699 7.04745C23.1207 8.79244 23.3277 10.9278 22.907 13.0582C22.4871 15.1837 21.5327 17.0069 20.5037 18.3756C19.4921 19.721 18.347 20.7072 17.4832 21.0767C17.1024 21.2394 16.6607 21.0629 16.4978 20.6822C16.3454 20.3253 16.4916 19.9151 16.824 19.731C17.8346 19.2254 18.6323 18.3681 19.3045 17.4742C20.2234 16.2521 21.0677 14.634 21.4363 12.7682C21.8039 10.9069 21.6271 8.99898 21.241 7.40096C20.8505 5.78529 20.2671 4.57045 19.8992 4.08358C19.6497 3.75316 19.7154 3.28346 20.0457 3.03378ZM7.02322 2.94003C7.36769 2.77966 7.78445 2.90248 7.98318 3.23593C8.1949 3.5917 8.07814 4.05229 7.72244 4.26425C7.3224 4.53951 6.97328 4.87074 6.64334 5.22714C6.18529 5.72197 5.67359 6.36158 5.17459 7.10214C4.17164 8.59069 3.25199 10.4405 2.89041 12.3072C2.38971 14.8928 2.87516 17.9083 4.67556 19.9166C4.91444 20.2124 4.89491 20.6473 4.61892 20.9205C4.34297 21.1933 3.90826 21.208 3.61502 20.9664C1.32284 18.8713 0.86522 14.8753 1.41775 12.0221C1.82983 9.8945 2.85796 7.85634 3.93142 6.26327C4.4705 5.46327 5.02886 4.76272 5.54275 4.2076C5.97315 3.74269 6.45323 3.23498 7.02322 2.94003ZM13.6101 9.53964C14.2613 8.93207 15.2373 8.72054 16.0301 8.82479C16.4365 8.87834 16.8678 9.02295 17.2107 9.31405C17.2107 9.31405 17.4185 9.44658 17.6414 9.87264C17.8642 10.299 18.0163 11.3361 17.1726 12.1021C16.5342 12.6819 15.3168 12.5718 15.2254 11.4664C15.1575 10.6436 15.7689 10.5461 15.7791 10.5445C15.901 10.4843 16.1162 10.2308 15.9031 10.2027C15.4562 10.1439 14.89 10.396 14.6326 10.6363C14.0975 11.136 13.3817 12.1481 12.9724 13.1724C12.7691 13.6816 12.6624 14.1434 12.6638 14.5123C12.6654 14.8706 12.7652 15.0803 12.9119 15.2125C13.2749 15.5395 13.6579 15.6457 14.0623 15.6109C14.4914 15.5739 14.9812 15.3728 15.4842 15.0142C15.8213 14.7738 16.2905 14.8521 16.531 15.189C16.7711 15.5262 16.6932 15.9955 16.3562 16.2359C15.7122 16.6951 14.9689 17.0379 14.1912 17.1051C13.3889 17.1742 12.5905 16.9436 11.907 16.3277C11.5457 16.0021 11.3388 15.6008 11.239 15.1822C10.8972 15.6384 10.5507 16.0322 10.2478 16.315C9.67058 16.854 8.77915 17.0924 8.06619 17.0924C7.70236 17.0923 7.29507 17.0316 6.949 16.8433C6.60986 16.6588 6.50762 16.4793 6.50369 16.4723C6.20573 16.1484 5.83569 15.2012 6.40017 14.3238C6.82728 13.66 8.00558
16313.4446 8.27127 14.4244C8.49573 15.2532 7.24003 15.4531 7.9158 15.5855L8.06717 15.5933C8.52785 15.5932 9.00624 15.4227 9.22439 15.2193C9.77288 14.7071 10.5896 13.6314 11.0808 12.5631C11.3265 12.0286 11.4625 11.5543 11.4773 11.19C11.4914 10.8428 11.3976 10.6868 11.2801 10.5963C10.921 10.3206 9.89525 10.2055 9.03787 11.0269L8.97927 11.0777C8.67978 11.3113 8.24689 11.2844 7.9783 11.0045C7.69171 10.7054 7.7017 10.2305 8.00076 9.94393L8.24978 9.72421C9.52897 8.68979 11.2168 8.65653 12.1931 9.40585C12.5421 9.67382 12.7536 10.0121 12.8679 10.3726C13.1174 10.0477 13.3711 9.76281 13.6101 9.53964Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}],516904),e.s(["BlockCodeSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M13.2324 4.77635C13.3702 4.31348 13.8573 4.04915 14.3203 4.1865C14.7832 4.32411 15.0473 4.81137 14.9102 5.2744L10.7686 19.2236C10.6309 19.6865 10.1437 19.9498 9.68066 19.8125C9.21745 19.6749 8.95327 19.1878 9.09082 18.7246L13.2324 4.77635ZM16.4365 8.07615C16.6974 7.70589 17.1936 7.60016 17.5801 7.81736L22.5107 11.2851C22.7434 11.449 22.8818 11.7154 22.8818 12C22.8818 12.2845 22.7443 12.5519 22.5117 12.7158L17.6562 16.1357C17.2612 16.4138 16.7158 16.3187 16.4375 15.9238C16.1594 15.5288 16.2536 14.9834 16.6484 14.7051L20.4873 12L16.5781 9.24022C16.2433 8.94956 16.1759 8.44649 16.4365 8.07615ZM6.34375 7.86424C6.7387 7.5862 7.28419 7.68141 7.5625 8.07615C7.84075 8.47115 7.74645 9.01655 7.35156 9.2949L3.5127 12L7.42188 14.7597C7.75678 15.0503 7.82408 15.5534 7.56348 15.9238C7.3026 16.2941 6.80642 16.4 6.41992 16.1826L1.48926 12.7148C1.25672 12.5509 1.11819 12.2845 1.11816 12C1.11826 11.7155 1.25577 11.448 1.48828 11.2842L6.34375 7.86424Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}],8127)},507646,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["Header1Small",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4248 17.3449C20.3246 17.3572 20.2493 17.4423 20.2493 17.5434V19.0583C20.2493 19.1688 20.3388 19.2583 20.4493 19.2583H28.2973C28.4078 19.2583 28.4973 19.1688 28.4973 19.0583V17.5434C28.4973 17.4423 28.422 17.3572 28.3217 17.3449L26.1504 17.0778C26.0502 17.0654 25.9749 16.9803 25.9749 16.8792V4.92194C25.9749 4.79776 25.8629 4.70359 25.7405 4.72491L20.3949 5.6562C20.2992 5.67288 20.2292 5.75601 20.2292 5.85323V7.2876C20.2292 7.39775 20.3183 7.48717 20.4285 7.4876L22.5725 7.49604C22.6827 7.49648 22.7717 7.58589 22.7717 7.69604V16.8792C22.7717 16.9803 22.6964 17.0654 22.5961 17.0778L20.4248 17.3449ZM4.82378 4.71289C4.71332 4.71289 4.62378 4.80243 4.62378 4.91289V19.0583C4.62378 19.1688 4.71332 19.2583 4.82378 19.2583H7.69082C7.80128 19.2583 7.89082 19.1688 7.89082 19.0583V13.5208C7.89082 13.4104 7.98037 13.3208 8.09082 13.3208H13.7065C13.8169 13.3208 13.9065 13.4104 13.9065 13.5208V19.0583C13.9065 19.1688 13.996 19.2583 14.1065 19.2583H16.9735C17.084 19.2583 17.1735 19.1688 17.1735 19.0583V4.91289C17.1735 4.80243 17.084 4.71289 16.9735 4.71289H14.1065C13.996 4.71289 13.9065 4.80243 13.9065 4.91289V10.4433C13.9065 10.5537 13.8169 10.6433 13.7065 10.6433H8.09082C7.98037 10.6433 7.89082 10.5537 7.89082 10.4433V4.91289C7.89082 4.80243 7.80128 4.71289 7.69082 4.71289H4.82378Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"32",height:"24",viewBox:"0 0 32 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},"Header2Small",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.7023 17.4603C18.6687 17.4972 18.6501 17.5452 18.6501 17.5951V18.8315C18.6501 18.942 18.7397 19.0315 18.8501 19.0315H27.6383C27.7488 19.0315 27.8383 18.942 27.8383 18.8315V16.0037C27.8383 15.8933 27.7488 15.8037 27.6383 15.8037H26.1823C26.0793 15.8037 25.9931 15.8819 25.9832 15.9844L25.8754 17.0988C25.8654 17.2013 25.7793 17.2795 25.6763 17.2795H21.5426C21.5266 17.2795 21.5122 17.2698 21.5062 17.2549V17.2549C21.5006 17.2409 21.5036 17.2249 21.5138 17.2138L24.7248 13.7375C25.3215 13.0964 25.8166 12.5125 26.2102 11.9856C26.6101 11.4524 26.9084 10.9382 27.1052 10.4431C27.3083 9.948 27.4099 9.43701 27.4099 8.91016C27.4099 8.13574 27.2321 7.45337 26.8767 6.86304C26.5212 6.27271 26.0166 5.80933 25.3628 5.4729C24.7089 5.13647 23.9282 4.96826 23.0205 4.96826C22.0683 4.96826 21.2463 5.15869 20.5544 5.53955C19.8625 5.92041 19.3325 6.43774 18.9643 7.09155C18.604 7.74257 18.4326 8.47225 18.4499 9.2806C18.4501 9.28749 18.4513 9.29434 18.4534 9.30087V9.30087C18.4629 9.3291 18.4893 9.34814 18.519 9.34814H20.4687C20.5791 9.34814 20.6682 9.25844 20.6727 9.14808C20.7029 8.41863 20.9015 7.84421 21.2685 7.4248C21.6684 6.96777 22.2365 6.73926 22.9729 6.73926C23.6711 6.73926 24.2043 6.95508 24.5725 7.38672C24.947 7.81836 25.1342 8.34839 25.1342 8.97681C25.
1631342 9.31958 25.0739 9.65918 24.9533 9.99561C24.8391 10.3257 24.6391 10.697 24.3535 11.1096C24.0678 11.5159 23.6743 11.9983 23.1728 12.5569L18.7023 17.4603ZM5.05474 5.21338C4.94428 5.21338 4.85474 5.30292 4.85474 5.41338V18.8316C4.85474 18.942 4.94428 19.0316 5.05474 19.0316H6.73961C6.85007 19.0316 6.93961 18.942 6.93961 18.8316V13.2063C6.93961 13.0959 7.02915 13.0063 7.13961 13.0063H13.6285C13.7389 13.0063 13.8285 13.0959 13.8285 13.2063V18.8316C13.8285 18.942 13.918 19.0316 14.0285 19.0316H15.7201C15.8305 19.0316 15.9201 18.942 15.9201 18.8316V5.41338C15.9201 5.30292 15.8305 5.21338 15.7201 5.21338H14.0285C13.918 5.21338 13.8285 5.30292 13.8285 5.41338V11.0184C13.8285 11.1288 13.7389 11.2184 13.6285 11.2184H7.13961C7.02915 11.2184 6.93961 11.1288 6.93961 11.0184V5.41338C6.93961 5.30292 6.85007 5.21338 6.73961 5.21338H5.05474Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"32",height:"24",viewBox:"0 0 32 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},"Header3Small",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5185 18.2898C20.1108 18.5796 20.8075 18.7245 21.6087 18.7245C22.4311 18.7245 23.1768 18.5732 23.8459 18.2707C24.5149 17.9638 25.0646 17.5377 25.495 16.9923C25.9297 16.4468 26.1981 15.8182 26.3004 15.1066C26.4283 14.2799 26.294 13.5704 25.8977 12.978C25.5115 12.3903 24.9205 12.0093 24.1247 11.8352C24.1038 11.8306 24.0888 11.8122 24.0888 11.7909V11.7909C24.0888 11.7709 24.102 11.7533 24.1211 11.7475C24.8271 11.5331 25.4214 11.1698 25.9041 10.6577C26.3984 10.1379 26.6967 9.5093 26.799 8.77208C26.8927 8.13714 26.8224 7.55546 26.5881 7.02706C26.3579 6.49865 25.9829 6.07464 25.4631 5.75504C24.9474 5.43544 24.3061 5.27563 23.5391 5.27563C22.8189 5.27563 22.1456 5.42265 21.5192 5.71669C20.8927 6.00646 20.3665 6.41129 19.9403 6.93117C19.5671 7.39115 19.3156 7.91283 19.1858 8.49623C19.159 8.61663 19.2533 8.72734 19.3767 8.72734H20.0434C20.1422 8.72734 20.2254 8.65495 20.2462 8.55835C20.3391 8.12647 20.529 7.74814 20.816 7.42336C21.1442 7.05262 21.5447 6.76711 22.0177 6.56683C22.4908 6.36228 22.9872 6.26001 23.5071 6.26001C24.044 6.26001 24.4915 6.36441 24.8494 6.57322C25.2074 6.77777 25.4631 7.06541 25.6165 7.43615C25.7699 7.80262 25.8104 8.22663 25.7379 8.70816C25.6655 9.23657 25.4694 9.6968 25.1498 10.0888C24.8302 10.4809 24.4275 10.7856 23.9417 11.0029C23.456 11.216 22.9254 11.3225 22.3501 11.3225H21.8463C21.7467 11.3225 21.6622 11.3959 21.6483 11.4946L21.5641 12.0917C21.5471 12.2121 21.6406 12.3197 21.7621 12.3197H22.2479C22.9467 12.3197 23.5305 12.4326 23.9993 12.6584C24.468 12.8843 24.8089 13.1996 25.022 13.6045C25.2351 14.005 25.3033 14.4695 25.2266 14.9979C25.1541 15.5349 24.9453 16.0079 24.6001 16.417C24.2592 16.8261 23.8288 17.1478 23.3089 17.3822C22.7933 17.6123 22.2308 17.7273 21.6214 17.7273C21.0504 17.7273 20.5561 17.6251 20.1385 17.4205C19.7251 17.216 19.414 16.9283 19.2052 16.5576C19.0324 16.2443 18.9508 15.8899 18.9606 15.4944C18.9635 15.3757 18.8717 15.2728 18.753 15.2728H18.0457C17.9449 15.2728 17.8592 15.3478 17.8513 15.4483C17.8037 16.0542 17.9141 16.5944 18.1825 17.069C18.4808 17.5888 18.9261 17.9958 19.5185 18.2898ZM6.51038 5.45459C6.41134 5.45459 6.32722 5.52708 6.31258 5.62504L4.41638 18.3159C4.39832 18.4368 4.49196 18.5455 4.61418 18.5455H5.31548C5.41456 18.5455 5.49871 18.473 5.5133 18.375L6.36379 12.6628C6.37838 12.5648 6.46253 12.4922 6.56161 12.4922H13.6934C13.8156 12.4922 13.9092 12.6008 13.8912 12.7217L13.0583 18.316C13.0403 18.4369 13.1339 18.5455 13.2561 18.5455H13.9512C14.0503 18.5455 14.1344 18.473 14.149 18.3751L16.0452 5.68414C16.0633 5.56326 15.9696 5.45459 15.8474 5.45459H15.1525C15.0534 5.45459 14.9693 5.5271 14.9547 5.62508L14.1043 11.3246C14.0896 11.4226 14.0055 11.4951 13.9064 11.4951H6.77465C6.65244 11.4951 6.5588 11.3864 6.57684 11.2656L7.40962 5.6841C7.42766 5.56323 7.33403 5.45459 7.21181 5.45459H6.51038Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"32",height:"24",viewBox:"0 0 32 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},"ParagraphSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M7.56396 18.5455V5.45459H11.9873C13.0142 5.45459 13.8537 5.63996 14.5057 6.0107C15.162 6.37
163718 15.6478 6.87362 15.9631 7.50004C16.2785 8.12646 16.4361 9.06841 16.4361 9.83971C16.4361 10.611 16.2785 11.5754 15.9631 12.206C15.652 12.8367 15.1705 13.3396 14.5185 13.7146C13.8665 14.0853 13.0313 14.2707 12.0128 14.2707H9.14919V12.8644H11.9617C12.6648 12.8644 13.2294 12.743 13.6556 12.5001C14.0817 12.2572 14.3907 11.929 14.5824 11.5157C14.7785 11.0981 14.8765 10.3639 14.8765 9.83971C14.8765 9.31556 14.7785 8.60374 14.5824 8.19039C14.3907 7.77703 14.0796 7.45317 13.6492 7.21879C13.2188 6.98016 12.6478 6.86084 11.9361 6.86084H9.14919V18.5455H7.56396Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},687065,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["BlueskyLinkTiny",0,e=>{let r,i=(0,n.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M14.7656 6.8848C15.2697 6.936 15.6629 7.36233 15.6631 7.87992V12.5694C15.6629 13.1215 15.2153 13.5694 14.6631 13.5694C14.1112 13.5691 13.6632 13.1213 13.6631 12.5694V10.2998L9.0332 14.9444L8.95801 15.0137C8.56577 15.3348 7.98589 15.3128 7.61914 14.9473C7.2283 14.5574 7.22747 13.9243 7.61719 13.5332L12.2549 8.87992H9.97461C9.42248 8.87973 8.97461 8.43208 8.97461 7.87992C8.97476 7.32786 9.42256 6.88008 9.97461 6.87992H14.6631L14.7656 6.8848ZM10.1865 1.73441C11.2384 0.927212 12.9424 0.30268 12.9424 2.29007C12.9422 2.64827 12.7609 5.04537 12.6299 5.87992H9.97461C8.87028 5.88006 7.97479 6.77558 7.97461 7.87992C7.97471 8.94304 8.80439 9.80948 9.85156 9.87308L7.8291 11.9024C7.1776 11.2583 6.81468 10.1744 6.66602 9.72855C6.58459 9.48423 6.58532 9.48426 6.50391 9.72855C6.20317 10.6309 5.02953 14.1504 2.34668 11.3369C0.9339 9.85511 1.58769 8.37313 4.15918 7.92582C2.68806 8.18169 1.03394 7.75832 0.580078 6.10062C0.449563 5.62339 0.227775 2.68937 0.227539 2.29007C0.227539 0.30268 1.93158 0.927212 2.9834 1.73441C4.44103 2.85312 6.00924 5.12071 6.58496 6.33793C7.16077 5.12075 8.72884 2.85305 10.1865 1.73441Z",fill:"currentColor"})}),i[0]=r):r=i[0],r}])},651937,981410,443223,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["CommentEmptyTiny",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.89622 10.3817L10.3363 10.2916L10.6959 10.5606C11.0946 10.8589 11.5378 11.1226 11.9493 11.2563C12.1971 11.3369 12.4399 11.3748 12.6632 11.3862C12.6398 11.3361 12.6182 11.2849 12.5986 11.2327L12.5784 11.1788C12.4909 10.946 12.4058 10.7197 12.3521 10.4886C12.2876 10.2117 12.2725 9.95727 12.2725 9.65473V9.10989L12.7304 8.81448C13.1791 8.52488 13.6191 7.91809 13.6191 6.45488C13.6191 5.05595 13.3068 4.05231 12.588 3.3768C11.8546 2.68746 10.5325 2.18237 8.1478 2.18237C6.48717 2.18237 5.11676 2.4908 4.17957 3.16758C3.29107 3.8092 2.67651 4.86585 2.67651 6.66696C2.67651 7.59257 3.05948 8.52302 3.94542 9.23888C4.84213 9.96345 6.31703 10.5153 8.56098 10.5153C9.0187 10.5153 9.46722 10.4695 9.89622 10.3817ZM13.4638 12.3367L13.4247 12.343C12.9441 12.4181 12.3059 12.4237 11.6403 12.2074C11.083 12.0262 10.5398 11.6928 10.0969 11.3613C9.60084 11.4629 9.08508 11.5153 8.56098 11.5153C6.16141 11.5153 4.44114 10.9251 3.31693 10.0167C2.1903 9.10636 1.67651 7.88721 1.67651 6.66696C1.67651 4.60444 2.40039 3.2189 3.59413 2.35686C4.77702 1.50266 6.39427 1.18237 8.1478 1.18237C10.6421 1.18237 12.2701 1.70568 13.2729 2.64811C14.2789 3.59362 14.6191 4.92613 14.6191 6.45488C14.6191 8.12643 14.1019 9.1196 13.2725 9.65473C13.2725 10.182 13.3259 10.3243 13.5248 10.8546L13.5349 10.8816C13.5792 10.9996 13.6496 11.1222 13.7294 11.2324L13.7308 11.2344C13.8104 11.3441 13.8993 11.4413 13.981 11.5091L13.9812 11.5093C14.0243 11.5451 14.0653 11.5727 14.1019 11.5896C14.1019 11.5896 14.2766 11.6522 14.2741 11.8717C14.2711 12.1295 14.1019 12.1609 14.1019 12.1609C14.0393 12.1881 13.9603 12.2169 13.8672 12.2446L13.867 12.2447C13.842 12.2521 13.816 12.2595 13.7889 12.2667C13.6923 12.2926 13.5832 12.3167 13.4638 12.3367ZM1.97491 11.1316C1.78181 10.9342 1.7853 10.6176 1.98271 10.4246C2.18011 10.2315 2.49667 10.2349 2.68977 10.4324C3.9238 11.6939 5.73211 12.3694 8.36319 12.3694C8.839 12.3694 9.30532 12.3214 9.75031 12.2291L9.96769 12.1841L10.1469 12.3151C10.5457 12.6067 11.0144 12.883 11.4665 13.0234C12.3294 13.2916 13.2154 13.2513 13.9249 13.0246C14.1879 12.9406 14.4693 13.0857 14.5533 13.3488C14.6374 13.6118 14.4923 13.8932 14.2292 13.9772C13.3347 14.263 12.2387 14.3105 11.1698 13.9784C10.6484 13.8164 10.1492 13.5339 9.73649 13.25C9.29042 13.3289 8.82989 13.3694 8.36319 13.3694C5.56008 13.3694 3.45553 12.6453 1.97491 11.1316Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}],651937),e.s(["CommentFilledSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M3.84473 16.418C4.07937 16.1648 4.47535 16.1501 4.72852 16.3848C6.82089 18.3237 10.402 19.3576 14.4121 18.8037L14.6406 18.7715L14.835 18.8965C16.5184 19.9759 17.8807 20.1831 19.1455 19.96C19.4853 19.9001 19.8091 20.1271 19.8691 20.4668C19.9288 20.8066 19.7021 21.1315 19.3623 21.1914C17.8051 21.466 16.
1631894 21.193 14.3584 20.0703C10.1596 20.5945 6.26835 19.5153 3.87891 17.3008C3.62591 17.0663 3.61058 16.6712 3.84473 16.418ZM12.2891 3.7627C15.7037 3.76279 17.9328 4.4793 19.3057 5.76953C20.6828 7.06404 21.1484 8.88856 21.1484 10.9814C21.1484 13.2698 20.0176 15.094 18.3086 16.292C18.3679 16.4258 18.4307 16.5586 18.4951 16.6865C18.683 17.059 19.038 17.4141 19.4258 17.7109C19.8102 18.0051 20.2057 18.2267 20.4463 18.3379L20.9521 18.5713L20.4404 18.7939C19.9153 19.022 18.5416 19.3354 17.0703 18.8574C16.3075 18.6095 15.5634 18.1529 14.957 17.6992C14.2781 17.8382 13.5718 17.9101 12.8545 17.9102C9.56959 17.9102 7.21402 17.1018 5.6748 15.8584C4.13237 14.6121 3.42878 12.9421 3.42871 11.2715C3.42879 8.44808 4.41967 6.55132 6.05371 5.37109C7.67324 4.20166 9.88831 3.7627 12.2891 3.7627ZM8.95605 11.916L7.08789 11.4043L6.9502 12.2764L8.74023 12.418L7.58984 13.916L8.46484 14.3613L9.22168 12.7031L10.0576 14.3613L10.9023 13.916L9.73242 12.418L11.542 12.2764L11.4043 11.4043L9.5166 11.916L9.71289 10.0957H8.75L8.95605 11.916ZM15.041 11.916L13.1738 11.4043L13.0361 12.2764L14.8252 12.418L13.6748 13.916L14.5498 14.3613L15.3066 12.7031L16.1426 14.3613L16.9883 13.916L15.8184 12.418L17.627 12.2764L17.4893 11.4043L15.6016 11.916L15.7988 10.0957H14.835L15.041 11.916ZM12.0137 7.64062L10.1455 7.12891L10.0078 8.00098L11.7969 8.14258L10.6475 9.64062L11.5215 10.0859L12.2793 8.42773L13.1143 10.0859L13.96 9.64062L12.79 8.14258L14.5986 8.00098L14.4609 7.12891L12.5742 7.64062L12.7705 5.82031H11.8066L12.0137 7.64062Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}],981410),e.s(["CommentEmptySmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M3.84473 16.418C4.07937 16.1648 4.47535 16.1501 4.72852 16.3848C6.82087 18.3237 10.402 19.3576 14.4121 18.8037L14.6406 18.7715L14.835 18.8965C16.5184 19.9759 17.8808 20.183 19.1455 19.96C19.4853 19.9001 19.8091 20.1271 19.8691 20.4668C19.9288 20.8066 19.7021 21.1315 19.3623 21.1914C17.8051 21.466 16.1894 21.193 14.3584 20.0703C10.1596 20.5945 6.26833 19.5153 3.87891 17.3008C3.62592 17.0663 3.61061 16.6712 3.84473 16.418ZM12.2881 3.7627C15.7031 3.7627 17.9327 4.47921 19.3057 5.76953C20.6828 7.06404 21.1484 8.88856 21.1484 10.9814C21.1484 13.2698 20.0176 15.094 18.3086 16.292C18.3679 16.4258 18.4297 16.5586 18.4941 16.6865C18.6819 17.0591 18.9871 17.4101 19.375 17.707C19.7595 18.0013 19.9112 18.0024 20.1221 18.1631C20.3325 18.3239 20.2843 18.7273 20.0957 18.8096C19.5708 19.0376 18.5417 19.3355 17.0703 18.8574C16.3074 18.6095 15.5635 18.1529 14.957 17.6992C14.2781 17.8383 13.5719 17.9101 12.8545 17.9102C9.56924 17.9102 7.21304 17.1021 5.67383 15.8584C4.13146 14.6121 3.42878 12.942 3.42871 11.2715C3.42879 8.44799 4.41958 6.55131 6.05371 5.37109C7.67319 4.20161 9.88736 3.76273 12.2881 3.7627ZM12.2881 5.2627C10.0267 5.26273 8.18257 5.68357 6.93164 6.58691C5.75535 7.43651 4.92879 8.8402 4.92871 11.2715C4.92878 12.5001 5.43579 13.7368 6.61719 14.6914C7.81517 15.6593 9.80282 16.4102 12.8545 16.4102C13.4723 16.4101 14.0778 16.348 14.6562 16.2295C15.0235 16.1544 15.4036 16.2197 15.7227 16.4092L15.8555 16.498C16.2575 16.7988 16.6894 17.0704 17.1084 17.2627C17.0492 17.1418 16.991 17.0209 16.9375 16.9004C16.6469 16.245 16.8602 15.475 17.4473 15.0635C18.8092 14.1088 19.6484 12.7189 19.6484 10.9814C19.6484 9.08323 19.2247 7.75183 18.2783 6.8623C17.3093 5.95163 15.5387 5.2627 12.2881 5.2627Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}],443223)},87592,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["DeleteSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.682 3.11103C9.4724 3.23448 8.89352 3.67017 8.73295 4.09426C8.57457 4.51256 8.71273 5.20871 9.51183 6.08877C9.86249 6.47497 10.3151 6.86398 10.8567 7.2317C11.521 7.68272 12.3093 8.09493 13.1874 8.42742C14.7679 9.02584 16.286 9.23267 17.4457 9.11431C18.6553 8.99087 19.2342 8.55517 19.3948 8.13109C19.5553 7.707 19.4102 6.99716 18.5856 6.10354C17.7951 5.24678 16.5208 4.39634 14.9403 3.79793C13.3598 3.19951 11.8417 2.99268 10.682 3.11103ZM10.5297 1.61879C11.9666 1.47215 13.7204 1.73212 15.4714 2.39511C17.2225 3.0581 18.7086 4.02485 19.6881 5.08636C20.6335 6.11101 21.2677 7.42054 20.7976 8.66223C20.4763 9.51081 19.7476 10.0415 18.8756 10.3377L18.8512 10.5864C18.8085 11.0201 18.7488 11.6195 18.6804 12.2826C18.5439 13.6052 18.3721 15.193 18.2332 16.2206C18.0958 17.2367 17.9216 18.1654 17.782 18.8394C17.7065 19.2037 17.6277 19.5677 17.5385 19.9289C17.3496 20.8304 16.5864 21.4845 15.7038 21.895C14.7878 22.321 13.5933 22.5626 12.2528 22.5626C9.70265 22.5626 7.61297 21.8776 6.98728 20.0005C6.8862 19.6168 6.80407 19.2278 6.72362 18.8394C6.58403 18.1654 6.40982 17.2367 6.27245 16.2206C6.13295 15.1888 5.96088 13.4661 5.82457 12.0139C5.75617 11.2852 5.69637 10.6201 5.65367 10.1372C5.63217 9.89407 5.61097 9.65088 5.58999 9.40767C5.57932 9.28304 5.58998 9.16406 5.60549 9.03837C5.71664 8.13769 6.61126 7.27662 8.06548 6.69616C7.34029 5.75314 6.92513 4.63277 7.33013 3.56312C7.80026 2.32143 9.14275 1.76033 10.5297 1.61879ZM17.1289 10.6396C17.1998 10.6367 17.2702 10.633 17.3398 10.6283C17.2993 11.0382 17.2469 11.56 17.1883 12.1287C17.0517 13.4526 16.882 15.0185 16.7467 16.0196C16.5497 17.4769 16.2709 18.7602 16.145 19.3048C16.121 19.4087 16.0961 19.5125 16.0714 19.6162C16.0259 19.8437 15.774 20.2081 15.0713 20.5349C14.3961 20.8489 13.4274 21.0626 12.2528 21.0626C9.79771 21.0626 8.71725 20.3951 8.41916 19.552C8.39914 19.4697 8.37966 19.3873 8.36059 19.3048C8.31867 19.1234 8.25973 18.86 8.19244 18.5352C8.05767 17.8845 7.89033 16.9916 7.75893 16.0196C7.62416 15.0228 7.45468 13.3299 7.31801 11.8738C7.28819 11.5561 7.26001 11.2505 7.23417 10.9669C7.3779 11.0411 7.52304 11.1123 7.66588 11.1824C7.78804 11.2424 7.90851 11.3016 8.02495 11.361C8.50725 11.6069 9.07475 11.811 9.70356 11.9612C10.4756 12.1457 11.3401 12.249 12.2528 12.249C14.3262 12.249 16.1049 11.5603 17.1289 10.6396ZM13.8382 5.4146C13.6815 5.78286 13.2605 5.9648 12.8828 5.82179C12.4954 5.67512 12.3002 5.24219 12.4469 4.85481C12.5697 4.53047 12.8562 4.18935 13.3052 4.0074C13.7683 3.8197 14.3267 3.83032 14.949 4.06593C15.5712 4.30154 15.9966 4.66339 16.2193 5.11078C16.4352 5.54447 16.4239 5.98976 16.3011 6.31411C16.1544 6.70148 15.7215 6.89661 15.3341 6.74994C14.9564 6.60693 14.7615 6.19178
16314.8879 5.81206C14.8869 5.8057 14.8841 5.79446 14.8765 5.77925C14.8604 5.74695 14.7761 5.60439 14.4178 5.46874C14.0596 5.33309 13.9019 5.38404 13.8685 5.39759C13.8528 5.40397 13.8432 5.41054 13.8382 5.4146ZM9.032 12.9912C9.39109 12.9721 9.67224 13.2642 9.69072 13.6111C9.71588 14.0747 9.7415 14.5382 9.76856 15.0016C9.81412 15.782 9.87062 16.6895 9.91555 17.2239C9.98125 18.0053 10.0742 18.693 10.1161 18.9847C10.1701 19.3602 10.074 19.7752 9.6166 19.8464C9.17393 19.9154 8.93368 19.5441 8.87883 19.1625C8.83468 18.8554 8.73864 18.1456 8.66995 17.3287C8.62347 16.7759 8.56612 15.8528 8.52068 15.0745C8.4935 14.609 8.46777 14.1434 8.44249 13.6778C8.42412 13.333 8.67585 13.01 9.032 12.9912ZM16.0647 13.6483C16.083 13.3036 15.8183 13.0094 15.4736 12.9912C15.1289 12.9729 14.8347 13.238 14.8164 13.5827L14.8164 13.584C14.7907 14.0566 14.7647 14.5292 14.7371 15.0016C14.6915 15.782 14.635 16.6895 14.5901 17.2239C14.5463 17.7451 14.4905 18.2237 14.4456 18.5723C14.4215 18.7593 14.3965 18.9464 14.3676 19.1328C14.3145 19.4738 14.548 19.7933 14.889 19.8464C15.2301 19.8995 15.5496 19.666 15.6027 19.325L15.6029 19.324C15.6333 19.1271 15.6599 18.9296 15.6853 18.732C15.7318 18.3708 15.7899 17.8731 15.8357 17.3287C15.8822 16.7759 15.9395 15.8528 15.9849 15.0745C16.0127 14.5998 16.0389 14.1251 16.0646 13.6503L16.0647 13.6483ZM12.9954 14.4678C12.9954 14.1226 12.7156 13.8428 12.3704 13.8428C12.0253 13.8428 11.7454 14.1226 11.7454 14.4678L11.7454 19.3657C11.7454 19.7109 12.0253 19.9907 12.3704 19.9907C12.7156 19.9907 12.9954 19.7109 12.9954 19.3657L12.9954 14.4678ZM8.34005 10.25C8.61619 10.25 8.84005 10.0261 8.84005 9.75C8.84005 9.47386 8.61619 9.25 8.34005 9.25C8.06391 9.25 7.84005 9.47386 7.84005 9.75C7.84005 10.0261 8.06391 10.25 8.34005 10.25ZM8.34005 10.75C8.89233 10.75 9.34005 10.3023 9.34005 9.75C9.34005 9.19772 8.89233 8.75 8.34005 8.75C7.78777 8.75 7.34005 9.19772 7.34005 9.75C7.34005 10.3023 7.78777 10.75 8.34005 10.75ZM11.4369 10.75C11.713 10.75 11.9369 10.5261 11.9369 10.25C11.9369 9.97386 11.713 9.75 11.4369 9.75C11.1607 9.75 10.9369 9.97386 10.9369 10.25C10.9369 10.5261 11.1607 10.75 11.4369 10.75ZM11.4369 11.25C11.9891 11.25 12.4369 10.8023 12.4369 10.25C12.4369 9.69772 11.9891 9.25 11.4369 9.25C10.8846 9.25 10.4369 9.69772 10.4369 10.25C10.4369 10.8023 10.8846 11.25 11.4369 11.25Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},276452,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["DeleteTiny",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M4.84013 0.946324C5.45222 0.762486 6.19573 0.729124 6.97782 0.820347C7.32039 0.860495 7.56546 1.1711 7.52568 1.51371C7.48568 1.85656 7.17517 2.10252 6.83232 2.06253C6.16005 1.98415 5.5998 2.02378 5.20048 2.14359C4.79524 2.26531 4.64378 2.43772 4.59599 2.56351C4.34149 3.23723 5.58865 4.19255 6.08232 4.51761C6.54562 4.82266 7.09489 5.10483 7.70536 5.33597C8.80491 5.75229 9.85164 5.90795 10.6409 5.84769C11.4848 5.78311 11.8008 5.50429 11.8714 5.31839C11.9189 5.19263 11.9202 4.96386 11.6976 4.60453C11.478 4.25029 11.0842 3.84861 10.5286 3.46195C10.2455 3.26479 10.1754 2.87508 10.3724 2.59183C10.5696 2.30876 10.9592 2.23946 11.2425 2.43656C11.8885 2.88612 12.4235 3.40237 12.7601 3.94535C13.0932 4.48275 13.2786 5.13116 13.0403 5.76078C12.9083 6.10935 12.6779 6.37566 12.3909 6.57621C12.366 6.82447 12.311 7.37448 12.2425 8.01957C12.1491 8.89816 12.0306 9.96291 11.9329 10.6856C11.809 11.602 11.638 12.5144 11.4153 13.4121C11.237 14.0305 10.6957 14.4725 10.0989 14.75C9.43935 15.0567 8.58506 15.2285 7.63212 15.2285C5.83513 15.2285 4.30017 14.7464 3.83818 13.3604C3.76287 13.0881 3.70695 12.8096 3.6497 12.5332C3.55128 12.058 3.42826 11.4025 3.33134 10.6856C3.23301 9.95806 3.11264 8.74578 3.01689 7.72562C2.96878 7.21315 2.92679 6.74483 2.89677 6.40531C2.87398 6.14754 2.83052 5.88349 2.86454 5.62503C2.95213 4.95974 3.29709 4.69093 3.98271 4.32035C3.46821 3.68093 3.13499 2.89278 3.42704 2.12113C3.66559 1.49131 4.23434 1.12831 4.84013 0.946324ZM4.26103 7.60843C4.35712 8.63219 4.47618 9.82018 4.5706 10.5186C4.66257 11.1989 4.7799 11.8245 4.87431 12.2803C4.92135 12.5074 4.9622 12.6916 4.9915 12.8184C5.24073 13.8967 6.74216 13.9785 7.63212 13.9785C8.44689 13.9785 9.11364 13.8297 9.57255 13.6162C9.98848 13.4227 10.1815 13.2132 10.2727 12.8184C10.3608 12.4373 10.5558 11.538 10.6936 10.5186C10.7887 9.81541 10.9059 8.76587 10.9993 7.88675C11.027 7.62595 11.0512 7.38071 11.0735 7.16507C10.278 7.59273 9.18805 7.88086 7.96318 7.88089C7.26324 7.88089 6.60019 7.80834 6.0081 7.67875C5.37465 7.54007 4.79262 7.29359 4.20732 7.02347C4.22408 7.20782 4.24189 7.4046 4.26103 7.60843ZM5.65849 9.89847C
1635.93369 9.87744 6.17434 10.0843 6.1956 10.3594C6.21921 10.6683 6.24342 10.9585 6.26396 11.1602C6.29655 11.4801 6.34417 11.7883 6.38407 12.0176C6.40539 12.1401 6.4278 12.2622 6.45341 12.3838C6.51991 12.6498 6.33262 12.9262 6.06962 12.9825C5.79972 13.0399 5.55695 12.8734 5.47587 12.5977C5.43009 12.442 5.42115 12.3183 5.39872 12.1895C5.3563 11.9458 5.30461 11.6127 5.26884 11.2618C5.24694 11.0467 5.22223 10.7457 5.19853 10.4356C5.17773 10.1606 5.38354 9.91976 5.65849 9.89847ZM5.59208 8.40238C6.25224 8.40238 6.25244 9.45121 5.59208 9.45121C4.93177 9.4506 4.93197 8.40299 5.59208 8.40238ZM9.06767 1.26566C9.29634 1.00742 9.69106 0.983602 9.9495 1.21195C10.2079 1.44072 10.2319 1.83535 10.0032 2.09378L9.137 3.07132L8.9622 3.54496C8.84186 3.86848 8.48103 4.03346 8.15751 3.91312C7.83456 3.79265 7.67047 3.43357 7.79032 3.11039L8.00614 2.52738C8.03292 2.45553 8.07353 2.38952 8.12431 2.33207L9.06767 1.26566Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},155687,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["DoubleArrowRightTiny",0,e=>{let r,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.05487 2.30299L13.8044 7.31194C14.1702 7.69772 14.1702 8.30228 13.8044 8.68806L9.05487 13.697C8.6718 14.101 8.05073 14.101 7.66767 13.697C7.2846 13.293 7.2846 12.638 7.66767 12.234L11.6824 8L7.66767 3.76597C7.2846 3.36198 7.2846 2.70698 7.66767 2.30299C8.05073 1.899 8.6718 1.899 9.05487 2.30299Z",fill:"currentColor"}),i=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6745 2.30299L8.42399 7.31194C8.78978 7.69772 8.78978 8.30228 8.42399 8.68806L3.6745 13.697C3.29143 14.101 2.67036 14.101 2.2873 13.697C1.90423 13.293 1.90423 12.638 2.2873 12.234L6.30201 8L2.2873 3.76597C1.90423 3.36198 1.90423 2.70698 2.2873 2.30299C2.67036 1.899 3.29143 1.899 3.6745 2.30299Z",fill:"currentColor"}),o[0]=r,o[1]=i):(r=o[0],i=o[1]),o[2]!==e?(a=(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r,i]}),o[2]=e,o[3]=a):a=o[3],a}])},432801,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["GoBackTiny",0,e=>{let r,i=(0,n.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M7.40426 3L2.19592 8M2.19592 8L7.40426 13M2.19592 8H13.8041",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),i[0]=r):r=i[0],r}])},743937,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["LinkSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.8125 3.92454C15.5169 2.52852 12.5243 3.25775 11.1283 5.55333L9.5103 8.21387C8.3889 10.0579 8.63885 12.3517 9.97045 13.9064C10.5675 14.6034 11.225 14.7498 11.7074 14.1675C12.2349 13.5307 11.8609 13.0473 11.5113 12.5952C11.468 12.5392 11.425 12.4838 11.3843 12.4285C10.7201 11.5292 10.6256 10.2815 11.2424 9.26723L12.8604 6.60669C13.6747 5.26772 15.4202 4.84237 16.7592 5.65665C18.0981 6.47092 18.5235 8.21646 17.7092 9.55543L16.0912 12.216C16.1369 12.7333 16.0617 13.4912 15.9517 13.9157C15.7904 14.538 15.6285 14.8863 15.502 15.1586C15.4845 15.1961 15.4678 15.2322 15.4517 15.2674C16.4058 14.8919 17.2495 14.2129 17.8233 13.2693L19.4413 10.6088C20.8373 8.3132 20.1081 5.32057 17.8125 3.92454ZM12.8718 17.7788L14.4898 15.1182C15.6464 13.2164 15.3442 10.836 13.9011 9.28159C13.5008 8.85043 12.8953 8.58987 12.3355 9.18193C11.7653 9.78495 12.2092 10.43 12.576 10.8488C13.2264 11.5914 13.4175 12.98 12.7577 14.0649L11.1397 16.7254C10.3255 18.0644 8.57993 18.4897 7.24096 17.6755C5.902 16.8612 5.47665 15.1156 6.29092 13.7767L7.9089 11.1161C7.90733 11.0611 7.90421 11.0044 7.90091 10.9444C7.88489 10.6535 7.86453 10.2837 7.99595 9.63388C8.15834 8.83095 8.36147 8.43969 8.50523 8.16278C8.52368 8.12724 8.54115 8.09358 8.55743 8.06118C7.59961 8.43591 6.75246 9.11618 6.17679 10.0628L4.55882 12.7233C3.16279 15.0189 3.89203 18.0115 6.18761 19.4076C8.48319 20.8036 11.4758 20.0744 12.8718 17.7788Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},74863,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["LockTiny",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1.52121C6.18249 1.52121 4.70911 2.99459 4.70911 4.8121V6.51834H4.67383C3.8454 6.51834 3.17383 7.18992 3.17383 8.01834V11.9686C3.17383 13.3493 4.29312 14.4686 5.67383 14.4686H10.3262C11.7069 14.4686 12.8262 13.3493 12.8262 11.9686V8.01834C12.8262 7.18991 12.1546 6.51834 11.3262 6.51834H11.2909V4.8121C11.2909 2.99459 9.8175 1.52121 8 1.52121ZM9.94088 6.51834V4.8121C9.94088 3.74018 9.07192 2.87121 8 2.87121C6.92807 2.87121 6.05911 3.74018 6.05911 4.8121V6.51834H9.94088ZM8.53274 10.603C8.90769 10.4096 9.16406 10.0186 9.16406 9.56766C9.16406 8.9247 8.64284 8.40347 7.99988 8.40347C7.35692 8.40347 6.83569 8.9247 6.83569 9.56766C6.83569 10.0322 7.10778 10.4332 7.50128 10.62L7.30909 12.3318C7.29246 12.48 7.40842 12.6097 7.55753 12.6097H8.44741C8.59476 12.6097 8.71015 12.4829 8.69631 12.3362L8.53274 10.603Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},681299,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["MoreOptionsTiny",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 4C4.5 3.17157 3.82843 2.5 3 2.5C2.17157 2.5 1.5 3.17157 1.5 4C1.5 4.82843 2.17157 5.5 3 5.5C3.82843 5.5 4.5 4.82843 4.5 4ZM8 2.5C8.82843 2.5 9.5 3.17157 9.5 4C9.5 4.82843 8.82843 5.5 8 5.5C7.17157 5.5 6.5 4.82843 6.5 4C6.5 3.17157 7.17157 2.5 8 2.5ZM13 2.5C13.8284 2.5 14.5 3.17157 14.5 4C14.5 4.82843 13.8284 5.5 13 5.5C12.1716 5.5 11.5 4.82843 11.5 4C11.5 3.17157 12.1716 2.5 13 2.5Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"8",viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},642448,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["QuoteSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M16.7949 7.38542C17.9558 7.38542 18.8084 7.67608 19.3525 8.25651C19.8603 8.87319 20.1143 9.65325 20.1143 10.5964V11.3581C20.1142 12.8453 19.6792 14.4781 18.8086 16.2555C17.0255 19.9698 12.2552 20.9527 12.0156 20.238C11.8204 19.6524 13.4757 19.2384 14.6699 17.5368C15.3351 16.5889 15.5976 15.7254 15.5977 14.2419C14.8724 14.060
1635 14.3469 13.7154 14.0205 13.2077C13.6578 12.6999 13.4756 12.0835 13.4756 11.3581V10.5964C13.4756 9.65333 13.748 8.87317 14.292 8.25651C14.7998 7.67613 15.6342 7.38547 16.7949 7.38542ZM5.19141 7.74479C6.97464 4.02989 11.7458 3.04715 11.9844 3.76237C12.1796 4.34789 10.5242 4.76176 9.33008 6.46354C8.6649 7.4115 8.40234 8.27486 8.40234 9.75847C9.12765 9.93988 9.65307 10.2849 9.97949 10.7926C10.3422 11.3005 10.5244 11.9168 10.5244 12.6423V13.404C10.5244 14.3471 10.2521 15.1271 9.70801 15.7438C9.20018 16.3242 8.36578 16.6149 7.20508 16.6149C6.04423 16.6149 5.19162 16.3242 4.64746 15.7438C4.13958 15.1271 3.88574 14.3472 3.88574 13.404V12.6423C3.88575 11.1549 4.32077 9.52235 5.19141 7.74479Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},895604,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["RecommendFilledSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M20.1058 13.5537C20.3082 13.2743 20.6984 13.2118 20.9779 13.414C21.2572 13.6163 21.3204 14.0065 21.1185 14.2861C18.8089 17.4759 15.7737 19.3847 13.3978 20.7499C13.0985 20.9219 12.7163 20.8186 12.5443 20.5195C12.3724 20.2202 12.4756 19.8379 12.7747 19.6659C15.1205 18.318 17.9593 16.5182 20.1058 13.5537ZM5.96025 4.49706C7.17619 3.93809 9.13408 3.91929 10.4134 4.90233C11.1836 5.49426 11.619 6.04473 11.9632 6.63475C12.3074 6.04484 12.7527 5.49416 13.5228 4.90233C14.8021 3.91923 16.7599 3.93906 17.9759 4.49804C19.0182 4.97724 19.9315 5.86233 20.3656 7.29295C20.7236 8.47332 20.6616 9.61109 20.3656 10.8554C19.5976 14.0828 14.9919 17.2637 12.3118 18.8036C12.2108 18.8617 12.0762 18.8906 11.9632 18.8906C11.8501 18.8907 11.7255 18.8618 11.6243 18.8036C8.94425 17.2637 4.3386 14.0827 3.57059 10.8554C3.27453 9.61111 3.21258 8.47329 3.57059 7.29295C4.00462 5.86219 4.91789 4.97626 5.96025 4.49706ZM7.35185 11.7666C7.09535 11.4417 6.62327 11.3863 6.29814 11.6425C5.9734 11.8991 5.91778 12.3712 6.17412 12.6962C7.47857 14.3499 8.42647 14.9796 10.2659 16.2304C10.6082 16.4625 11.0751 16.3731 11.3079 16.0312C11.5402 15.6889 11.4507 15.2221 11.1087 14.9892C9.27694 13.7436 8.50116 13.2236 7.35185 11.7666ZM5.79911 7.45408C5.40772 7.31879 4.97946 7.52663 4.84403 7.91795C4.74105 8.21598 4.67606 8.59724 4.66532 8.97361C4.65485 9.34339 4.69467 9.78935 4.86552 10.1826C5.03073 10.5617 5.47237 10.7356 5.85185 10.5713C6.23154 10.4063 6.40613 9.96371 6.2415 9.58396C6.19255 9.47092 6.15719 9.27138 6.16435 9.01657C6.17145 8.76803 6.21738 8.54144 6.26298 8.40916C6.39824 8.01782 6.19034 7.58956 5.79911 7.45408Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},133643,779521,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["SearchSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.3882 13.4918C16.0902 13.4116 16.8207 13.6407 17.3591 14.1791L17.368 14.188L17.3679 14.1881L20.8268 17.7645C21.7593 18.7021 21.7577 20.218 20.822 21.1537C19.8848 22.0909 18.3652 22.0909 17.428 21.1537L17.4191 21.1448L17.4192 21.1447L13.9603 17.5684C13.4304 17.0355 13.2022 16.3159 13.2755 15.6222L12.5856 14.9162C11.5587 15.5303 10.3576 15.8831 9.07417 15.8831C5.28991 15.8831 2.22216 12.8154 2.22216 9.03113C2.22216 5.24687 5.28991 2.17912 9.07417 2.17912C12.8584 2.17912 15.9262 5.24687 15.9262 9.03114C15.9262 10.4458 15.4975 11.7603 14.7629 12.8519L15.3882 13.4918ZM15.0363 16.5233C15.3829 16.5101 15.7131 16.3963 15.9528 16.1619C16.2057 15.9149 16.3227 15.6029 16.3364 15.2792L19.7526 18.8114L19.7525 18.8114L19.7614 18.8203C20.1128 19.1717 20.1128 19.7416 19.7614 20.093C19.4112 20.4432 18.8442 20.4445 18.4924 20.0968L15.0363 16.5233ZM9.07417 3.92912C6.25641 3.92912 3.97216 6.21337 3.97216 9.03113C3.97216 11.8489 6.25641 14.1331 9.07417 14.1331C11.8919 14.1331 14.1762 11.8489 14.1762 9.03114C14.1762 6.21337 11.8919 3.92912 9.07417 3.92912ZM10.2779 11.7018C10.4564 12.1657 10.2251 12.6865 9.76119 12.865C9.47813 12.974 9.18509 12.9893 8.95246 12.979C8.70872 12.9683 8.46274 12.926 8.23733 12.8706C7.80084 12.7632 7.33708 12.5802 7.01053 12.3667C6.55802 12.0708 5.66109 11.4318 5.39409 10.3237C5.27767 9.84042 5.57502 9.35431 6.05825 9.23788C6.54148 9.12146 7.02759 9.41881 7.14402 9.90204C7.23429 10.2767 7.57343 10.5841 7.99558 10.8601C8.10636 10.9325 8.36702 11.0488 8.66713 11.1226C8.81002 11.1578 8.93539 11.1765 9.03167 11.1808C9.09302 11.1835 9.12443 11.1795 9.13263 11.1784L9.13269 11.1784C9.59197 11.0126 10.1017 11.2439 10.2779 11.7018ZM5.5481 6.89456C5.19301 7.32017 5.25018 7.95304 5.67578 8.30813C6.10138 8.66322 6.73425 8.60606 7.08934 8.18046C7.44443 7.75485 7.38727 7.12198 6.96167 6.76689C6.53607 6.4118 5.90319 6.46896 5.5481 6.89456Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}],133643),e.s(["TagSmall",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M6.72467 12.065C7.3108 11.6577 8.11602 11.8032 8.5235 12.3893C8.93088 12.9754 8.78635 13.7806 8.20026 14.1881C7.72319 14.5197 7.10087 14.4854 6.66608 14.1451C5.6484 14.4853 4.81236 15.2231 4.3
1631256 16.1021C3.73575 17.1169 3.65902 18.2144 4.12213 19.0484C4.47731 19.6876 5.18264 20.0117 6.20514 20.0758C7.22138 20.1393 8.37845 19.9287 9.3399 19.6812C10.7978 19.3061 11.89 19.606 12.584 20.2672C12.9149 20.5824 13.1265 20.9561 13.2393 21.3121C13.3463 21.6497 13.3853 22.0412 13.2784 22.3863C13.1557 22.7818 12.7354 23.003 12.3399 22.8805C11.9689 22.7654 11.7507 22.3889 11.8262 22.0162L11.8419 21.9518C11.8386 21.9605 11.8509 21.8957 11.8096 21.7652C11.7675 21.6322 11.6837 21.4816 11.5489 21.3531C11.3113 21.127 10.7896 20.8563 9.71295 21.1334C8.70042 21.394 7.3632 21.6522 6.11139 21.5738C4.86592 21.4958 3.52842 21.0674 2.81158 19.7779C2.02826 18.368 2.24712 16.6994 3.00787 15.3609C3.68152 14.176 4.82017 13.1659 6.2403 12.7066C6.32636 12.4555 6.49002 12.2282 6.72467 12.065ZM19.9464 11.7271C20.2297 11.5306 20.6186 11.6012 20.8155 11.8844C21.0123 12.1677 20.9424 12.5565 20.6592 12.7535L13.0342 18.0504C12.5945 18.3558 12.0716 18.5201 11.5362 18.5201H6.94928C6.60423 18.5201 6.32351 18.2401 6.3233 17.8951C6.32356 17.5503 6.60351 17.2704 6.9483 17.2701L11.5362 17.2711C11.8166 17.2711 12.091 17.184 12.3214 17.024L19.9464 11.7271ZM14.669 1.39902C15.4624 0.847523 16.5528 1.04335 17.1046 1.83652L21.3663 7.9664C21.9179 8.75983 21.722 9.85015 20.9288 10.4019L12.252 16.4352C11.8686 16.7016 11.4113 16.8423 10.9444 16.8375L6.69147 16.7935C6.27743 16.7892 5.94511 16.4498 5.94928 16.0357C5.95367 15.6217 6.293 15.2893 6.70709 15.2935L10.96 15.3375C11.1156 15.339 11.2678 15.2915 11.3956 15.2027L20.0723 9.1705C20.1855 9.09164 20.2136 8.93615 20.1348 8.82285L15.8731 2.69296C15.7943 2.57985 15.6387 2.55191 15.5255 2.63046L6.88873 8.63437C6.74865 8.73176 6.64607 8.87505 6.59772 9.03867L5.64459 12.2682C5.52741 12.6654 5.11018 12.893 4.71295 12.776C4.31582 12.6587 4.08894 12.2415 4.20612 11.8443L5.15826 8.61386C5.30323 8.1228 5.6119 7.69523 6.03229 7.40292L14.669 1.39902ZM14.086 5.54355C14.1404 5.5563 14.1874 5.59162 14.2149 5.64023L15.0626 7.14706L16.5167 5.84726C16.5594 5.80926 16.6162 5.79077 16.6729 5.79745C16.7299 5.80432 16.782 5.83608 16.8145 5.88339L17.4844 6.85995C17.5169 6.90725 17.5277 6.96644 17.5137 7.02206C17.4996 7.07758 17.4621 7.12477 17.4112 7.15097L15.6739 8.03964L16.796 9.40097C16.8316 9.44425 16.8477 9.5017 16.8399 9.55722C16.832 9.61254 16.8009 9.66223 16.7549 9.69394L15.9327 10.2574C15.8866 10.289 15.8299 10.3001 15.7755 10.2877C15.7208 10.275 15.6731 10.2398 15.6456 10.191L14.7823 8.65976L13.8008 9.58456C13.7863 9.5982 13.7699 9.60998 13.752 9.61874L12.4571 10.2516L13.5762 11.6109C13.6119 11.6542 13.628 11.7116 13.6202 11.7672C13.6123 11.8225 13.5812 11.8722 13.5352 11.9039L12.713 12.4674C12.6669 12.499 12.6092 12.5101 12.5547 12.4977C12.5007 12.4851 12.4545 12.4501 12.4268 12.4019L11.5499 10.8697L10.1046 12.1646C10.0618 12.203 10.0044 12.2222 9.94733 12.2154C9.89045 12.2085 9.83922 12.1767 9.8067 12.1295L9.1358 11.1529C9.10345 11.1057 9.09259 11.0463 9.10651 10.9908C9.12065 10.9351 9.1588 10.8871 9.21002 10.8609L10.9376 9.97812L9.84381 8.63925C9.80844 8.59592 9.79291 8.53934 9.80084 8.48398C9.80882 8.42869 9.83975 8.37888 9.8858 8.34726L10.7081 7.78378C10.7543 7.75217 10.8117 7.74085 10.8663 7.75351C10.9208 7.76625 10.9677 7.80144 10.9952 7.85019L11.8419 9.35312L12.8985 8.3746C12.9131 8.36104 12.9293 8.34908 12.9473 8.34042L14.1612 7.75742L13.0645 6.43027C13.0288 6.38701 13.0128 6.33052 13.0206 6.27499C13.0284 6.21943 13.0593 6.16905 13.1055 6.1373L13.9278 5.57382C13.9739 5.54231 14.0316 5.53098 14.086 5.54355Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}],779521)},811256,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["TagTiny",0,e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M3.70775 9.003C3.96622 8.90595 4.25516 9.03656 4.35228 9.29499C4.37448 9.35423 4.38309 9.41497 4.38255 9.47468C4.38208 9.6765 4.25946 9.86621 4.05931 9.94148C3.36545 10.2021 2.74535 10.833 2.42747 11.5479C2.33495 11.7561 2.27242 11.9608 2.239 12.1573C2.15817 12.6374 2.25357 13.069 2.52513 13.3858C2.92043 13.8467 3.51379 14.0403 4.20189 14.0665C4.88917 14.0925 5.59892 13.9482 6.12571 13.8126C7.09158 13.5639 7.81893 13.6157 8.29954 13.9415C8.67856 14.1986 8.83462 14.578 8.8347 14.9298
163C8.83502 15.0506 8.81652 15.1682 8.78294 15.2764C8.7009 15.5398 8.42049 15.6873 8.15696 15.6055C7.89935 15.5253 7.75386 15.2555 7.82396 14.9971C7.82572 14.9905 7.8258 14.9833 7.82786 14.9766C7.83167 14.9643 7.834 14.9503 7.8347 14.9356C7.83623 14.8847 7.8147 14.823 7.739 14.7716C7.61179 14.6853 7.23586 14.5616 6.37474 14.7833C5.81779 14.9266 4.99695 15.1 4.1638 15.0684C3.33126 15.0368 2.41412 14.7967 1.76536 14.0401C1.30175 13.4992 1.16206 12.8427 1.22728 12.1993C1.23863 12.086 1.25554 11.9732 1.27903 11.8614C1.28235 11.8457 1.28624 11.8302 1.28978 11.8145C1.34221 11.5817 1.41832 11.3539 1.51439 11.1378C1.92539 10.2136 2.72927 9.37064 3.70775 9.003ZM13.8972 7.54695C14.124 7.38948 14.4359 7.44622 14.5935 7.67292C14.7508 7.89954 14.6948 8.21063 14.4685 8.36823L8.65892 12.4044C8.24041 12.695 7.74265 12.8515 7.23314 12.8516H3.9138C3.63794 12.8515 3.41315 12.6274 3.41282 12.3516C3.41282 12.0755 3.63769 11.8517 3.9138 11.8516H7.23216C7.538 11.8516 7.8374 11.7575 8.0886 11.5831L13.8972 7.54695ZM10.1609 0.550851C10.6142 0.235853 11.2372 0.347685 11.5525 0.800851L14.6091 5.19734C14.9239 5.65063 14.8121 6.27369 14.3591 6.58894L7.88841 11.087C7.63297 11.2645 7.32837 11.3586 7.01732 11.3555L4.1804 11.3262C3.76371 11.3218 3.38443 11.1921 3.072 10.9776C3.23822 10.7748 3.43062 10.5959 3.63646 10.4503C3.96958 10.5767 4.35782 10.5421 4.67259 10.3233C5.17899 9.97084 5.30487 9.27438 4.95286 8.76765C4.60048 8.26108 3.90304 8.13639 3.39622 8.48835C3.17656 8.64127 3.02799 8.85895 2.9597 9.09773C2.69658 9.26211 2.45194 9.45783 2.23118 9.67585C2.17892 9.38285 2.19133 9.07163 2.28294 8.76081L3.14818 5.8282C3.24483 5.50092 3.45101 5.21639 3.73118 5.02155L10.1609 0.550851ZM8.76732 3.73835L9.73607 4.91023L8.68626 5.41804L7.79466 6.24323L7.04857 4.91804L6.26634 5.45417L7.22923 6.63386L5.72337 7.40437L6.34739 8.31355L7.60814 7.18464L8.37767 8.53132L9.15989 7.99421L8.17454 6.79792L9.27708 6.25788L10.1179 5.46589L10.8786 6.81452L11.6609 6.27741L10.6745 5.07917L12.1882 4.30476L11.5642 3.39558L10.2976 4.52839L9.54954 3.20124L8.76732 3.73835Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}])},282436,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["ZoomListItemSmall",0,e=>{let r,i,a,o,s,l,c,u=(0,n.c)(8);return u[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("circle",{cx:"4.4",cy:"6.2",r:"1.3",fill:"currentColor"}),i=(0,t.jsx)("circle",{cx:"4.4",cy:"12",r:"1.3",fill:"currentColor"}),a=(0,t.jsx)("circle",{cx:"4.4",cy:"17.8",r:"1.3",fill:"currentColor"}),o=(0,t.jsx)("path",{d:"M8.2 6.2H19.5M8.2 12H10.5M8.2 17.8H9.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),s=(0,t.jsx)("circle",{cx:"15.5",cy:"14.5",r:"4",stroke:"currentColor",strokeWidth:"2"}),l=(0,t.jsx)("path",{d:"M18.5 17.5L21.5 20.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),u[0]=r,u[1]=i,u[2]=a,u[3]=o,u[4]=s,u[5]=l):(r=u[0],i=u[1],a=u[2],o=u[3],s=u[4],l=u[5]),u[6]!==e?(c=(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r,i,a,o,s,l]}),u[6]=e,u[7]=c):c=u[7],c}])},238713,e=>{"use strict";e.s(["DiscussionButton",()=>h]);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(88891),a=e.i(651937),o=e.i(981410),s=e.i(443223),l=e.i(910131),c=e.i(968562),u=e.i(794866),d=e.i(848023);function h(e){let h,p,m,f,g,y,b=(0,n.c)(24),v=(0,r.useContext)(u.DrawerThreadContext),[x,k]=(0,r.useState)(!1),w=e.showComments&&(e.showWhenEmpty||e.commentsCount>0),C=e.showMentions&&e.quotesCount>0;if(!(w||C))return null;b[0]!==v||b[1]!==e?(h=t=>{t.preventDefault(),t.stopPropagation(),e.onClick?e.onClick(t):v?v.push({type:"standardSitePost",uri:e.documentUri}):(e.onOpenChange?.(!0),k(!0))},b[0]=v,b[1]=e,b[2]=h):h=b[2];let S=h;b[3]!==e.documentUri||b[4]!==e.onPrefetch||b[5]!==e.pageId?(p=e.onPrefetch??(()=>(0,c.prefetchDocumentDiscussion)(e.documentUri,e.pageId)),b[3]=e.documentUri,b[4]=e.onPrefetch,b[5]=e.pageId,b[6]=p):p=b[6];let E=p,T=e.large?d.LargeInteractionButton:d.InteractionButton,I=e.commentsCount+e.quotesCount;b[7]!==e.large||b[8]!==I?(m=I>0?e.large?(0,t.jsx)(o.CommentFilledSmall,{"aria-hidden":!0}):(0,t.jsx)(i.CommentTiny,{"aria-hidden":!0}):e.large?(0,t.jsx)(s.CommentEmptySmall,{"aria-hidden":!0}):(0,t.jsx)(a.CommentEmptyTiny,{"aria-hidden":!0}),b[7]=e.large,b[8]=I,b[9]=m):m=b[9];let D=m,N=`${e.large?"":"hover:text-accent-contrast"} ${e.className??""}`,A=I>0?` ${I}`:null;return b[10]!==T||b[11]!==D||b[12]!==S||b[13]!==E||b[14]!==N||b[15]!==A?(f=(0,t.jsxs)(T,{onClick:S,onMouseEnter:E,onTouchStart:E,ariaLabel:"Post discussions",className:N,children:[D,A]}),b[10]=T,b[11]=D,b[12]=S,b[13]=E,b[14]=N,b[15]=A,b[16]=f):f=b[16],b[17]!==x||b[18]!==v||b[19]!==e?(g=!e.onClick&&!v&&(0,t.jsx)(l.DiscussionModal,{open:x,onOpenChange:t=>{k(t),e.onOpenChange?.(t)},document_uri:e.documentUri,postUrl:e.postUrl,title:e.title,commentsCount:e.commentsCount,quotesCount:e.quotesCount,showComments:e.showComments,showMentions:e.showMentions,pageId:e.pageId}),b[17]=x,b[18]=v,b[19]=e,b[20]=g):g=b[20],b[21]!==f||b[22]!==g?(y=(0,t.jsxs)(t.Fragment,{children:[f,g]}),b[21]=f,b[22]=g,b[23]=y):y=b[23],y}},910131,e=>{"use strict";e.s(["DiscussionContent",()=>
163w,"DiscussionModal",()=>S]);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(857592),a=e.i(791676),o=e.i(899169),s=e.i(788613),l=e.i(465082),c=e.i(126479),u=e.i(912383),d=e.i(902057),h=e.i(794866),p=e.i(278688),m=e.i(596814),f=e.i(308231),g=e.i(968562),y=e.i(4876),b=e.i(432801),v=e.i(155687),x=e.i(69278),k=e.i(132711);function w(e){let i,k,w,S,E,T,I,D,N,A,_,P,M,R,L,j,O,B,F=(0,n.c)(52),H=e.showComments&&(e.commentsCount>0||!!e.showWhenEmpty),U=e.showMentions&&e.quotesCount>0,z=H&&U,$="quotes"===e.initialTab&&U?"quotes":"comments"===e.initialTab&&H||H&&(e.commentsCount>0||!U)?"comments":"quotes",[V,q]=(0,r.useState)($);F[0]!==$||F[1]!==e.open?(i=()=>{e.open&&q($)},F[0]=$,F[1]=e.open,F[2]=i):i=F[2],F[3]!==e.open?(k=[e.open],F[3]=e.open,F[4]=k):k=F[4],(0,r.useEffect)(i,k);let{isLoading:G,data:W,did:K,pages:Y,documentContextValue:Z,comments:X}=(0,g.useDocumentDiscussionData)(e.document_uri,e.open);F[5]!==e.initialThread?(w=e.initialThread?[e.initialThread]:[],F[5]=e.initialThread,F[6]=w):w=F[6];let[Q,J]=(0,r.useState)(w);F[7]===Symbol.for("react.memo_cache_sentinel")?(E={push:e=>J(t=>{let n=t[t.length-1];return n&&(0,h.sameDrawerThread)(n,e)?t:[...t,e]})},F[7]=E):E=F[7],S=E;let ee=Q[Q.length-1],et=(0,r.useRef)(null);F[8]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{et.current?.scrollIntoView({block:"nearest"})},F[8]=T):T=F[8],F[9]!==Q.length?(I=[Q.length],F[9]=Q.length,F[10]=I):I=F[10],(0,r.useEffect)(T,I),F[11]!==W?.quotesAndMentions?(D=W?.quotesAndMentions??[],F[11]=W?.quotesAndMentions,F[12]=D):D=F[12],F[13]!==e.pageId||F[14]!==D?(N=(0,g.filterQuotesForPage)(D,e.pageId),F[13]=e.pageId,F[14]=D,F[15]=N):N=F[15];let en=N;F[16]===Symbol.for("react.memo_cache_sentinel")?(A=(0,t.jsx)("div",{ref:et}),F[16]=A):A=F[16];let er=`discussionModalStickyHeader sticky top-0 z-10 bg-bg-page! ${e.bgColor?e.bgColor:" sm:bg-[var(--color-bg-light)]!"} -mx-3 ${e.headerClassName}`;return F[17]!==ee||F[18]!==z||F[19]!==H||F[20]!==e.commentsCount||F[21]!==e.quotesCount||F[22]!==V||F[23]!==Q.length?(_=ee?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[Q.length>=2&&(0,t.jsx)("button",{className:"text-tertiary hover:text-secondary shrink-0","aria-label":"Back to the top of the thread",onClick:()=>J([]),children:(0,t.jsx)(v.DoubleArrowRightTiny,{className:"rotate-180"})}),(0,t.jsxs)("button",{className:"flex items-center gap-1 text-tertiary hover:text-secondary font-bold text-sm",onClick:()=>J(C),children:[(0,t.jsx)(b.GoBackTiny,{})," Back"]})]}):z?(0,t.jsx)(a.ToggleGroup,{fullWidth:!0,value:V,onChange:e=>q(e),options:[{value:"comments",label:e.commentsCount>0?`Comments (${e.commentsCount})`:"Comments"},{value:"quotes",label:(0,t.jsxs)("div",{children:["Bluesky ",(0,t.jsx)("span",{className:"hidden sm:inline",children:"Mentions"})," ",e.quotesCount>0&&`(${e.quotesCount})`]})}]}):(0,t.jsx)("div",{className:"font-bold text-tertiary text-sm! ",children:H?e.commentsCount>0?`Comments (${e.commentsCount})`:"Comments":`Bluesky Mentions (${e.quotesCount})`}),F[17]=ee,F[18]=z,F[19]=H,F[20]=e.commentsCount,F[21]=e.quotesCount,F[22]=V,F[23]=Q.length,F[24]=_):_=F[24],F[25]!==e.postLinkButton||F[26]!==e.postUrl?(P=e.postLinkButton??(0,t.jsx)(o.SpeedyLink,{href:e.postUrl,className:"shrink-0 hover:no-underline!",children:(0,t.jsxs)(x.ButtonPrimary,{className:"text-sm py-[3px]! rounded-lg!",children:[(0,t.jsx)("span",{className:"sm:block hidden",children:"Full "}),"Post ",(0,t.jsx)(y.GoToArrow,{})]})}),F[25]=e.postLinkButton,F[26]=e.postUrl,F[27]=P):P=F[27],F[28]!==_||F[29]!==P?(M=(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-3 pb-2 px-3",children:[_," ",P]}),F[28]=_,F[29]=P,F[30]=M):M=F[30],F[31]===Symbol.for("react.memo_cache_sentinel")?(R=(0,t.jsx)("hr",{className:"border-border-light"}),F[31]=R):R=F[31],F[32]!==er||F[33]!==M?(L=(0,t.jsxs)("div",{className:er,children:[M,R]}),F[32]=er,F[33]=M,F[34]=L):L=F[34],F[35]!==ee||F[36]!==X||F[37]!==W||F[38]!==K||F[39]!==Z||F[40]!==G||F[41]!==Y||F[42]!==e.document_uri||F[43]!==e.pageId||F[44]!==en||F[45]!==V?(j=!W&&G?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 text-tertiary italic text-sm py-8",children:[(0,t.jsx)("span",{children:"loading"}),(0,t.jsx)(s.DotLoader,{})]}):Z?(0,t.jsx)(c.LeafletContentProvider,{value:{pages:Y},children:(0,t.jsx)(l.DocumentProvider,{value:Z,children:(0,t.jsx)(h.DrawerThreadContext.Provider,{value:S,children:ee?.type==="recommends"?(0,t.jsx)(f.RecommendsList,{documentUri:ee.uri}):ee?.type==="standardSitePost"?(0,t.jsx)(m.StandardSitePostDrawerView,{uri:ee.uri,tab:"comments"}):ee?.type==="thread"||ee?.type==="quotes"?(0,t.jsx)(p.ThreadView,{parentUri:ee.uri,initialTab:"quotes"===ee.type?"quotes":"replies"}):"comments"===V?(0,t.jsx)(u.CommentsDrawerContent,{document_uri:e.document_uri,comments:X,pageId:e.pageId}):(0,t.jsx)(d.DiscussionDrawerContent,{did:K,quotesAndMentions:en})})})}):null,F[35]=ee,F[36]=X,F[37]=W,F[38]=K,F[39]=Z,F[40]=G,F[41]=Y,F[42]=e.document_uri,F[43]=e.pageId,F[44]=en,F[45]=V,F[46]=j):j=F[46],F[47]!==j?(O=(0,t.jsx)("div",{className:"pb-3 pt-4",children:j}),F[47]=j,F[48]=O):O=F[48],F[49]!==L||F[50]!==O?(B=(0,t.jsxs)(t.Fragment,{children:[A,
163L,O]}),F[49]=L,F[50]=O,F[51]=B):B=F[51],B}function C(e){return e.slice(0,-1)}function S(e){let r,a,o,s=(0,n.c)(9);return s[0]!==e.document_uri?(r=(0,t.jsx)("div",{className:"standardSitePostBlock block-border overflow-hidden w-full bg-bg-page my-3",children:(0,t.jsx)(k.StandardSitePostItem,{pageWidth:448,uri:e.document_uri,size:"small",hideInteractions:!0})}),s[0]=e.document_uri,s[1]=r):r=s[1],s[2]!==e?(a=(0,t.jsx)(w,{...e}),s[2]=e,s[3]=a):a=s[3],s[4]!==e.onOpenChange||s[5]!==e.open||s[6]!==r||s[7]!==a?(o=(0,t.jsxs)(i.Modal,{sheetOnMobile:!0,open:e.open,onOpenChange:e.onOpenChange,className:"px-3! pt-0! pb-4 gap-0 sm:w-lg max-w-full relative bg-[var(--color-bg-light)]! h-[1000px]!",sheetClassName:"px-3! pt-0!",children:[r,a]}),s[4]=e.onOpenChange,s[5]=e.open,s[6]=r,s[7]=a,s[8]=o):o=s[8],o}},848023,e=>{"use strict";var t=e.i(843476),n=e.i(500932);e.s(["InteractionButton",0,e=>{let r,i,a=(0,n.c)(9),o=`interactionButton relative flex gap-1 items-center ${e.className}`;return a[0]!==e.ariaLabel||a[1]!==e.onClick||a[2]!==e.onMouseEnter||a[3]!==e.onTouchStart?(r=(0,t.jsx)("button",{onClick:e.onClick,onMouseEnter:e.onMouseEnter,onTouchStart:e.onTouchStart,className:"peer absolute inset-0 z-0","aria-label":e.ariaLabel}),a[0]=e.ariaLabel,a[1]=e.onClick,a[2]=e.onMouseEnter,a[3]=e.onTouchStart,a[4]=r):r=a[4],a[5]!==e.children||a[6]!==o||a[7]!==r?(i=(0,t.jsxs)("div",{className:o,children:[r,e.children]}),a[5]=e.children,a[6]=o,a[7]=r,a[8]=i):i=a[8],i},"LargeInteractionButton",0,e=>{let r,i,a=(0,n.c)(9),o=`largeInteractionButton relative flex gap-1 items-center text-accent-contrast py-1 px-2 rounded-full border border-accent-contrast shrink-0 hover:bg-accent-1 hover:text-accent-2 ${e.className}`;return a[0]!==e.ariaLabel||a[1]!==e.onClick||a[2]!==e.onMouseEnter||a[3]!==e.onTouchStart?(r=(0,t.jsx)("button",{onClick:e.onClick,onMouseEnter:e.onMouseEnter,onTouchStart:e.onTouchStart,className:"absolute inset-0","aria-label":e.ariaLabel}),a[0]=e.ariaLabel,a[1]=e.onClick,a[2]=e.onMouseEnter,a[3]=e.onTouchStart,a[4]=r):r=a[4],a[5]!==e.children||a[6]!==o||a[7]!==r?(i=(0,t.jsxs)("div",{className:o,children:[r,e.children]}),a[5]=e.children,a[6]=o,a[7]=r,a[8]=i):i=a[8],i}])},280190,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(620196),a=e.i(793610),o=e.i(416504),s=e.i(857592),l=e.i(794853),c=e.i(806398),u=e.i(929092),d=e.i(815255),h=e.i(124670),p=e.i(755223),m=e.i(671473),f=e.i(509387),g=e.i(475307);let y=e=>{let r,a,o,l,y,b,v,x,k=(0,n.c)(43),{identity:w}=(0,c.useIdentityData)();k[0]!==e.onPosted?(r={onPosted:e.onPosted},k[0]=e.onPosted,k[1]=r):r=k[1];let{editorStateRef:C,charCount:S,setCharCount:E,posting:T,post:I}=(0,g.useBskyPostSubmit)(r),D=w?.bsky_profiles?.record.avatar,N=w?.bsky_profiles?.record.displayName,A=w?.bsky_profiles?.record.handle;k[2]!==D||k[3]!==N||k[4]!==A?(a={avatar:D,displayName:N,handle:A},k[2]=D,k[3]=N,k[4]=A,k[5]=a):a=k[5];let _=a,{title:P,description:M,coverImage:R,publishedAt:L}=e.docRecord,j=e.documentUri?new i.AtUri(e.documentUri).host:void 0,O=!!e.preferUrlScreenshot||!R,B=(0,f.usePrefetchedScreenshot)(e.postUrl,O&&e.shareModalOpen);k[6]!==I||k[7]!==e.docRecord||k[8]!==e.documentUri||k[9]!==e.postUrl||k[10]!==e.pubUri||k[11]!==B||k[12]!==O?(o=()=>{let t=e.postUrl;t&&I(async(n,r)=>{let i=B.promiseRef.current?await B.promiseRef.current??void 0:void 0;return(0,u.publishPostToBsky)({text:n,facets:r,url:t,document_record:e.docRecord,documentUri:e.documentUri,publicationUri:e.pubUri,preferUrlScreenshot:O,prefetchedThumb:i,langs:(0,d.viewerPostLangs)()})})},k[6]=I,k[7]=e.docRecord,k[8]=e.documentUri,k[9]=e.postUrl,k[10]=e.pubUri,k[11]=B,k[12]=O,k[13]=o):o=k[13];let F=o,H=R&&j?(0,h.blobRefToSrc)(R.ref,j,void 0,{width:1200}):void 0,U=e.postUrl??"",z=O?B.previewSrc??void 0:H,$=O&&!B.previewSrc;k[14]!==M||k[15]!==e.pubOwnerDid||k[16]!==e.publication||k[17]!==L||k[18]!==U||k[19]!==z||k[20]!==$||k[21]!==P?(l=(0,p.bskyPostEmbed)({url:U,title:P,description:M,thumb:z,thumbPending:$,publishedAt:L,publication:e.publication,pubOwnerDid:e.pubOwnerDid}),k[14]=M,k[15]=e.pubOwnerDid,k[16]=e.publication,k[17]=L,k[18]=U,k[
16319]=z,k[20]=$,k[21]=P,k[22]=l):l=k[22];let V=l;k[23]!==S||k[24]!==T||k[25]!==F?(y=(0,t.jsx)(g.BskyPostSubmitButton,{posting:T,charCount:S,onClick:F}),k[23]=S,k[24]=T,k[25]=F,k[26]=y):y=k[26];let q=y,G=w&&w.atp_did;k[27]!==S||k[28]!==C||k[29]!==V||k[30]!==G||k[31]!==_||k[32]!==E?(b=G?(0,t.jsx)(g.LazyBlueskyPostComposer,{profile:_,editorStateRef:C,charCount:S,onCharCountChange:E,embed:V,autoFocus:!0,hideCharacterCounter:!0}):(0,t.jsx)(m.LoginContent,{redirectRoute:window.location.href,className:"sm:w-full!"}),k[27]=S,k[28]=C,k[29]=V,k[30]=G,k[31]=_,k[32]=E,k[33]=b):b=k[33];let W=b,K=G?"Share on Bluesky":void 0,Y=G?q:void 0;return k[34]!==G?(v=G&&(0,t.jsx)("div",{className:"spacer w-full h-2 hidden sm:block"}),k[34]=G,k[35]=v):v=k[35],k[36]!==e.setShareModalOpen||k[37]!==e.shareModalOpen||k[38]!==W||k[39]!==K||k[40]!==Y||k[41]!==v?(x=(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(s.Modal,{sheetOnMobile:!0,open:e.shareModalOpen,onOpenChange:e.setShareModalOpen,title:K,actionButton:Y,className:"max-w-full w-lg",children:[v,W]})}),k[36]=e.setShareModalOpen,k[37]=e.shareModalOpen,k[38]=W,k[39]=K,k[40]=Y,k[41]=v,k[42]=x):x=k[42],x};e.s(["BskyShareModal",0,y,"InteractionShareButton",0,e=>{let s,c,u,d,h,p,m,f,g,b,v=(0,n.c)(27),x=(0,a.useSmoker)(),[k,w]=(0,r.useState)(!1);v[0]===Symbol.for("react.memo_cache_sentinel")?(s=function(e){try{return new i.AtUri(e).host}catch{return null}},v[0]=s):s=v[0];let C=s,S=`text-sm flex shrink-0 gap-1 items-center relative font-bold ${e.className}`;return v[1]!==e.trigger?(c=e.trigger?e.trigger:(0,t.jsx)(l.ShareTiny,{role:"img","aria-label":"Share"}),v[1]=e.trigger,v[2]=c):c=v[2],v[3]!==S||v[4]!==c?(u=(0,t.jsx)("div",{className:S,children:c}),v[3]=S,v[4]=c,v[5]=u):u=v[5],v[6]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(o.MenuItem,{onSelect:()=>w(!0),children:"Share on Bluesky"}),v[6]=d):d=v[6],v[7]!==e.postUrl||v[8]!==x?(h=(0,t.jsx)(o.MenuItem,{onSelect:n=>{if(n.stopPropagation(),n.preventDefault(),!e.postUrl)return;navigator.clipboard.writeText(e.postUrl);let r=n.target.getBoundingClientRect();x({text:(0,t.jsx)("strong",{children:"Copied Link!"}),position:{y:r.top,x:r.left}})},children:"Copy Link"}),v[7]=e.postUrl,v[8]=x,v[9]=h):h=v[9],v[10]!==u||v[11]!==h?(p=(0,t.jsxs)(o.Menu,{trigger:u,children:[d,h]}),v[10]=u,v[11]=h,v[12]=p):p=v[12],v[13]!==e.documentUri?(m=(e.documentUri?C(e.documentUri):void 0)||void 0,v[13]=e.documentUri,v[14]=m):m=v[14],v[15]===Symbol.for("react.memo_cache_sentinel")?(f=()=>w(!1),v[15]=f):f=v[15],v[16]!==e.documentUri||v[17]!==e.postRecord||v[18]!==e.postUrl||v[19]!==e.pubUri||v[20]!==e.publication||v[21]!==k||v[22]!==m?(g=(0,t.jsx)(y,{postUrl:e.postUrl,docRecord:e.postRecord,documentUri:e.documentUri,publication:e.publication,pubOwnerDid:m,pubUri:e.pubUri,onPosted:f,shareModalOpen:k,setShareModalOpen:w}),v[16]=e.documentUri,v[17]=e.postRecord,v[18]=e.postUrl,v[19]=e.pubUri,v[20]=e.publication,v[21]=k,v[22]=m,v[23]=g):g=v[23],v[24]!==p||v[25]!==g?(b=(0,t.jsxs)(t.Fragment,{children:[p,g]}),v[24]=p,v[25]=g,v[26]=b):b=v[26],b}])},229770,e=>{"use strict";e.s(["InteractionPreview",()=>d,"TagPopover",()=>h]);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(386834),a=e.i(814649),o=e.i(794866),s=e.i(811256),l=e.i(149753),c=e.i(238713),u=e.i(280190);let d=e=>{let r,i,a,o,s=(0,n.c)(22);return s[0]!==e.documentUri||s[1]!==e.recommendsCount||s[2]!==e.showRecommends?(r=!1===e.showRecommends?null:(0,t.jsx)(l.RecommendButton,{documentUri:e.documentUri,recommendsCount:e.recommendsCount}),s[0]=e.documentUri,s[1]=e.recommendsCount,s[2]=e.showRecommends,s[3]=r):r=s[3],s[4]!==e.commentsCount||s[5]!==e.documentUri||s[6]!==e.postRecord.title||s[7]!==e.postUrl||s[8]!==e.quotesCount||s[9]!==e.showComments||s[10]!==e.showMentions?(i=(0,t.jsx)(c.DiscussionButton,{documentUri:e.documentUri,commentsCount:e.commentsCount,quotesCount:e.quotesCount,showComments:e.showComments,showMentions:e.showMentions,postUrl:e.postUrl,title:e.postRecord.title}),s[4]=e.commentsCount,s[5]=e.documentUri,s[6]=e.postRecord.title,s[7]=e.postUrl,s[8]=e.quotesCount,s[9]=e.showComments,s[10]=e.showMentions,s[11]=i):i=s[11],s[12]!==e.documentUri||s[13]!==e.postRecord||s[14]!==e.postUrl||s[15]!==e.pubUri||s[16]!==e.publication?(a=(0,t.jsx)(u.InteractionShareButton,{postRecord:e.postRecord,postUrl:e.postUrl,documentUri:e.documentUri,publication:e.publication,pubUri:e.pubUri}),s[12]=e.documentUri,s[13]=e.postRecord,s[14]=e.postUrl,s[15]=e.pubUri,s[16]=e.publication,s[17]=a):a=s[17],s[18]!==r||s[19]!==i||s[20]!==a?(o=(0,t.jsxs)("div",{className:" text-tertiary text-sm items-center flex gap-4 shrink-0",children:[r,i,a]}),s[18]=r,s[19]=i,s[20]=a,s[21]=o):o=s[21],o},h=e=>{let i,l,c,u,d,h=(0,n.c)(13),m=(0,r.useContext)(o.DrawerThreadContext),[f,g]=(0,r.useState)(!1),y=`${e.tags.length} tag${1===e.tags.length?"":"s"}`;return h[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(s.TagTiny,{"aria-hidden":!0}),h[0]=i):i=h[0],h[1]!==e.tags.length||h[2]!==y?(l=(0,t.jsxs)("div",{className:"relative flex gap-1 items-center hover:text-accent-contrast","aria-label":y,children:[i," ",e.tags.length]}),h[1]=e.tags.length,h[2]=y,h[3]=l):l=h[3],h[4]!==m?(c=m&&(e=>{g(!1),m.push({type:"tag",tag:e})}),h[4]=m,h[5]=c):c=h[5],h[6]!==e.tags||h[7]!==c?(u=(0,t.jsx)(p,{tags:e.tags,className:"text-secondary!",onTagClick:c}),h[6]=e.tags,h[7]=c,h[8]=u):u=h[8],h[9]!==f||h[10]!==l||h[11]!==u?(d=(0,t.jsx)(a.Popover,{open:f,onOpenChange:g,className:"p-2! max-w-xs",trigger:l,children:u}),h[9]=f,h[10]=l,h[11]=u,h[12]=d):d=h[12],d},p=e=>{let r,a,o=(0,n.c)(9);
163if(o[0]!==e.className||o[1]!==e.onTagClick||o[2]!==e.tags){let n;o[4]!==e.className||o[5]!==e.onTagClick?(n=(n,r)=>(0,t.jsx)(i.Tag,{name:n,className:e.className,onClick:e.onTagClick??void 0},r),o[4]=e.className,o[5]=e.onTagClick,o[6]=n):n=o[6],r=e.tags.map(n),o[0]=e.className,o[1]=e.onTagClick,o[2]=e.tags,o[3]=r}else r=o[3];return o[7]!==r?(a=(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",role:"list","aria-label":"Tags",children:r}),o[7]=r,o[8]=a):a=o[8],a}},149753,e=>{"use strict";e.s(["RecommendButton",()=>D]);var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(283599),a=e.i(72545),o=e.i(847451),s=e.i(838854),l=e.i(140677),c=e.i(895604),u=e.i(384847),d=e.i(722935),h=e.i(935593),p=e.i(123838),m=e.i(793610),f=e.i(410275),g=e.i(806398),y=e.i(671473),b=e.i(857592),v=e.i(308231),x=e.i(794866),k=e.i(848023),w=e.i(132711);let C=(0,o.create)({fetcher:async e=>(await (0,h.callRPC)("get_user_recommendations",{documentUris:e})).result,resolver:(e,t)=>e[t]??!1,scheduler:(0,o.windowScheduler)(10)}),S=e=>`recommendation:${e}`,E=e=>`recommendation-count:${e}`;function T(e,t,n){(0,a.mutate)(E(e),e=>t(e??n),{revalidate:!1})}function I(e,t,n){(0,a.mutate)((0,v.getDocumentRecommendsKey)(e),e=>{let r=e??[];return n?r.includes(t)?r:[t,...r]:r.filter(e=>e!==t)},{revalidate:!1})}function D(e){let o,h,b,w,D,A,_,P=(0,n.c)(30),{displayRecommended:M,count:R,recommendPost:L,loginOpen:j,setLoginOpen:O}=function(e,o){let s,l,c,h,p=(0,n.c)(18),{hasRecommended:y,isLoading:b}=function(e){let t,r,a,o,s=(0,n.c)(9),{identity:l}=(0,g.useIdentityData)();s[0]!==e||s[1]!==l?.atp_did?(t=l?.atp_did?S(e):null,s[0]=e,s[1]=l?.atp_did,s[2]=t):t=s[2],s[3]!==e?(r=()=>C.fetch(e),s[3]=e,s[4]=r):r=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(a={revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1},s[5]=a):a=s[5];let{data:c,isLoading:u}=(0,i.default)(t,r,a),d=c??!1;return s[6]!==u||s[7]!==d?(o={hasRecommended:d,isLoading:u},s[6]=u,s[7]=d,s[8]=o):o=s[8],o}(e),{identity:v}=(0,g.useIdentityData)();p[0]!==e?(s=E(e),p[0]=e,p[1]=s):s=p[1],p[2]!==o?(l={fallbackData:o},p[2]=o,p[3]=l):l=p[3];let{data:x}=(0,i.default)(s,null,l),k=void 0===x?o:x,[w,D]=(0,r.useState)(!1),[N,A]=(0,r.useState)(null),[_,P]=(0,r.useState)(!1),M=(0,m.useToaster)(),R=(0,m.useSmoker)(),L=null!==N?N:y;p[4]!==L||p[5]!==e||p[6]!==v||p[7]!==b||p[8]!==w||p[9]!==o||p[10]!==R||p[11]!==M?(c=async n=>{var r;if(n.preventDefault(),n.stopPropagation(),w||b)return;if(!v?.atp_did)return void P(!0);let i=v.atp_did;D(!0),A(!L),T(e,e=>L?e-1:e+1,o),I(e,i,!L),L||R({position:{x:n.clientX,y:n.clientY-16},text:(0,t.jsx)("div",{className:"text-xs",children:"Recc'd!"})});let s=L?await (0,d.unrecommendAction)({document:e}):await (0,u.recommendAction)({document:e});if(!s.success){A(null),T(e,e=>L?e+1:e-1,o),I(e,i,L),D(!1),M({content:(0,f.isOAuthSessionError)(s.error)?(0,t.jsx)(f.OAuthErrorMessage,{error:s.error}):"Oh no! Something went wrong!",type:"error"});return}r=!L,(0,a.mutate)(S(e),r,{revalidate:!1}),A(null),D(!1)},p[4]=L,p[5]=e,p[6]=v,p[7]=b,p[8]=w,p[9]=o,p[10]=R,p[11]=M,p[12]=c):c=p[12];let j=c;return p[13]!==k||p[14]!==L||p[15]!==_||p[16]!==j?(h={displayRecommended:L,count:k,recommendPost:j,loginOpen:_,setLoginOpen:P},p[13]=k,p[14]=L,p[15]=_,p[16]=j,p[17]=h):h=p[17],h}(e.documentUri,e.recommendsCount),[B,F]=(0,r.useState)(!1),H=(0,r.useContext)(x.DrawerThreadContext),U=e.large?k.LargeInteractionButton:k.InteractionButton,z=e.large?c.RecommendFilledSmall:s.RecommendFilledTiny,$=e.large?l.RecommendEmptySmall:s.RecommendEmptyTiny,V=M?"Remove recommend":"Recommend",q=e.large?"":"peer-hover:text-accent-contrast";return P[0]!==$||P[1]!==z||P[2]!==M?(o=M?(0,t.jsx)(z,{}):(0,t.jsx)($,{}),P[0]=$,P[1]=z,P[2]=M,P[3]=o):o=P[3],P[4]!==q||P[5]!==o?(h=(0,t.jsx)("div",{className:q,children:o}),P[4]=q,P[5]=o,P[6]=h):h=P[6],P[7]!==R||P[8]!==H||P[9]!==e?(b=R>0?e.recommendOnly?R:(0,t.jsx)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onOpenRecommends?e.onOpenRecommends():H?H.push({type:"recommends",uri:e.documentUri}):F(!0)},onMouseEnter:()=>(0,v.prefetchDocumentRecommends)(e.documentUri),onPointerDown:()=>(0,v.prefetchDocumentRecommends)(e.documentUri),className:`relative z-10 ${e.large?"":"hover:text-accent-contrast"}`,"aria-label":"See who recommended this",children:R}):null,P[7]=R,P[8]=H,P[9]=e,P[10]=b):b=P[10],P[11]!==U||P[12]!==e.className||P[13]!==L||P[14]!==V||P[15]!==h||P[16]!==b?(w=(0,t.jsxs)(U,{onClick:L,ariaLabel:V,className:e.className,children:[h,b]}),P[11]=U,P[12]=e.className,P[13]=L,P[14]=V,P[15]=h,P[16]=b,P[17]=w):w=P[17],P[18]!==e.documentUri||P[19]!==e.recommendsCount||P[20]!==B?(D=B&&(0,t.jsx)(N,{documentUri:e.documentUri,recommendCount:e.recommendsCount,open:B,onOpenChange:F}),P[18]=e.documentUri,P[19]=e.recommendsCount,P[20]=B,P[21]=D):D=P[21],P[22]!==j||P[23]!==e.documentUri||P[24]!==O?(A=j&&(0,t.jsx)(y.LoginModal,{noEmailLogin:!0,open:j,onOpenChange:O,action:(0,p.encodeActionToSearchParam)({action:"recommend",document:e.documentUri})}),P[22]=j,P[23]=e.documentUri,P[24]=O,P[25]=A):A=P[25],P[26]!==w||P[27]!==D||P[28]!==A?(_=(0,t.jsxs)(t.Fragment,{children:[w,D,A]}),P[26]=w,P[27]=D,P[28]=A,P[29]=_):_=P[29],_}function N(e){let r,i,a,o,s,l,c=(0,n.c)(15);return c[0]!==e.documentUri?(r=(0,t.jsx)("div",{className:"standardSitePostBlock block-border overflow-hidden w-full bg-bg-page my-3",children:(0,t.jsx)(w.StandardSitePostItem,{pageWidth:448,uri:e.documentUri,size:"small",hideInteractions:!0})}),c[0]=e.documentUri,c[1]=r):r=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"font-bold text-tertiary text-sm!",children:"Recommended by"}),c[2]=i):i=c[2],c[3]!==e.documentUri||c[4]!==e.recommendCount?(a=(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 pb-2",children:[i,(0,t.jsx)(D,{documentUri:e.documentUri,recommendsCount:e.recommendCount,recommendOnly:!0,large:!0,className:"sm:p-0! sm:border-none! sm:flex-row-reverse! hover:sm:bg-transparent! sm:h-fit! hover:sm:text-accent-contrast!"})]}),c[3]=e.documentUri,c[4]=e.recommendCount,c[5]=a):a=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("hr",{className:"border-border-light -mx-3 mb-3"}),c[6]=o):o=c[6],c[7]!==e.documentUri?(s=(0,t.jsx)(v.RecommendsList,{documentUri:e.documentUri}),c[7]=e.documentUri,c[8]=s):s=c[8],c[9]!==e.onOpenChange||c[10]!==e.open||c[11]!==r||c[12]!==a||c[13]!==s?(l=(0,t.jsxs)(b.Modal,{sheetOnMobile:!0,open:e.open,onOpenChange:e.onOpenChange,className:"px-3! pt-0! pb-4 gap-0 sm:w-lg max-w-full relative bg-[var(--color-bg-light)]!",sheetClassName:"px-3! pt-0!",children:[r,a,o,s]}),c[9]=e.onOpenChange,c[10]=e.open,c[11]=r,c[12]=a,c[13]=s,c[14]=l):l=c[14],l}},308231,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(283599),i=e.i(271235),a=e.i(935593),o=e.i(645522),s=e.i(788613),l=e.i(732849),c=e.i(921598);let u=e=>`document-recommends:${e}`;async function d(e){return(await (0,a.callRPC)("get_document_recommends",{document:e})).result.dids}async function h(e){let t=await (0,i.preload)(u(e),()=>d(e));(0,c.prefetchContributorProfiles)(t)}e.s(["RecommendsList",0,function(e){let i,a,h,p,m,f=(0,n.c)(15);f[0]!==e.documentUri?(i=u(e.documentUri),f[0]=e.documentUri,f[1]=i):i=f[1],f[2]!==e.documentUri?(a=()=>d(e.documentUri),f[2]=e.documentUri,f[3]=a):a=f[3];let{data:g,isLoading:y}=(0,r.default)(i,a);f[4]!==g?(h=g??[],f[4]=g,f[5]=h):h=f[5];let b=h,{data:v,isLoading:x}=(0,c.useContributorProfiles)(b);if(y||b.length>0&&x){let e;return f[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 text-tertiary italic text-sm py-8",children:[(0,t.jsx)("span",{children:"loading"}),(0,t.jsx)(s.DotLoader,{})]}),f[6]=e):e=f[6],e}if(0===b.length){let e;return f[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"text-tertiary italic text-sm py-8 text-center",children:"No recommends yet"}
163),f[7]=e):e=f[7],e}if(f[8]!==b||f[9]!==v){let e;f[11]!==v?(e=e=>{let n=v?.[e];return(0,t.jsx)(l.ProfilePopover,{className:"z-[60]! w-fit",didOrHandle:n?.handle??e,triggerClassName:"flex items-start gap-2 w-fit",trigger:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Avatar,{src:n?.avatar,displayName:n?.displayName,size:"medium"}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0 text-left",children:[(0,t.jsx)("div",{className:"text-primary font-bold truncate leading-snug",children:n?.displayName||n?.handle||"Unknown user"}),n?.displayName&&n?.handle&&(0,t.jsxs)("div",{className:"text-tertiary text-sm truncate",children:["@",n.handle]})]})]})},e)},f[11]=v,f[12]=e):e=f[12],p=b.map(e),f[8]=b,f[9]=v,f[10]=p}else p=f[10];return f[13]!==p?(m=(0,t.jsx)("div",{className:"flex flex-col gap-3",children:p}),f[13]=p,f[14]=m):m=f[14],m},"getDocumentRecommendsKey",0,u,"prefetchDocumentRecommends",0,h])},434988,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(768834),a=e.i(69497),o=e.i(988314),s=e.i(467592),l=e.i(213459),c=e.i(276452),u=e.i(864460),d=e.i(202145),h=e.i(546296),p=e.i(382548);let m=(0,i.create)(e=>({href:null,anchorElement:null,blockEntityID:null,pageID:null,open:(t,n,r,i)=>e({href:t,anchorElement:n,blockEntityID:r,pageID:i}),close:()=>e({href:null,anchorElement:null,blockEntityID:null,pageID:null})}));function f(e,t,n){e.removeMark(t,n,a.schema.marks.link)}e.s(["LinkPopover",0,function(e){let i,g,y,b,v,x,k,w,C,S,E,T=(0,n.c)(33),{href:I,anchorElement:D,blockEntityID:N,pageID:A,close:_}=m(),{undoManager:P}=(0,s.useReplicache)(),[M,R]=(0,r.useState)(""),L=null!==I&&null!==D&&A===e.pageID,j=null!==I&&M!==I;T[0]!==I?(i=()=>{I&&R(I)},g=[I],T[0]=I,T[1]=i,T[2]=g):(i=T[1],g=T[2]),(0,r.useEffect)(i,g),T[3]!==D||T[4]!==N||T[5]!==_||T[6]!==P?(y=e=>{if(!N||!D)return;let t=o.useEditorStates.getState().editorStates[N];if(!t?.editor||!t.view)return;let n=t.editor,r=t.view.posAtDOM(D,0),i=t.view.posAtDOM(D,D.childNodes.length),{start:s,end:l}=(0,p.findMarkRange)(n.doc,a.schema.marks.link,r,i),c=n.tr;e(c,s,l);let u=n.apply(c);P.add({undo:()=>(0,o.setEditorState)(N,{editor:n}),redo:()=>(0,o.setEditorState)(N,{editor:u})}),(0,o.setEditorState)(N,{editor:u}),_()},T[3]=D,T[4]=N,T[5]=_,T[6]=P,T[7]=y):y=T[7];let O=y;T[8]!==O||T[9]!==M?(b=()=>{O((e,t,n)=>{if(""===M.trim())e.removeMark(t,n,a.schema.marks.link);else{let r=(0,h.ensureProtocol)(M);e.addMark(t,n,a.schema.marks.link.create({href:r}))}})},T[8]=O,T[9]=M,T[10]=b):b=T[10];let B=b;T[11]!==O?(v=()=>{O(f)},T[11]=O,T[12]=v):v=T[12];let F=v;return T[13]===Symbol.for("react.memo_cache_sentinel")?(x=e=>R(e.target.value),T[13]=x):x=T[13],T[14]!==_||T[15]!==B?(k=e=>{"Enter"===e.key&&(e.preventDefault(),B()),"Escape"===e.key&&(e.preventDefault(),_())},T[14]=_,T[15]=B,T[16]=k):k=T[16],T[17]!==M||T[18]!==k?(w=(0,t.jsx)("input",{type:"text",spellCheck:!1,value:M,onChange:x,onKeyDown:k,className:"flex-1 min-w-0 bg-transparent border-none outline-none text-sm text-primary placeholder:text-tertiary",placeholder:"https://example.com"}),T[17]=M,T[18]=k,T[19]=w):w=T[19],T[20]!==F||T[21]!==j||T[22]!==M||T[23]!==B?(C=j?(0,t.jsx)("button",{className:"shrink-0 text-tertiary hover:text-accent-contrast",onMouseDown:e=>{e.preventDefault(),B()},title:"Save link",children:(0,t.jsx)(u.CheckTiny,{})}):(0,t.jsxs)("div",{className:"flex items-center shrink-0 gap-1",children:[(0,t.jsx)("button",{className:"text-tertiary hover:text-accent-contrast",onMouseDown:e=>{e.preventDefault(),window.open((0,h.ensureProtocol)(M),"_blank","noopener,noreferrer")},title:"Open link",children:(0,t.jsx)(l.ExternalLinkTiny,{})}),(0,t.jsx)("button",{className:"text-tertiary hover:text-accent-contrast",onMouseDown:e=>{e.preventDefault(),F()},title:"Remove link",children:(0,t.jsx)(c.DeleteTiny,{})})]}),T[20]=F,T[21]=j,T[22]=M,T[23]=B,T[24]=C):C=T[24],T[25]!==w||T[26]!==C?(S=(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[w,C]}),T[25]=w,T[26]=C,T[27]=S):S=T[27],T[28]!==D||T[29]!==_||T[30]!==L||T[31]!==S?(E=(0,t.jsx)(d.AnchoredPopover,{open:L,anchorElement:D,onClose:_,className:"link-popover px-2 py-1",children:S}),T[28]=D,T[29]=_,T[30]=L,T[31]=S,T[32]=E):E=T[32],E},"useLinkPopoverStore",0,m])},107461,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(641192),i=e.i(271645),a=e.i(794900),o=e.i(814649),s=e.i(817016),l=e.i(467592);let c=(0,e.i(768834).create)(()=>({}));function u(e){return parseInt(e,10)}function d(e){return parseInt(e,10)}function h(e){return e>new Date}e.s(["Backdater",0,e=>{let p,m,f,g,y,b,v,x,k,w,C,S,E=(0,n.c)(28);
163(0,l.useReplicache)(),E[0]!==e.docURI?(p=t=>t[e.docURI]?t[e.docURI]:null,E[0]=e.docURI,E[1]=p):p=E[1];let T=c(p);E[2]!==T||E[3]!==e.publishedAt?(f=T||new Date(e.publishedAt),E[2]=T,E[3]=e.publishedAt,E[4]=f):f=E[4],m=f;let[I,D]=(0,i.useState)(`${m.getHours().toString().padStart(2,"0")}:${m.getMinutes().toString().padStart(2,"0")}`),N=`${new Date().getHours().toString().padStart(2,"0")}:${new Date().getMinutes().toString().padStart(2,"0")}`;E[5]!==m||E[6]!==e.docURI?(g=async t=>{D(t);let[n,r]=t.split(":").map(u),i=new Date(m);i.setHours(n),i.setMinutes(r);let a=new Date;i>a?(c.setState({[e.docURI]:a}),D(N)):c.setState({[e.docURI]:i})},E[5]=m,E[6]=e.docURI,E[7]=g):g=E[7];let A=g;E[8]!==e.docURI||E[9]!==I?(y=async t=>{if(!t)return;let[n,r]=I.split(":").map(d),i=new Date(t);i.setHours(n),i.setMinutes(r);let a=new Date;i>a?(c.setState({[e.docURI]:a}),D(N)):c.setState({[e.docURI]:i})},E[8]=e.docURI,E[9]=I,E[10]=y):y=E[10];let _=y;return E[11]!==m?(b=(0,a.timeAgo)(m.toISOString()),E[11]=m,E[12]=b):b=E[12],E[13]!==b?(v=(0,t.jsx)("div",{className:"underline",children:b}),E[13]=b,E[14]=v):v=E[14],E[15]!==_||E[16]!==m?(x=(0,t.jsx)(r.DatePicker,{selected:m,onSelect:_,disabled:h}),E[15]=_,E[16]=m,E[17]=x):x=E[17],E[18]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsx)(s.Separator,{className:"border-border"}),E[18]=k):k=E[18],E[19]!==A||E[20]!==I?(w=(0,t.jsx)("div",{className:"flex gap-4 pb-1 items-center",children:(0,t.jsx)(r.TimePicker,{value:I,onChange:A})}),E[19]=A,E[20]=I,E[21]=w):w=E[21],E[22]!==x||E[23]!==w?(C=(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[x,k,w]}),E[22]=x,E[23]=w,E[24]=C):C=E[24],E[25]!==C||E[26]!==v?(S=(0,t.jsx)(o.Popover,{className:"w-fit z-10 px-2!",trigger:v,children:C}),E[25]=C,E[26]=v,E[27]=S):S=E[27],S},"useLocalPublishedAt",0,c])},332111,e=>{"use strict";e.s(["AddTags",()=>V,"PublicationMetadata",()=>H,"PublicationMetadataPreview",()=>$],332111);var t=e.i(843476),n=e.i(500932),r=e.i(522016),i=e.i(657688),a=e.i(876082),o=e.i(271645),s=e.i(467592),l=e.i(870370),c=e.i(207342),u=e.i(969202),d=e.i(741514),h=e.i(859015),p=e.i(620196),m=e.i(250209),f=e.i(789606),g=e.i(492122),y=e.i(794900),b=e.i(88891),v=e.i(811256),x=e.i(814649),k=e.i(386834),w=e.i(806398),C=e.i(788244),S=e.i(107461),E=e.i(838854),T=e.i(134087),I=e.i(338448),D=e.i(645522),N=e.i(921598),A=e.i(425481),_=e.i(416504);function P(e){let r,i,o,l,c,u,d,p,m,y=(0,n.c)(21),{permissions:b}=(0,g.useEntitySetContext)(),{rep:v}=(0,s.useReplicache)(),{data:x}=(0,a.useLeafletPublicationData)(),k=(0,f.useSubscribe)(v,j)??[],w=x?.publications?.identity_did;y[0]!==w||y[1]!==x?.publications?.publication_contributors?(r=void 0===w?[]:[w,...(x?.publications?.publication_contributors??[]).filter(e=>e.confirmed&&e.contributor_did!==w).sort(L).map(R)],y[0]=w,y[1]=x?.publications?.publication_contributors,y[2]=r):r=y[2];let C=r,{data:S}=(0,N.useContributorProfiles)(C);if(y[3]!==C||y[4]!==w||y[5]!==S||y[6]!==k){c=Symbol.for("react.early_return_sentinel");e:{if(i=C.map(e=>({contributor_did:e,is_owner:e===w,profile:S?.[e]??null})),C.length<=1){c=null;break e}let e=i.filter(e=>k.includes(e.contributor_did)),n=i.find(M)??null,r=e.length>0?e:n?[n]:[];o="flex gap-0 items-center text-tertiary text-sm",l=0===r.length?(0,t.jsx)("span",{className:"italic",children:"â"}):r.map((e,n)=>(0,t.jsxs)("span",{className:"flex gap-1 items-center",children:[n<r.length-2&&n>0?(0,t.jsx)("span",{children:","}):n===r.length-1&&n>0?(0,t.jsx)("span",{className:"pl-1",children:" and "}):"",(0,t.jsx)("span",{children:B(e)})]},e.contributor_did))}y[3]=C,y[4]=w,y[5]=S,y[6]=k,y[7]=i,y[8]=o,y[9]=l,y[10]=c}else i=y[7],o=y[8],l=y[9],c=y[10];if(c!==Symbol.for("react.early_return_sentinel"))return c;y[11]!==o||y[12]!==l?(u=(0,t.jsx)("div",{className:o,children:l}),y[11]=o,y[12]=l,y[13]=u):u=y[13];let E=u;return b.write?(y[14]!==i||y[15]!==k?(d=(0,t.jsx)(O,{contributors:i,selectedDids:k}),y[14]=i,y[15]=k,y[16]=d):d=y[16],y[17]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(h.Separator,{classname:"h-4!"}),y[17]=p):p=y[17],y[18]!==E||y[19]!==d?(m=(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[E,d,p]}),y[18]=E,y[19]=d,y[20]=m):m=y[20],m):E}function M(e){return e.is_owner}function R(e){return e.contributor_did}function L(e,t){return e.created_at.localeCompare(t.created_at)}function j(e){return e.get("draft_contributors")}let O=e=>{let r,i,a,o,l=(0,n.c)(13),{rep:c}=(0,s.useReplicache)();l[0]!==e.selectedDids||l[1]!==c?.mutate?(r=t=>{c?.mutate.toggleDraftContributor({contributor_did:t,selected:!e.selectedDids.includes(t)})},l[0]=e.selectedDids,l[1]=c?.mutate,l[2]=r):r=l[2];let u=r;if(0!==e.contributors.length){if(l[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"text-accent-contrast",children:"Add"}),l[3]=i):i=l[3],l[4]!==e.contributors||l[5]!==e.selectedDids||l[6]!==u){let n;l[8]!==e.selectedDids||l[9]!==u?(n=n=>{let r=e.selectedDids.includes(n.contributor_did);return(0,t.jsxs)(_.CheckboxMenuItem,{onSelect:e=>{e.preventDefault(),u(n.contributor_did)},checked:r,children:[(0,t.jsx)(D.Avatar,{src:n.profile?.avatar??void 0,displayName:B(n),size:"small"}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0 leading-tight",children:[(0,t.jsx)("span",{className:"truncate",children:B(n)}),n.is_owner&&(0,t.jsx)("span",{className:"text-tertiary text-xs font-normal",children:"Owner"})]})]},n.contributor_did)},l[8]=e.selectedDids,l[9]=u,l[10]=n):n=l[10],a=e.contributors.map(n),l[4]=e.contributors,l[5]=e.selectedDids,l[6]=u,l[7]=a}else a=l[7];return l[11]!==a?(o=(0,t.jsx)(_.Menu,{align:"start",className:"p-1! w-max min-w-[192px]",trigger:i,children:(0,t.jsx)("div",{className:"flex flex-col gap-0.5",children:a})}),l[11]=a,l[12]=o):o=l[12],o}};function B(e){return(0,A.bylineName)(e.profile??{did:e.contributor_did,handle:null,displayName:null})}var F=e.i(69278);let H=e=>{let{rep:n,permission_token:i}=(0,s.useReplicache)(),o=i.id,{data:l,normalizedDocument:c,normalizedPublication:u}=(0,a.useLeafletPublicationData)(),{identity:d}=(0,w.useIdentityData)(),g=(0,f.useSubscribe)(n,e=>e.get("publication_title")),y=(0,f.useSubscribe)(n,e=>e.get("publication_description")),v=(0,f.useSubscribe)(n,e=>e.get("post_preferences")),x=(0,T.mergePreferences)(v||void 0,u?.preferences),k=c?.publishedAt,I=(0,a.useLeafletScheduledPublishAt)();return l?("string"!=typeof g&&(g=l?.title||""),"string"!=typeof y&&(y=l?.description||""),(0,t.jsx)(C.PostHeaderLayout,{compact:e.compact,pubLink:(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[l.publications&&(0,t.jsx)(r.default,{href:d?.atp_did===l.publications?.identity_did?`${(0,m.getBasePublicationURL)(l.publications)}/dashboard`:(0,m.getPublicationURL)(l.publications),className:"leafletMetadata text-accent-contrast font-bold no-underline!",children:l.publications?.name}),(0,t.jsx)("div",{className:"font-bold text-tertiary px-1 h-[20px] text-sm flex place-items-center bg-border-light rounded-md ",children:"DRAFT"})]}),postTitle:(0,t.jsx)(z,{className:"leading-tight pt-0.5 text-2xl font-bold outline-hidden bg-transparent",value:g,onChange:async e=>{await n?.mutate.updatePublicationDraft({title:e,description:y})},placeholder:"Untitled"}),postDescription:e.compact?void 0:(0,t.jsx)(z,{placeholder:"add an optional descriptionâ¦",className:"",value:y,onChange:async e=>{await n?.mutate.updatePublicationDraft({title:g,description:e})}}),postInfo:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex gap-1 items-center",children:[l.publications&&o&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(P,{leaflet_id:o})}),l.doc?(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,t.jsxs)("p",{className:"text-sm text-tertiary",children:["Published"," ",k&&(0,t.jsx)(S.Backdater,{publishedAt:k,docURI:l.doc})]}),(0,t.jsx)(r.default,{target:"_blank",className:"text-sm",href:l.publications?`${(0,m.getPublicationURL)(l.publications)}/${new p.AtUri(l.doc).rkey}`:`/p/${new p.AtUri(l.doc).host}/${new p.AtUri(l.doc).rkey}`,children:"View"})]}):I?(0,t.jsx)(U,{publishAt:I}):(0,t.jsx)("p",{children:"Draft"})]}),!e.noInteractions&&(0,t.jsxs)("div",{className:"flex gap-2 text-border items-center",children:[!1!==x.showRecommends&&(0,t.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,t.jsx)(E.RecommendEmptyTiny,{}),"â"]}),(!1!==x.showComments||!1!==x.showMentions)&&(0,t.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,t.jsx)(b.CommentTiny,{}),"â"]}),(0,t.jsxs)(t.Fragment,{children:[!1!==x.showRecommends||!1!==x.showMentions||!1!==x.showComments?(0,t.jsx)(h.Separator,{classname:"h-4!"}):null,(0,t.jsx)(V,{}),(0,t.jsx)(h.Separator,{classname:"h-4!"}),(0,t.jsx)(q,{})]})]})]})})):null},U=e=>{let r,i,a=(0,n.c)(3);a[0]===Symbol.for("react.memo_cache_sentinel")?(r={month:"short",day:"numeric",year:"numeric"},a[0]=r):r=a[0];let o=(0,I.useLocalizedDate)(e.publishAt,r);return a[1]!==o?(i=(0,t.jsxs)("p",{children:["Scheduled for ",o]}),a[1]=o,a[2]=i):i=a[2],i},z=e=>{let r,i,a,l,c=(0,n.c)(14),{value:u,onChange:h,className:p,placeholder:m}=e,{undoManager:f}=(0,s.useReplicache)(),y=(0,o.useRef)(null),{permissions:b}=(0,g.useEntitySetContext)(),v=(0,o.useRef)(null),x=(0,o.useRef)(null),k=!b.write;return c[0]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{v.current={start:e.currentTarget.selectionStart,end:e.currentTarget.selectionEnd}},c[0]=r):r=c[0],c[1]!==f?(i=async()=>{y.current&&(f.endGroup(),window.clearTimeout(y.current),y.current=null)},c[1]=f,c[2]=i):i=c[2],c[3]!==h||c[4]!==f||c[5]!==u?(a=async e=>{let t=e.currentTarget.value,n=e.currentTarget.selectionStart,r=e.currentTarget.selectionEnd;await h(e.currentTarget.value),y.current?window.clearTimeout(y.current):f.startGroup(),y.current=window.setTimeout(()=>{f.endGroup(),y.current=null},200);let i=v.current?.start||null,a=v.current?.end||null;f.add({redo:async()=>{await h(t),x.current?.setSelectionRange(n,r),x.current?.focus()},undo:async()=>{await h(u),x.current?.setSelectionRange(i,a),x.current?.focus()}})},c[3]=h,c[4]=f,c[5]=u,c[6]=a):a=c[6],c[7]!==p||c[8]!==m||c[9]!==k||c[10]!==i||c[11]!==a||c[12]!==u?(l=(0,t.jsx)(d.AsyncValueAutosizeTextarea,{ref:x,disabled:k,onSelect:r,className:p,value:u,onBlur:i,onChange:a,placeholder:m}),c[7]=p,c[8]=m,c[9]=k,c[10]=i,c[11]=a,c[12]=u,c[13]=l):l=c[13],l},$=e=>{let r,i,o,s=(0,n.c)(11),{data:l,normalizedDocument:c}=(0,a.useLeafletPublicationData)(),u=c?.publishedAt;if(!l)return null;let d=l.publications?.name;s[0]!==d?(r=(0,t.jsx)("div",{className:"text-accent-contrast font-bold hover:no-underline",children:d}),s[0]=d,s[1]=r):r=s[1];let h=e.compact?void 0:l.description;return s[2]!==l.doc||s[3]!==u?(i=l.doc?(0,t.jsxs)("p",{children:["Published ",u&&(0,y.timeAgo)(u)]}):(0,t.jsx)("p",{children:"Draft"}),s[2]=l.doc,s[3]=u,s[4]=i):i=s[4],s[5]!==e.compact||s[6]!==l.title||s[7]!==r||s[8]!==h||s[9]!==i?(o=(0,t.jsx)(C.PostHeaderLayout,{compact:e.compact,pubLink:r,postTitle:l.title,postDescription:h,postInfo:i}
163),s[5]=e.compact,s[6]=l.title,s[7]=r,s[8]=h,s[9]=i,s[10]=o):o=s[10],o},V=()=>{let e,r,i,o,l,c,u,d=(0,n.c)(14),{normalizedDocument:h}=(0,a.useLeafletPublicationData)(),{rep:p}=(0,s.useReplicache)(),m=(0,f.useSubscribe)(p,G);d[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],d[0]=e):e=d[0];let g=e;Array.isArray(m)?g=m:h?.tags&&Array.isArray(h.tags)&&(g=h.tags),d[1]!==p?.mutate?(r=async e=>{await p?.mutate.updatePublicationDraft({tags:e})},d[1]=p?.mutate,d[2]=r):r=d[2];let y=r;return d[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(v.TagTiny,{}),d[3]=i):i=d[3],d[4]!==g.length?(o=g.length>0?`${g.length} Tag${1===g.length?"":"s"}`:(0,t.jsx)("div",{className:"sm:block hidden",children:"Add Tags"}),d[4]=g.length,d[5]=o):o=d[5],d[6]!==o?(l=(0,t.jsxs)("div",{className:"addTagTrigger flex gap-1 hover:underline text-sm items-center text-tertiary",children:[i," ",o]}),d[6]=o,d[7]=l):l=d[7],d[8]!==y||d[9]!==g?(c=(0,t.jsx)(k.TagSelector,{selectedTags:g,setSelectedTags:y}),d[8]=y,d[9]=g,d[10]=c):c=d[10],d[11]!==l||d[12]!==c?(u=(0,t.jsx)(x.Popover,{className:"p-2! w-full min-w-xs max-w-md ",trigger:l,children:c}),d[11]=l,d[12]=c,d[13]=u):u=d[13],u},q=()=>{let e,r,d,h,p,m,f,y,b,v=(0,n.c)(26),{rep:k,rootEntity:w}=(0,s.useReplicache)(),C=(0,g.useEntitySetContext)(),{data:S}=(0,a.useLeafletPublicationData)(),E=(0,s.useEntity)(w,"root/cover-image")?.data.value??null,T=(0,s.useEntity)(E,"block/image");v[0]!==T?(e=T?l.localImages.get(T.data.src):void 0,v[0]=T,v[1]=e):e=v[1];let I=e,D=(0,o.useRef)(null);v[2]!==E||v[3]!==C||v[4]!==k||v[5]!==w?(r=async e=>{k&&await (0,c.uploadCoverImage)(k,e,{rootEntity:w,permission_set:C.set,existingCoverEntity:E})},v[2]=E,v[3]=C,v[4]=k,v[5]=w,v[6]=r):r=v[6];let N=r;if(!S?.publications||!C.permissions.write)return null;if(!E){let e,n;return v[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(u.CoverImageTiny,{}),v[7]=e):e=v[7],v[8]!==N?(n=(0,t.jsxs)("label",{className:"addCoverImageTrigger flex gap-1 hover:underline text-sm items-center text-tertiary hover:cursor-pointer",onMouseDown:W,children:[e,"Add Cover",(0,t.jsx)("input",{className:"hidden",type:"file",accept:"image/*",onChange:e=>{let t=e.currentTarget.files?.[0];t&&N(t),e.currentTarget.value=""}})]}),v[8]=N,v[9]=n):n=v[9],n}return v[10]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsxs)("div",{className:"flex flex-row gap-1 shrink-0 items-center hover:underline text-tertiary",children:[(0,t.jsx)(u.CoverImageTiny,{}),(0,t.jsx)("div",{className:"sm:block hidden",children:"Edit Cover"})]}),v[10]=d):d=v[10],v[11]!==T||v[12]!==I?(h=T&&(I||T.data.local?(0,t.jsx)("img",{loading:"lazy",decoding:"async",src:I??T.data.fallback,className:"w-full aspect-video object-cover rounded-md border border-border-light",alt:""}):(0,t.jsx)(i.default,{src:"/"+new URL(T.data.src).pathname.split("/").slice(5).join("/"),width:T.data.width,height:T.data.height,className:"w-full aspect-video object-cover rounded-md border border-border-light",alt:""})),v[11]=T,v[12]=I,v[13]=h):h=v[13],v[14]!==E||v[15]!==k?.mutate?(p=(0,t.jsx)(F.ButtonTertiary,{compact:!0,type:"button",className:"text-sm ",onClick:()=>k?.mutate.deleteEntity({entity:E}),children:"Remove"}),v[14]=E,v[15]=k?.mutate,v[16]=p):p=v[16],v[17]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(F.ButtonPrimary,{compact:!0,type:"button",className:"changeCoverImageTrigger text-sm ",onMouseDown:K,onClick:()=>D.current?.click(),children:"Change Cover Image"}),v[17]=m):m=v[17],v[18]!==N?(f=(0,t.jsx)("input",{ref:D,className:"hidden",type:"file",accept:"image/*",onChange:e=>{let t=e.currentTarget.files?.[0];t&&N(t),e.currentTarget.value=""}}),v[18]=N,v[19]=f):f=v[19],v[20]!==p||v[21]!==f?(y=(0,t.jsxs)("div",{className:"flex gap-2 place-self-end",children:[p,m,f]}),v[20]=p,v[21]=f,v[22]=y):y=v[22],v[23]!==h||v[24]!==y?(b=(0,t.jsxs)(x.Popover,{className:"w-sm flex flex-col gap-2",trigger:d,children:[h,y]}),v[23]=h,v[24]=y,v[25]=b):b=v[25],b};function G(e){return e.get("publication_tags")}function W(e){return e.preventDefault()}function K(e){return e.preventDefault()}},901982,e=>{"use strict";var t=e.i(768834),n=e.i(813029),r=e.i(680016);let i=(0,t.create)(()=>({start:null})),a=(e,t)=>(0,r.filterBlocksForZoom)((0,r.getPageBlocks)(e,t),n.useUIState.getState().zoomedBlocks[t]),o=async e=>{let[t]=await s(e);if(t.length>0)return t;let{selectedBlocks:i,focusedEntity:o}=n.useUIState.getState(),l=i.flatMap(t=>(0,r.getCanvasBlock)(e,t.parent,t.entityID)??[]);if(l.length>0)return l;if(!o||"block"!==o.entityType)return[];
163let c=(0,r.getCanvasBlock)(e,o.parent,o.entityID);return c?[c]:a(e,o.parent).filter(e=>e.entityID===o.entityID)},s=async e=>{let t=n.useUIState.getState().selectedBlocks;if(!t[0])return[[],[]];let i=a(e,t[0].parent),o=new Set(i.map(e=>e.entityID)),s=n.useUIState.getState().foldedBlocks.filter(e=>o.has(e)),l=i.filter(e=>t.find(t=>t.entityID===e.entityID)),c=i.filter(e=>{let n=t.find(t=>t.entityID===e.entityID);return e.listData&&!n?e.listData.path.find(e=>t.find(t=>t.entityID===e.entity)&&s.includes(e.entity)):n});return[l,i.filter(e=>!(0,r.isBlockHidden)(e,s)),c]};e.s(["getSelectedOrFocusedBlocks",0,o,"getSortedSelection",0,s,"getViewBlocks",0,a,"useSelectingMouse",0,i])},510285,e=>{"use strict";var t=e.i(500932),n=e.i(271645),r=e.i(283599),i=e.i(935593);let a=new Set,o=new Map,s=!1,l=(0,n.createContext)(null);e.s(["useStandardSitePost",0,function(e){let c,u,d,h=(0,t.c)(6),p=(0,n.useContext)(l),m=e?p?.[e]:void 0;h[0]!==e?(c=()=>new Promise(t=>{a.add(e);let n=o.get(e)||[];n.push(t),o.set(e,n),s||(s=!0,queueMicrotask(async()=>{let e=Array.from(a);a=new Set;let t=o;if(o=new Map,s=!1,0!==e.length)try{let n=await (0,i.callRPC)("get_standard_site_posts",{uris:e}),r=new Map((n?.result.posts||[]).map(e=>[e.uri,e]));for(let n of e){let e=r.get(n)??null;for(let r of t.get(n)||[])r(e)}}catch{for(let n of e)for(let e of t.get(n)||[])e(null)}}))}),h[0]=e,h[1]=c):c=h[1],h[2]===Symbol.for("react.memo_cache_sentinel")?(u={revalidateOnFocus:!1,revalidateIfStale:!1},h[2]=u):u=h[2];let f=(0,r.default)(!e||m?null:`standard-site-post:${e}`,c,u),g=m??f.data,y=!m&&f.isLoading;return h[3]!==g||h[4]!==y?(d={data:g,isLoading:y},h[3]=g,h[4]=y,h[5]=d):d=h[5],d}])},836108,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645),i=e.i(618566);e.s(["Tabs",0,function(e){let r,i,a,o,s=(0,n.c)(10),l=`tabs flex justify-start w-full overflow-x-auto no-scrollbar ${e.pill?"gap-3":"gap-4"} ${e.className||""}`;return s[0]!==e?(r=e.options.map(n=>{let r=e.value===n.value,i=`text-sm font-bold px-1 ${r?`text-accent-2 bg-accent-1 rounded-md ${e.selectedOptionClassName||""}`:"text-tertiary bg-transparent"}`,a=`text-sm font-bold pb-0.5 px-1 border-b-3 ${r?`text-accent-contrast border-accent-contrast ${e.selectedOptionClassName||""}`:"text-tertiary border-transparent"} `;return(0,t.jsx)("button",{type:"button",className:`tab shrink-0 whitespace-nowrap ${e.pill?i:a} ${e.optionClassName||""}`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onChange(n.value,t)},children:n.label},n.value)}),s[0]=e,s[1]=r):r=s[1],s[2]!==l||s[3]!==r?(i=(0,t.jsx)("div",{className:l,children:r}),s[2]=l,s[3]=r,s[4]=i):i=s[4],s[5]!==e.pill?(a=!e.pill&&(0,t.jsx)("hr",{className:"border-border-light"}),s[5]=e.pill,s[6]=a):a=s[6],s[7]!==i||s[8]!==a?(o=(0,t.jsxs)("div",{className:"w-full",children:[i,a]}),s[7]=i,s[8]=a,s[9]=o):o=s[9],o},"useTabParam",0,function(e,t){let a,o,s,l=(0,n.c)(9),c=(0,i.useSearchParams)();l[0]!==c?(a=c.get("tab"),l[0]=c,l[1]=a):a=l[1];let u=a,[d,h]=(0,r.useState)(null);l[2]!==d||l[3]!==t||l[4]!==u||l[5]!==e?(o=d??(e.some(e=>e.value===u)?u:t),l[2]=d,l[3]=t,l[4]=u,l[5]=e,l[6]=o):o=l[6];let p=o;return l[7]!==p?(s=[p,h],l[7]=p,l[8]=s):s=l[8],s}])},386834,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(133564),i=e.i(784192),a=e.i(271645),o=e.i(241665),s=e.i(814649),l=e.i(522016),c=e.i(95187);let u=(0,c.createServerReference)("40663fb45585d8df969e5a5cc0f660bc8288f61ef3",c.callServer,void 0,c.findSourceMapURL,"searchTags"),d=e=>{let i,a,o,s,c=(0,n.c)(13),u=`px-1 py-0.5 hover:no-underline! ${e.selected?"text-accent-2":"text-tertiary"}`,d=`tag flex items-center text-xs rounded-md border ${e.selected?"bg-accent-1 border-accent-1 font-bold":"bg-bg-page border-border"} ${e.className}`;return c[0]!==u||c[1]!==e?(i=e.onClick?(0,t.jsxs)("button",{type:"button",className:u,"aria-pressed":void 0===e.selected?void 0:e.selected,"aria-label":`Tag: ${e.name}`,onClick:()=>e.onClick?.(e.name),onMouseEnter:()=>e.onPrefetch?.(e.name),onPointerDown:()=>e.onPrefetch?.(e.name),children:[e.name," "]}):(0,t.jsxs)(l.default,{href:`https://leaflet.pub/tag/${encodeURIComponent(e.name)}
163`,className:u,"aria-label":`Tag: ${e.name}`,children:[e.name," "]}),c[0]=u,c[1]=e,c[2]=i):i=c[2],c[3]!==e.count||c[4]!==e.selected?(a=void 0!==e.count?(0,t.jsxs)("span",{className:`pr-1 ${e.selected?"text-accent-2":"text-tertiary"}`,children:["(",e.count,")"]}):null,c[3]=e.count,c[4]=e.selected,c[5]=a):a=c[5],c[6]!==e?(o=e.selected&&(e.onDelete||e.onClick)?(0,t.jsx)("button",{type:"button","aria-label":`Remove tag: ${e.name}`,onClick:()=>e.onDelete?e.onDelete(e.name):e.onClick?.(e.name),children:(0,t.jsx)(r.CloseTiny,{className:"scale-80 pr-1 text-accent-2"})}):null,c[6]=e,c[7]=o):o=c[7],c[8]!==d||c[9]!==i||c[10]!==a||c[11]!==o?(s=(0,t.jsxs)("div",{className:d,children:[i,a,o]}),c[8]=d,c[9]=i,c[10]=a,c[11]=o,c[12]=s):s=c[12],s},h=e=>{let r,l,c,h,y,b,v,x,k,w,C,S,E,T,I,D,N,A,_,P,M,R,L,j=(0,n.c)(57),[O,B]=(0,a.useState)(""),[F,H]=(0,a.useState)(!1),[U,z]=(0,a.useState)(0);j[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],j[0]=r):r=j[0];let[$,V]=(0,a.useState)(r),[,q]=(0,a.useState)(!1),G=document.getElementById("placeholder-tag-search-input")?.clientWidth;if(j[1]!==O?(l=async()=>{if(O.trim().length<3)return void V([]);q(!0);let e=await u(O);e&&V(e),q(!1)},j[1]=O,j[2]=l):l=j[2],j[3]!==O?(c=[O],j[3]=O,j[4]=c):c=j[4],(0,o.useDebouncedEffect)(l,300,c),j[5]!==U||j[6]!==F||j[7]!==e||j[8]!==$||j[9]!==O){let t,n,r,i;j[15]!==e.selectedTags?(t=t=>!e.selectedTags.includes(t.name),j[15]=e.selectedTags,j[16]=t):t=j[16],j[17]!==O?(n=e=>e.name.toLowerCase().includes(O.toLowerCase()),j[17]=O,j[18]=n):n=j[18],h=$.filter(t).filter(n),v=O.length>=3,j[19]===Symbol.for("react.memo_cache_sentinel")?(r=function(){z(0),B("")},j[19]=r):r=j[19];let a=r;j[20]!==e?(i=function(t){e.setSelectedTags([...e.selectedTags,t]),a()},j[20]=e,j[21]=i):i=j[21],b=i,y=e=>{F&&("ArrowDown"===e.key?(e.preventDefault(),z(e=>e<h.length?e+1:e)):"ArrowUp"===e.key?(e.preventDefault(),z(m)):"Enter"===e.key?(e.preventDefault(),b(x?0===U?O:h[U-1].name:h[U].name),a()):"Escape"===e.key&&H(!1))},x=v&&""!==O&&!h.some(e=>e.name===O),j[5]=U,j[6]=F,j[7]=e,j[8]=$,j[9]=O,j[10]=h,j[11]=y,j[12]=b,j[13]=v,j[14]=x}else h=j[10],y=j[11],b=j[12],v=j[13],x=j[14];return j[22]===Symbol.for("react.memo_cache_sentinel")?(k=e=>{B(e.target.value),H(!0),z(0)},j[22]=k):k=j[22],j[23]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{H(!0),document.getElementById("tag-search-input")?.focus()},j[23]=w):w=j[23],j[24]!==y||j[25]!==O?(C=(0,t.jsx)(i.Input,{className:"input-with-border grow w-full outline-none!",id:"placeholder-tag-search-input",value:O,placeholder:"search tagsâ¦",onChange:k,onKeyDown:y,onFocus:w}),j[24]=y,j[25]=O,j[26]=C):C=j[26],j[27]!==F?(S=()=>{H(!F),F||setTimeout(f,100)},j[27]=F,j[28]=S):S=j[28],j[29]===Symbol.for("react.memo_cache_sentinel")?(E=(0,t.jsx)("button",{className:"absolute left-0 top-0 right-0 h-[30px] max-w-md"}),j[29]=E):E=j[29],j[30]===Symbol.for("react.memo_cache_sentinel")?(T={width:`${G}px`},j[30]=T):T=j[30],j[31]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{B(e.target.value),H(!0),z(0)},j[31]=I):I=j[31],j[32]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{H(!0)},j[32]=D):D=j[32],j[33]!==y||j[34]!==O?(N=(0,t.jsx)(i.Input,{className:"input-with-border grow w-full mb-2",id:"tag-search-input",placeholder:"search tagsâ¦",value:O,onChange:I,onKeyDown:y,onFocus:D}),j[33]=y,j[34]=O,j[35]=N):N=j[35],j[36]!==e?(A=e.selectedTags.length>0?(0,t.jsx)("div",{className:`flex flex-wrap gap-2 pb-[6px] ${e.rightAlign&&"justify-end"}`,children:e.selectedTags.map(n=>(0,t.jsx)(d,{name:n,selected:!0,onDelete:()=>{e.setSelectedTags(e.selectedTags.filter(e=>e!==n))}},n))}):(0,t.jsx)("div",{className:`text-tertiary italic text-sm h-6 ${e.rightAlign&&"text-right"}`,children:"no tags selected"}),j[36]=e,j[37]=A):A=j[37],j[38]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)("hr",{className:" mb-[2px] border-border-light"}),j[38]=_):_=j[38],j[39]!==h||j[40]!==U||j[41]!==b||j[42]!==v||j[43]!==O||j[44]!==x?(P=v?(0,t.jsxs)(t.Fragment,{children:[x&&(0,t.jsx)(p,{index:0,name:O,tagged:0,highlighted:0===U,setHighlightedIndex:z,onSelect:()=>{b(O)}},"userInput"),h.map((e,n)=>(0,t.jsx)(p,{index:x?n+1:n,name:e.name,tagged:e.document_count,highlighted:(x?n+1:n)===U,setHighlightedIndex:z,onSelect:()=>{b(e.name)}
163},e.name))]}):(0,t.jsx)("div",{className:"text-tertiary italic text-sm py-1",children:"type at least 3 characters to search"}),j[39]=h,j[40]=U,j[41]=b,j[42]=v,j[43]=O,j[44]=x,j[45]=P):P=j[45],j[46]!==N||j[47]!==A||j[48]!==P?(M=(0,t.jsxs)("div",{className:"",style:T,children:[N,A,_,P]}),j[46]=N,j[47]=A,j[48]=P,j[49]=M):M=j[49],j[50]!==F||j[51]!==M||j[52]!==S?(R=(0,t.jsx)(s.Popover,{noArrow:!0,open:F,onOpenChange:S,className:"tagResults w-full p-2! min-w-xs text-primary max-w-md translate-x-[calc(50%-8px)]",sideOffset:-39,onOpenAutoFocus:g,asChild:!0,trigger:E,children:M}),j[50]=F,j[51]=M,j[52]=S,j[53]=R):R=j[53],j[54]!==R||j[55]!==C?(L=(0,t.jsxs)("div",{className:"relative",children:[C,R]}),j[54]=R,j[55]=C,j[56]=L):L=j[56],L},p=e=>{let r,i,a,o,s,l=(0,n.c)(13),c=`w-full flex justify-between items-center text-left pr-1 pl-[6px] py-0.5 rounded-md ${e.highlighted?"bg-border-light":""}`;return l[0]!==e?(r=t=>{t.preventDefault(),e.onSelect()},i=t=>{t.preventDefault(),e.onSelect()},a=t=>e.setHighlightedIndex(e.index),l[0]=e,l[1]=r,l[2]=i,l[3]=a):(r=l[1],i=l[2],a=l[3]),l[4]!==e.tagged?(o=(0,t.jsxs)("div",{className:"text-tertiary text-sm",children:[" ",e.tagged]}),l[4]=e.tagged,l[5]=o):o=l[5],l[6]!==e.name||l[7]!==c||l[8]!==r||l[9]!==i||l[10]!==a||l[11]!==o?(s=(0,t.jsx)("div",{className:"-mx-1",children:(0,t.jsxs)("button",{className:c,onSelect:r,onClick:i,onMouseEnter:a,children:[e.name,o]})}),l[6]=e.name,l[7]=c,l[8]=r,l[9]=i,l[10]=a,l[11]=o,l[12]=s):s=l[12],s};function m(e){return e>0?e-1:0}function f(){document.getElementById("tag-search-input")?.focus()}function g(e){return e.preventDefault()}e.s(["Tag",0,d,"TagSelector",0,e=>{let r,i,a,o=(0,n.c)(9);return o[0]!==e.rightAlign||o[1]!==e.selectedTags||o[2]!==e.setSelectedTags?(r=(0,t.jsx)(h,{selectedTags:e.selectedTags,setSelectedTags:e.setSelectedTags,rightAlign:e.rightAlign}),o[0]=e.rightAlign,o[1]=e.selectedTags,o[2]=e.setSelectedTags,o[3]=r):r=o[3],o[4]!==e?(i=e.selectedTags.length>0?(0,t.jsx)("div",{className:`flex flex-wrap gap-2 ${e.rightAlign&&"justify-end"}`,children:e.selectedTags.map(n=>(0,t.jsx)(d,{name:n,selected:!0,onDelete:()=>{e.setSelectedTags(e.selectedTags.filter(e=>e!==n))}},n))}):(0,t.jsx)("div",{className:`text-tertiary italic text-sm h-6 ${e.rightAlign&&"text-right"}`,children:"no tags selected"}),o[4]=e,o[5]=i):i=o[5],o[6]!==r||o[7]!==i?(a=(0,t.jsxs)("div",{className:"flex flex-col gap-2 text-primary",children:[r,i]}),o[6]=r,o[7]=i,o[8]=a):a=o[8],a}],386834)},50203,464367,651677,e=>{"use strict";e.s(["SectionArrow",()=>Q,"ThemePopover",()=>W,"ThemeSetterContent",()=>K,"setColorAttribute",()=>G],50203);var t=e.i(843476),n=e.i(500932),r=e.i(814649);e.s(["LeafletBackgroundPicker",()=>I,"PageBackgroundColorPicker",()=>N,"PageThemePickers",()=>
163S,"SubpageBackgroundPicker",()=>E,"TextPickers",()=>_],464367);var i=e.i(80762),a=e.i(768928),o=e.i(552933),s=e.i(597849),l=e.i(615079),c=e.i(715295),u=e.i(618431),d=e.i(17250),h=e.i(271645),p=e.i(467592),m=e.i(629683),f=e.i(859015),g=e.i(250366),y=e.i(505206),b=e.i(537712),v=e.i(552401),x=e.i(750590),k=e.i(637777),w=e.i(103136),C=e.i(87592);let S=e=>{let{rep:n}=(0,p.useReplicache)(),r=(0,h.useMemo)(()=>G(n,e.entityID),[n,e.entityID]),i=(0,p.useEntity)(e.entityID,"page/type")?.data.value||"doc",a=(0,m.useColorAttribute)(e.entityID,"theme/primary"),o=(0,p.useEntity)(e.entityID,"theme/heading-font")?.data.value,s=(0,p.useEntity)(e.entityID,"theme/body-font")?.data.value;return(0,t.jsxs)("div",{className:"pageThemeBG flex flex-col gap-2 h-full text-primary bg-bg-leaflet p-2 rounded-md border border-primary shadow-[0_0_0_1px_rgb(var(--bg-page))]",style:{backgroundColor:"rgba(var(--bg-page), 0.6)"},children:["canvas"===i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A,{entityID:e.entityID,rep:n})," ",(0,t.jsx)("hr",{className:"border-border-light w-full"})]}),(0,t.jsx)(_,{value:a,setValue:r("theme/primary"),openPicker:e.openPicker,setOpenPicker:e.setOpenPicker}),!e.home&&!e.hideFonts&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.FontPicker,{label:"Heading",value:o,onChange:t=>n?.mutate.assertFact({entity:e.entityID,attribute:"theme/heading-font",data:{type:"string",value:t}})}),(0,t.jsx)(v.FontPicker,{label:"Body",value:s,onChange:t=>n?.mutate.assertFact({entity:e.entityID,attribute:"theme/body-font",data:{type:"string",value:t}})})]})]})},E=e=>{let{rep:n,rootEntity:r}=(0,p.useReplicache)(),i=(0,h.useMemo)(()=>G(n,e.entityID),[n,e.entityID]),a=(0,m.useColorAttribute)(e.entityID,"theme/card-background"),o=(0,p.useEntity)(e.entityID,"theme/card-background-image"),s=(0,p.useEntity)(r,"theme/card-border-hidden"),l=(0,p.useEntity)(e.entityID,"theme/card-border-hidden"),c=!(l||s)?.data.value,u=c?"Page":"Containers";return c?(0,t.jsxs)(t.Fragment,{children:[o&&(0,t.jsx)(T,{entityID:e.entityID,openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,setValue:i("theme/card-background")}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(b.ColorPicker,{label:u,value:a,setValue:i("theme/card-background"),thisPicker:"page",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:()=>e.setOpenPicker("null"),alpha:!0}),!o&&(0,t.jsxs)("label",{className:"text-[#969696] hover:cursor-pointer shrink-0 absolute top-0 right-0",children:[(0,t.jsx)(x.BlockImageSmall,{}),(0,t.jsx)("div",{className:"hidden",children:(0,t.jsx)(y.ImageInput,{entityID:e.entityID,onChange:()=>e.setOpenPicker("page-background-image"),card:!0})})]})]})]}):(0,t.jsx)(b.ColorPicker,{label:u,helpText:"Affects menus, tooltips and some block backgrounds",value:a,setValue:i("theme/card-background"),thisPicker:"page",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:()=>e.setOpenPicker("null"),alpha:!0})},T=e=>{let r,h,v,k,w,S,E,T,I,D,N,A,_,P,L,j,O,B,F,H,U,z,$=(0,n.c)(52),{rep:V,undoManager:q}=(0,p.useReplicache)(),G=(0,p.useEntity)(e.entityID,"theme/card-background-image"),W=(0,p.useEntity)(e.entityID,"theme/card-background-image-repeat"),K=(0,m.useColorAttribute)(e.entityID,"theme/card-background"),Y=(0,p.useEntity)(e.entityID,"theme/card-background-image-opacity")?.data.value||1,Z=`rgba(0,0,0,${Y})`;$[0]!==Z?(h=(0,a.parseColor)(Z),$[0]=Z,$[1]=h):h=$[1],r=h;let X="page-background-image"===e.openPicker;$[2]!==X||$[3]!==e?(v=()=>{e.setOpenPicker(X?"null":"page-background-image")},$[2]=X,$[3]=e,$[4]=v):v=$[4];let Q=G?.data.src?`url(${G.data.src})`:void 0;return $[5]!==Q?(k={backgroundImage:Q,backgroundPosition:"center",backgroundSize:"cover"},$[5]=Q,$[6]=k):k=$[6],$[7]!==K||$[8]!==k?(w=(0,t.jsx)(d.ColorSwatch,{color:K,className:"w-6 h-6 rounded-full border-2 border-white shadow-[0_0_0_1px_#8C8C8C]",style:k}),$[7]=K,$[8]=k,$[9]=w):w=$[9],$[10]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)("strong",{className:"text-[#595959]",children:"Page"}),E=(0,t.jsx)("div",{className:"italic text-[#8C8C8C]",children:"image"}),$[10]=S,$[11]=E):(S=$[10],E=$[11]),$[12]!==v||$[13]!==w?(T=(0,t.jsxs)("button",{onClick:v,className:"flex gap-2 items-center grow",children:[w,S,E]}),$[12]=v,$[13]=w,$[14]=T):T=$[14],$[15]!==e.entityID||$[16]!==V?.mutate?(I=t=>{let n=t.getChannelValue("alpha");V?.mutate.assertFact({entity:e.entityID,attribute:"theme/card-background-image-opacity",data:{type:"number",value:n}})}
163,$[15]=e.entityID,$[16]=V?.mutate,$[17]=I):I=$[17],$[18]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsx)(f.Separator,{classname:"h-4! my-1 border-[#C3C3C3]!"}),$[18]=D):D=$[18],$[19]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)(c.ColorField,{className:"w-fit pl-[6px]",channel:"alpha",children:(0,t.jsx)(l.Input,{onMouseDown:g.onMouseDown,onFocus:M,onKeyDown:R,className:"w-[48px] bg-transparent outline-hidden"})}),$[19]=N):N=$[19],$[20]!==r||$[21]!==I?(A=(0,t.jsxs)(i.ColorPicker,{value:r,onChange:I,children:[D,N]}),$[20]=r,$[21]=I,$[22]=A):A=$[22],$[23]!==G||$[24]!==W||$[25]!==V?.mutate||$[26]!==q?(_=()=>{q.withUndoGroup(async()=>{G&&await V?.mutate.retractFact({factID:G.id}),W&&await V?.mutate.retractFact({factID:W.id})})},$[23]=G,$[24]=W,$[25]=V?.mutate,$[26]=q,$[27]=_):_=$[27],$[28]===Symbol.for("react.memo_cache_sentinel")?(P=(0,t.jsx)(C.DeleteSmall,{}),$[28]=P):P=$[28],$[29]!==_?(L=(0,t.jsx)("button",{onClick:_,children:P}),$[29]=_,$[30]=L):L=$[30],$[31]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsx)(x.BlockImageSmall,{}),$[31]=j):j=$[31],$[32]!==e?(O=()=>e.setOpenPicker("page-background-image"),$[32]=e,$[33]=O):O=$[33],$[34]!==e.entityID||$[35]!==O?(B=(0,t.jsxs)("label",{className:"hover:cursor-pointer",children:[j,(0,t.jsx)("div",{className:"hidden",children:(0,t.jsx)(y.ImageInput,{entityID:e.entityID,onChange:O,card:!0})})]}),$[34]=e.entityID,$[35]=O,$[36]=B):B=$[36],$[37]!==L||$[38]!==B?(F=(0,t.jsxs)("div",{className:"flex gap-1 text-[#8C8C8C]",children:[L,B]}),$[37]=L,$[38]=B,$[39]=F):F=$[39],$[40]!==A||$[41]!==F||$[42]!==T?(H=(0,t.jsxs)("div",{className:"bgPickerColorLabel flex gap-2 items-center",children:[T,A,F]}),$[40]=A,$[41]=F,$[42]=T,$[43]=H):H=$[43],$[44]!==r||$[45]!==X||$[46]!==e.entityID||$[47]!==V?.mutate?(U=X&&(0,t.jsxs)("div",{className:"pageImagePicker flex flex-col gap-2",children:[(0,t.jsx)(y.ImageSettings,{entityID:e.entityID,card:!0}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 pr-2 pl-8 -mt-2 mb-2",children:[(0,t.jsx)("hr",{className:"border-[#DBDBDB]"}),(0,t.jsx)(i.ColorPicker,{value:r,onChange:t=>{let n=t.getChannelValue("alpha");V?.mutate.assertFact({entity:e.entityID,attribute:"theme/card-background-image-opacity",data:{type:"number",value:n}})},children:(0,t.jsx)(s.ColorSlider,{colorSpace:"hsb",className:"w-full mt-1 rounded-full",style:{backgroundImage:"url(/transparent-bg.png)",backgroundRepeat:"repeat",backgroundSize:"8px"},channel:"alpha",children:(0,t.jsx)(u.SliderTrack,{className:"h-2 w-full rounded-md",children:(0,t.jsx)(o.ColorThumb,{className:`${b.thumbStyle} mt-[4px]`})})})})]})]}),$[44]=r,$[45]=X,$[46]=e.entityID,$[47]=V?.mutate,$[48]=U):U=$[48],$[49]!==H||$[50]!==U?(z=(0,t.jsxs)(t.Fragment,{children:[H,U]}),$[49]=H,$[50]=U,$[51]=z):z=$[51],z},I=e=>{let{rep:n}=(0,p.useReplicache)(),r=(0,h.useMemo)(()=>G(n,e.entityID),[n,e.entityID]),i=(0,m.useColorAttribute)(e.entityID,"theme/page-background"),a=(0,m.useColorAttribute)(e.entityID,"theme/card-background"),o=(0,p.useEntity)(e.entityID,"theme/background-image");(0,p.useEntity)(e.entityID,"theme/background-image-repeat");let s=(0,p.useEntity)(e.entityID,"theme/card-border-hidden"),l=!s?.data.value;return(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsx)(D,{entityID:e.entityID,openPicker:e.openPicker,setOpenPicker:e.setOpenPicker}):(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(b.ColorPicker,{label:"Background",value:i,setValue:r("theme/page-background"),thisPicker:"leaflet",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:()=>e.setOpenPicker("null"),labelClassName:"text-[#272727]",fieldClassName:"text-[#969696]"}),(0,t.jsxs)("label",{className:"text-[#969696] hover:cursor-pointer shrink-0 absolute top-0 right-0",children:[(0,t.jsx)(x.BlockImageSmall,{}),(0,t.jsx)("div",{className:"hidden",children:(0,t.jsx)(y.ImageInput,{entityID:e.entityID,onChange:()=>e.setOpenPicker("leaflet")})})]})]}),(l||!!o)&&(0,t.jsx)(b.ColorPicker,{label:l?"Page":"Containers",helpText:l?void 0:"Affects menus, tooltips and some block backgrounds",value:a,setValue:r("theme/card-background"),thisPicker:"page",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:()=>e.setOpenPicker("null"),alpha:!0,labelClassName:"text-[#272727]",fieldClassName:"text-[#969696]"}),(0,t.jsx)("hr",{className:"border-[#CCCCCC]"}),(0,t.jsx)(P,{entityID:e.entityID,openPicker:e.openPicker,setOpenPicker:e.setOpenPicker})]})},D=e=>{let r,i,a,o,s,l,c,u,h,f,g,b,v,k,w,S,E=(0,n.c)(39),{rep:T,undoManager:I}=(0,p.useReplicache)(),D=(0,p.useEntity)(e.entityID,"theme/background-image"),N=(0,p.useEntity)(e.entityID,"theme/background-image-repeat"),A=(0,m.useColorAttribute)(e.entityID,"theme/page-background"),_="leaflet"===e.openPicker;E[0]!==_||E[1]!==e?(r=()=>{e.setOpenPicker(_?"null":"leaflet")},E[0]=_,E[1]=e,E[2]=r):r=E[2];let P=D?.data.src?`url(${D.data.src})`:void 0;return E[3]!==P?(i={backgroundImage:P,backgroundPosition:"center",backgroundSize:"cover"}
163,E[3]=P,E[4]=i):i=E[4],E[5]!==A||E[6]!==i?(a=(0,t.jsx)(d.ColorSwatch,{color:A,className:"w-6 h-6 rounded-full border-2 border-white shadow-[0_0_0_1px_#8C8C8C]",style:i}),E[5]=A,E[6]=i,E[7]=a):a=E[7],E[8]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("strong",{className:"text-[#595959]",children:"Background"}),s=(0,t.jsx)("div",{className:"italic text-[#8C8C8C]",children:"image"}),E[8]=o,E[9]=s):(o=E[8],s=E[9]),E[10]!==r||E[11]!==a?(l=(0,t.jsxs)("button",{onClick:r,className:"flex gap-2 items-center grow",children:[a,o,s]}),E[10]=r,E[11]=a,E[12]=l):l=E[12],E[13]!==D||E[14]!==N||E[15]!==T?.mutate||E[16]!==I?(c=()=>{I.withUndoGroup(async()=>{D&&await T?.mutate.retractFact({factID:D.id}),N&&await T?.mutate.retractFact({factID:N.id})})},E[13]=D,E[14]=N,E[15]=T?.mutate,E[16]=I,E[17]=c):c=E[17],E[18]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(C.DeleteSmall,{}),E[18]=u):u=E[18],E[19]!==c?(h=(0,t.jsx)("button",{onClick:c,children:u}),E[19]=c,E[20]=h):h=E[20],E[21]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(x.BlockImageSmall,{}),E[21]=f):f=E[21],E[22]!==e?(g=()=>e.setOpenPicker("leaflet"),E[22]=e,E[23]=g):g=E[23],E[24]!==e.entityID||E[25]!==g?(b=(0,t.jsxs)("label",{className:"hover:cursor-pointer",children:[f,(0,t.jsx)("div",{className:"hidden",children:(0,t.jsx)(y.ImageInput,{entityID:e.entityID,onChange:g})})]}),E[24]=e.entityID,E[25]=g,E[26]=b):b=E[26],E[27]!==b||E[28]!==h?(v=(0,t.jsxs)("div",{className:"flex gap-1 text-[#8C8C8C]",children:[h,b]}),E[27]=b,E[28]=h,E[29]=v):v=E[29],E[30]!==v||E[31]!==l?(k=(0,t.jsxs)("div",{className:"bgPickerColorLabel flex gap-2 items-center",children:[l,v]}
163),E[30]=v,E[31]=l,E[32]=k):k=E[32],E[33]!==_||E[34]!==e.entityID?(w=_&&(0,t.jsx)("div",{className:"pageImagePicker flex flex-col gap-2",children:(0,t.jsx)(y.ImageSettings,{entityID:e.entityID})}),E[33]=_,E[34]=e.entityID,E[35]=w):w=E[35],E[36]!==k||E[37]!==w?(S=(0,t.jsxs)(t.Fragment,{children:[k,w]}),E[36]=k,E[37]=w,E[38]=S):S=E[38],S},N=e=>{let r,i,a=(0,n.c)(12);return a[0]!==e?(r=()=>e.setOpenPicker("null"),a[0]=e,a[1]=r):r=a[1],a[2]!==e.alpha||a[3]!==e.disabled||a[4]!==e.helpText||a[5]!==e.label||a[6]!==e.openPicker||a[7]!==e.setOpenPicker||a[8]!==e.setValue||a[9]!==e.value||a[10]!==r?(i=(0,t.jsx)(b.ColorPicker,{disabled:e.disabled,label:e.label,helpText:e.helpText,value:e.value,setValue:e.setValue,thisPicker:"page",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:r,alpha:e.alpha}),a[2]=e.alpha,a[3]=e.disabled,a[4]=e.helpText,a[5]=e.label,a[6]=e.openPicker,a[7]=e.setOpenPicker,a[8]=e.setValue,a[9]=e.value,a[10]=r,a[11]=i):i=a[11],i},A=e=>{let r,i,a,o,s,l,c,u,d,h,m=(0,n.c)(25),f=(0,p.useEntity)(e.entityID,"canvas/background-pattern")?.data.value,g=`w-full rounded-md bg-bg-page border ${"grid"===f?"outline-solid outline-tertiary border-tertiary":"transparent-outline hover:outline-border border-border "}`;m[0]!==e.entityID||m[1]!==e.rep?(r=()=>{e.rep&&e.rep.mutate.assertFact({entity:e.entityID,attribute:"canvas/background-pattern",data:{type:"canvas-pattern-union",value:"grid"}})},m[0]=e.entityID,m[1]=e.rep,m[2]=r):r=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(k.CanvasBackgroundPattern,{pattern:"grid",scale:.5}),m[3]=i):i=m[3],m[4]!==g||m[5]!==r?(a=(0,t.jsx)("button",{className:g,onMouseDown:r,children:i}),m[4]=g,m[5]=r,m[6]=a):a=m[6];let y=`w-full rounded-md bg-bg-page border ${"dot"===f?"outline-solid outline-tertiary border-tertiary":"transparent-outline hover:outline-border border-border "}`;m[7]!==e.entityID||m[8]!==e.rep?(o=()=>{e.rep&&e.rep.mutate.assertFact({entity:e.entityID,attribute:"canvas/background-pattern",data:{type:"canvas-pattern-union",value:"dot"}})},m[7]=e.entityID,m[8]=e.rep,m[9]=o):o=m[9],m[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(k.CanvasBackgroundPattern,{pattern:"dot",scale:.5}),m[10]=s):s=m[10],m[11]!==y||m[12]!==o?(l=(0,t.jsx)("button",{className:y,onMouseDown:o,children:s}),m[11]=y,m[12]=o,m[13]=l):l=m[13];let b=`w-full rounded-md bg-bg-page border ${"plain"===f?"outline-solid outline-tertiary border-tertiary":"transparent-outline hover:outline-border border-border "}`;return m[14]!==e.entityID||m[15]!==e.rep?(c=()=>{e.rep&&e.rep.mutate.assertFact({entity:e.entityID,attribute:"canvas/background-pattern",data:{type:"canvas-pattern-union",value:"plain"}})},m[14]=e.entityID,m[15]=e.rep,m[16]=c):c=m[16],m[17]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(k.CanvasBackgroundPattern,{pattern:"plain"}),m[17]=u):u=m[17],m[18]!==b||m[19]!==c?(d=(0,t.jsx)("button",{className:b,onMouseDown:c,children:u}),m[18]=b,m[19]=c,m[20]=d):d=m[20],m[21]!==d||m[22]!==a||m[23]!==l?(h=(0,t.jsxs)("div",{className:"flex gap-2 h-8 ",children:[a,l,d]}),m[21]=d,m[22]=a,m[23]=l,m[24]=h):h=m[24],h},_=e=>{let r,i,a=(0,n.c)(8);return a[0]!==e?(r=()=>e.setOpenPicker("null"),a[0]=e,a[1]=r):r=a[1],a[2]!==e.openPicker||a[3]!==e.setOpenPicker||a[4]!==e.setValue||a[5]!==e.value||a[6]!==r?(i=(0,t.jsx)(b.ColorPicker,{label:"Text",value:e.value,setValue:e.setValue,thisPicker:"text",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:r}),a[2]=e.openPicker,a[3]=e.setOpenPicker,a[4]=e.setValue,a[5]=e.value,a[6]=r,a[7]=i):i=a[7],i},P=e=>{let r,i,a,o,s,l=(0,n.c)(13),{rep:c,rootEntity:u}=(0,p.useReplicache)(),d=(0,p.useEntity)(u,"theme/card-border-hidden"),h=(0,p.useEntity)(e.entityID,"theme/card-border-hidden"),m=(h||d)?.data.value||!1;l[0]!==m||l[1]!==e||l[2]!==c?.mutate?(r=function(){c?.mutate.assertFact({entity:e.entityID,attribute:"theme/card-border-hidden",data:{type:"boolean",value:!m}}),m&&"page"===e.openPicker||"page-background-image"===e.openPicker&&e.setOpenPicker("null")},l[0]=m,l[1]=e,l[2]=c?.mutate,l[3]=r):r=l[3];let f=r,g=!m;l[4]!==f?(i=()=>{f()},l[4]=f,l[5]=i):i=l[5],l[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("div",{className:"font-bold text-[#272727]",children:"Page Backgroun
163d"}),l[6]=a):a=l[6];let y=m?"none":"";return l[7]!==y?(o=(0,t.jsxs)("div",{className:"flex gap-2",children:[a,(0,t.jsx)("div",{className:"italic text-[#8C8C8C]",children:y})]}),l[7]=y,l[8]=o):o=l[8],l[9]!==g||l[10]!==i||l[11]!==o?(s=(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(w.Toggle,{toggle:g,onToggle:i,disabledColor1:"#8C8C8C",disabledColor2:"#DBDBDB",children:o})}),l[9]=g,l[10]=i,l[11]=o,l[12]=s):s=l[12],s};function M(e){e.currentTarget.setSelectionRange(0,e.currentTarget.value.length-1)}function R(e){"Enter"!==e.key||e.currentTarget.blur()}var L=e.i(44729),j=e.i(784192),O=e.i(99245);let B=e=>{let r,i,a,o,s,l,c,u,d=(0,n.c)(22),{rep:m}=(0,p.useReplicache)(),f=(0,p.useEntity)(e.entityID,"theme/page-width")?.data.value||624,[g,y]=(0,h.useState)(f),[b,v]=(0,h.useState)(624===f?"default":768===f?"wide":"custom"),x=e.openPicker==e.thisPicker;d[0]!==f?(r=()=>{y(f)},i=[f],d[0]=f,d[1]=r,d[2]=i):(r=d[1],i=d[2]),(0,h.useEffect)(r,i),d[3]!==e.entityID||d[4]!==m?.mutate?(a=t=>{m?.mutate.assertFact({entity:e.entityID,attribute:"theme/page-width",data:{type:"number",value:t}})},d[3]=e.entityID,d[4]=m?.mutate,d[5]=a):a=d[5];let k=a;return d[6]!==e?(o=()=>{e.openPicker===e.thisPicker?e.setOpenPicker("null"):e.setOpenPicker(e.thisPicker)},d[6]=e,d[7]=o):o=d[7],d[8]!==f?(s=(0,t.jsxs)("span",{className:"flex font-normal text-[#969696]",children:[f,"px"]}),d[8]=f,d[9]=s):s=d[9],d[10]!==o||d[11]!==s?(l=(0,t.jsx)("div",{className:"flex gap-2 items-center",children:(0,t.jsxs)("button",{className:"font-bold text-[#272727] shrink-0 grow-0 w-full flex gap-2 items-start text-left",onClick:o,children:["Max Page Width",s]})}),d[10]=o,d[11]=s,d[12]=l):l=d[12],d[13]!==f||d[14]!==g||d[15]!==x||d[16]!==b||d[17]!==k?(c=x&&(0,t.jsxs)("div",{className:"flex flex-col gap-1 px-3",children:[(0,t.jsx)("label",{htmlFor:"default",className:"w-full",children:(0,t.jsx)(O.Radio,{radioCheckedClassName:"text-[#595959]!",radioEmptyClassName:"text-[#969696]!",type:"radio",id:"default",name:"page-width-options",value:"default",checked:"default"===b,onChange:e=>{e.currentTarget.checked&&(v("default"),k(624))},children:(0,t.jsxs)("div",{className:`w-full cursor-pointer ${"default"===b?"text-[#595959]":"text-[#969696]"}`,children:["default (",624,"px)"]})})}),(0,t.jsx)("label",{htmlFor:"wide",className:"w-full",children:(0,t.jsx)(O.Radio,{radioCheckedClassName:"text-[#595959]!",radioEmptyClassName:"text-[#969696]!",type:"radio",id:"wide",name:"page-width-options",value:"wide",checked:"wide"===b,onChange:e=>{e.currentTarget.checked&&(v("wide"),k(768))},children:(0,t.jsxs)("div",{className:`w-full cursor-pointer ${"wide"===b?"text-[#595959]":"text-[#969696]"}`,children:["wide (",768,"px)"]})})}),(0,t.jsx)("label",{htmlFor:"custom",className:"pb-3 w-full",children:(0,t.jsx)(O.Radio,{type:"radio",id:"custom",name:"page-width-options",value:"custom",radioCheckedClassName:"text-[#595959]!",radioEmptyClassName:"text-[#969696]!",checked:"custom"===b,onChange:e=>{e.currentTarget.checked&&(v("custom"),"custom"!==b&&(k(f),y(f)))},children:(0,t.jsxs)("div",{className:"flex flex-col w-full",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("div",{className:`shrink-0 grow-0 w-fit z-10 cursor-pointer ${"custom"===b?"text-[#595959]":"text-[#969696]"}`,children:"custom"}),(0,t.jsxs)("div",{className:`flex font-normal ${"custom"===b?"text-[#969696]":"text-[#C3C3C3]"}`,children:[(0,t.jsx)(j.Input,{type:"number",className:"w-10 text-right appearance-none bg-transparent",max:1200,min:320,value:g,onChange:e=>{y(parseInt(e.currentTarget.value))},onKeyDown:e=>{if("Enter"===e.key||"Escape"===e.key){e.preventDefault();let t=g;isNaN(g)||y(t=Math.max(320,Math.min(1200,g))),k(t)}},onBlur:()=>{let e=g;isNaN(g)||y(e=Math.max(320,Math.min(1200,g))),k(e)}}),"px"]})]}),(0,t.jsxs)(L.Root,{className:"relative grow flex items-center select-none touch-none w-full h-fit px-1",value:[g],max:1200,min:320,step:16,onValueChange:e=>{y(e[0])},onValueCommit:e=>{k(e[0])},children:[(0,t.jsx)(L.Track,{className:`${"custom"===b?"bg-[#595959]":"bg-[#C3C3C3]"} relative grow rounded-full h-[3px] my-2`}),(0,t.jsx)(L.Thumb,{className:`flex w-4 h-4 rounded-full border-2 border-white cursor-pointer 164 ${"custom"===b?"bg-[#595959] shadow-[0_0_0_1px_#8C8C8C,inset_0_0_0_1px_#8C8C8C]":"bg-[#C3C3C3]"} 165 `,"aria-label":"Max Page Width"})]})]})})})]}),d[13]=f,d[14]=g,d[15]=x,d[16]=b,d[17]=k,d[18]=c):c=d[18],d[19]!==l||d[20]!==c?(u=(0,t.jsx)("div",{className:"pageWidthSetter flex flex-col gap-2 px-2 py-[6px] border border-[#CCCCCC] rounded-md",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[l,c]})}),d[19]=l,d[20]=c,d[21]=u):u=d[21],u};var F=e.i(492122),H=e.i(727378),U=e.i(461875);e.s(["AccentPickers",()=>z],651677);let z=e=>{let{rep:n}=(0,p.useReplicache)(),r=(0,h.useMemo)(()=>G(n,e.entityID),[n,e.entityID]),i=(0,m.useColorAttribute)(e.entityID,"theme/accent-background"),a=(0,m.useColorAttribute)(e.entityID,"theme/accent-text");return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"themeLeafletControls text-accent-2 flex flex-col gap-2 h-full bg-bg-leaflet p-2 rounded-md border border-accent-2 shadow-[0_0_0_1px_rgb(var(--accent-1))]",style:{backgroundColor:"rgba(var(--accent-1), 0.5)"},children:[(0,t.jsx)(b.ColorPicker,{label:"Accent",value:i,setValue:r("theme/accent-background"),thisPicker:"accent-1",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:()=>e.setOpenPicker("null")}),(0,t.jsx)(b.ColorPicker,{label:"Text on Accent",value:a,setValue:r("theme/accent-text"),thisPicker:"accent-2",openPicker:e.openPicker,setOpenPicker:e.setOpenPicker,closePicker:()=>e.setOpenPicker("null")})]})})};var $=e.i(876082),V=e.i(227086),q=e.i(88046);function G(e,t){return n=>r=>e?.mutate.assertFact({entity:t,attribute:n,data:{type:"color",value:(0,m.colorToString)(r,"hsba")}})}let W=e=>{let i,a,o,s=(0,n.c)(7),{data:l}=(0,$.useLeafletPublicationData)(),c=(0,V.useIsMobile)();if(!(0,F.useEntitySetContext)().permissions.write||l?.publications)return null;let u=c?"top":"right",d=c?"center":"start";return s[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(H.ActionButton,{icon:(0,t.jsx)(U.PaintSmall,{}),label:"Theme",className:"sm:w-full! w-fit!"}),s[0]=i):i=s[0],s[1]!==e?(a=(0,t.jsx)(K,{...e}),s[1]=e,s[2]=a):a=s[2],s[3]!==u||s[4]!==d||s[5]!==a?(o=(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(r.Po
165pover,{className:"w-80 bg-white! py-3!",arrowFill:"#FFFFFF",asChild:!0,side:u,align:d,trigger:i,children:a})}),s[3]=u,s[4]=d,s[5]=a,s[6]=o):o=s[6],o},K=e=>{let r,i,a,o,s,l,c,u,d,m,f,g,y,b,v,x,k,w,C=(0,n.c)(48),{rep:E}=(0,p.useReplicache)(),{data:T}=(0,$.useLeafletPublicationData)(),D=(0,F.useEntitySetContext)().permissions.write,N=(0,p.useEntity)(e.entityID,"theme/background-image"),A=(0,p.useEntity)(e.entityID,"theme/background-image-repeat"),[_,P]=(0,h.useState)(!0===e.home?"leaflet":"null");if(G(E,e.entityID),!D||T?.publications)return null;C[0]!==_||C[1]!==e.entityID||C[2]!==e.home?(r=!e.home&&(0,t.jsx)(B,{entityID:e.entityID,thisPicker:"page-width",openPicker:_,setOpenPicker:P,closePicker:()=>P("null")}),C[0]=_,C[1]=e.entityID,C[2]=e.home,C[3]=r):r=C[3],C[4]!==_||C[5]!==e.entityID?(i=(0,t.jsx)("div",{className:"bgPickerBody w-full flex flex-col gap-2 p-2 mt-1 border border-[#CCCCCC] rounded-md text-[#272727]",children:(0,t.jsx)(I,{entityID:e.entityID,openPicker:_,setOpenPicker:P})}),C[4]=_,C[5]=e.entityID,C[6]=i):i=C[6],C[7]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(Q,{fill:"white",stroke:"#CCCCCC",className:"ml-2 -mt-px"}),C[7]=a):a=C[7],C[8]!==i?(o=(0,t.jsx)("div",{className:"themeBGLeaflet flex",children:(0,t.jsxs)("div",{className:"bgPicker flex flex-col gap-0 -mb-[6px] z-10 w-full ",children:[i,a]})}),C[8]=i,C[9]=o):o=C[9],C[10]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{e.currentTarget===e.target&&P("leaflet")},C[10]=s):s=C[10];let M=N?`url(${N.data.src})`:void 0,R=A?"repeat":"no-repeat",L=A?`calc(${A.data.value}px / 2 )`:"cover";return C[11]!==M||C[12]!==R||C[13]!==L?(l={backgroundImage:M,backgroundRepeat:R,backgroundPosition:"center",backgroundSize:L},C[11]=M,C[12]=R,C[13]=L,C[14]=l):l=C[14],C[15]===Symbol.for("react.memo_cache_sentinel")?(c=e=>P(e),C[15]=c):c=C[15],C[16]!==_||C[17]!==e.entityID||C[18]!==e.home?(u=(0,t.jsx)(S,{entityID:e.entityID,openPicker:_,setOpenPicker:c,home:e.home}),C[16]=_,C[17]=e.entityID,C[18]=e.home,C[19]=u):u=C[19],C[20]===Symbol.for("react.memo_cache_sentinel")?(d=e=>P(e),C[20]=d):d=C[20],C[21]!==_||C[22]!==e.entityID?(m=(0,t.jsx)(z,{entityID:e.entityID,openPicker:_,setOpenPicker:d}),C[21]=_,C[22]=e.entityID,C[23]=m):m=C[23],C[24]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(Q,{fill:"rgb(var(--accent-2))",stroke:"rgb(var(--accent-1))",className:"ml-2"}),C[24]=f):f=C[24],C[25]!==m?(g=(0,t.jsxs)("div",{className:"flex flex-col z-10 -mb-[6px] ",children:[m,f]}),C[25]=m,C[26]=g):g=C[26],C[27]!==e.entityID?(y=(0,t.jsx)(Z,{entityID:e.entityID,setOpenPicker:P}),C[27]=e.entityID,C[28]=y):y=C[28],C[29]!==g||C[30]!==y?(b=(0,t.jsxs)("div",{className:"flex flex-col -gap-[6px]",children:[g,y]}),C[29]=g,C[30]=y,C[31]=b):b=C[31],C[32]!==e.entityID||C[33]!==e.home?(v=(0,t.jsx)(X,{setOpenPicker:P,home:e.home,entityID:e.entityID}),C[32]=e.entityID,C[33]=e.home,C[34]=v):v=C[34],C[35]!==u||C[36]!==b||C[37]!==v||C[38]!==l?(x=(0,t.jsxs)("div",{onClick:s,style:l,className:"bg-bg-leaflet px-3 pt-4 pb-0 mb-2 flex flex-col gap-4 roun
165ded-md border border-border",children:[u,b,v]}),C[35]=u,C[36]=b,C[37]=v,C[38]=l,C[39]=x):x=C[39],C[40]!==e.entityID||C[41]!==e.home?(k=!e.home&&(0,t.jsx)(Y,{entityID:e.entityID}),C[40]=e.entityID,C[41]=e.home,C[42]=k):k=C[42],C[43]!==r||C[44]!==x||C[45]!==k||C[46]!==o?(w=(0,t.jsxs)("div",{className:"themeSetterContent flex flex-col w-full overflow-y-scroll no-scrollbar",children:[r,o,x,k]}),C[43]=r,C[44]=x,C[45]=k,C[46]=o,C[47]=w):w=C[47],w};function Y(e){let r,i,a,o,s=(0,n.c)(10),{rep:l}=(0,p.useReplicache)(),c=(0,p.useEntity)(e.entityID,"theme/page-leaflet-watermark");s[0]!==c?.data.value||s[1]!==e.entityID||s[2]!==l?.mutate?(r=function(){l?.mutate.assertFact({entity:e.entityID,attribute:"theme/page-leaflet-watermark",data:{type:"boolean",value:!c?.data.value}})},s[0]=c?.data.value,s[1]=e.entityID,s[2]=l?.mutate,s[3]=r):r=s[3];let u=r,d=!!c?.data.value;return s[4]!==u?(i=()=>{u()},s[4]=u,s[5]=i):i=s[5],s[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)("div",{className:"flex flex-col gap-0 items-start ",children:[(0,t.jsx)("div",{className:"font-bold text-[#272727]",children:"Show Leaflet Watermark"}),(0,t.jsx)("div",{className:"text-sm text-[#969696]",children:"Help us spread the word!"})]}),s[6]=a):a=s[6],s[7]!==d||s[8]!==i?(o=(0,t.jsx)("div",{className:"flex gap-2 items-start mt-0.5",children:(0,t.jsx)(w.Toggle,{toggle:d,onToggle:i,disabledColor1:"#8C8C8C",disabledColor2:"#DBDBDB",children:a})}),s[7]=d,s[8]=i,s[9]=o):o=s[9],o}let Z=e=>{let r,i,a,o=(0,n.c)(7);return o[0]!==e?(r=t=>{t.target===t.currentTarget&&e.setOpenPicker("accent-1")},o[0]=e,o[1]=r):r=o[1],o[2]!==e?(i=(0,t.jsx)("div",{className:"cursor-pointer w-fit",onClick:()=>{e.setOpenPicker("accent-2")},children:"Example Button"}),o[2]=e,o[3]=i):i=o[3],o[4]!==r||o[5]!==i?(a=(0,t.jsx)("div",{onClick:r,className:"pointer-cursor font-bold relative text-center text-lg py-2 rounded-md bg-accent-1 text-accent-2 shadow-md flex items-center justify-center",children:i}),o[4]=r,o[5]=i,o[6]=a):a=o[6],a},X=e=>{let r,i,a,o,s,l,c,u,d,h,m,f,g,y,b,v=(0,n.c)(39),x=(0,p.useEntity)(e.entityID,"theme/card-background-image"),k=(0,p.useEntity)(e.entityID,"theme/card-background-image-repeat"),w=(0,p.useEntity)(e.entityID,"theme/card-background-image-opacity"),C=(0,p.useEntity)(e.entityID,"theme/card-border-hidden")?.data.value,S=(0,p.useEntity)(e.entityID,"theme/heading-font")?.data.value,E=(0,p.useEntity)(e.entityID,"theme/body-font")?.data.value;v[0]!==E?(r=(0,q.getFontFamilyValue)((0,q.getFontConfig)(E)),v[0]=E,v[1]=r):r=v[1];let T=r;v[2]!==S?(i=(0,q.getFontFamilyValue)((0,q.getFontConfig)(S)),v[2]=S,v[3]=i):i=v[3];let I=i;v[4]!==e?(a=t=>{t.currentTarget===t.target&&e.setOpenPicker("page")},v[4]=e,v[5]=a):a=v[5];let D=` 166 text-primary relative 167 ${C?"py-2 px-0 border border-transparent":`cursor-pointer p-2 border border-border border-b-transparent shadow-md 168 ${e.home?"rounded-md ":"rounded-t-lg "}`}`;return v[6]!==C?(o=C?void 0:{backgroundColor:"rgba(var(--bg-page), var(--bg-page-alpha))"},v[6]=C,v[7]=o):o=v[7],v[8]!==x||v[9]!==w?.data||v[10]!==k||v[11]!==C?(s=C?void 0:{backgroundImage:x?`url(${x.data.src})`:void 0,backgroundRepeat:k?"repeat":"no-repeat",opacity:w?.data.value||1,backgroundSize:k?`calc(${k.data.value}px / 2 )`:"cover"},v[8]=x,v[9]=w?.data,v[10]=k,v[11]=C,v[12]=s):s=v[12],v[13]!==s?(l=(0,t.jsx)("div",{className:"background absolute top-0 right-0 bottom-0 left-0 z-0 rounded-t-lg",style:s}),v[13]=s,v[14]=l):l=v[14],v[15]!==T?(c={fontFamily:T},v[15]=T,v[16]=c):c=v[16],v[17]!==e?(u=()=>{e.setOpenPicker("text")},v[17]=e,v[18]=u):u=v[18],v[19]!==I?(d={fontFamily:I},v[19]=I,v[20]=d):d=v[20],v[21]!==u||v[22]!==d?(h=(0,t.jsx)("p",{onClick:u,className:"cursor-pointer font-bold w-fit",style:d,children:"Hello!"}),v[21]=u,v[22]=d,v[23]=h):h=v[23],v[24]!==e?(m=()=>e.setOpenPicker("text"),v[24]=e,v[25]=m):m=v[25],v[26]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)("span",{className:"font-bold text-accent-contrast",children:"Leaflet"}),v[26]=f):f=v[26],v[27]!==m?(g=(0,t.jsxs)("small",{onClick:m,children:["Welcome to"," ",f," â a fun and easy way to make, share, and collab on little bits of paper â¨"]}),v[27]=m,v[28]=g):g=v[28],v[29]!==h||v[30]!==g||v[31]!==c?(y=(0,t.jsxs)("div",{className:"z-10 relative",style:c,children:[h,g]}),v[29]=h,v[30]=g,v[31]=c,v[32]=y):y=v[32],v[33]!==y||v[34]!==a||v[35]!==D||v[36]!==o||v[37]!==l?(b=(0,t.jsxs)("div",{onClick:a,className:D,style:o,children:[l,y]}),v[33]=y,v[34]=a,v[35]=D,v[36]=o,v[37]=l,v[38]=b):b=v[38],b},Q=e=>{let r,i,a,o=(0,n.c)(8);return o[0]!==e.fill?(r=(0,t.jsx)("path",{d:"M11.9999 12L24 0H0L11.9999 12Z",fill:e.fill}),o[0]=e.fill,o[1]=r):r=o[1],o[2]!==e.stroke?(i=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.33552 0L12 10.6645L22.6645 0H24L12 12L0 0H1.33552Z",fill:e.stroke}),o[2]=e.stroke,o[3]=i):i=o[3],o[4]!==e.className||o[5]!==r||o[6]!==i?(a=(0,t.jsxs)("svg",{width:"24",height:"12",viewBox:"0 0 24 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e.className,children:[r,i]}),o[4]=e.className,o[5]=r,o[6]=i,o[7]=a):a=o[7],a}},84395,e=>{"use strict";e.s(["FootnoteButton",()=>c]);var t=e.i(843476),n=e.i(500932),r=e.i(988314),i=e.i(813029),a=e.i(467592),o=e.i(492122),s=e.i(346594),l=e.i(887710);function c(){let e,c,h,p=(0,n.c)(7),m=(0,a.useReplicache)(),f=(0,o.useEntitySetContext)(),g=(0,i.useUIState)(u);return p[0]!==f||p[1]!==g||p[2]!==m?(e=async e=>{if(e.preventDefault(),!g||"block"!==g.entityType)return;let t=r.useEditorStates.getState().editorStates[g.entityID];t?.view&&m.rep&&await (0,s.insertFootnote)(t.view,g.entityID,m.rep,f.set)},p[0]=f,p[1]=g,p[2]=m,p[3]=e):e=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(d,{}),p[4]=c):c=p[4],p[5]!==e?(h=(0,t.jsx)(l.ToolbarButton,{tooltipContent:"Insert Footnote",onClick:e,children:c}),p[5]=e,p[6]=h):h=p[6],h}function u(e){return e.focusedEntity}function d(e){let r,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M21.3926 4.21564C21.503 4.21564 21.5926 4.30518 21.5926 4.41564V10.0352C21.5926 10.1456 21.503 10.2352 21.3926 10.2352H20.1584C20.0479 10.2352 19.9584 10.1456 19.9584 10.0352V5.74816C19.9584 5.73289 19.946 5.72052 19.9307 5.72052C19.9257 5.72052 19.9208 5.72187 19.9165 5.72444L18.909 6.32717C18.7757 6.40692 18.6063 6.31088 18.6063 6.15553V5.23309C18.6063 5.16341 18.6426 5.09876 18.702 5.06243L20.0397 4.24498
168C20.0711 4.22579 20.1072 4.21564 20.144 4.21564H21.3926Z",fill:"currentColor"}),i=(0,t.jsx)("path",{d:"M13.6152 5C13.8361 5 14.0156 5.17948 14.0156 5.40039V10.4297C14.254 10.2111 14.5346 9.9596 15.1074 9.66016C15.6803 9.34771 16.1974 9.19924 16.9785 9.19922C17.7797 9.19927 18.356 9.39478 18.958 9.75879V10.0352C18.9581 10.6977 19.4957 11.2352 20.1582 11.2354H20.417C20.4857 11.3518 20.5525 11.4718 20.6133 11.5977C20.9909 12.353 21.1797 13.2326 21.1797 14.2354C21.1797 15.2379 21.1195 16.0091 20.6455 16.9775C20.2754 17.7337 19.8632 18.1974 19.2607 18.6299C18.766 18.9849 17.9146 19.2011 17.0684 19.2012C16.3263 19.2012 15.7474 19.0709 15.2266 18.8105C14.7059 18.5502 14.2825 18.231 13.957 17.8535V18.6299C13.957 18.8478 13.7823 19.026 13.5645 19.0303L12.2158 19.0566C11.992 19.0609 11.8076 18.8802 11.8076 18.6562V5.40039C11.8076 5.17954 11.9872 5.0001 12.208 5H13.6152ZM7.05469 9.16113C8.33062 9.1612 9.28775 9.48019 9.92578 10.1182C10.5637 10.7562 10.8828 11.57 10.8828 12.5596V18.6641C10.8828 18.885 10.7033 19.0645 10.4824 19.0645H9.00586C8.77508 19.0642 8.59172 18.869 8.60645 18.6387L8.65625 17.873C8.34379 18.2896 7.97256 18.6087 7.54297 18.8301C7.11324 19.0514 6.5394 19.1621 5.82324 19.1621C5.14633 19.162 4.56014 19.0514 4.06543 18.8301C3.57077 18.5957 3.18651 18.2766 2.91309 17.873C2.65267 17.4563 2.52246 16.9737 2.52246 16.4268C2.52256 15.6066 2.82203 14.9228 3.4209 14.376C4.03285 13.8161 4.92498 13.4711 6.09668 13.3408L8.65625 13.0674V12.3057C8.65625 11.9932 8.5194 11.7132 8.24609 11.4658C7.97268 11.2055 7.53625 11.0753 6.9375 11.0752C6.41668 11.0752 5.95996 11.2054 5.56934 11.4658C5.30375 11.64 5.0992 11.8786 4.95605 12.1816C4.85494 12.3957 4.61483 12.5278 4.39258 12.4463L3.24316 12.0234C3.04644 11.9511 2.9365 11.7382 3.0127 11.543C3.28354 10.8507 3.73231 10.2976 4.3584 9.88379C5.10064 9.40199 5.99995 9.16116 7.05469 9.16113ZM6.31152 15.0596C5.81698 15.1247 5.44557 15.268 5.19824 15.4893C4.95102 15.6975 4.82725 15.9647 4.82715 16.29C4.82715 16.5895 4.94437 16.8509 5.17871 17.0723C5.42601 17.2805 5.75841 17.3847 6.1748 17.3848C6.70866 17.3848 7.15883 17.2871 7.52344 17.0918C7.90102 16.8965 8.18098 16.6155 8.36328 16.251C8.55847 15.8864 8.65625 15.437 8.65625 14.9033C8.65611 14.8309 8.59244 14.7752 8.52051 14.7842L6.31152 15.0596ZM16.6758 11.1533C15.9644 11.1533 15.6758 11.2705 15.2852 11.5049C14.9076 11.7393 14.6016 12.0844 14.3672 12.54C14.1328 12.9827 14.0156 13.5297 14.0156 14.1807C14.0156 14.8317 14.1329 15.3851 14.3672 15.8408C14.6016 16.2835 14.9076 16.623 15.2852 16.8574C15.6756 17.0917 15.9645 17.209 16.6758 17.209C17.3871 17.2089 17.8897 16.9826 18.3584 16.4229C18.8401 15.863 19.081 15.1337 19.0811 14.2354C19.0811 13.3368 18.8402 12.6068 18.3584 12.0469C17.8897 11.4871 17.387 11.1535 16.6758 11.1533Z",fill:"currentColor"}),o[0]=r,o[1]=i):(r=o[0],i=o[1]),o[2]!==e?(a=(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r,i]}),o[2]=e,o[3]=a):a=o[3],a}},543291,e=>{"use strict";e.s(["HighlightButton",()=>w,"HighlightToolbar",()=>C]);var t=e.i(843476),n=e.i(500932),r=e.i(988314),i=e.i(813029),a=e.i(69497),o=e.i(991657),s=e.i(178761),l=e.i(186336),c=e.i(885718),u=e.i(50203),d=e.i(537712),h=e.i(467592),p=e.i(271645),m=e.i(629683),f=e.i(859015),g=e.i(887710),y=e.i(970827),b=e.i(979944),v=e.i(22272),x=e.i(461875),k=e.i(760524);let w=e=>{let r,s,l,u,d,h,p,m,y,b=(0,n.c)(17),x=(0,i.useUIState)(I);b[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"text-center bg-border-light w-fit rounded-md px-0.5 mx-auto ",children:"Highlight"}),b[0]=r):r=b[0],b[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[r,(0,t.jsx)("div",{className:"flex gap-1",children:(0,k.isMac)()?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.ShortcutKey,{children:"â"})," +"," ",(0,t.jsx)(f.ShortcutKey,{children:" Ctrl "})," +"," ",(0,t.jsx)(f.ShortcutKey,{children:" H "})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.ShortcutKey,{children:" Ctrl "})," +"," ",(0,t.jsx)(f.ShortcutKey,{children:" Meta "})," +"," ",(0,t.jsx)(f.ShortcutKey,{children:" H "})]})})]}),b[1]=s):s=b[1],b[2]!==x?(l={color:x},b[2]=x,b[3]=l):l=b[3];let w="1"===x?c.theme.colors["highlight-1"]:"2"===x?c.theme.colors["highlight-2"]:c.theme.colors["highlight-3"];return b[4]!==w?(u=(0,t.jsx)(T,{highlightColor:w}),b[4]=w,b[5]=u):u=b[5],b[6]!==l||b[7]!==u?(d=(0,t.jsx)(o.TextDecorationButton,{tooltipContent:s,attrs:l,mark:a.schema.marks.highlight,icon:u}),b[6]=l,b[7]=u,b[8]=d):d=b[8],b[9]!==e?(h=()=>{e.setToolbarState("highlight")},b[9]=e,b[10]=h):h=b[10],b[11]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(v.ArrowRightTiny,{}),b[11]=p):p=b[11],b[12]!==h?(m=(0,t.jsx)(g.ToolbarButton,{tooltipContent:"Change Highlight Color",onClick:h,className:"-ml-1",children:p}),b[12]=h,b[13]=m):m=b[13],b[14]!==d||b[15]!==m?(y=(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[d,m]}),b[14]=d,b[15]=m,b[16]=y):y=b[16],y},C=e=>{let a,o,s,l,c,u,d,h,m,g,y=(0,n.c)(17),b=(0,i.useUIState)(D);y[0]!==b?(a=e=>b?e.editorStates[b.entityID]:null,y[0]=b,y[1]=a):a=y[1];let v=(0,r.useEditorStates)(a),[x,k]=(0,p.useState)(!0);return y[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{k(!1)},s=[],y[2]=o,y[3]=s):(o=y[2],s=y[3]),(0,p.useEffect)(o,s),y[4]!==v||y[5]!==x||y[6]!==e?(l=()=>{!x&&v&&e.onClose()},y[4]=v,y[5]=x,y[6]=e,y[7]=l):l=y[7],y[8]!==v||y[9]!==e?(c=[v,e],y[8]=v,y[9]=e,y[10]=c):c=y[10],(0,p.useEffect)(l,c),y[11]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(S,{color:"1"}),d=(0,t.jsx)(S,{color:"2"}),h=(0,t.jsx)(S,{color:"3"}),m=(0,t.jsx)(f.Separator,{classname:"h-6!"}),y[11]=u,y[12]=d,y[13]=h,y[14]=m):(u=y[11],d=y[12],h=y[13],m=y[14]),y[15]!==e.pageID?(g=(0,t.jsx)("div",{className:"flex w-full justify-between items-center gap-4 text-secondary",children:(0,t.jsxs)("div",{className:"flex items-center gap-[6px]",children:[u,d,h,m,(0,t.jsx)(E,{pageID:e.pageID})]})}),y[15]=e.pageID,y[16]=g):g=y[16],g},S=e=>{let r,s,l,u,d=(0,n.c)(10),h=(0,i.useUIState)(N);d[0]!==e.color?(r=t=>{t.preventDefault(),(0,o.toggleMarkInFocusedBlock)(a.schema.marks.highlight,{color:e.color}),i.useUIState.setState({lastUsedHighlight:e.color})},d[0]=e.color,d[1]=r):r=d[1];let p=`w-6 h-6 rounded-md flex items-center justify-center ${h===e.color?"bg-border":""}
168`,m="1"===e.color?c.theme.colors["highlight-1"]:"2"===e.color?c.theme.colors["highlight-2"]:c.theme.colors["highlight-3"];return d[2]!==m?(s=(0,t.jsx)("div",{className:"w-5 h-5 rounded-full border-2 border-white shadow-[0_0_0_1px_#8C8C8C]",style:{backgroundColor:m}}),d[2]=m,d[3]=s):s=d[3],d[4]!==p||d[5]!==s?(l=(0,t.jsx)("div",{className:p,children:s}),d[4]=p,d[5]=s,d[6]=l):l=d[6],d[7]!==r||d[8]!==l?(u=(0,t.jsx)("button",{onMouseDown:r,children:l}),d[7]=r,d[8]=l,d[9]=u):u=d[9],u},E=e=>{let r,i,a,o,f,g,v,k,w,C,S,E,T,I,D,N,_,P,M,R,L,j,O,B,F,H,U,z,$=(0,n.c)(57),{rep:V,rootEntity:q}=(0,h.useReplicache)();$[0]!==V||$[1]!==q?(i=(0,u.setColorAttribute)(V,q),$[0]=V,$[1]=q,$[2]=i):i=$[2],r=i;let[G,W]=(0,p.useState)("null"),K=(0,h.useEntity)(q,"theme/background-image"),Y=(0,h.useEntity)(q,"theme/background-image-repeat"),Z=(0,h.useEntity)(e.pageID,"theme/card-background-image"),X=(0,h.useEntity)(e.pageID,"theme/card-background-image-repeat"),Q=(0,h.useEntity)(e.pageID,"theme/card-background-image-opacity"),J=(0,m.useColorAttribute)(q,"theme/highlight-1"),ee=(0,m.useColorAttribute)(q,"theme/highlight-2"),et=(0,m.useColorAttribute)(q,"theme/highlight-3");$[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(s.Trigger,{asChild:!0,children:(0,t.jsx)(l.Trigger,{className:"rounded-md active:bg-border active:text-primary text-secondary hover:bg-border hover:text-primary",onMouseDown:A,children:(0,t.jsx)(x.PaintSmall,{})})}),$[3]=a):a=$[3],$[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(l.Portal,{children:(0,t.jsx)(y.NestedCardThemeProvider,{children:(0,t.jsxs)(l.Content,{sideOffset:6,alignOffset:12,className:"portalStyles z-10 bg-border rounded-md py-1 px-[6px] font-bold text-secondary text-sm",children:["Change Highlight Colors",(0,t.jsx)(l.Arrow,{asChild:!0,width:16,height:8,viewBox:"0 0 16 8",children:(0,t.jsx)(b.PopoverArrow,{arrowFill:c.theme.colors.border,arrowStroke:"transparent"})})]})})}),$[4]=o):o=$[4];let en=`url(${K?.data.src})`,er=Y?"repeat":"no-repeat",ei=Y?`calc(${Y.data.value}px / 2 )`:"cover";$[5]!==en||$[6]!==er||$[7]!==ei?(f={backgroundImage:en,backgroundRepeat:er,backgroundPosition:"center",backgroundSize:ei},$[5]=en,$[6]=er,$[7]=ei,$[8]=f):f=$[8],$[9]===Symbol.for("react.memo_cache_sentinel")?(g={backgroundColor:"rgba(var(--bg-page), 0.6)"},$[9]=g):g=$[9],$[10]!==r?(v=e=>{r("theme/highlight-1")(e.withChannelValue("alpha",1))},$[10]=r,$[11]=v):v=$[11],$[12]===Symbol.for("react.memo_cache_sentinel")?(k=()=>W("null"),$[12]=k):k=$[12],$[13]!==J||$[14]!==G||$[15]!==v?(w=(0,t.jsx)(d.ColorPicker,{label:"Highlight 1",value:J,setValue:v,thisPicker:"highlight-1",openPicker:G,setOpenPicker:W,closePicker:k}),$[13]=J,$[14]=G,$[15]=v,$[16]=w):w=$[16],$[17]!==r?(C=r("theme/highlight-2"),$[17]=r,$[18]=C):C=$[18],$[19]===Symbol.for("react.memo_cache_sentinel")?(S=()=>W("null"),$[19]=S):S=$[19],$[20]!==ee||$[21]!==G||$[22]!==C?(E=(0,t.jsx)(d.ColorPicker,{label:"Highlight 2",value:ee,setValue:C,thisPicker:"highlight-2",openPicker:G,setOpenPicker:W,closePicker:S}),$[20]=ee,$[21]=G,$[22]=C,$[23]=E):E=$[23],$[24]!==r?(T=r("theme/highlight-3"),$[24]=r,$[25]=T):T=$[25],$[26]===Symbol.for("react.memo_cache_sentinel")?(I=()=>W("null"),$[26]=I):I=$[26],$[27]!==et||$[28]!==G||$[29]!==T?(D=(0,t.jsx)(d.ColorPicker,{label:"Highlight 3",value:et,setValue:T,thisPicker:"highlight-3",openPicker:G,setOpenPicker:W,closePicker:I}),$[27]=et,$[28]=G,$[29]=T,$[30]=D):D=$[30],$[31]!==w||$[32]!==E||$[33]!==D?(N=(0,t.jsxs)("div",{className:"themeHighlightControls flex flex-col gap-2 h-full text-primary bg-bg-leaflet p-2 rounded-md border border-primary shadow-[0_0_0_1px_rgb(var(--bg-page))]",style:g,children:[w,E,D]}),$[31]=w,$[32]=E,$[33]=D,$[34]=N):N=$[34],$[35]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(u.SectionArrow,{fill:c.theme.colors.primary,stroke:c.theme.colors["bg-page"],className:"ml-2"}),$[35]=_):_=$[35],$[36]!==N?(P=(0,t.jsxs)("div",{className:"flex flex-col -mb-[6px] z-10",children:[N,_]}),$[36]=N,$[37]=P):P=$[37],$[38]===Symbol.for("react.memo_cache_sentinel")?(M={backgroundColor:"rgba(var(--bg-page), var(--bg-page-alpha))"},$[38]=M):M=$[38];let ea=`url(${Z?.data.src})`,eo=X?"repeat":"no-repeat",es=X?`calc(${X.data.value}px / 2 )`:"cover",el=Q?.data.value||1;return $[39]!==ea||$[40]!==eo||$[41]!==es||$[42]!==el?(R=(0,t.jsx)("div",{className:"background absolute top-0 right-0 bottom-0 left-0 z-0 rounded-t-lg",style:{backgroundImage:ea,backgroundRepeat:eo,backgroundPosition:"center",backgroundSize:es,opacity:el}}),$[39]=ea,$[40]=eo,$[41]=es,$[42]=el,$[43]=R):R=$[43],$[44]===Symbol.for("react.memo_cache_sentinel")?(L=(0,t.jsx)("p",{className:"font-bold",children:"Pick your highlights!"}),$[44]=L):L=$[44],$[45]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsx)("span",{className:"highlight bg-highlight-1",children:"Highlights look like"}),O=(0,t.jsx)("br",{}),$[45]=j,$[46]=O):(j=$[45],O=$[46]),$[47]===Symbol.for("react.memo_cache_sentinel")?(B=(0,t.jsxs)("div",{className:"relative flex flex-col",children:[L,(0,t.jsxs)("small",{className:"",children:["This is what"," ",j,O,"Make them"," ",(0,t.jsx)("span",{className:"highlight bg-highlight-2",children:"whatever you want!"}),(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"highlight bg-highlight-3",children:"Happy theming!"})]})]}),$[47]=B):B=$[47],$[48]!==R?(F=(0,t.jsxs)("div",{className:"rounded-t-lg p-2 relative border border-border border-b-transparent shadow-md text-primary",style:M,children:[R,B]}),$[48]=R,$[49]=F):F=$[49],$[50]!==P||$[51]!==F||$[52]!==f?(H=(0,t.jsxs)("div",{className:"bg-bg-leaflet w-full m-2 p-3 pb-0 flex flex-col rounded-md border border-border",style:f,children:[P,F]}),$[50]=P,$[51]=F,$[52]=f,$[53]=H):H=$[53],$[54]===Symbol.for("react.memo_cache_sentinel")?(U=(0,t.jsx)(s.Arrow,{asChild:!0,width:16,height:8,viewBox:"0 0 16 8",children:(0,t.jsx)(b.PopoverArrow,{arrowFill:c.theme.colors.white,arrowStroke:c.theme.colors.border})}),$[54]=U):U=$[54],$[55]!==H?(z=(0,t.jsx)(s.Root,{children:(0,t.jsxs)(l.Root,{children:[a,o,(0,t.jsx)(s.Portal,{children:(0,t.jsx)(y.NestedCardThemeProvider,{children:(0,t.jsxs)(s.Content,{className:"themeSetterWrapper portalStyles z-20 w-80 h-fit max-h-[80vh] bg-white rounded-md border border-border flex",align:"center",sideOffset:8,collisionPadding:16,children:[H,U]})})})]})}),$[55]=H,$[56]=z):z=$[56],z},T=e=>{let r,i,a,o,s,l=(0,n.c)(9);return l[0]!==e?({highlightColor:r,...i}=e,l[0]=e,l[1]=r,l[2]=i):(r=l[1],i=l[2]),l[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 12C20.5 16.6944 16.6944 20.5 12 20.5C7.30558 20.5 3.5 16.6944 3.5 12C3.5 7.93802 6.34926 4.54153 10.1582 3.70008L9.84791 4.18297C9.77021 4.3039 9.72889 4.44461 9.72888 4.58836L9.72851 10.0094L8.63101 11.7402C8.62242 11.7538 8.61431 11.7675 8.60666 11.7815C8.60016 11.7908 8.59388 11.8004 8.58781 11.8101C8.38051 12.1418 8.46302 12.6162 8.76836 13.1359L7.24363 15.6498C6.74131 16.4779 7.3311 17.5381 8.29965 17.548L11.6224 17.5818C12.2379 17.5881 12.8114 17.2706 13.1328 16.7456L13.4985 16.
168148C13.9182 16.1939 14.2769 16.1567 14.5378 16.0308C14.6916 15.9756 14.8266 15.8704 14.9178 15.7265L16.0178 13.9918L20.4981 11.8165C20.4994 11.8775 20.5 11.9387 20.5 12ZM20.3169 10.2369L15.1709 12.7355C15.0456 12.7963 14.9397 12.8909 14.8651 13.0086L14.3138 13.878C14.2071 13.7494 14.0889 13.6201 13.9603 13.4913C13.554 13.0742 13.0329 12.6692 12.5492 12.3837C12.4992 12.3542 12.4466 12.3239 12.3919 12.2929C12.0663 12.101 11.7406 11.938 11.4239 11.8053C11.2273 11.719 11.024 11.6386 10.8321 11.5784C10.7486 11.5522 10.6549 11.5258 10.5563 11.505L11.1119 10.6287C11.188 10.5086 11.2285 10.3694 11.2285 10.2272L11.2289 4.80862L12.0696 3.50028C12.4231 3.50311 12.7716 3.52754 13.1136 3.57229C13.0973 3.59203 13.082 3.61297 13.0679 3.63511L12.2981 4.84369C12.2341 4.94402 12.2002 5.06052 12.2002 5.17948V7.82698C12.2002 8.17215 12.48 8.45198 12.8252 8.45198C13.1704 8.45198 13.4502 8.17215 13.4502 7.82698V5.36164L14.1222 4.3067C14.225 4.14534 14.2445 3.95474 14.1919 3.7853C17.2663 4.60351 19.6556 7.10172 20.3169 10.2369ZM22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM12.6338 9.14563C12.979 9.14563 13.2588 9.42545 13.2588 9.77063V10.2416C13.2588 10.5868 12.979 10.8666 12.6338 10.8666C12.2886 10.8666 12.0088 10.5868 12.0088 10.2416V9.77063C12.0088 9.42545 12.2886 9.14563 12.6338 9.14563ZM12.7875 14.4388C12.5032 14.1651 12.1383 13.8821 11.7882 13.6755C11.5214 13.5181 11.1621 13.3284 10.8268 13.1808C10.733 13.1395 10.6444 13.103 10.5629 13.072L8.75514 16.0525L11.6391 16.0819C11.727 16.0828 11.809 16.0374 11.8549 15.9625L12.7875 14.4388Z",fill:"currentColor"}),l[3]=a):a=l[3],l[4]!==r?(o=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 12C20.5 16.6944 16.6944 20.5 12 20.5C7.30558 20.5 3.5 16.6944 3.5 12C3.5 7.93801 6.34926 4.54152 10.1582 3.70007L9.84791 4.18296C9.77021 4.30389 9.72889 4.4446 9.72888 4.58835L9.72851 10.0093L8.63101 11.7402C8.62242 11.7537 8.61431 11.7675 8.60666 11.7814C8.60016 11.7908 8.59388 11.8004 8.58781 11.8101C8.38051 12.1418 8.46302 12.6162 8.76836 13.1359L7.24363 15.6498C6.74131 16.4779 7.3311 17.5381 8.29965 17.5479L11.6224 17.5818C12.2379 17.5881 12.8114 17.2705 13.1328 16.7455L13.4985 16.148C13.9182 16.1939 14.2769 16.1567 14.5378 16.0308C14.6916 15.9756 14.8266 15.8704 14.9178 15.7265L16.0178 13.9918L20.4981 11.8164C20.4994 11.8775 20.5 11.9387 20.5 12ZM12.7875 14.4388C12.5032 14.1651 12.1383 13.8821 11.7882 13.6755C11.5214 13.5181 11.1621 13.3284 10.8268 13.1808C10.733 13.1395 10.6444 13.1029 10.5629 13.072L8.75514 16.0525L11.6391 16.0819C11.727 16.0828 11.809 16.0374 11.8549 15.9624L12.7875 14.4388Z",fill:r}),l[4]=r,l[5]=o):o=l[5],l[6]!==i||l[7]!==o?(s=(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[a,o]}),l[6]=i,l[7]=o,l[8]=s):s=l[8],s};function I(e){return e.lastUsedHighlight}function D(e){return e.focusedEntity}function N(e){return e.lastUsedHighlight}function A(e){e.preventDefault()}},61395,e=>{"use strict";e.s(["ImageToolbar",()=>s]);var t=e.i(843476),n=e.i(500932),r=e.i(467592),i=e.i(813029),a=e.i(859015),o=e.i(511987);let s=e=>{let s,c,u,d=(0,n.c)(7),h=(0,i.useUIState)(l),p=(0,r.useEntity)(h?.entityType==="page"?h.entityID:h?.parent||null,"page/type");return d[0]!==e.setToolbarState?(s=(0,t.jsx)(o.TextAlignmentButton,{hiddenOnCanvas:!0,setToolbarState:e.setToolbarState}),d[0]=e.setToolbarState,d[1]=s):s=d[1],d[2]!==p?.data.value?(c=p?.data.value!=="canvas"&&(0,t.jsx)(a.Separator,{classname:"h-6!"}),d[2]=p?.data.value,d[3]=c):c=d[3],d[4]!==s||d[5]!==c?(u=(0,t.jsx)("div",{className:"flex items-center gap-2 justify-between w-full",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s,c]})}),d[4]=s,d[5]=c,d[6]=u):u=d[6],u};function l(e){return e.focusedEntity}},743756,e=>{"use strict";e.s(["InlineLinkToolbar",()=>x,"LinkButton",()=>b]);var t=e.i(843476),n=e.i(500932),r=e.i(69497),i=e.i(827121),a=e.i(813029),o=e.i(887710),s=e.i(271645),l=e.i(859015),c=e.i(988314),u=e.i(662498),d=e.i(382548),h=e.i(546296),p=e.i(784192),m=e.i(467592),f=e.i(864460),g=e.i(743937);let y=e=>{if(!e)return{isLink:!1,disabled:!0};
168let t=!1,{to:n,from:i,$cursor:a}=e.selection;return a&&(t=!!r.schema.marks.link.isInSet(a.marks())),n!==i&&(t=!!(0,u.rangeHasMark)(e,r.schema.marks.link,i,n)),{isLink:t,disabled:e.selection.empty&&!t}};function b(e){let r,i,s,l,u,d,h,p=(0,n.c)(14),m=(0,a.useUIState)(v);p[0]!==m?(r=e=>m?e.editorStates[m]?.editor:void 0,p[0]=m,p[1]=r):r=p[1];let f=r;p[2]!==f?(i=e=>y(f(e)).isLink,p[2]=f,p[3]=i):i=p[3];let b=(0,c.useEditorStates)(i);p[4]!==f?(s=e=>y(f(e)).disabled,p[4]=f,p[5]=s):s=p[5];let x=(0,c.useEditorStates)(s);return p[6]!==e?(l=t=>{t.preventDefault(),e.setToolbarState("link")},p[6]=e,p[7]=l):l=p[7],p[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)("div",{className:"text-accent-contrast underline",children:"Inline Link"}),d=(0,t.jsx)(g.LinkSmall,{}),p[8]=u,p[9]=d):(u=p[8],d=p[9]),p[10]!==x||p[11]!==b||p[12]!==l?(h=(0,t.jsx)(o.ToolbarButton,{active:b,onClick:l,disabled:x,tooltipContent:u,children:d}),p[10]=x,p[11]=b,p[12]=l,p[13]=h):h=p[13],h}function v(e){return e.focusedEntity?.entityID}function x(e){let o,y,b,v,x,C,S,E,T,I,D,N,A,_=(0,n.c)(31),P=(0,a.useUIState)(w);_[0]!==P?(o=e=>P?e.editorStates[P.entityID]:null,_[0]=P,_[1]=o):o=_[1];let M=(0,c.useEditorStates)(o),{undoManager:R}=(0,m.useReplicache)();(0,s.useEffect)(()=>{if(M){let e,{to:t,from:n,$cursor:i}=M.editor.selection;if(i&&(e=!!r.schema.marks.link.isInSet(i.marks())),t!==n&&(e=!!(0,u.rangeHasMark)(M.editor,r.schema.marks.link,n,t)),e)return}M?.editor.selection.empty&&e.onClose()},[M,e]);let L="";if(y=null,b=null,M){let{to:e,from:t,$cursor:n}=M.editor.selection;if(e!==t)y=t,b=e;else{let e=(0,d.findMarkRange)(M.editor.doc,r.schema.marks.link,t);y=e.start,b=e.end}if(n){let e;_[2]!==n?(e=n.marks().find(k),_[2]=n,_[3]=e):e=_[3];let t=e;t&&(L=t.attrs.href)}}let[j,O]=(0,s.useState)(L);_[4]!==b||_[5]!==P||_[6]!==M?.editor||_[7]!==M?.view||_[8]!==j||_[9]!==e||_[10]!==y||_[11]!==R?(v=()=>{let t=(0,h.ensureProtocol)(j),n=M?.editor;if(!n||null===y||!b||!P)return;let a=n.tr;a.addMark(y,b,r.schema.marks.link.create({href:t})),a.setSelection(i.TextSelection.create(a.doc,a.selection.to));let o=n.apply(a);R.add({undo:()=>{M?.view?.hasFocus()||M?.view?.focus(),(0,c.setEditorState)(P.entityID,{editor:n})},redo:()=>{M?.view?.hasFocus()||M?.view?.focus(),(0,c.setEditorState)(P.entityID,{editor:o})}}),(0,c.setEditorState)(P?.entityID,{editor:o}),e.onClose()},_[4]=b,_[5]=P,_[6]=M?.editor,_[7]=M?.view,_[8]=j,_[9]=e,_[10]=y,_[11]=R,_[12]=v):v=_[12];let B=v;_[13]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(g.LinkSmall,{}),C=(0,t.jsx)(l.Separator,{classname:"h-6!"}),_[13]=x,_[14]=C):(x=_[13],C=_[14]),_[15]===Symbol.for("react.memo_cache_sentinel")?(S=e=>O(e.target.value),_[15]=S):S=_[15],_[16]!==e||_[17]!==B?(E=t=>{"Enter"===t.key&&(t.preventDefault(),B()),"Escape"===t.key&&e.onClose()},_[16]=e,_[17]=B,_[18]=E):E=_[18],_[19]!==j||_[20]!==E?(T=(0,t.jsx)(p.Input,{autoFocus:!0,className:"w-full grow bg-transparent border-none outline-hidden ",placeholder:"www.example.com",value:j,onChange:S,onKeyDown:E}),_[19]=j,_[20]=E,_[21]=T):T=_[21];let F=!j||""===j;return _[22]!==B?(I=e=>{e.preventDefault(),B()},_[22]=B,_[23]=I):I=_[23],_[24]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsx)(f.CheckTiny,{}),_[24]=D):D=_[24],_[25]!==F||_[26]!==I?(N=(0,t.jsx)("div",{className:"flex items-center gap-3 w-4",children:(0,t.jsx)("button",{disabled:F,className:"hover:text-accent-contrast -mr-6 disabled:text-border",onMouseDown:I,children:D})}),_[25]=F,_[26]=I,_[27]=N):N=_[27],_[28]!==N||_[29]!==T?(A=(0,t.jsxs)("div",{className:"w-full flex items-center gap-[6px] grow",children:[x,C,T,N]}),_[28]=N,_[29]=T,_[30]=A):A=_[30],A}function k(e){return e.type===r.schema.marks.link}function w(e){return e.focusedEntity}},842158,e=>{"use strict";e.s(["ListButton",()=>f,"ListOrderedSmall",()=>b,"ListToolbar",()=>g,"ListUnorderedSmall",()=>y]);var t=e.i(843476),n=e.i(500932),r=e.i(859015),i=e.i(393991),a=e.i(467592),o=e.i(813029),s=e.i(898144),l=e.i(887710),c=e.i(293297),u=e.i(901982),d=e.i(271645),h=e.i(22272),p=e.i(282436),m=e.i(823035);let f=e=>{let i,d,p,m,f,g,b,v,x,k=(0,n.c)(16),C=(0,o.useUIState)(w),S=(0,a.useEntity)(C?.entityID||null,"block/is-list"),{rep:E,undoManager:T}=(0,a.useReplicache)();return k[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"text-center",children:"Make List"}),k[0]=i):i=k[0],k[1]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsxs)(r.ShortcutKey,{children:[" ",(0,s.metaKey)()]}),k[1]=d):d=k[1],k[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(r.ShortcutKey,{children:" Alt "}),k[2]=p):p=k[2],k[3]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[i,(0,t.jsx)("div",{className:"flex gap-1",children:(0,t.jsxs)(t.Fragment,{children:[d," +"," ",p," +"," ",(0,t.jsx)(r.ShortcutKey,{children:" L "})]})})]}),k[3]=m):m=k[3],k[4]!==E||k[5]!==T?(f=async e=>{if(e.preventDefault(),!E)return;let t=await (0,u.getSelectedOrFocusedBlocks)(E);await (0,c.toggleListForBlocks)(t,E,T)},k[4]=E,k[5]=T,k[6]=f):f=k[6],k[7]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(y,{}),k[7]=g):g=k[7],k[8]!==f?(b=(0,t.jsx)(l.ToolbarButton,{tooltipContent:m,onClick:f,children:g}),k[8]=f,k[9]=b):b=k[9],k[10]!==S?.data.value||k[11]!==e?(v=S?.data.value&&(0,t.jsx)(l.ToolbarButton,{tooltipContent:"List Options",onClick:()=>{e.setToolbarState("list")},className:"-ml-1",children:(0,t.jsx)(h.ArrowRightTiny,{})}
168),k[10]=S?.data.value,k[11]=e,k[12]=v):v=k[12],k[13]!==b||k[14]!==v?(x=(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[b,v]}),k[13]=b,k[14]=v,k[15]=x):x=k[15],x},g=e=>{let h,f,g,w,S,E,T,I,D,N,A,_,P,M,R,L,j,O,B,F,H,U,z,$,V,q,G,W,K,Y,Z,X,Q,J,ee,et,en,er=(0,n.c)(76),ei=(0,o.useUIState)(C),ea=(0,i.useBlocks)(ei?.entityType==="block"?ei.parent:null),eo=(0,a.useEntity)(ei?.entityID||null,"block/check-list"),es=(0,a.useEntity)(ei?.entityID||null,"block/is-list");er[0]!==ei?(h=e=>!!ei&&"block"===ei.entityType&&e.zoomedBlocks[ei.parent]===ei.entityID,er[0]=ei,er[1]=h):h=er[1];let el=(0,o.useUIState)(h);if(er[2]!==ei?.entityID||er[3]!==ea){let e;er[5]!==ei?.entityID?(e=e=>e.entityID===ei?.entityID,er[5]=ei?.entityID,er[6]=e):e=er[6],f=ea.find(e),er[2]=ei?.entityID,er[3]=ea,er[4]=f}else f=er[4];let ec=f,eu=ea[ea.findIndex(e=>e.entityID===ei?.entityID)-1],{rep:ed,undoManager:eh}=(0,a.useReplicache)();er[7]!==es?.data.value||er[8]!==e?(g=()=>{if(!es?.data.value){let t=setTimeout(()=>e.onClose(),50);return()=>clearTimeout(t)}},er[7]=es?.data.value,er[8]=e,er[9]=g):g=er[9],er[10]!==es||er[11]!==e?(w=[e,es],er[10]=es,er[11]=e,er[12]=w):w=er[12],(0,d.useEffect)(g,w);let ep=!es?.data.value;er[13]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)("div",{className:"text-center",children:"Outdent Item"}),er[13]=S):S=er[13],er[14]===Symbol.for("react.memo_cache_sentinel")?(E=(0,t.jsx)(r.ShortcutKey,{children:"Shift"}),er[14]=E):E=er[14],er[15]===Symbol.for("react.memo_cache_sentinel")?(T=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[S,(0,t.jsxs)("div",{className:"flex gap-1 justify-center",children:[E," + ",(0,t.jsx)(r.ShortcutKey,{children:"Tab"})]})]}),er[15]=T):T=er[15],er[16]!==ed||er[17]!==eh?(I=async()=>{if(!ed)return;let[,e]=await (0,u.getSortedSelection)(ed),t=await (0,u.getSelectedOrFocusedBlocks)(ed);await (0,c.multiSelectOutdent)(t,e.length?e:t,ed,eh)},er[16]=ed,er[17]=eh,er[18]=I):I=er[18],er[19]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsx)(x,{}),er[19]=D):D=er[19],er[20]!==ep||er[21]!==I?(N=(0,t.jsx)(l.ToolbarButton,{disabled:ep,tooltipContent:T,onClick:I,children:D}),er[20]=ep,er[21]=I,er[22]=N):N=er[22],er[23]===Symbol.for("react.memo_cache_sentinel")?(A=(0,t.jsx)("div",{className:"text-center",children:"Indent Item"}),er[23]=A):A=er[23],er[24]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[A,(0,t.jsx)("div",{className:"flex gap-1 justify-center",children:(0,t.jsx)(r.ShortcutKey,{children:"Tab"})})]}),er[24]=_):_=er[24];let em=!eu?.listData||eu.listData.depth<ec?.listData?.depth;er[25]!==ed||er[26]!==eh?(P=async()=>{if(!ed)return;let[e,t]=await (0,u.getSortedSelection)(ed);await (0,c.multiSelectIndent)(e,t,ed,eh)},er[25]=ed,er[26]=eh,er[27]=P):P=er[27],er[28]===Symbol.for("react.memo_cache_sentinel")?(M=(0,t.jsx)(v,{}),er[28]=M):M=er[28],er[29]!==em||er[30]!==P?(R=(0,t.jsx)(l.ToolbarButton,{tooltipContent:_,disabled:em,onClick:P,children:M}),er[29]=em,er[30]=P,er[31]=R):R=er[31],er[32]===Symbol.for("react.memo_cache_sentinel")?(L=(0,t.jsx)(r.Separator,{classname:"h-6!"}),er[32]=L):L=er[32];let ef=!es?.data.value;er[33]!==ed||er[34]!==eh?(j=async()=>{if(!ed)return;let e=await (0,u.getSelectedOrFocusedBlocks)(ed);await (0,c.setListStyleForBlocks)(e,"unordered",ed,eh)},er[33]=ed,er[34]=eh,er[35]=j):j=er[35],er[36]===Symbol.for("react.memo_cache_sentinel")?(O=(0,t.jsx)(y,{}),er[36]=O):O=er[36],er[37]!==ef||er[38]!==j?(B=(0,t.jsx)(l.ToolbarButton,{disabled:ef,tooltipContent:"Unordered List",onClick:j,children:O}),er[37]=ef,er[38]=j,er[39]=B):B=er[39];let eg=!es?.data.value;er[40]!==ed||er[41]!==eh?(F=async()=>{if(!ed)return;let e=await (0,u.getSelectedOrFocusedBlocks)(ed);await (0,c.setListStyleForBlocks)(e,"ordered",ed,eh)},er[40]=ed,er[41]=eh,er[42]=F):F=er[42],er[43]===Symbol.for("react.memo_cache_sentinel")?(H=(0,t.jsx)(b,{}),er[43]=H):H=er[43],er[44]!==eg||er[45]!==F?(U=(0,t.jsx)(l.ToolbarButton,{disabled:eg,tooltipContent:"Ordered List",onClick:F,children:H}),er[44]=eg,er[45]=F,er[46]=U):U=er[46],er[47]===Symbol.for("react.memo_cache_sentinel")?(z=(0,t.jsx)(r.Separator,{classname:"h-6"}),er[47]=z):z=er[47];let ey=!es?.data.value,eb=!!eo;er[48]===Symbol.for("react.memo_cache_sentinel")?($=(0,t.jsx)("div",{className:"text-center",children:"Add a Checkbox"}),er[48]=$):$=er[48],er[49]===Symbol.for("react.memo_cache_sentinel")?(V=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[$,(0,t.jsxs)("div",{className:"flex gap-1 font-normal",children:[(0,t.jsx)(r.ShortcutKey,{children:"["}),(0,t.jsx)(r.ShortcutKey,{children:"]"})]})]}),er[49]=V):V=er[49],er[50]!==ed||er[51]!==eh?(q=async()=>
168{if(!ed)return;let e=await (0,u.getSelectedOrFocusedBlocks)(ed);await (0,c.toggleChecklistForBlocks)(e,ed,eh)},er[50]=ed,er[51]=eh,er[52]=q):q=er[52],er[53]===Symbol.for("react.memo_cache_sentinel")?(G=(0,t.jsx)(k,{}),er[53]=G):G=er[53],er[54]!==ey||er[55]!==eb||er[56]!==q?(W=(0,t.jsx)(l.ToolbarButton,{disabled:ey,active:eb,tooltipContent:V,onClick:q,children:G}),er[54]=ey,er[55]=eb,er[56]=q,er[57]=W):W=er[57],er[58]===Symbol.for("react.memo_cache_sentinel")?(K=(0,t.jsx)(r.Separator,{classname:"h-6"}),er[58]=K):K=er[58];let ev=!es?.data.value||el;return er[59]===Symbol.for("react.memo_cache_sentinel")?(Y=(0,t.jsx)("div",{className:"text-center",children:"Zoom into Item"}),er[59]=Y):Y=er[59],er[60]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,t.jsx)(r.ShortcutKey,{children:(0,s.metaKey)()}),er[60]=Z):Z=er[60],er[61]===Symbol.for("react.memo_cache_sentinel")?(X=(0,t.jsx)(r.ShortcutKey,{children:"Shift"}),er[61]=X):X=er[61],er[62]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[Y,(0,t.jsxs)("div",{className:"flex gap-1 justify-center",children:[Z," +"," ",X," + ",(0,t.jsx)(r.ShortcutKey,{children:":"})]})]}),er[62]=Q):Q=er[62],er[63]!==ec?(J=()=>{ec?.listData&&(0,m.zoomIntoBlock)(ec.parent,ec.entityID)},er[63]=ec,er[64]=J):J=er[64],er[65]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,t.jsx)(p.ZoomListItemSmall,{}),er[65]=ee):ee=er[65],er[66]!==ev||er[67]!==J?(et=(0,t.jsx)(l.ToolbarButton,{disabled:ev,tooltipContent:Q,onClick:J,children:ee}),er[66]=ev,er[67]=J,er[68]=et):et=er[68],er[69]!==N||er[70]!==R||er[71]!==B||er[72]!==U||er[73]!==W||er[74]!==et?(en=(0,t.jsxs)("div",{className:"flex items-center gap-[6px]",children:[N,R,L,B,U,z,W,K,et]}),er[69]=N,er[70]=R,er[71]=B,er[72]=U,er[73]=W,er[74]=et,er[75]=en):en=er[75],en},y=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.1687 5.19995C7.61642 5.19995 7.1687 5.64767 7.1687 6.19995C7.1687 6.75224 7.61642 7.19995 8.1687 7.19995H19.5461C20.0984 7.19995 20.5461 6.75224 20.5461 6.19995C20.5461 5.64767 20.0984 5.19995 19.5461 5.19995H8.1687ZM4.35361 7.10005C4.85067 7.10005 5.25361 6.69711 5.25361 6.20005C5.25361 5.70299 4.85067 5.30005 4.35361 5.30005C3.85656 5.30005 3.45361 5.70299 3.45361 6.20005C3.45361 6.69711 3.85656 7.10005 4.35361 7.10005ZM5.25361 12.0001C5.25361 12.4972 4.85067 12.9001 4.35361 12.9001C3.85656 12.9001 3.45361 12.4972 3.45361 12.0001C3.45361 11.503 3.85656 11.1001 4.35361 11.1001C4.85067 11.1001 5.25361 11.503 5.25361 12.0001ZM8.1687 11C7.61642 11 7.1687 11.4477 7.1687 12C7.1687 12.5523 7.61642 13 8.1687 13H19.5461C20.0984 13 20.5461 12.5523 20.5461 12C20.5461 11.4477 20.0984 11 19.5461 11H8.1687ZM5.25361 17.8001C5.25361 18.2972 4.85067 18.7001 4.35361 18.7001C3.85656 18.7001 3.45361 18.2972 3.45361 17.8001C3.45361 17.3031 3.85656 16.9001 4.35361 16.9001C4.85067 16.9001 5.25361 17.3031 5.25361 17.8001ZM8.1687 16.8C7.61642 16.8 7.1687 17.2478 7.1687 17.8C7.1687 18.3523 7.61642 18.8 8.1687 18.8H19.5461C20.0984 18.8 20.5461 18.3523 20.5461 17.8C20.5461 17.2478 20.0984 16.8 19.5461 16.8H8.1687Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},b=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.61712 10.7835V9.86485L3.45578 9.72146V5.59887L2.60815 5.58543V4.7161L5.52724 4.25903V9.72146L6.50669 9.86485V10.7835H2.61712ZM7.27734 6.19995C7.27734 5.64767 7.72506 5.19995 8.27734 5.19995H19.6548C20.2071 5.19995 20.6548 5.64767 20.6548 6.19995C20.6548 6.75224 20.2071 7.19995 19.6548 7.19995H8.27734C7.72506 7.19995 7.27734 6.75224 7.27734 6.19995ZM7.27734 12C7.27734 11.4477 7.72506 11 8.27734 11H19.6548C20.2071 11 20.6548 11.4477 20.6548 12C20.6548 12.5523 20.2071 13 19.6548 13H8.27734C7.72506 13 7.27734 12.5523 7.27734 12ZM8.27734 16.8001C7.72506 16.8001 7.27734 17.2478 7.27734 17.8001C7.27734 18.3523 7.72506 18.8001 8.27734 18.8001H19.6548C20.2071 18.8001 20.6548 18.3523 20.6548 17.8001C20.6548 17.2478 20.2071 16.8001 19.6548 16.8001H8.27734ZM1.91871 18.2618V19.7411H6.50732V18.0069H5.3288L5.31088 18.2618H4.22L4.21104 18.2394L4.94343 17.4826C5.28997 17.1182 5.5663 16.8075 5.77243 16.5506C5.98155 16.2937 6.13091 16.0532 6.22054 15.8291C6.31314 15.6021 6.35945 15.3541 6.35945 15.0853C6.35945 14.6909 6.26833 14.3474 6.0861 14.0546C5.90686 13.7589 5.64845 13.5303 5.31088 13.369C4.97629 13.2047 4.57449 13.1226 4.10547 13.1226C3.63645 13.1226 3.22867 13.2182 2.88214 13.4093C2.5356 13.6005 2.26972 13.8589 2.08451 14.1846C1.90228 14.5102 1.81564 14.8747 1.8246 15.278L1.83357 15.3048L3.4118 15.3461C3.47346 15.0234 3.52123 14.9071 3.58817 14.8083C3.70767 14.6321 3.95383 14.5502 4.10547 14.5502C4.33251 14.5502 4.51426 14.5909 4.62778 14.7402C4.7413 14.8896 4.79268 15.0853 4.74967 15.3048C4.72169 15.4476 4.60209 15.6648 4.49156 15.8291C4.38102 15.9934 4.01836 16.5076 3.51648 16.9234L1.91871 18.2618Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},v=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.2771 5.19995C7.72481 5.19995 7.2771 5.64767 7.2771 6.19995C7.2771 6.75224 7.72481 7.19995 8.2771 7.19995H19.6545C20.2068 7.19995 20.6545 6.75224 20.6545 6.19995C20.6545 5.64767 20.2068 5.19995 19.6545 5.19995H8.2771ZM4.46201 7.10005C4.95907 7.10005 5.36201 6.6971 5.36201 6.20005C5.36201 5.70299 4.95907 5.30005 4.46201 5.30005C3.96496 5.30005 3.56201 5.70299 3.56201 6.20005C3.56201 6.6971 3.96496 7.10005 4.46201 7.10005ZM11.1218 12.0001C11.1218 12.4972 10.7188 12.9001 10.2218 12.9001C9.72472 12.9001 9.32178 12.4972 9.32178 12.0001C9.32178 11.503 9.72472 11.1001 10.2218 11.1001C10.7188 11.1001 11.1218 11.503 11.1218 12.0001ZM14.0369 11C13.4846 11 13.0369 11.4477 13.0369 12C13.0369 12.5523 13.4846 13 14.0369 13H19.6545C20.2068 13 20.6545 12.5523 20.6545 12C20.6545 11.4477 20.2068 11 19.6545 11H14.0369ZM11.1218 17.8002C11.1218 18.2973 10.7188 18.7002 10.2218 18.7002C9.72472 18.7002 9.32178 18.2973 9.32178 17.8002C9.32178 17.3032 9.72472 16.9002 10.2218 16.9002C10.7188 16.9002 11.1218 17.3032 11.1218 17.8002ZM14.037 16.8C13.4847 16.8 13.037 17.2478 13.037 17.8C13.037 18.3523 13.4847 18.8 14.037 18.8L19.6547 18.8C20.207 18.8 20.6547 18.3523 20.6547 17.8C20.6547 17.2478 20.207 16.8 19.6547 16.8L14.037 16.8ZM5.00428 15.5359H2.23413C1.88895 15.5359 1.60913 15.2561 1.60913 14.9109C1.60913 14.5657 1.88895 14.2859 2.23413 14.2859H5.00453L4.00116 13.2825C3.70827 12.9896 3.70827 12.5148 4.00116 12.2219C4.29406 11.929 4.76893 11.929 5.06182 12.2219L7.75072 14.9108L5.06182 17.5997C4.76893 17.8926 4.29406 17.8926 4.00116 17.5997C3.70827 17.3068 3.70827 16.8319 4.00116 16.539L5.00428 15.5359Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},x=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.27716 5.19995C7.72488 5.19995 7.27716 5.64767 7.27716 6.19995C7.27716 6.75224 7.72488 7.19995 8.27716 7.19995H19.6546C20.2069 7.19995 20.6546 6.75224 20.6546 6.19995C20.6546 5.64767 20.2069 5.19995 19.6546 5.19995H8.27716ZM4.46208 7.10005C4.95913 7.
16810005 5.36208 6.69711 5.36208 6.20005C5.36208 5.70299 4.95913 5.30005 4.46208 5.30005C3.96502 5.30005 3.56208 5.70299 3.56208 6.20005C3.56208 6.69711 3.96502 7.10005 4.46208 7.10005ZM5.36208 12.0001C5.36208 12.4972 4.95913 12.9001 4.46208 12.9001C3.96502 12.9001 3.56208 12.4972 3.56208 12.0001C3.56208 11.503 3.96502 11.1001 4.46208 11.1001C4.95913 11.1001 5.36208 11.503 5.36208 12.0001ZM8.27716 11C7.72488 11 7.27716 11.4477 7.27716 12C7.27716 12.5523 7.72488 13 8.27716 13H20.106C20.6583 13 21.106 12.5523 21.106 12C21.106 11.4477 20.6583 11 20.106 11H8.27716ZM11.1218 17.8001C11.1218 18.2972 10.7189 18.7001 10.2218 18.7001C9.72479 18.7001 9.32184 18.2972 9.32184 17.8001C9.32184 17.3031 9.72479 16.9001 10.2218 16.9001C10.7189 16.9001 11.1218 17.3031 11.1218 17.8001ZM14.0372 16.8C13.4849 16.8 13.0372 17.2478 13.0372 17.8C13.0372 18.3523 13.4849 18.8 14.0372 18.8L19.6549 18.8C20.2071 18.8 20.6549 18.3523 20.6549 17.8C20.6549 17.2478 20.2071 16.8 19.6549 16.8L14.0372 16.8ZM4.48975 17.1753L5.4936 16.1721C5.78659 15.8793 5.78675 15.4044 5.49395 15.1114C5.20115 14.8185 4.72628 14.8183 4.43329 15.1111L1.74243 17.8002L4.43329 20.4892C4.72628 20.782 5.20115 20.7819 5.49395 20.4889C5.78675 20.1959 5.78659 19.721 5.4936 19.4282L4.48999 18.4253H6.96185C7.30703 18.4253 7.58685 18.1455 7.58685 17.8003C7.58685 17.4551 7.30703 17.1753 6.96185 17.1753H4.48975Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},k=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.2777 7.26811C19.6649 6.79541 19.5956 6.09831 19.1229 5.7111C18.6502 5.32389 17.9531 5.3932 17.5658 5.86591L11.0608 13.8073L8.55229 11.4827C8.10409 11.0674 7.40406 11.094 6.98873 11.5422C6.57339 11.9904 6.60003 12.6905 7.04823 13.1058L10.4194 16.2298C10.6432 16.4372 10.9428 16.543 11.2472 16.5221C11.5517 16.5012 11.834 16.3554 12.0273 16.1194L19.2777 7.26811ZM5.72192 5.78943C4.61735 5.78943 3.72192 6.68486 3.72192 7.78943V17.2894C3.72192 18.394 4.61735 19.2894 5.72192 19.2894H15.2219C16.3265 19.2894 17.2219 18.394 17.2219 17.2894V14.4884C17.2219 14.0741 16.8861 13.7384 16.4719 13.7384C16.0577 13.7384 15.7219 14.0741 15.7219 14.4884V17.2894C15.7219 17.5656 15.4981 17.7894 15.2219 17.7894H5.72192C5.44578 17.7894 5.22192 17.5656 5.22192 17.2894V7.78943C5.22192 7.51329 5.44578 7.28943 5.72192 7.28943H12.9815C13.3957 7.28943 13.7315 6.95364 13.7315 6.53943C13.7315 6.12522 13.3957 5.78943 12.9815 5.78943H5.72192Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};function w(e){return e.focusedEntity}function C(e){return e.focusedEntity}},511987,e=>{"use strict";e.s(["AlignCenterSmall",()=>d,"AlignJustifiedSmall",()=>p,"AlignLeftSmall",()=>u,"AlignRightSmall",()=>h,"TextAlignmentButton",()=>l,"TextAlignmentToolbar",()=>o]);var t=e.i(843476),n=e.i(500932),r=e.i(813029),i=e.i(887710),a=e.i(467592);function o(){let e,o,l,c,m,f,g,y,b,v,x,k,w,C,S=(0,n.c)(32),E=(0,r.useUIState)(s),{rep:T}=(0,a.useReplicache)(),I=(0,a.useEntity)(E?.entityID||null,"block/text-alignment")?.data.value;S[0]!==E||S[1]!==T?.mutate?(e=e=>{let t=r.useUIState.getState().selectedBlocks;if(E?.entityType==="page"||!E)return null;T?.mutate.assertFact(t.map(t=>({entity:t.entityID,attribute:"block/text-alignment",data:{type:"text-alignment-type-union",value:e}})))},S[0]=E,S[1]=T?.mutate,S[2]=e):e=S[2];let D=e;S[3]!==D?(o=()=>D("left"),S[3]=D,S[4]=o):o=S[4];let N="left"===I;S[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(u,{}),S[5]=l):l=S[5],S[6]!==o||S[7]!==N?(c=(0,t.jsx)(i.ToolbarButton,{onClick:o,tooltipContent:"Align Left",active:N,children:l}),S[6]=o,S[7]=N,S[8]=c):c=S[8],S[9]!==D?(m=()=>D("center"),S[9]=D,S[10]=m):m=S[10];let A="center"===I;S[11]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(d,{}),S[11]=f):f=S[11],S[12]!==m||S[13]!==A?(g=(0,t.jsx)(i.ToolbarButton,{onClick:m,tooltipContent:"Align Center",active:A,children:f}),S[12]=m,S[13]=A,S[14]=g):g=S[14],S[15]!==D?(y=()=>D("right"),S[15]=D,S[16]=y):y=S[16];let _="right"===I;S[17]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(h,{}),S[17]=b):b=S[17],S[18]!==_||S[19]!==y?(v=(0,t.jsx)(i.ToolbarButton,{onClick:y,tooltipContent:"Align Right",active:_,children:b}),S[18]=_,S[19]=y,S[20]=v):v=S[20],S[21]!==D?(x=()=>D("justify"),S[21]=D,S[22]=x):x=S[22];let P="justify"===I;return S[23]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsx)(p,{}),S[23]=k):k=S[23],S[24]!==x||S[25]!==P?(w=(0,t.jsx)(i.ToolbarButton,{onClick:x,tooltipContent:"Align Justified",active:P,children:k}),S[24]=x,S[25]=P,S[26]=w):w=S[26],S[27]!==v||S[28]!==w||S[29]!==c||S[30]!==g?(C=(0,t.jsxs)(t.Fragment,{children:[c,g,v,w]}),S[27]=v,S[28]=w,S[29]=c,S[30]=g,S[31]=C):C=S[31],C}function s(e){return e.focusedEntity}function l(e){let o,s,l,m,f=(0,n.c)(10),g=(0,r.useUIState)(c),y=(0,a.useEntity)(g?.entityID||null,"block/text-alignment")?.data.value||"left";f[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("div",{children:"Align"}),f[0]=o):o=f[0];let b=`${e.className}`;return f[1]!==e?(s=()=>{e.setToolbarState("text-alignment")},f[1]=e,f[2]=s):s=f[2],f[3]!==y?(l="left"===y?(0,t.jsx)(u,{}):"center"===y?(0,t.jsx)(d,{}):"justify"===y?(0,t.jsx)(p,{}):(0,t.jsx)(h,{}),f[3]=y,f[4]=l):l=f[4],f[5]!==e.hiddenOnCanvas||f[6]!==b||f[7]!==s||f[8]!==l?
168(m=(0,t.jsx)(i.ToolbarButton,{hiddenOnCanvas:e.hiddenOnCanvas,tooltipContent:o,className:b,onClick:s,children:l}),f[5]=e.hiddenOnCanvas,f[6]=b,f[7]=s,f[8]=l,f[9]=m):m=f[9],m}function c(e){return e.focusedEntity}let u=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 6.19983C3.5 5.64754 3.94772 5.19983 4.5 5.19983H19.6547C20.2069 5.19983 20.6547 5.64754 20.6547 6.19983C20.6547 6.75211 20.2069 7.19983 19.6547 7.19983H4.5C3.94772 7.19983 3.5 6.75211 3.5 6.19983ZM3.5 12C3.5 11.4477 3.94772 11 4.5 11H12.8243C13.3766 11 13.8243 11.4477 13.8243 12C13.8243 12.5523 13.3766 13 12.8243 13H4.5C3.94772 13 3.5 12.5523 3.5 12ZM4.5 16.7999C3.94772 16.7999 3.5 17.2476 3.5 17.7999C3.5 18.3522 3.94772 18.7999 4.5 18.7999H16.1426C16.6949 18.7999 17.1426 18.3522 17.1426 17.7999C17.1426 17.2476 16.6949 16.7999 16.1426 16.7999H4.5Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},d=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 6.19983C3.5 5.64754 3.94772 5.19983 4.5 5.19983H19.6547C20.2069 5.19983 20.6547 5.64754 20.6547 6.19983C20.6547 6.75211 20.2069 7.19983 19.6547 7.19983H4.5C3.94772 7.19983 3.5 6.75211 3.5 6.19983ZM6.91519 12C6.91519 11.4477 7.36291 11 7.91519 11H16.2395C16.7918 11 17.2395 11.4477 17.2395 12C17.2395 12.5523 16.7918 13 16.2395 13H7.91519C7.36291 13 6.91519 12.5523 6.91519 12ZM6.25601 16.7999C5.70373 16.7999 5.25601 17.2476 5.25601 17.7999C5.25601 18.3522 5.70373 18.7999 6.25601 18.7999H17.8987C18.4509 18.7999 18.8987 18.3522 18.8987 17.7999C18.8987 17.2476 18.4509 16.7999 17.8987 16.7999H6.25601Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},h=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 6.19983C3.5 5.64754 3.94772 5.19983 4.5 5.19983H19.6547C20.2069 5.19983 20.6547 5.64754 20.6547 6.19983C20.6547 6.75211 20.2069 7.19983 19.6547 7.19983H4.5C3.94772 7.19983 3.5 6.75211 3.5 6.19983ZM10.3304 12C10.3304 11.4477 10.7781 11 11.3304 11H19.6547C20.2069 11 20.6547 11.4477 20.6547 12C20.6547 12.5523 20.2069 13 19.6547 13H11.3304C10.7781 13 10.3304 12.5523 10.3304 12ZM8.01202 16.7999C7.45974 16.7999 7.01202 17.2476 7.01202 17.7999C7.01202 18.3522 7.45974 18.7999 8.01202 18.7999H19.6547C20.2069 18.7999 20.6547 18.3522 20.6547 17.7999C20.6547 17.2476 20.2069 16.7999 19.6547 16.7999H8.01202Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},p=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 6.19983C3.5 5.64754 3.94772 5.19983 4.5 5.19983H19.6547C20.2069 5.19983 20.6547 5.64754 20.6547 6.19983C20.6547 6.75211 20.2069 7.19983 19.6547 7.19983H4.5C3.94772 7.19983 3.5 6.75211 3.5 6.19983ZM3.5 12C3.5 11.4477 3.94772 11 4.5 11H19.6547C20.2069 11 20.6547 11.4477 20.6547 12C20.6547 12.5523 20.2069 13 19.6547 13H4.5C3.94772 13 3.5 12.5523 3.5 12ZM4.5 16.7999C3.94772 16.7999 3.5 17.2476 3.5 17.7999C3.5 18.3522 3.94772 18.7999 4.5 18.7999H19.6547C20.2069 18.7999 20.6547 18.3522 20.6547 17.7999C20.6547 17.2476 20.2069 16.7999 19.6547 16.7999H4.5Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}},911549,e=>{"use strict";e.s(["TextBlockTypeButton",()=>m,"TextBlockTypeToolbar",()=>p]);var t=e.i(843476),n=e.i(500932),r=e.i(507646),i=e.i(642448),a=e.i(859015),o=e.i(887710),s=e.i(901982),l=e.i(827121),c=e.i(467592),u=e.i(988314),d=e.i(813029),h=e.i(521771);let p=e=>{let p,m,f,y,b,v,x,k,w,C,S,E,T,I,D,N,A,_,P,M,R,L,j,O,B,F,H,U,z,$,V,q,G,W,K,Y,Z=(0,n.c)(75),X=(0,d.useUIState)(g),Q=(0,c.useEntity)(X?.entityID||null,"block/type"),J=(0,c.useEntity)(X?.entityID||null,"block/heading-level"),ee=(0,c.useEntity)(X?.entityID||null,"block/text-size"),{rep:et,undoManager:en}=(0,c.useReplicache)();Z[0]!==et||Z[1]!==en?(p=async e=>{if(!et)return;let t=d.useUIState.getState().focusedEntity,n=t?.entityType==="block"?u.useEditorStates.getState().editorStates[t.entityID]?.editor.selection:void 0,r=await (0,s.getSelectedOrFocusedBlocks)(et);if(await (0,h.setTextBlockStyle)(r,e,et,en),1!==r.length||!t||"block"!==t.entityType||!n)return;let i=u.useEditorStates.getState().editorStates[t.entityID];
168i&&(i.view?.dispatch(i.editor.tr.setSelection(l.TextSelection.create(i.editor.doc,Math.min(n.anchor,i.editor.doc.content.size)))),i.view?.focus())},Z[0]=et,Z[1]=en,Z[2]=p):p=Z[2];let er=p;Z[3]!==er?(m=e=>er({style:"heading",level:e}),Z[3]=er,Z[4]=m):m=Z[4];let ei=m;Z[5]!==ei?(f=()=>{ei(1)},Z[5]=ei,Z[6]=f):f=Z[6];let ea=Q?.data.value==="heading"&&J?.data.value===1;Z[7]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)("div",{className:"font-bold text-center",children:"Title"}),Z[7]=y):y=Z[7],Z[8]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsxs)("div",{className:"flex flex-col justify-center",children:[y,(0,t.jsxs)("div",{className:"flex gap-1 font-normal",children:["start line with",(0,t.jsx)(a.ShortcutKey,{children:"#"})]})]}),v=(0,t.jsx)(r.Header1Small,{}),Z[8]=b,Z[9]=v):(b=Z[8],v=Z[9]),Z[10]!==e.className||Z[11]!==f||Z[12]!==ea?(x=(0,t.jsx)(o.ToolbarButton,{className:e.className,onClick:f,active:ea,tooltipContent:b,children:v}),Z[10]=e.className,Z[11]=f,Z[12]=ea,Z[13]=x):x=Z[13],Z[14]!==ei?(k=()=>{ei(2)},Z[14]=ei,Z[15]=k):k=Z[15];let eo=Q?.data.value==="heading"&&J?.data.value===2;Z[16]===Symbol.for("react.memo_cache_sentinel")?(w=(0,t.jsx)("div",{className:"font-bold text-center",children:"Heading"}),Z[16]=w):w=Z[16],Z[17]===Symbol.for("react.memo_cache_sentinel")?(C=(0,t.jsxs)("div",{className:"flex flex-col justify-center",children:[w,(0,t.jsxs)("div",{className:"flex gap-1 font-normal",children:["start line with",(0,t.jsx)(a.ShortcutKey,{children:"##"})]})]}),S=(0,t.jsx)(r.Header2Small,{}),Z[17]=C,Z[18]=S):(C=Z[17],S=Z[18]),Z[19]!==e.className||Z[20]!==k||Z[21]!==eo?(E=(0,t.jsx)(o.ToolbarButton,{className:e.className,onClick:k,active:eo,tooltipContent:C,children:S}),Z[19]=e.className,Z[20]=k,Z[21]=eo,Z[22]=E):E=Z[22],Z[23]!==ei?(T=()=>{ei(3)},Z[23]=ei,Z[24]=T):T=Z[24];let es=Q?.data.value==="heading"&&J?.data.value===3;Z[25]===Symbol.for("react.memo_cache_sentinel")?(I=(0,t.jsx)("div",{className:"font-bold text-center",children:"Subheading"}),Z[25]=I):I=Z[25],Z[26]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsxs)("div",{className:"flex flex-col justify-center",children:[I,(0,t.jsxs)("div",{className:"flex gap-1 font-normal",children:["start line with",(0,t.jsx)(a.ShortcutKey,{children:"###"})]})]}),N=(0,t.jsx)(r.Header3Small,{}),Z[26]=D,Z[27]=N):(D=Z[26],N=Z[27]),Z[28]!==e.className||Z[29]!==T||Z[30]!==es?(A=(0,t.jsx)(o.ToolbarButton,{className:e.className,onClick:T,active:es,tooltipContent:D,children:N}),Z[28]=e.className,Z[29]=T,Z[30]=es,Z[31]=A):A=Z[31],Z[32]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(a.Separator,{classname:"h-6!"}),Z[32]=_):_=Z[32];let el=`px-[6px] ${e.className}`;Z[33]!==er?(P=()=>er({style:"text",size:"default"}),Z[33]=er,Z[34]=P):P=Z[34];let ec=Q?.data.value==="text"&&ee?.data.value!=="small"&&ee?.data.value!=="large";Z[35]===Symbol.for("react.memo_cache_sentinel")?(M=(0,t.jsx)("div",{children:"Normal Text"}),Z[35]=M):M=Z[35],Z[36]!==el||Z[37]!==P||Z[38]!==ec?(R=(0,t.jsx)(o.ToolbarButton,{className:el,onClick:P,active:ec,tooltipContent:M,children:"Text"}),Z[36]=el,Z[37]=P,Z[38]=ec,Z[39]=R):R=Z[39];let eu=`px-[6px] text-lg ${e.className}`;Z[40]!==er?(L=()=>er({style:"text",size:"large"}),Z[40]=er,Z[41]=L):L=Z[41];let ed=Q?.data.value==="text"&&ee?.data.value==="large";Z[42]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsx)("div",{children:"Large Text"}),O=(0,t.jsx)("div",{className:"leading-[1.625rem]",children:"Large"}),Z[42]=j,Z[43]=O):(j=Z[42],O=Z[43]),Z[44]!==eu||Z[45]!==L||Z[46]!==ed?(B=(0,t.jsx)(o.ToolbarButton,{className:eu,onClick:L,active:ed,tooltipContent:j,children:O}),Z[44]=eu,Z[45]=L,Z[46]=ed,Z[47]=B):B=Z[47];let eh=`px-[6px] text-sm text-secondary ${e.className}`;Z[48]!==er?(F=()=>er({style:"text",size:"small"}),Z[48]=er,Z[49]=F):F=Z[49];let ep=Q?.data.value==="text"&&ee?.data.value==="small";Z[50]===Symbol.for("react.memo_cache_sentinel")?(H=(0,t.jsx)("div",{children:"Small Text"}),U=(0,t.jsx)("div",{className:"leading-[1.625rem]",children:"Small"}),Z[50]=H,Z[51]=U):(H=Z[50],U=Z[51]),Z[52]!==eh||Z[53]!==F||Z[54]!==ep?(z=(0,t.jsx)(o.ToolbarButton,{className:eh,onClick:F,active:ep,tooltipContent:H,children:U}),Z[52]=eh,Z[53]=F,Z[54]=ep,Z[55]=z):z=Z[55],Z[56]===Symbol.for("react.memo_cache_sentinel")?($=(0,t.jsx)(a.Separator,{classname:"h-6!"}),Z[56]=$):$=Z[56],Z[57]!==Q?.data.value||Z[58]!==er?(V=()=>er(Q?.data.value==="blockquote"?{style:"text",size:"default"}:{style:"blockquote"}),Z[57]=Q?.data.value,Z[58]=er,Z[59]=V):V=Z[59];let em=Q?.data.value==="blockquote";return Z[60]===Symbol.for("react.memo_cache_sentinel")?(q=(0,t.jsx)("div",{className:"font-bold text-center",children:"Block Quote"}),Z[60]=q):q=Z[60],Z[61]===Symbol.for("react.memo_cache_sentinel")?(G=(0,t.jsxs)("div",{className:"flex flex-col justify-center",children:[q,(0,t.jsxs)("div",{className:"flex gap-1 font-normal",children:["start line with",(0,t.jsx)(a.ShortcutKey,{children:">"})]})]}),W=(0,t.jsx)(i.QuoteSmall,{}),Z[61]=G,Z[62]=W):(G=Z[61],W=Z[62]),Z[63]!==e.className||Z[64]!==V||Z[65]!==em?(K=(0,t.jsx)(o.ToolbarButton,{className:e.className,onClick:V,active:em,tooltipContent:G,children:W}),Z[63]=e.className,Z[64]=V,Z[65]=em,Z[66]=K):K=Z[66],Z[67]!==E||Z[68]!==A||Z[69]!==R||Z[70]!==B||Z[71]!==z||Z[72]!==K||Z[73]!==x?(Y=(0,t.jsxs)(t.Fragment,{children:[x,E,A,_,R,B,z,$,
168K]}),Z[67]=E,Z[68]=A,Z[69]=R,Z[70]=B,Z[71]=z,Z[72]=K,Z[73]=x,Z[74]=Y):Y=Z[74],Y};function m(e){let r,i,a,s,l=(0,n.c)(7);l[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{children:"Text Style"}),l[0]=r):r=l[0];let c=`${e.className}`;return l[1]!==e?(i=()=>{e.setToolbarState("heading")},l[1]=e,l[2]=i):i=l[2],l[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(f,{}),l[3]=a):a=l[3],l[4]!==c||l[5]!==i?(s=(0,t.jsx)(o.ToolbarButton,{tooltipContent:r,className:c,onClick:i,children:a}),l[4]=c,l[5]=i,l[6]=s):s=l[6],s}let f=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3435 12.6008C14.4028 12.7825 14.6587 12.7855 14.7222 12.6052L14.8715 12.1816H19.0382L19.8657 14.6444C19.9067 14.7666 20.0212 14.8489 20.15 14.8489H21.6021C21.809 14.8489 21.9538 14.6443 21.885 14.4491L18.2831 4.23212C18.2408 4.11212 18.1274 4.03186 18.0002 4.03186H16.0009C15.8761 4.03186 15.7643 4.10917 15.7203 4.22598L13.5539 9.96923C13.5298 10.0331 13.5282 10.1033 13.5494 10.1682L14.3435 12.6008ZM18.5093 10.6076L17.0588 6.29056C17.0507 6.26644 17.0281 6.25019 17.0027 6.25019C16.9775 6.25019 16.9552 6.26605 16.9468 6.28974L15.4259 10.6076H18.5093ZM4.57075 19.9682C4.69968 19.9682 4.81418 19.8858 4.85518 19.7636L5.98945 16.3815H11.4579L12.5943 19.7637C12.6353 19.8859 12.7498 19.9682 12.8787 19.9682H15.0516C15.2586 19.9682 15.4034 19.7636 15.3346 19.5684L10.4182 5.62298C10.3759 5.50299 10.2625 5.42273 10.1353 5.42273H7.30723C7.17995 5.42273 7.06652 5.50305 7.02425 5.62311L2.11475 19.5686C2.04604 19.7637 2.19084 19.9682 2.39772 19.9682H4.57075ZM10.7468 14.2651L8.79613 8.45953C8.78532 8.42736 8.75517 8.40568 8.72123 8.40568C8.68728 8.40568 8.65712 8.42738 8.64633 8.45957L6.69928 14.2651H10.7468Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};function g(e){return e.focusedEntity}},991657,149508,e=>{"use strict";e.s(["TextDecorationButton",()=>u,"toggleMarkInFocusedBlock",()=>d],991657);var t=e.i(843476),n=e.i(500932),r=e.i(813029),i=e.i(887710),a=e.i(172604),o=e.i(988314),s=e.i(662498);let l=(e,t={})=>(n,r)=>{let{selection:i}=n,{empty:a,ranges:o}=i,s=n.tr;if(a){let r=function(e,t){let{from:n,to:r,empty:i}=e.selection,a=[];i?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(n,r,e=>{a.push(...e.marks)});let o=a.find(e=>e.type.name===t.name);return o?{...o.attrs}:{}}(n,e);s.addStoredMark(e.create({...r,...t}))}else o.forEach(r=>{let i=r.$from.pos,a=r.$to.pos;n.doc.nodesBetween(i,a,(n,r)=>{let o=Math.max(r,i),l=Math.min(r+n.nodeSize,a);n.marks.find(t=>t.type===e)?n.marks.forEach(n=>{e===n.type&&s.addMark(o,l,e.create({...n.attrs,...t}))}):s.addMark(o,l,e.create(t))})});r(s)};function c(e){return e.focusedEntity?.entityID}function u(e){var a;let l,u,h,p,m,f=(0,n.c)(8),g=(a=e.mark,p=(0,n.c)(3),m=(0,r.useUIState)(c),p[0]!==m||p[1]!==a?(h=e=>{let t=m?e.editorStates[m]?.editor:void 0;if(!t)return!1;let{to:n,from:r,$cursor:i}=t.selection;return i?!!a.isInSet(t.storedMarks||i.marks()):!!(0,s.rangeHasMark)(t,a,r,n)},p[0]=m,p[1]=a,p[2]=h):h=p[2],(0,o.useEditorStates)(h));return f[0]!==e.attrs||f[1]!==e.mark?(l=t=>{t.preventDefault(),t.stopPropagation(),d(e.mark,e.attrs)},f[0]=e.attrs,f[1]=e.mark,f[2]=l):l=f[2],f[3]!==g||f[4]!==e.icon||f[5]!==e.tooltipContent||f[6]!==l?(u=(0,t.jsx)(i.ToolbarButton,{active:g,onClick:l,tooltipContent:e.tooltipContent,children:e.icon}),f[3]=g,f[4]=e.icon,f[5]=e.tooltipContent,f[6]=l,f[7]=u):u=f[7],u}function d(e,t){let n=r.useUIState.getState().focusedEntity,i=n?o.useEditorStates.getState().editorStates[n?.entityID]:null;if(!i)return;let{view:c}=i,{to:u,from:d,$cursor:h}=c.state.selection,p=(0,s.rangeHasMark)(c.state,e,d,u);if(u===d&&e?.isInSet(c.state.storedMarks||h?.marks()||[]))return(0,a.toggleMark)(e,t)(c.state,c.dispatch);p&&(!t||JSON.stringify(t)===JSON.stringify(p.attrs))?(0,a.toggleMark)(e,t)(c.state,c.dispatch):l(e,t)(c.state,c.dispatch)}e.s(["setMark",0,l],149508)},839028,630564,e=>{"use strict";e.s(["BoldSmall",()=>B,"ItalicSmall",()=>j,"StrikethroughSmall",()=>O,"TextMarkButtons",()=>R,"TextToolbar",()=>L],839028);var t=e.i(843476),n=e.i(500932),r=e.i(859015),i=e.i(898144),a=e.i(743756),o=e.i(842158),s=e.i(911549),l=e.i(991657),c=e.i(543291),u=e.i(69497),d=e.i(511987),h=e.i(84395),p=e.i(680915),m=e.i(813029),f=e.i(467592),g=e.i(492122),y=e.i(110383),b=e.i(616009),v=e.i(734582),x=e.i(478802),k=e.i(580714),w=e.i(988314),C=e.i(64572),S=e.i(975191);function E(e,t){if(!e||"block"!==e.entityType)return;let n=w.useEditorStates.getState().editorStates[e.entityID];if(!n?.view)return;let r=(0,p.pageOfParent)(e.parent);!function(e,t,n){let{from:r,to:i}=e.state.selection;if(r===i){let t=e.state.doc.resolve(r),n=t.start(),a=t.parent.textBetween(0,t.parent.content.size,void 0,""),o=r-n,s=o,l=o;for(;s>0&&/\S/.test(a[s-1]);)s--;for(;l<a.length&&/\S/.test(a[l]);)l++;if(s===l)return;r=n+s,i=n+l}let a=S.useEditorCommentDraftStore.getState().draft;a&&a.blockID!==t&&T(a.blockID),e.dispatch(e.state.tr.setMeta(k.commentDraftKey,{from:r,to:i})),S.useEditorCommentDraftStore.setState({draft:{blockID:t,pageID:n}})}(n.view,e.entityID,r),window.matchMedia("(min-width: 1280px)").matches&&"canvas"!==t||S.useEditorCommentSheetStore.getState().openSheet(r)}function T(e){let t=w.useEditorStates.getState().editorStates[e];t?.view&&t.view.dispatch(t.view.state.tr.setMeta(k.commentDraftKey,null))}async function I({rep:e,undoManager:t,permissionSet:n,authorDid:r,ydoc:i}){let a=S.useEditorCommentDraftStore.getState().draft;if(!a)return;let o=w.useEditorStates.getState().editorStates[a.blockID]?.view;if(!o)return;let s=(0,k.getCommentDraftRange)(o.state);if(!s)return;let l=(0,y.v7)(),c=await e.query(async e=>(0,C.scanIndex)(e).eav(a.blockID,"block/comment")),d={};for(let e of c)d[e.data.value]=e.data.position;let h={};o.state.doc.descendants((e,t)=>{for(let n of e.marks)if(n.type===u.schema.marks.comment)for(let e of D(n))void 0===h[e]&&(h[e]=t)});let p=null,m=null;for(let[e,t]of Object.entries(h)){let n=d[e];void 0!==n&&(t<s.from?(null===p||n>p)&&(p=n):(null===m||n<m)&&(m=n))}let f=(0,x.generateKeyBetween)(p,m);o.dispatch(o.state.tr.setMeta(k.commentDraftKey,null)),t.startGroup();try{await e.mutate.createEditorComment({commentEntityID:l,blockID:a.blockID,permission_set:n,commentFactID:(0,y.v7)(),position:f,authorDid:r,createdAt:new Date().toISOString(),anchorStart:s.from,anchorEnd:s.to,content:v.fromByteArray(b.encodeStateAsUpdate(i))});let t=u.schema.marks.comment,c=o.state.tr;o.state.doc.nodesBetween(s.from,s.to,(e,n)=>{if(!e.isText)return;let r=Math.max(n,s.from),i=Math.min(n+e.nodeSize,s.to);if(r>=i)return;let a=e.marks.find(e=>e.type===t),o=a?D(a):[];o.includes(l)||o.push(l),c.addMark(r,i,t.create({commentID:o.join(" ")}))}),c.setMeta("bulkOp",!0),o.dispatch(c)}finally{t.endGroup()}return S.useEditorCommentDraftStore.setState({draft:null}),l}
168function D(e){return(e.attrs.commentID||"").split(" ").filter(Boolean)}e.s(["cancelEditorCommentDraft",0,function(){let e=S.useEditorCommentDraftStore.getState().draft;e&&(T(e.blockID),S.useEditorCommentDraftStore.setState({draft:null}))},"removeEditorCommentMark",0,function(e,t){let n=w.useEditorStates.getState().editorStates[e]?.view;if(!n)return;let r=u.schema.marks.comment,i=n.state.tr;n.state.doc.descendants((e,n)=>{if(!e.isText)return;let a=e.marks.find(e=>e.type===r);if(!a)return;let o=D(a);if(!o.includes(t))return;let s=n+e.nodeSize;i.removeMark(n,s,r);let l=o.filter(e=>e!==t);l.length>0&&i.addMark(n,s,r.create({commentID:l.join(" ")}))}),0!==i.steps.length&&(i.setMeta("bulkOp",!0),n.dispatch(i))},"startFocusedBlockCommentDraft",0,E,"submitEditorCommentDraft",0,I],630564);var N=e.i(88891),A=e.i(887710);function _(){let e,r,i,a,o=(0,n.c)(8),{permissions:s}=(0,g.useEntitySetContext)(),l=(0,m.useUIState)(P);o[0]!==l?(e=l?.entityType==="block"?(0,p.pageOfParent)(l.parent):null,o[0]=l,o[1]=e):e=o[1];let c=e,u=(0,f.useEntity)(c,"page/type")?.data.value||"doc";return s.write?(o[2]!==l||o[3]!==u?(r=e=>{e.preventDefault(),E(l,u)},o[2]=l,o[3]=u,o[4]=r):r=o[4],o[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(N.CommentTiny,{className:"w-6 h-6 p-0.5"}),o[5]=i):i=o[5],o[6]!==r?(a=(0,t.jsx)(A.ToolbarButton,{tooltipContent:"Add Comment",onClick:r,children:i}),o[6]=r,o[7]=a):a=o[7],a):null}function P(e){return e.focusedEntity}var M=e.i(760524);let R=()=>{let e,a,o,s,c,d,h,p,m,f,g,y=(0,n.c)(11);return y[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"text-center",children:"Bold "}),y[0]=e):e=y[0],y[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(r.ShortcutKey,{children:(0,i.metaKey)()}),y[1]=a):a=y[1],y[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[e,(0,t.jsxs)("div",{className:"flex gap-1",children:[a," +"," ",(0,t.jsx)(r.ShortcutKey,{children:" B "})]})]}),y[2]=o):o=y[2],y[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(l.TextDecorationButton,{tooltipContent:o,mark:u.schema.marks.strong,icon:(0,t.jsx)(B,{})}),y[3]=s):s=y[3],y[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("div",{className:"italic font-normal text-center",children:"Italic"}),y[4]=c):c=y[4],y[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(r.ShortcutKey,{children:(0,i.metaKey)()}),y[5]=d):d=y[5],y[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[c,(0,t.jsxs)("div",{className:"flex gap-1",children:[d," +"," ",(0,t.jsx)(r.ShortcutKey,{children:" I "})]})]}),y[6]=h):h=y[6],y[7]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(l.TextDecorationButton,{tooltipContent:h,mark:u.schema.marks.em,icon:(0,t.jsx)(j,{})}),y[7]=p):p=y[7],y[8]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("div",{className:"text-center font-normal line-through",children:"Strikethrough"}),y[8]=m):m=y[8],y[9]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsxs)("div",{className:"flex flex-col gap-1 justify-center",children:[m,(0,t.jsx)("div",{className:"flex gap-1",children:(0,M.isMac)()?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ShortcutKey,{children:"â"})," +"," ",(0,t.jsx)(r.ShortcutKey,{children:" Ctrl "})," +"," ",(0,t.jsx)(r.ShortcutKey,{children:" X "})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ShortcutKey,{children:" Ctrl "})," +"," ",(0,t.jsx)(r.ShortcutKey,{children:" Meta "})," +"," ",(0,t.jsx)(r.ShortcutKey,{children:" X "})]})})]}),y[9]=f):f=y[9],y[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsxs)(t.Fragment,{children:[s,p,(0,t.jsx)(l.TextDecorationButton,{tooltipContent:f,mark:u.schema.marks.strikethrough,icon:(0,t.jsx)(O,{})})]}),y[10]=g):g=y[10],g},L=e=>{let i,l,u,p,m,f,g,y,b,v,x,k,w=(0,n.c)(20);return w[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(R,{}),w[0]=i):i=w[0],w[1]!==e.setToolbarState?(l=(0,t.jsx)(c.HighlightButton,{setToolbarState:e.setToolbarState}),w[1]=e.setToolbarState,w[2]=l):l=w[2],w[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(r.Separator,{classname:"h-6!"}),w[3]=u):u=w[3],w[4]!==e.setToolbarState?(p=(0,t.jsx)(a.LinkButton,{setToolbarState:e.setToolbarState}),w[4]=e.setToolbarState,w[5]=p):p=w[5],w[6]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(r.Separator,{classname:"h-6!"}),w[6]=m):m=w[6],w[7]!==e.setToolbarState?(f=(0,t.jsx)(s.TextBlockTypeButton,{setToolbarState:e.setToolbarState}),g=(0,t.jsx)(d.TextAlignmentButton,{setToolbarState:e.setToolbarState}),y=(0,t.jsx)(o.ListButton,{setToolbarState:e.setToolbarState}),w[7]=e.setToolbarState,w[8]=f,w[9]=g,w[10]=y):(f=w[8],g=w[9],y=w[10]),w[11]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)(r.Separator,{classname:"h-6!"}),x=(0,t.jsx)(h.FootnoteButton,{}),b=(0,t.jsx)(_,{}),w[11]=b,w[12]=v,w[13]=x):(b=w[11],v=w[12],x=w[13]),w[14]!==l||w[15]!==p||w[16]!==f||w[17]!==g||w[18]!==y?(k=(0,t.jsxs)(t.Fragment,{children:[i,l,u,p,m,f,g,y,v,x,b]}),w[14]=l,w[15]=p,w[16]=f,w[17]=g,w[18]=y,w[19]=k):k=w[19],k},j=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{d:"M16.5405 4.29297H8.94642C8.84899 4.29297 8.76575 4.36316 8.74929 4.45919L8.47218 6.0761
1685C8.45124 6.19833 8.54535 6.30993 8.66931 6.30993H11.1682C11.2917 6.30993 11.3856 6.42064 11.3656 6.54243L9.55711 17.5225C9.5412 17.6191 9.45768 17.69 9.35977 17.69H6.73484C6.63743 17.69 6.55419 17.7602 6.53772 17.8562L6.26156 19.4656C6.24059 19.5877 6.3347 19.6994 6.45868 19.6994H14.0711C14.1686 19.6994 14.2519 19.6291 14.2682 19.5329L14.542 17.9236C14.5628 17.8014 14.4687 17.69 14.3449 17.69H11.8282C11.7047 17.69 11.6107 17.5792 11.6308 17.4574L13.445 6.47733C13.4609 6.38076 13.5444 6.30993 13.6423 6.30993H16.2664C16.364 6.30993 16.4473 6.23954 16.4636 6.14335L16.7377 4.52639C16.7584 4.40432 16.6643 4.29297 16.5405 4.29297Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},O=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.766 7.54791C14.5981 7.14401 14.3193 6.81106 13.9296 6.54904C13.3392 6.14693 12.596 5.94588 11.7002 5.94588C11.0588 5.94588 10.504 6.04768 10.0358 6.25128C9.56749 6.44978 9.20356 6.72464 8.94397 7.07585C8.68947 7.42197 8.56222 7.81644 8.56222 8.25927C8.56222 8.63083 8.64875 8.9515 8.82181 9.22127C8.99996 9.49104 9.23155 9.71754 9.51659 9.90078C9.80672 10.0789 10.1172 10.2291 10.4481 10.3512C10.7789 10.4683 11.097 10.565 11.4024 10.6414L11.7916 10.7426H19.1828C19.2933 10.7426 19.3828 10.8321 19.3828 10.9426V12.2426C19.3828 12.353 19.2933 12.4426 19.1828 12.4426H4.2C4.08954 12.4426 4 12.353 4 12.2426V10.9426C4 10.8321 4.08954 10.7426 4.2 10.7426H7.02679C6.4827 10.1204 6.21066 9.33845 6.21066 8.3967C6.21066 7.49577 6.45498 6.70937 6.94361 6.0375C7.43225 5.36562 8.09394 4.8439 8.9287 4.47233C9.76345 4.09568 10.7051 3.90735 11.7536 3.90735C12.8123 3.90735 13.7463 4.09313 14.5557 4.4647C15.37 4.83627 16.0114 5.34781 16.4797 5.99932C16.6189 6.19157 16.7384 6.39238 16.838 6.60174C17.1675 7.34647 16.7266 7.9669 16.2546 8.14575C15.7343 8.34291 15.0571 8.17629 14.766 7.54791ZM17.0153 13.9178C17.0957 13.9178 17.1689 13.9658 17.197 14.0412C17.3499 14.452 17.4264 14.9169 17.4264 15.4361C17.4264 16.3218 17.1973 17.1082 16.7392 17.7953C16.2862 18.4825 15.6271 19.0245 14.7618 19.4216C13.9016 19.8186 12.8607 20.0171 11.6391 20.0171C10.4684 20.0171 9.45551 19.8313 8.60039 19.4597C7.74528 19.0882 7.07595 18.5613 6.59241 17.8793C6.40641 17.615 6.25242 17.3318 6.13043 17.0299C5.85043 16.3373 6.2981 15.6726 6.89251 15.4915C7.42606 15.329 8.08749 15.585 8.32635 16.2052C8.41821 16.4437 8.54519 16.6582 8.70728 16.8486C9.03304 17.2201 9.44787 17.4975 9.95178 17.6808C10.4608 17.8589 11.0181 17.948 11.6238 17.948C12.2906 17.948 12.8836 17.8437 13.4028 17.635C13.927 17.4212 14.3393 17.126 14.6396 16.7493C14.9399 16.3676 15.0901 15.9222 15.0901 15.4132C15.0901 14.95 14.9578 14.5708 14.6931 14.2756C14.6436 14.2193 14.5906 14.1649 14.5343 14.1123C14.4636 14.0463 14.5077 13.9178 14.6044 13.9178H17.0153Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},B=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.50664 19.6364L7.50448 19.6364H6.2C6.08954 19.6364 6 19.5468 6 19.4364V17.836C6 17.7255 6.08954 17.636 6.2 17.636H7.30664V6.00037H6.2C6.08954 6.00037 6 5.91082 6 5.80037V4.2C6 4.08954 6.08954 4 6.2 4H7.50664H10.1779H13.0328C14.1425 4 14.9085 4.18324 15.6364 4.54972C16.3642 4.9111 16.9089 5.40228 17.2702 6.02326C17.6316 6.63915 17.8123 7.23894 17.8123 8.01261C17.8123 8.66413 17.6927 9.07855 17.4535 9.52647C17.3043 9.80578 17.0377 10.2195 16.6682 10.5116C16.3158 10.7902 15.8543 11.0303 15.3972 11.1579C15.3583 11.1688 15.331 11.2039 15.331 11.2442C15.331 11.2913 15.3679 11.33 15.4149 11.3337C15.9048 11.3723 16.3832 11.5385 16.8503 11.8322C17.3491 12.1376 17.7614 12.5728 18.0872 13.1378C18.4129 13.7028 18.5758 14.6202 18.5758 15.4295C18.5758 16.2286 18.3875 16.9463 18.0108 17.5826C17.6393 18.2137 17.0641 18.7151 16.2853 19.0866C15.5066 19.4531 14.5115 19.6364 13.3001 19.6364H7.50664ZM9.66584 17.4131C9.66584 17.5236 9.75538 17.6131 9.86584 17.6131H13.071C14.201 17.6131 15.0103 17.3942 15.4989 16.9565C15.9876 16.5188 16.2319 15.9716 16.2319 15.315C16.2319 14.8213 16.1072 14.138 15.8578 13.7257C15.6084 13.3134 15.2521 12.9851 14.7889 12.7408C14.3308 12.4965 13.7862 12.3743 13.155 12.3743H9.86584C9.75538 12.3743 9.66584 12.4638 9.66584 12.5743V17.4131ZM9.66584 10.3343C9.66584 10.4447 9.75538 10.5343 9.86584 10.5343H12.8267C13.3561 10.5343 13.6793 10.4325 14.1017 10.2289C14.5293 10.0253 14.8678 9.74025 15.1172 9.37377C15.3717 9.0022 15.4989 8.69976 15.4989 8.19585C15.4989 7.54943 15.2724 7.10233 14.8194 6.6646C14.3664 6.22686 13.8243 6.00799 12.8878 6.00799H9.86584C9.75538 6.00799 9.66584 6.09753 9.66584 6.20799V10.3343Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i}},887710,e=>{"use strict";e.s(["Toolbar",()=>_,"ToolbarButton",()=>P,"ToolbarPageTypeProvider",()=>A],887710);var t=e.i(843476),n=e.i(500932),r=e.i(680915),i=e.i(271645),a=e.i(911549),o=e.i(743756),s=e.i(988314),l=e.i(813029),c=e.i(467592),u=e.i(186336),d=e.i(581869),h=e.i(842158),p=e.i(543291),m=e.i(839028),f=e.i(61395),g=e.i(858930
168),y=e.i(793610),b=e.i(511987),v=e.i(901982),x=e.i(993417),k=e.i(859015);let w=e=>{let r,i,o,s,l,u,d,p,m,f,w,T=(0,n.c)(24),{rep:I,undoManager:D}=(0,c.useReplicache)(),N=(0,y.useSmoker)(),A=(0,y.useToaster)();T[0]!==I||T[1]!==N?(r=async e=>{if(!I)return;let[t]=await (0,v.getSortedSelection)(I);await (0,g.copySelection)(I,t),N({position:{x:e.clientX,y:e.clientY},text:"Copied to clipboard"})},T[0]=I,T[1]=N,T[2]=r):r=T[2];let _=r;return T[3]!==I||T[4]!==A||T[5]!==D?(i=async e=>{if(e.stopPropagation(),!I)return;let[n]=await (0,v.getSortedSelection)(I);await (0,x.deleteBlock)(n.map(E),I,D),A({content:(0,t.jsxs)("div",{className:"font-bold items-center flex",children:[n.length," block",1===n.length?"":"s"," deleted!"," ",(0,t.jsxs)("span",{className:"px-2 flex",children:[(0,t.jsx)(k.ShortcutKey,{children:"Ctrl"}),(0,t.jsx)(k.ShortcutKey,{children:"Z"})," "]}),"to undo."]}),type:"success"})},T[3]=I,T[4]=A,T[5]=D,T[6]=i):i=T[6],T[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(S,{}),T[7]=o):o=T[7],T[8]!==i?(s=(0,t.jsx)(P,{tooltipContent:"Delete Selected Blocks",onClick:i,children:o}),T[8]=i,T[9]=s):s=T[9],T[10]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(C,{}),T[10]=l):l=T[10],T[11]!==_?(u=(0,t.jsx)(P,{tooltipContent:"Copy Selected Blocks",onClick:_,children:l}),T[11]=_,T[12]=u):u=T[12],T[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(k.Separator,{classname:"h-6!"}),T[13]=d):d=T[13],T[14]!==e.setToolbarState?(p=(0,t.jsx)(a.TextBlockTypeButton,{setToolbarState:e.setToolbarState}),m=(0,t.jsx)(b.TextAlignmentButton,{setToolbarState:e.setToolbarState}),f=(0,t.jsx)(h.ListButton,{setToolbarState:e.setToolbarState}),T[14]=e.setToolbarState,T[15]=p,T[16]=m,T[17]=f):(p=T[15],m=T[16],f=T[17]),T[18]!==s||T[19]!==u||T[20]!==p||T[21]!==m||T[22]!==f?(w=(0,t.jsx)("div",{className:"flex items-center gap-2 justify-between w-full",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s,u,d,p,m,f]})}),T[18]=s,T[19]=u,T[20]=p,T[21]=m,T[22]=f,T[23]=w):w=T[23],w},C=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.03036 3.85044C8.19103 2.68789 9.26372 1.87571 10.4263 2.03638L19.0781 3.23213C20.2406 3.39281 21.0528 4.4655 20.8921 5.62805L19.2931 17.1976C19.1324 18.3602 18.0598 19.1724 16.8972 19.0117L16.8768 19.0089L17.9581 11.1853C18.0399 10.5931 17.8827 9.99263 17.5212 9.51651L14.5554 5.61099C14.1951 5.13664 13.6615 4.82447 13.0715 4.74292L8.00381 4.04252L8.03036 3.85044ZM5.97171 6.80481C6.03787 6.32611 6.47957 5.99168 6.95827 6.05784L12.2718 6.79222C12.4984 6.82354 12.7038 6.94239 12.8439 7.12329L15.5846 10.6629C15.7287 10.849 15.7917 11.0853 15.7595 11.3184L14.5626 19.9785C14.4964 20.4572 14.0547 20.7916 13.576 20.7255L5.09311 19.5531C4.61441 19.4869 4.27998 19.0452 4.34614 18.5665L5.97171 6.80481ZM7.1294 4.81961C5.96685 4.65894 4.89416 5.47112 4.73348 6.63368L3.10791 18.3954C2.94724 19.5579 3.75942 20.6306 4.92198 20.7913L13.4049 21.9637C14.5675 22.1244 15.6402 21.3122 15.8008 20.1496L16.9977 11.4896C17.076 10.9234 16.9229 10.3496 16.5729 9.89767L13.8322 6.35801C13.492 5.91868 12.9933 5.63006 12.4429 5.55399L7.1294 4.81961ZM12.2721 8.02572C12.3193 7.6838 12.0805 7.3683 11.7385 7.32104C11.3966 7.27379 11.0811 7.51266 11.0339 7.85459L10.7715 9.75307C10.6297 10.7789 11.3463 11.7253 12.3721 11.8671L14.455 12.155C14.797 12.2022 15.1125 11.9634 15.1597 11.6214C15.207 11.2795 14.9681 10.964 14.6262 10.9168L12.5433 10.6289C12.2013 10.5816 11.9624 10.2661 12.0097 9.9242L12.2721 8.02572ZM5.99683 14.2097C6.05354 13.7994 6.43214 13.5128 6.84245 13.5695L10.0055 14.0066C10.4158 14.0633 10.7024 14.4419 10.6457 14.8523C10.589 15.2626 10.2104 15.5492 9.80011 15.4925L6.63709 15.0554C6.22678 14.9986 5.94012 14.62 5.99683 14.2097ZM6.47584 16.2222C6.06553 16.1655 5.68693 16.4521 5.63022 16.8624C5.57352 17.2728 5.86017 17.6514 6.27048 17.7081L12.8109 18.612C13.2212 18.6687 13.5998 18.3821 13.6565 17.9717C13.7132 17.5614 13.4266 17.1828 13.0163 17.1261L6.47584 16.2222Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i},S=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.682 3.11103C9.4724 3.23448 8.89352 3.67017 8.73295 4.09426C8.57457 4.51256 8.71273 5.20871 9.51183 6.08877C9.86249 6.47497 10.3151 6.86398 10.8567 7.2317C11.521 7.68272 12.3093 8.09493 13.1874 8.42742C14.7679 9.02584 16.286 9.23267 17.4457 9.11431C18.6553 8.99087 19.2342 8.55517 19.3948 8.13109C19.5553 7.707 19.4102 6.99716 18.5856 6.10354C17.7951 5.24678 16.5208 4.39634 14.9403 3.79793C13.3598 3.19951 11.8417 2.99268 10.682 3.11103ZM10.5297 1.61879C11.9666 1.47215 13.7204 1.73212 15.4714 2.39511C17.2225 3.0581 18.7086 4.02485 19.6881 5.08636C20.6335 6.11101 21.2677 7.42054 20.7976 8.66223C20.4763 9.51081 19.7476 10.0415 18.8756 10.3377L18.8512 10.5864C18.8085 11.0201 18.7488 11.6195 18.6804 12.2826C18.5439 13.6052 18.3721 15.193 18.2332 16.2206C18.0958 17.2367 17.9216 18.1654 17.782 18.8394C17.7065 19.2037 17.6277 19.5677 17.5385 19.9289C17.3496 20.8304 16.5864 21.4845 15.7038 21.895C14.7878 22.321 13.5933 22.5626 12.2528 22.5626C9.70265 22.5626 7.61297 21.8776 6.98728 20.0005C6.8862 19.6168 6.80407 19.2278 6.72362 18.8394C6.58403 18.1654 6.40982 17.2367 6.27245 16.2206C6.13295 15.1888 5.96088 13.4661 5.82457 12.0139C5.75617 11.2852 5.69637 10.6201 5.65367 10.1372C5.63217 9.89407 5.61097 9.65088 5.58999 9.40767C5.57932 9.28304 5.58998 9.16406 5.60549 9.03837C5.71664 8.13769 6.61126 7.27662 8.06548 6.69616C7.34029 5.75314 6.92513 4.63277 7.33013 3.56312C7.80026 2.32143 9.14275 1.76033 10.5297 1.61879ZM17.1289 10.6396C17.1998 10.6367 17.2702 10.633 17.3398 10.6283C17.2993 11.0382 17.2469 11.56 17.1883 12.1287C17.0517 13.4526 16.882 15.0185 16.7467 16.0196C16.5497 17.4769 16.2709 18.7602 16.145 19.3048C16.121 19.4087 16.0961 19.5125 16.0714 19.6162C16.0259 19.8437 15.774 20.2081 15.0713 20.5349C14.3961 20.8489 13.4274 21.0626 12.2528 21.0626C9.79771 21.0626 8.71725 20.3951 8.41916 19.552C8.39914 19.4697 8.37966 19.3873 8.36059 19.3048C8.31867 19.1234 8.25973 18.86 8.19244 18.5352C8.05767 17.8845 7.89033 16.9916 7.75893 16.0196C7.62416 15.0228 7.45468 13.3299 7.31801 11.8738C7.28819 11.5561 7.26001 11.2505 7.23417 10.9669C7.3779 11.0411 7.52304 11.1123 7.66588 11.1824C7.78804 11.2424 7.90851 11.3016 8.02495 11.361C8.50725 11.6069 9.07475 11.811 9.70356 11.9612C10.4756 12.1457 11.3401 12.249 12.2528 12.249C14.3262 12.249 16.1049 11.5603 17.1289 10.6396ZM13.8382 5.4146C13.6815 5.78286 13.2605 5.9648 12.8828 5.82179C12.4954 5.67512 12.3002 5.24219 12.4469 4.85481C12.5697 4.53047 12.8562 4.18935 13.3052 4.0074C13.7683 3.8197 14.3267 3.83032 14.949 4.06593C15.5712 4.30154 15.9966 4.66339 16.2193 5.11078C16.4352 5.54447 16.4239 5.98976 16.3011 6.31411C16.1544 6.70148 15.7215 6.89661 15.3341 6.74994C14.9564 6.60693 14.7615 6.19178
16814.8879 5.81206C14.8869 5.8057 14.8841 5.79446 14.8765 5.77925C14.8604 5.74695 14.7761 5.60439 14.4178 5.46874C14.0596 5.33309 13.9019 5.38404 13.8685 5.39759C13.8528 5.40397 13.8432 5.41054 13.8382 5.4146ZM9.032 12.9912C9.39109 12.9721 9.67224 13.2642 9.69072 13.6111C9.71588 14.0747 9.7415 14.5382 9.76856 15.0016C9.81412 15.782 9.87062 16.6895 9.91555 17.2239C9.98125 18.0053 10.0742 18.693 10.1161 18.9847C10.1701 19.3602 10.074 19.7752 9.6166 19.8464C9.17393 19.9154 8.93368 19.5441 8.87883 19.1625C8.83468 18.8554 8.73864 18.1456 8.66995 17.3287C8.62347 16.7759 8.56612 15.8528 8.52068 15.0745C8.4935 14.609 8.46777 14.1434 8.44249 13.6778C8.42412 13.333 8.67585 13.01 9.032 12.9912ZM16.0647 13.6483C16.083 13.3036 15.8183 13.0094 15.4736 12.9912C15.1289 12.9729 14.8347 13.238 14.8164 13.5827L14.8164 13.584C14.7907 14.0566 14.7647 14.5292 14.7371 15.0016C14.6915 15.782 14.635 16.6895 14.5901 17.2239C14.5463 17.7451 14.4905 18.2237 14.4456 18.5723C14.4215 18.7593 14.3965 18.9464 14.3676 19.1328C14.3145 19.4738 14.548 19.7933 14.889 19.8464C15.2301 19.8995 15.5496 19.666 15.6027 19.325L15.6029 19.324C15.6333 19.1271 15.6599 18.9296 15.6853 18.732C15.7318 18.3708 15.7899 17.8731 15.8357 17.3287C15.8822 16.7759 15.9395 15.8528 15.9849 15.0745C16.0127 14.5998 16.0389 14.1251 16.0646 13.6503L16.0647 13.6483ZM12.9954 14.4678C12.9954 14.1226 12.7156 13.8428 12.3704 13.8428C12.0253 13.8428 11.7454 14.1226 11.7454 14.4678L11.7454 19.3657C11.7454 19.7109 12.0253 19.9907 12.3704 19.9907C12.7156 19.9907 12.9954 19.7109 12.9954 19.3657L12.9954 14.4678ZM8.34005 10.25C8.61619 10.25 8.84005 10.0261 8.84005 9.75C8.84005 9.47386 8.61619 9.25 8.34005 9.25C8.06391 9.25 7.84005 9.47386 7.84005 9.75C7.84005 10.0261 8.06391 10.25 8.34005 10.25ZM8.34005 10.75C8.89233 10.75 9.34005 10.3023 9.34005 9.75C9.34005 9.19772 8.89233 8.75 8.34005 8.75C7.78777 8.75 7.34005 9.19772 7.34005 9.75C7.34005 10.3023 7.78777 10.75 8.34005 10.75ZM11.4369 10.75C11.713 10.75 11.9369 10.5261 11.9369 10.25C11.9369 9.97386 11.713 9.75 11.4369 9.75C11.1607 9.75 10.9369 9.97386 10.9369 10.25C10.9369 10.5261 11.1607 10.75 11.4369 10.75ZM11.4369 11.25C11.9891 11.25 12.4369 10.8023 12.4369 10.25C12.4369 9.69772 11.9891 9.25 11.4369 9.25C10.8846 9.25 10.4369 9.69772 10.4369 10.25C10.4369 10.8023 10.8846 11.25 11.4369 11.25Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};function E(e){return e.entityID}var T=e.i(69278),I=e.i(227086),D=e.i(133564);let N=(0,i.createContext)(void 0),A=e=>{let r,i=(0,n.c)(3),a=(0,c.useEntity)(e.pageID,"page/type")?.data.value;return i[0]!==a||i[1]!==e.children?(r=(0,t.jsx)(N.Provider,{value:a,children:e.children}),i[0]=a,i[1]=e.children,i[2]=r):r=i[2],r},_=e=>{let c,g,y,v,x,k,C,S,E,T,N,_=(0,n.c)(34),[P,M]=(0,i.useState)("default"),j=(0,l.useUIState)(R),O=(0,l.useUIState)(L);_[0]!==P?(c=()=>{if("default"!==P)return;let e=(0,d.addShortcut)({metaKey:!0,key:"k",handler:()=>{M("link")}});return()=>{e()}},g=[P],_[0]=P,_[1]=c,_[2]=g):(c=_[1],g=_[2]),(0,i.useEffect)(c,g);let B="heading"===e.blockType||"text"===e.blockType||"blockquote"===e.blockType;_[3]!==O||_[4]!==B||_[5]!==e.blockType?(y=()=>{O?M("multiselect"):(B&&M("default"),"image"===e.blockType&&M("image"),"datetime"===e.blockType&&M("text-alignment"))},_[3]=O,_[4]=B,_[5]=e.blockType,_[6]=y):y=_[6],_[7]!==O||_[8]!==e.blockType||_[9]!==j?(v=[e.blockType,O,j],_[7]=O,_[8]=e.blockType,_[9]=j,_[10]=v):v=_[10],(0,i.useEffect)(y,v);let F=(0,I.useIsMobile)(),H=`toolbar flex gap-2 items-center justify-between w-full 169 ${F?"":"h-[26px]"}`;return _[11]!==O||_[12]!==e.blockID||_[13]!==e.pageID||_[14]!==P?(x="default"===P?(0,t.jsx)(m.TextToolbar,{setToolbarState:e=>{M(e)}}):"highlight"===P?(0,t.jsx)(p.HighlightToolbar,{pageID:e.pageID,onClose:()=>M("default")}):"list"===P?(0,t.jsx)(h.ListToolbar,{onClose:()=>M(O?"multiselect":"default")}):"link"===P?(0,t.jsx)(o.InlineLinkToolbar,{onClose:()=>{s.useEditorStates.getState().editorStates[e.blockID]?.view?.focus(),M("default")}}):"heading"===P?(0,t.jsx)(a.TextBlockTypeToolbar,{onClose:()=>M(O?"multiselect":"default")}):"text-alignment"===P?(0,t.jsx)(b.TextAlignmentToolbar,{}):"image"===P?(0,t.jsx)(f.ImageToolbar,{setToolbarState:M}):"multiselect"===P?(0,t.jsx)(w,{setToolbarState:M}
169):null,_[11]=O,_[12]=e.blockID,_[13]=e.pageID,_[14]=P,_[15]=x):x=_[15],_[16]!==x?(k=(0,t.jsx)("div",{className:"toolbarOptions flex gap-1 sm:gap-[6px] items-center grow",children:x}),_[16]=x,_[17]=k):k=_[17],_[18]!==O||_[19]!==B||_[20]!==e.blockType||_[21]!==e.pageID||_[22]!==P?(C=t=>{t.preventDefault(),"multiselect"===P||"image"===P||"default"===P?l.useUIState.setState(()=>({focusedEntity:{entityType:"page",entityID:(0,r.pageOfParent)(e.pageID)},selectedBlocks:[]})):O?M("multiselect"):("image"===e.blockType&&M("image"),B&&M("default"))},_[18]=O,_[19]=B,_[20]=e.blockType,_[21]=e.pageID,_[22]=P,_[23]=C):C=_[23],_[24]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)(D.CloseTiny,{}),_[24]=S):S=_[24],_[25]!==C?(E=(0,t.jsx)("button",{className:"toolbarBackToDefault hover:text-accent-contrast",onMouseDown:C,children:S}),_[25]=C,_[26]=E):E=_[26],_[27]!==H||_[28]!==k||_[29]!==E?(T=(0,t.jsx)(u.Provider,{children:(0,t.jsxs)("div",{className:H,children:[k,E]})}),_[27]=H,_[28]=k,_[29]=E,_[30]=T):T=_[30],_[31]!==e.pageID||_[32]!==T?(N=(0,t.jsx)(A,{pageID:e.pageID,children:T}),_[31]=e.pageID,_[32]=T,_[33]=N):N=_[33],N},P=e=>{let r,a,o=(0,n.c)(8);if("canvas"===(0,i.useContext)(N)&&e.hiddenOnCanvas)return null;o[0]!==e?(r=async t=>{t.preventDefault(),e.onClick&&await e.onClick(t)},o[0]=e,o[1]=r):r=o[1];let s=` 170 flex items-center rounded-md border border-transparent 171 ${e.className} 172 ${e.active&&!e.disabled?"bg-border-light text-primary":e.disabled?"text-border cursor-not-allowed":"text-secondary hover:text-primary hover:border-border active:bg-border-light active:text-primary"} 173 `;return o[2]!==e.children||o[3]!==e.disabled||o[4]!==e.tooltipContent||o[5]!==r||o[6]!==s?(a=(0,t.jsx)(T.TooltipButton,{onMouseDown:r,disabled:e.disabled,tooltipContent:e.tooltipContent,className:s,children:e.children}),o[2]=e.children,o[3]=e.disabled,o[4]=e.tooltipContent,o[5]=r,o[6]=s,o[7]=a):a=o[7],a};function M(e){return e.entityID}function R(e){return e.selectedBlocks.map(M).join(" ")}function L(e){return e.selectedBlocks.length>1}},369058,e=>{e.v({"grow-wrap":"textarea-styles-module__eW9ePG__grow-wrap","no-wrap":"textarea-styles-module__eW9ePG__no-wrap"})},741514,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(369058);let i=(0,n.forwardRef)((e,i)=>{let a=(0,n.useRef)(null),{noWrap:o,...s}=e;return(0,n.useImperativeHandle)(i,()=>a.current),(0,t.jsx)("div",{className:`${r.default["grow-wrap"]} ${e.className} ${o?r.default["no-wrap"]:""}`,"data-replicated-value":e.value,style:e.style,children:(0,t.jsx)("textarea",{rows:1,...s,ref:a,className:`placeholder:text-tertiary bg-transparent ${e.className}`})})}),a=(0,n.forwardRef)((e,r)=>{let[a,o]=(0,n.useState)(e.value);return(0,n.useEffect)(()=>{o(e.value)},[e.value]),(0,t.jsx)(i,{...e,ref:r,value:a,onChange:async t=>{e.onChange&&(o(t.currentTarget.value),await Promise.all([e.onChange(t)]))}})});i.displayName="Textarea",e.s(["AsyncValueAutosizeTextarea",0,a])},465082,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645);let i=(0,r.createContext)(null);e.s(["DocumentProvider",0,function(e){let r,a=(0,n.c)(3),{children:o,value:s}=e;return a[0]!==o||a[1]!==s?(r=(0,t.jsx)(i.Provider,{value:s,children:o}),a[0]=o,a[1]=s,a[2]=r):r=a[2],r},"useDocument",0,function(){let e=(0,r.useContext)(i);if(!e)throw Error("useDocument must be used within DocumentProvider");return e},"useDocumentOptional",0,function(){return(0,r.useContext)(i)}])},126479,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645);let i=(0,r.createContext)(null);e.s(["LeafletContentProvider",0,function(e){let r,a=(0,n.c)(3),{children:o,value:s}=e;return a[0]!==o||a[1]!==s?(r=(0,t.jsx)(i.Provider,{value:s,children:o}),a[0]=o,a[1]=s,a[2]=r):r=a[2],r},"useLeafletContent",0,function(){let e=(0,r.useContext)(i);if(!e)throw Error("useLeafletContent must be used within LeafletContentProvider");return e}])},43400,365172,271264,734570,e=>{"use strict";var t=e.i(642553);e.s(["PubLeafletBlocksText",0,t],43400);var n=e.i(474084);e.s(["PubLeafletBlocksUnorderedList",0,n],365172);var r=e.i(194511);e.s(["PubLeafletBlocksHeader",0,r],271264);var i=e.i(281954);e.s(["PubLeafletBlocksCode",0,i],734570)},374942,e=>{"use strict";var t=e.i(573818);e.s(["PubLeafletComment",0,t])},536116,e=>{"use strict";var t=e.i(102140);e.s(["PubLeafletPagesCanvas",0,t])},974049,e=>{"use strict";var t=e.i(36378);e.s(["PubLeafletPagesLinearDocument",0,t])},477183,807311,829975,e=>{"use strict";let t;var n,r,i,a,o,s,l,c,u,d,h,p,m,f,g,y,b,v,x,k=e.i(271645),w=e.i(174080);let C="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function S(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function E(e){return"nodeType"in e}function T(e){var t,n;return e?S(e)?e:E(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function I(e){let{Document:t}=T(e);return e instanceof t}function D(e){return!S(e)&&e instanceof T(e).HTMLElement}function N(e){return e instanceof T(e).SVGElement}function A(e){return e?S(e)?e.document:E(e)?I(e)?e:D(e)||N(e)?e.ownerDocument:document:document:document}let _=C?k.useLayoutEffect:k.useEffect;function P(e){let t=(0,k.useRef)(e);return _(()=>{t.current=e}),(0,k.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function M(){let e=(0,k.useRef)(null);return[(0,k.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,k.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function R(e,t){void 0===t&&(t=[e]);let n=(0,k.useRef)(e);return _(()=>{n.current!==e&&(n.current=e)},t),n}function L(e,t){let n=(0,k.useRef)();return(0,k.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function j(e){let t=P(e),n=(0,k.useRef)(null),r=(0,k.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function O(e){let t=(0,k.useRef)();return(0,k.useEffect)(()=>{t.current=e},[e]),t.current}let B={};function F(e,t){return(0,k.useMemo)(()=>
173{if(t)return t;let n=null==B[e]?0:B[e]+1;return B[e]=n,e+"-"+n},[e,t])}function H(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{for(let[r,i]of Object.entries(n)){let n=t[r];null!=n&&(t[r]=n+e*i)}return t},{...t})}}let U=H(1),z=H(-1);function $(e){if(!e)return!1;let{KeyboardEvent:t}=T(e.target);return t&&e instanceof t}function V(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=T(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return"clientX"in e&&"clientY"in e?{x:e.clientX,y:e.clientY}:null}let q=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[q.Translate.toString(e),q.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),G="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function W(e){return e.matches(G)?e:e.querySelector(G)}e.s(["CSS",0,q,"add",0,U,"canUseDOM",0,C,"findFirstFocusableNode",0,W,"getEventCoordinates",0,V,"getOwnerDocument",0,A,"getWindow",0,T,"isDocument",0,I,"isHTMLElement",0,D,"isKeyboardEvent",0,$,"isNode",0,E,"isSVGElement",0,N,"isWindow",0,S,"subtract",0,z,"useCombinedRefs",0,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,k.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)},"useEvent",0,P,"useInterval",0,M,"useIsomorphicLayoutEffect",0,_,"useLatestValue",0,R,"useLazyMemo",0,L,"useNodeRef",0,j,"usePrevious",0,O,"useUniqueId",0,F],807311);let K={display:"none"};function Y(e){let{id:t,value:n}=e;return k.default.createElement("div",{id:t,style:K},n)}function Z(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return k.default.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}let X=(0,k.createContext)(null),Q={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},J={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ee(e){var t;let n,{announcements:r=J,container:i,hiddenTextDescribedById:a,screenReaderInstructions:o=Q}=e,{announce:s,announcement:l}=function(){let[e,t]=(0,k.useState)("");return{announce:(0,k.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),c=F("DndLiveRegion"),[u,d]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{d(!0)},[]),t=(0,k.useMemo)(()=>({onDragStart(e){let{active:t}=e;s(r.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;r.onDragMove&&s(r.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;s(r.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;s(r.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;s(r.onDragCancel({active:t,over:n}))}}),[s,r]),n=(0,k.useContext)(X),(0,k.useEffect)(()=>{if(!n)throw Error("useDndMonitor must be used within a children of <DndContext>");return n(t)},[t,n]),!u)return null;let h=k.default.createElement(k.default.Fragment,null,k.default.createElement(Y,{id:a,value:o.draggable}),k.default.createElement(Z,{id:c,announcement:l}));return i?(0,w.createPortal)(h,i):h}function et(){}(n=d||(d={})).DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable";let en=Object.freeze({x:0,y:0});function er(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ei(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ea(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function eo(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function es(e,t){if(!e||0===e.length)return null;let[n]=e;return t?n[t]:n}function el(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}let ec=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=function(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height);if(r<i&&n<a){let o=t.width*t.height,s=e.width*e.height,l=(i-r)*(a-n);return Number((l/(o+s-l)).toFixed(4))}return 0}(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(ea)};function eu(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:en}let ed=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((e,t)=>
173({...e,top:e.top+ +t.y,bottom:e.bottom+ +t.y,left:e.left+ +t.x,right:e.right+ +t.x}),{...e})};function eh(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}let ep={ignoreTransform:!1};function em(e,t){void 0===t&&(t=ep);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=T(e).getComputedStyle(e);t&&(n=function(e,t,n){let r=eh(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,l=e.left-o-(1-i)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:l}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:l}}function ef(e){return em(e,{ignoreTransform:!0})}function eg(e,t){let n=[];return e?function r(i){var a,o;let s;if(null!=t&&n.length>=t||!i)return n;if(I(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!D(i)||N(i)||n.includes(i))return n;let l=T(e).getComputedStyle(i);return(i!==e&&(void 0===(a=l)&&(a=T(i).getComputedStyle(i)),s=/(auto|scroll|overlay)/,["overflow","overflowX","overflowY"].some(e=>{let t=a[e];return"string"==typeof t&&s.test(t)}))&&n.push(i),void 0===(o=l)&&(o=T(i).getComputedStyle(i)),"fixed"===o.position)?n:r(i.parentNode)}(e):n}function ey(e){let[t]=eg(e,1);return null!=t?t:null}function eb(e){return C&&e?S(e)?e:E(e)?I(e)||e===A(e).scrollingElement?window:D(e)?e:null:null:null}function ev(e){return S(e)?e.scrollX:e.scrollLeft}function ex(e){return S(e)?e.scrollY:e.scrollTop}function ek(e){return{x:ev(e),y:ex(e)}}function ew(e){return!!C&&!!e&&e===document.scrollingElement}function eC(e){let t={x:0,y:0},n=ew(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x;return{isTop:i,isLeft:a,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}(r=h||(h={}))[r.Forward=1]="Forward",r[r.Backward=-1]="Backward";let eS={x:.2,y:.2};function eE(e){return e.reduce((e,t)=>U(e,ek(t)),en)}function eT(e,t){if(void 0===t&&(t=em),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);ey(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}let eI=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+ev(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+ex(t),0)}]];class eD{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=eg(t),r=eE(n);for(const[t,i,a]of(this.rect={...e},this.width=e.width,this.height=e.height,eI))for(const e of i)Object.defineProperty(this,e,{get:()=>{let i=a(n),o=r[t]-i;return this.rect[e]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class eN{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function eA(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}function e_(e){e.preventDefault()}function eP(e){e.stopPropagation()}(i=p||(p={})).Click="click",i.DragStart="dragstart",i.Keydown="keydown",i.ContextMenu="contextmenu",i.Resize="resize",i.SelectionChange="selectionchange",i.VisibilityChange="visibilitychange",(a=m||(m={})).Space="Space",a.Down="ArrowDown",a.Right="ArrowRight",a.Left="ArrowLeft",a.Up="ArrowUp",a.Esc="Escape",a.Enter="Enter",a.Tab="Tab";let eM={start:[m.Space,m.Enter],cancel:[m.Esc],end:[m.Space,m.Enter,m.Tab]},eR=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case m.Right:return{...n,x:n.x+25};case m.Left:return{...n,x:n.x-25};case m.Down:return{...n,y:n.y+25};case m.Up:return{...n,y:n.y-25}}};class eL{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new eN(A(t)),this.windowListeners=new eN(T(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(p.Resize,this.handleCancel),this.windowListeners.add(p.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(p.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&eT(n),t(en)}handleKeyDown(e){if($(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=eM,coordinateGetter:a=eR,scrollBehavior:o="smooth"}=r,{code:s}=e;if(i.end.includes(s))return void this.handleEnd(e);if(i.cancel.includes(s))return void this.handleCancel(e);let{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:en;this.referenceCoordinates||(this.referenceCoordinates=c);let u=a(e,{active:t,context:n.current,currentCoordinates:c});if(u){let t=z(u,c),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:h}=eC(n),p=function(e){if(e===document.scrollingElement){let{innerWidth:e,innerHe
173ight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}(n),f={x:Math.min(i===m.Right?p.right-p.width/2:p.right,Math.max(i===m.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===m.Down?p.bottom-p.height/2:p.bottom,Math.max(i===m.Down?p.top:p.top+p.height/2,u.y))},g=i===m.Right&&!s||i===m.Left&&!l,y=i===m.Down&&!c||i===m.Up&&!a;if(g&&f.x!==u.x){let e=n.scrollLeft+t.x,a=i===m.Right&&e<=d.x||i===m.Left&&e>=h.x;if(a&&!t.y)return void n.scrollTo({left:e,behavior:o});a?r.x=n.scrollLeft-e:r.x=i===m.Right?n.scrollLeft-d.x:n.scrollLeft-h.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(y&&f.y!==u.y){let e=n.scrollTop+t.y,a=i===m.Down&&e<=d.y||i===m.Up&&e>=h.y;if(a&&!t.x)return void n.scrollTo({top:e,behavior:o});a?r.y=n.scrollTop-e:r.y=i===m.Down?n.scrollTop-d.y:n.scrollTop-h.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,U(z(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ej(e){return!!(e&&"distance"in e)}function eO(e){return!!(e&&"delay"in e)}eL.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=eM,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class eB{constructor(e,t,n){var r;void 0===n&&(n=function(e){let{EventTarget:t}=T(e);return e instanceof t?e:A(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=A(a),this.documentListeners=new eN(this.document),this.listeners=new eN(n),this.windowListeners=new eN(T(a)),this.initialCoordinates=null!=(r=V(i))?r:en,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(p.Resize,this.handleCancel),this.windowListeners.add(p.DragStart,e_),this.windowListeners.add(p.VisibilityChange,this.handleCancel),this.windowListeners.add(p.ContextMenu,e_),this.documentListeners.add(p.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(eO(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(ej(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(p.Click,eP,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(p.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:o}}=i;if(!r)return;
173let s=null!=(t=V(e))?t:en,l=z(r,s);if(!n&&o){if(ej(o)){if(null!=o.tolerance&&eA(l,o.tolerance))return this.handleCancel();if(eA(l,o.distance))return this.handleStart()}return eO(o)&&eA(l,o.tolerance)?this.handleCancel():void this.handlePending(o,l)}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===m.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}let eF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class eH extends eB{constructor(e){const{event:t}=e;super(e,eF,A(t.target))}}eH.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!!n.isPrimary&&0===n.button&&(null==r||r({event:n}),!0)}}];(o=f||(f={}))[o.RightClick=2]="RightClick";(s=g||(g={}))[s.Pointer=0]="Pointer",s[s.DraggableRect=1]="DraggableRect",(l=y||(y={}))[l.TreeOrder=0]="TreeOrder",l[l.ReversedTreeOrder=1]="ReversedTreeOrder";let eU={x:{[h.Backward]:!1,[h.Forward]:!1},y:{[h.Backward]:!1,[h.Forward]:!1}};(c=b||(b={}))[c.Always=0]="Always",c[c.BeforeDragging=1]="BeforeDragging",c[c.WhileDragging=2]="WhileDragging",(v||(v={})).Optimized="optimized";let ez=new Map;function e$(e,t){return L(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function eV(e){let{callback:t,disabled:n}=e,r=P(t),i=(0,k.useMemo)(()=>{if(n||"u"<typeof window||void 0===window.ResizeObserver)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,k.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function eq(e){return new eD(em(e),e)}function eG(e,t,n){void 0===t&&(t=eq);let[r,i]=(0,k.useState)(null);function a(){i(r=>{if(!e)return null;if(!1===e.isConnected){var i;return null!=(i=null!=r?r:n)?i:null}let a=t(e);return JSON.stringify(r)===JSON.stringify(a)?r:a})}let o=function(e){let{callback:t,disabled:n}=e,r=P(t),i=(0,k.useMemo)(()=>{if(n||"u"<typeof window||void 0===window.MutationObserver)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,k.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=eV({callback:a});return _(()=>{a(),e?(null==s||s.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==o||o.disconnect())},[e]),r}let eW=[];function eK(e,t){void 0===t&&(t=[]);let n=(0,k.useRef)(null);return(0,k.useEffect)(()=>{n.current=null},t),(0,k.useEffect)(()=>{let t=e!==en;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?z(e,n.current):en}function eY(e){return(0,k.useMemo)(()=>{let t,n;return e?(t=e.innerWidth,{top:0,left:0,right:t,bottom:n=e.innerHeight,width:t,height:n}):null},[e])}let eZ=[];function eX(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return D(t)?t:e}let eQ=[{sensor:eH,options:{}},{sensor:eL,options:{}}],eJ={current:{}},e1={draggable:{measure:ef},droppable:{measure:ef,strategy:b.WhileDragging,frequency:v.Optimized},dragOverlay:{measure:em}};class e0 extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}let e2={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new e0,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:et},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:e1,measureDroppableContainers:et,windowRect:null,measuringScheduled:!1},e4={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:et,draggableNodes:new Map,over:null,measureDroppableContainers:et},e3=(0,k.createContext)(e4),e5=(0,k.createContext)(e2);function e6(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new e0}}}function e7(e,t){switch(t.type){case d.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case d.DragMove:if(null==e.draggable.active)return e;return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case d.DragEnd:case d.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case d.RegisterDroppable:{let{element:n}=t,{id:r}
173=n,i=new e0(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case d.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new e0(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case d.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new e0(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function e8(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,k.useContext)(e3),a=O(r),o=O(null==n?void 0:n.id);return(0,k.useEffect)(()=>{if(!t&&!r&&a&&null!=o){if(!$(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;(t.current||n.current)&&requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=W(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function e9(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}let te=(0,k.createContext)({...en,scaleX:1,scaleY:1});(u=x||(x={}))[u.Uninitialized=0]="Uninitialized",u[u.Initializing=1]="Initializing",u[u.Initialized=2]="Initialized";let tt=(0,k.memo)(function(e){var t,n,r,i,a,o,s,l;let c,u,p,m,f,v,S,E,{id:I,accessibility:N,autoScroll:A=!0,children:P,sensors:B=eQ,collisionDetection:H=ec,measuring:z,modifiers:$,...q}=e,[G,W]=(0,k.useReducer)(e7,void 0,e6),[K,Y]=function(){let[e]=(0,k.useState)(()=>new Set),t=(0,k.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,k.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[Z,Q]=(0,k.useState)(x.Uninitialized),J=Z===x.Initialized,{draggable:{active:et,nodes:er,translate:ei},droppable:{containers:ea}}=G,eo=null!=et?er.get(et):null,el=(0,k.useRef)({initial:null,translated:null}),eh=(0,k.useMemo)(()=>{var e;return null!=et?{id:et,data:null!=(e=null==eo?void 0:eo.data)?e:eJ,rect:el}:null},[et,eo]),ep=(0,k.useRef)(null),[ef,ev]=(0,k.useState)(null),[ex,eT]=(0,k.useState)(null),eI=R(q,Object.values(q)),eN=F("DndDescribedBy",I),eA=(0,k.useMemo)(()=>ea.getEnabled(),[ea]),e_=(0,k.useMemo)(()=>({draggable:{...e1.draggable,...null==z?void 0:z.draggable},droppable:{...e1.droppable,...null==z?void 0:z.droppable},dragOverlay:{...e1.dragOverlay,...null==z?void 0:z.dragOverlay}}),[null==z?void 0:z.draggable,null==z?void 0:z.droppable,null==z?void 0:z.dragOverlay]),{droppableRects:eP,measureDroppableContainers:eM,measuringScheduled:eR}=function(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,k.useState)(null),{frequency:s,measure:l,strategy:c}=i,u=(0,k.useRef)(e),d=function(){switch(c){case b.Always:return!1;case b.BeforeDragging:return n;default:return!n}}(),h=R(d),p=(0,k.useCallback)(function(e){void 0===e&&(e=[]),h.current||o(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[h]),m=(0,k.useRef)(null),f=L(t=>{if(d&&!n)return ez;if(!t||t===ez||u.current!==e||null!=a){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new eD(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,l]);return(0,k.useEffect)(()=>{u.current=e},[e]),(0,k.useEffect)(()=>{d||p()},[n,d]),(0,k.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,k.useEffect)(()=>{d||"number"!=typeof s||null!==m.current||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:f,measureDroppableContainers:p,measuringScheduled:null!=a}}(eA,{dragging:J,dependencies:[ei.x,ei.y],config:e_.droppable}),eL=L(e=>{var t;return null==et?null:null!=(t=null!=f?f:e)?t:null},[f=(m=null!=et?er.get(et):void 0)?m.node.current:null,et]),ej=(0,k.useMemo)(()=>ex?V(ex):null,[ex]),eO=(c=(null==ef?void 0:ef.autoScrollEnabled)===!1,u="object"==typeof A?!1===A.enabled:!1===A,p=J&&!c&&!u,"object"==typeof A?{...A,enabled:p}:{enabled:p}),eB=e$(eL,e_.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,k.useRef)(!1),{x:o,y:s}="boolean"==typeof i?{x:i,y:i}:i;_(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;let i=eu(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=ey(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}({activeNode:null!=et?er.get(et):null,config:eO.layoutShiftCompensation,initialRect:eB,measure:e_.draggable.measure});let eF=eG(eL,e_.draggable.measure,eB),eH=eG(eL?eL.parentElement:null),eq=(0,k.useRef)({activatorEvent:null,active:null,activeNode:eL,collisionRect:null,collisions:null,droppableRects:eP,draggableNodes:er,draggingNode:null,draggingNodeRect:null,droppableContainers:ea,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),e0=ea.getNodeFor(null==(t=eq.current.over)?void 0:t.id),e2=function(e){let{measure:t}=e,[n,r]=(0,k.useState)(null),i=eV({callback:(0,k.useCallback)(e=>{for(let{target:n}of e)if(D(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=j((0,k.useCallback)(e=>{let n=eX(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)},[t,i]));return(0,k.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}({measure:e_.dragOverlay.measure}),e4=null!=(n=e2.nodeRef.current)?n:eL,tt=J?null!=(r=e2.rect)?r:eF:null,tn=!!(e2.nodeRef.current&&e2.rect),tr=(v
173=e$(a=tn?null:eF),eu(a,v)),ti=eY(e4?T(e4):null),ta=(o=J?null!=e0?e0:eL:null,S=(0,k.useRef)(o),E=L(e=>o?e&&e!==eW&&o&&S.current&&o.parentNode===S.current.parentNode?e:eg(o):eW,[o]),(0,k.useEffect)(()=>{S.current=o},[o]),E),to=function(e,t){void 0===t&&(t=em);let[n]=e,r=eY(n?T(n):null),[i,a]=(0,k.useState)(eZ);function o(){a(()=>e.length?e.map(e=>ew(e)?r:new eD(t(e),e)):eZ)}let s=eV({callback:o});return _(()=>{null==s||s.disconnect(),o(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),i}(ta),ts=e9($,{transform:{x:ei.x-tr.x,y:ei.y-tr.y,scaleX:1,scaleY:1},activatorEvent:ex,active:eh,activeNodeRect:eF,containerNodeRect:eH,draggingNodeRect:tt,over:eq.current.over,overlayNodeRect:e2.rect,scrollableAncestors:ta,scrollableAncestorRects:to,windowRect:ti}),tl=ej?U(ej,ei):null,tc=function(e){let[t,n]=(0,k.useState)(null),r=(0,k.useRef)(e),i=(0,k.useCallback)(e=>{let t=eb(e.target);t&&n(e=>e?(e.set(t,ek(t)),new Map(e)):null)},[]);return(0,k.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=eb(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,ek(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{let t=eb(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),(0,k.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>U(e,t),en):eE(e):en,[e,t])}(ta),tu=eK(tc),td=eK(tc,[eF]),th=U(ts,tu),tp=tt?ed(tt,ts):null,tm=eh&&tp?H({active:eh,collisionRect:tp,droppableRects:eP,droppableContainers:eA,pointerCoordinates:tl}):null,tf=es(tm,"id"),[tg,ty]=(0,k.useState)(null),tb=(s=tn?ts:U(ts,td),l=null!=(i=null==tg?void 0:tg.rect)?i:null,{...s,scaleX:l&&eF?l.width/eF.width:1,scaleY:l&&eF?l.height/eF.height:1}),tv=(0,k.useRef)(null),tx=(0,k.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==ep.current)return;let i=er.get(ep.current);if(!i)return;let a=e.nativeEvent,o=new n({active:ep.current,activeNode:i,event:a,options:r,context:eq,onAbort(e){if(!er.get(e))return;let{onDragAbort:t}=eI.current,n={id:e};null==t||t(n),K({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!er.get(e))return;let{onDragPending:i}=eI.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(a),K({type:"onDragPending",event:a})},onStart(e){let t=ep.current;if(null==t)return;let n=er.get(t);if(!n)return;let{onDragStart:r}=eI.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:el}};(0,w.unstable_batchedUpdates)(()=>{null==r||r(i),Q(x.Initializing),W({type:d.DragStart,initialCoordinates:e,active:t}),K({type:"onDragStart",event:i}),ev(tv.current),eT(a)})},onMove(e){W({type:d.DragMove,coordinates:e})},onEnd:s(d.DragEnd),onCancel:s(d.DragCancel)});function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=eq.current,o=null;if(t&&i){let{cancelDrop:s}=eI.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===d.DragEnd&&"function"==typeof s&&await Promise.resolve(s(o))&&(e=d.DragCancel)}ep.current=null,(0,w.unstable_batchedUpdates)(()=>{W({type:e}),Q(x.Uninitialized),ty(null),ev(null),eT(null),tv.current=null;let t=e===d.DragEnd?"onDragEnd":"onDragCancel";if(o){let e=eI.current[t];null==e||e(o),K({type:t,event:o})}})}}tv.current=o},[er]),tk=(0,k.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=er.get(r);null!==ep.current||!a||i.dndKit||i.defaultPrevented||!0===e(n,t.options,{active:a})&&(i.dndKit={capturedBy:t.sensor},ep.current=r,tx(n,t))},[er,tx]),tw=(0,k.useMemo)(()=>B.reduce((e,t)=>{let{sensor:n}=t;return[...e,...n.activators.map(e=>({eventName:e.eventName,handler:tk(e.handler,t)}))]},[]),[B,tk]);(0,k.useEffect)(()=>{if(!C)return;let e=B.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(let t of e)null==t||t()}},B.map(e=>{let{sensor:t}=e;return t})),_(()=>{eF&&Z===x.Initializing&&Q(x.Initialized)},[eF,Z]),(0,k.useEffect)(()=>{let{onDragMove:e}=eI.current,{active:t,activatorEvent:n,collisions:r,over:i}=eq.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:th.x,y:th.y},over:i};(0,w.unstable_batchedUpdates)(()=>{null==e||e(a),K({type:"onDragMove",event:a})})},[th.x,th.y]),(0,k.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=eq.current;if(!e||null==ep.current||!t||!i)return;let{onDragOver:a}=eI.current,o=r.get(tf),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,w.unstable_batchedUpdates)(()=>{ty(s),null==a||a(l),K({type:"onDragOver",event:l})})},[tf]),_(()=>{eq.current={activatorEvent:ex,active:eh,activeNode:eL,collisionRect:tp,collisions:tm,droppableRects:eP,draggableNodes:er,draggingNode:e4,draggingNodeRect:tt,droppableContainers:ea,over:tg,scrollableAncestors:ta,scrollAdjustedTranslate:th},el.current={initial:tt,translated:tp}},[eh,eL,tm,tp,er,e4,tt,eP,ea,tg,ta,th]),function(e){let{acceleration:t,activator:n=g.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=y.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:p}=e,m=function(e){let{delta:t,disabled:n}=e,r=O(t);return L(e=>{if(n||!r||!e)return eU;
173let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[h.Backward]:e.x[h.Backward]||-1===i.x,[h.Forward]:e.x[h.Forward]||1===i.x},y:{[h.Backward]:e.y[h.Backward]||-1===i.y,[h.Forward]:e.y[h.Forward]||1===i.y}}},[n,t,r])}({delta:d,disabled:!a}),[f,b]=M(),v=(0,k.useRef)({x:0,y:0}),x=(0,k.useRef)({x:0,y:0}),w=(0,k.useMemo)(()=>{switch(n){case g.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case g.DraggableRect:return i}},[n,i,l]),C=(0,k.useRef)(null),S=(0,k.useCallback)(()=>{let e=C.current;if(!e)return;let t=v.current.x*x.current.x,n=v.current.y*x.current.y;e.scrollBy(t,n)},[]),E=(0,k.useMemo)(()=>s===y.TreeOrder?[...c].reverse():c,[s,c]);(0,k.useEffect)(()=>{if(!a||!c.length||!w)return void b();for(let e of E){if((null==r?void 0:r(e))===!1)continue;let n=u[c.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=function(e,t,n,r,i){let{top:a,left:o,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=eS);let{isTop:c,isBottom:u,isLeft:d,isRight:p}=eC(e),m={x:0,y:0},f={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&a<=t.top+g.height?(m.y=h.Backward,f.y=r*Math.abs((t.top+g.height-a)/g.height)):!u&&l>=t.bottom-g.height&&(m.y=h.Forward,f.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!p&&s>=t.right-g.width?(m.x=h.Forward,f.x=r*Math.abs((t.right-g.width-s)/g.width)):!d&&o<=t.left+g.width&&(m.x=h.Backward,f.x=r*Math.abs((t.left+g.width-o)/g.width)),{direction:m,speed:f}}(e,n,w,t,p);for(let e of["x","y"])m[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){b(),C.current=e,f(S,o),v.current=a,x.current=i;return}}v.current={x:0,y:0},x.current={x:0,y:0},b()},[t,S,r,b,a,o,JSON.stringify(w),JSON.stringify(m),f,c,E,u,JSON.stringify(p)])}({...eO,delta:ei,draggingRect:tp,pointerCoordinates:tl,scrollableAncestors:ta,scrollableAncestorRects:to});let tC=(0,k.useMemo)(()=>({active:eh,activeNode:eL,activeNodeRect:eF,activatorEvent:ex,collisions:tm,containerNodeRect:eH,dragOverlay:e2,draggableNodes:er,droppableContainers:ea,droppableRects:eP,over:tg,measureDroppableContainers:eM,scrollableAncestors:ta,scrollableAncestorRects:to,measuringConfiguration:e_,measuringScheduled:eR,windowRect:ti}),[eh,eL,eF,ex,tm,eH,e2,er,ea,eP,tg,eM,ta,to,e_,eR,ti]),tS=(0,k.useMemo)(()=>({activatorEvent:ex,activators:tw,active:eh,activeNodeRect:eF,ariaDescribedById:{draggable:eN},dispatch:W,draggableNodes:er,over:tg,measureDroppableContainers:eM}),[ex,tw,eh,eF,W,eN,er,tg,eM]);return k.default.createElement(X.Provider,{value:Y},k.default.createElement(e3.Provider,{value:tS},k.default.createElement(e5.Provider,{value:tC},k.default.createElement(te.Provider,{value:tb},P)),k.default.createElement(e8,{disabled:(null==N?void 0:N.restoreFocus)===!1})),k.default.createElement(ee,{...N,hiddenTextDescribedById:eN}))}),tn=(0,k.createContext)(null),tr="button";function ti(){return(0,k.useContext)(e5)}let ta={timeout:25};function to(e){let{animation:t,children:n}=e,[r,i]=(0,k.useState)(null),[a,o]=(0,k.useState)(null),s=O(n);return n||r||!s||i(s),_(()=>{if(!a)return;let e=null==r?void 0:r.key,n=null==r?void 0:r.props.id;null==e||null==n?i(null):Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),k.default.createElement(k.default.Fragment,null,n,r?(0,k.cloneElement)(r,{ref:o}):null)}let ts={x:0,y:0,scaleX:1,scaleY:1};function tl(e){let{children:t}=e;return k.default.createElement(e3.Provider,{value:e4},k.default.createElement(te.Provider,{value:ts},t))}let tc={position:"fixed",touchAction:"none"},tu=e=>$(e)?"transform 250ms ease":void 0,td=(0,k.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:l,transform:c,transition:u=tu}=e;if(!s)return null;let d=i?c:{...c,scaleX:1,scaleY:1},h={...tc,width:s.width,height:s.height,top:s.top,left:s.left,transform:q.Transform.toString(d),transformOrigin:i&&r?function(e,t){let n=V(e);if(!n)return"0 0";let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}(r,s):void 0,transition:"function"==typeof u?u(r):u,...l};return k.default.createElement(n,{className:o,style:h,ref:t},a)}),th={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:q.Transform.toString(t)},{transform:q.Transform.toString(n)}]},sideEffects:(t={styles:{active:{opacity:"0"}}},e=>{let{active:n,dragOverlay:r}=e,i={},{styles:a,className:o}=t;if(null!=a&&a.active)for(let[e,t]of Object.entries(a.active))void 0!==t&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=a&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=o&&o.active&&n.node.classList.add(o.active),null!=o&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=o&&o.active&&n.node.classList.remove(o.active)}})},tp=0,tm=k.default.memo(e=>{var t;
173let{adjustScale:n=!1,children:r,dropAnimation:i,style:a,transition:o,modifiers:s,wrapperElement:l="div",className:c,zIndex:u=999}=e,{activatorEvent:d,active:h,activeNodeRect:p,containerNodeRect:m,draggableNodes:f,droppableContainers:g,dragOverlay:y,over:b,measuringConfiguration:v,scrollableAncestors:x,scrollableAncestorRects:w,windowRect:C}=ti(),S=(0,k.useContext)(te),E=(t=null==h?void 0:h.id,(0,k.useMemo)(()=>{if(null!=t)return++tp},[t])),I=e9(s,{activatorEvent:d,active:h,activeNodeRect:p,containerNodeRect:m,draggingNodeRect:y.rect,over:b,overlayNodeRect:y.rect,scrollableAncestors:x,scrollableAncestorRects:w,transform:S,windowRect:C}),D=e$(p),N=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return P((e,a)=>{if(null===t)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let l=eX(a);if(!l)return;let{transform:c}=T(a).getComputedStyle(a),u=eh(c);if(!u)return;let d="function"==typeof t?t:function(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...th,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...l}=e;if(!t)return;let c={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:1!==s.scaleX?a.rect.width*s.scaleX/o.rect.width:1,scaleY:1!==s.scaleY?a.rect.height*s.scaleY/o.rect.height:1},d={x:s.x-c.x,y:s.y-c.y,...u},h=i({...l,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=h,m=h[h.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let f=null==r?void 0:r({active:a,dragOverlay:o,...l}),g=o.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{g.onfinish=()=>{null==f||f(),e()}})}}(t);return eT(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:i,transform:u})})}({config:i,draggableNodes:f,droppableContainers:g,measuringConfiguration:v}),A=D?y.setRef:void 0;return k.default.createElement(tl,null,k.default.createElement(to,{animation:N},h&&E?k.default.createElement(td,{key:E,id:h.id,ref:A,as:l,activatorEvent:d,adjustScale:n,className:c,transition:o,rect:D,style:{zIndex:u,...a},transform:I},r):null))});e.s(["DndContext",0,tt,"DragOverlay",0,tm,"KeyboardCode",0,m,"KeyboardSensor",0,eL,"MeasuringStrategy",0,b,"PointerSensor",0,eH,"closestCenter",0,e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=el(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=er(el(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(ei)},"closestCorners",0,e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=eo(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=eo(r),o=Number((i.reduce((e,t,r)=>e+er(n[r],t),0)/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:o}})}}return a.sort(ei)},"getClientRect",0,em,"getFirstCollision",0,es,"getScrollableAncestors",0,eg,"pointerWithin",0,e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&function(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}(r,a)){let n=Number((eo(a).reduce((e,t)=>e+er(r,t),0)/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(ei)},"useDndContext",0,ti,"useDraggable",0,function(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=F("Draggable"),{activators:o,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:h}=(0,k.useContext)(e3),{role:p=tr,roleDescription:m="draggable",tabIndex:f=0}=null!=i?i:{},g=(null==l?void 0:l.id)===t,y=(0,k.useContext)(g?te:tn),[b,v]=j(),[x,w]=j(),C=(0,k.useMemo)(()=>o.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[o,t]),S=R(n);return _(()=>(d.set(t,{id:t,key:a,node:b,activatorNode:x,data:S}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:l,activatorEvent:s,activeNodeRect:c,attributes:(0,k.useMemo)(()=>({role:p,tabIndex:f,"aria-disabled":r,"aria-pressed":!!g&&p===tr||void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,f,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:b,over:h,setNodeRef:v,setActivatorNodeRef:w,transform:y}},"useDroppable",0,function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=F("Droppable"),{active:o,dispatch:s,over:l,measureDroppableContainers:c}=(0,k.useContext)(e3),u=(0,k.useRef)({disabled:n}),h=(0,k.useRef)(!1),p=(0,k.useRef)(null),m=(0,k.useRef)(null),{disabled:f,updateMeasurementsFor:g,timeout:y}={...ta,...i},b=R(null!=g?g:r),v=eV({callback:(0,k.useCallback)(()=>
173{if(!h.current){h.current=!0;return}null!=m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),m.current=null},y)},[y]),disabled:f||!o}),[x,w]=j((0,k.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),h.current=!1),e&&v.observe(e))},[v])),C=R(t);return(0,k.useEffect)(()=>{v&&x.current&&(v.disconnect(),h.current=!1,v.observe(x.current))},[x,v]),(0,k.useEffect)(()=>(s({type:d.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:p,data:C}}),()=>s({type:d.UnregisterDroppable,key:a,id:r})),[r]),(0,k.useEffect)(()=>{n!==u.current.disabled&&(s({type:d.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:p,isOver:(null==l?void 0:l.id)===r,node:x,over:l,setNodeRef:w}},"useSensor",0,function(e,t){return(0,k.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])},"useSensors",0,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,k.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}],477183);var tf=e.i(768834),tg=e.i(579473);let ty=new Map,tb=(0,tf.create)((0,tg.combine)({activeId:null,dropTarget:null},()=>({}))),tv=(0,k.createContext)(null),tx=(0,k.createContext)(null),tk="data-drag-handle",tw=0;e.s(["BlockBodyDragContext",0,tx,"DRAG_HANDLE_ATTR",0,tk,"ListDragHandleContext",0,tv,"didListDragJustEnd",0,()=>Date.now()-tw<250,"dragHandleAttr",0,e=>({[tk]:e}),"findListDndPageForBlock",0,e=>{for(let t of ty.values())if(t.blocks.some(t=>t.entityID===e))return t},"listDndPages",0,ty,"markListDragEnd",0,()=>{tw=Date.now()},"useBlockBodyDrag",0,()=>(0,k.useContext)(tx),"useListDragHandle",0,()=>(0,k.useContext)(tv),"useListDragState",0,tb],829975)},44729,e=>{"use strict";var t=e.i(271645),n=e.i(470152),r=e.i(981140),i=e.i(820783),a=e.i(30030),o=e.i(369340),s=e.i(586318),l=e.i(635804),c=e.i(248425),u=e.i(75830),d=e.i(843476),h=["PageUp","PageDown"],p=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],m={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},f="Slider",[g,y,b]=(0,u.createCollection)(f),[v,x]=(0,a.createContextScope)(f,[b]),[k,w]=v(f),C=t.forwardRef((e,i)=>{let{name:a,min:s=0,max:l=100,step:c=1,orientation:u="horizontal",disabled:m=!1,minStepsBetweenThumbs:f=0,defaultValue:y=[s],value:b,onValueChange:v=()=>{},onValueCommit:x=()=>{},inverted:w=!1,form:C,...S}=e,E=t.useRef(new Set),D=t.useRef(0),N="horizontal"===u,[A=[],_]=(0,o.useControllableState)({prop:b,defaultProp:y,onChange:e=>{let t=[...E.current];t[D.current]?.focus(),v(e)}}),P=t.useRef(A);function M(e,t,{commit:r}={commit:!1}){let i,a=(String(c).split(".")[1]||"").length,o=Math.round((Math.round((e-s)/c)*c+s)*(i=Math.pow(10,a)))/i,u=(0,n.clamp)(o,[s,l]);_((e=[])=>{let n=function(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}(e,u,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(n,f*c))return e;{D.current=n.indexOf(u);let t=String(n)!==String(e);return t&&r&&x(n),t?n:e}})}return(0,d.jsx)(k,{scope:e.__scopeSlider,name:a,disabled:m,min:s,max:l,valueIndexToChangeRef:D,thumbs:E.current,values:A,orientation:u,form:C,children:(0,d.jsx)(g.Provider,{scope:e.__scopeSlider,children:(0,d.jsx)(g.Slot,{scope:e.__scopeSlider,children:(0,d.jsx)(N?T:I,{"aria-disabled":m,"data-disabled":m?"":void 0,...S,ref:i,onPointerDown:(0,r.composeEventHandlers)(S.onPointerDown,()=>{m||(P.current=A)}),min:s,max:l,inverted:w,onSlideStart:m?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}(A,e);M(e,t)},onSlideMove:m?void 0:function(e){M(e,D.current)},onSlideEnd:m?void 0:function(){let e=P.current[D.current];A[D.current]!==e&&x(A)},onHomeKeyDown:()=>!m&&M(s,0,{commit:!0}),onEndKeyDown:()=>!m&&M(l,A.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!m){let n=h.includes(e.key)||e.shiftKey&&p.includes(e.key),r=D.current;M(A[r]+c*(n?10:1)*t,r,{commit:!0})}}})})})})});C.displayName=f;var[S,E]=v(f,{startEdge:"left",endEdge:"right",size:"width",direction:1}
173),T=t.forwardRef((e,n)=>{let{min:r,max:a,dir:o,inverted:l,onSlideStart:c,onSlideMove:u,onSlideEnd:h,onStepKeyDown:p,...f}=e,[g,y]=t.useState(null),b=(0,i.useComposedRefs)(n,e=>y(e)),v=t.useRef(void 0),x=(0,s.useDirection)(o),k="ltr"===x,w=k&&!l||!k&&l;function C(e){let t=v.current||g.getBoundingClientRect(),n=B([0,t.width],w?[r,a]:[a,r]);return v.current=t,n(e-t.left)}return(0,d.jsx)(S,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,d.jsx)(D,{dir:x,"data-orientation":"horizontal",...f,ref:b,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=C(e.clientX);c?.(t)},onSlideMove:e=>{let t=C(e.clientX);u?.(t)},onSlideEnd:()=>{v.current=void 0,h?.()},onStepKeyDown:e=>{let t=m[w?"from-left":"from-right"].includes(e.key);p?.({event:e,direction:t?-1:1})}})})}),I=t.forwardRef((e,n)=>{let{min:r,max:a,inverted:o,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...h}=e,p=t.useRef(null),f=(0,i.useComposedRefs)(n,p),g=t.useRef(void 0),y=!o;function b(e){let t=g.current||p.current.getBoundingClientRect(),n=B([0,t.height],y?[a,r]:[r,a]);return g.current=t,n(e-t.top)}return(0,d.jsx)(S,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:(0,d.jsx)(D,{"data-orientation":"vertical",...h,ref:f,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=b(e.clientY);s?.(t)},onSlideMove:e=>{let t=b(e.clientY);l?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=m[y?"from-bottom":"from-top"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),D=t.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:i,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:u,...m}=e,g=w(f,n);return(0,d.jsx)(c.Primitive.span,{...m,ref:t,onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):h.concat(p).includes(e.key)&&(u(e),e.preventDefault())}),onPointerDown:(0,r.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),g.thumbs.has(t)?t.focus():i(e)}),onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,r.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),N="SliderTrack",A=t.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=w(N,n);return(0,d.jsx)(c.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});A.displayName=N;var _="SliderRange",P=t.forwardRef((e,n)=>{let{__scopeSlider:r,...a}=e,o=w(_,r),s=E(_,r),l=t.useRef(null),u=(0,i.useComposedRefs)(n,l),h=o.values.length,p=o.values.map(e=>O(e,o.min,o.max)),m=h>1?Math.min(...p):0,f=100-Math.max(...p);return(0,d.jsx)(c.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...a,ref:u,style:{...e.style,[s.startEdge]:m+"%",[s.endEdge]:f+"%"}})});P.displayName=_;var M="SliderThumb",R=t.forwardRef((e,n)=>{let r=y(e.__scopeSlider),[a,o]=t.useState(null),s=(0,i.useComposedRefs)(n,e=>o(e)),l=t.useMemo(()=>a?r().findIndex(e=>e.ref.current===a):-1,[r,a]);return(0,d.jsx)(L,{...e,ref:s,index:l})}),L=t.forwardRef((e,n)=>{var a,o,s,u,h;let p,m,{__scopeSlider:f,index:y,name:b,...v}=e,x=w(M,f),k=E(M,f),[C,S]=t.useState(null),T=(0,i.useComposedRefs)(n,e=>S(e)),I=!C||x.form||!!C.closest("form"),D=(0,l.useSize)(C),N=x.values[y],A=void 0===N?0:O(N,x.min,x.max),_=(a=y,(o=x.values.length)>2?`Value ${a+1} of ${o}`:2===o?["Minimum","Maximum"][a]:void 0),P=D?.[k.size],R=P?(s=P,u=A,h=k.direction,m=B([0,50],[0,p=s/2]),(p-m(u)*h)*h):0;return t.useEffect(()=>{if(C)return x.thumbs.add(C),()=>{x.thumbs.delete(C)}},[C,x.thumbs]),(0,d.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[k.startEdge]:`calc(${A}% + ${R}px)`},children:[(0,d.jsx)(g.ItemSlot,{scope:e.__scopeSlider,children:(0,d.jsx)(c.Primitive.span,{role:"slider","aria-label":e["aria-label"]||_,"aria-valuemin":x.min,"aria-valuenow":N,"aria-valuemax":x.max,"aria-orientation":x.orientation,"data-orientation":x.orientation,"data-disabled":x.disabled?"":void 0,tabIndex:x.disabled?void 0:0,...v,ref:T,style:void 0===N?{display:"none"}:e.style,onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{x.valueIndexToChangeRef.current=y})})}),I&&(0,d.jsx)(j,{name:b??(x.name?x.name+(x.values.length>1?"[]":""):void 0),form:x.form,value:N},y)]})});R.displayName=M;var j=t.forwardRef(({__scopeSlider:e,value:n,...r},a)=>{let o,s=t.useRef(null),l=(0,i.useComposedRefs)(s,a),u=(o=t.useRef({value:n,previous:n}),t.useMemo(()=>(o.current.value!==n&&(o.current.previous=o.current.value,o.current.value=n),o.current.previous),[n]));return t.useEffect(()=>{let e=s.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(u!==n&&t){let r=new Event("input",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[u,n]),(0,d.jsx)(c.Primitive.input,{style:{display:"none"},...r,ref:l,defaultValue:n})});function O(e,t,r){return(0,n.clamp)(100/(r-t)*(e-t),[0,100])}function B(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}j.displayName="RadioBubbleInput",e.s(["Range",0,P,"Root",0,C,"Thumb",0,R,"Track",0,A],44729)},982528,501240,815126,538299,887921,791884,21318,424220,e=>{"use strict";class t{get childNodes(){throw Error("childNodes is not supported")}clone(){let e=new t(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=t}}class n{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=null!=this.firstKey?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=null!=e.nextKey?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=(null==n?void 0:n.firstChildKey)!=null?t.get(n.firstChildKey):null;for(;r;)yield r,r=null!=r.nextKey?t.get(r.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(null!=t.prevKey){var n;for(t=this.keyMap.get(t.prevKey);t&&"item"!==t.type&&null!=t.lastChildKey;)t=this.keyMap.get(t.lastChildKey);return null!=(n=null==t?void 0:t.key)?n:null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if("item"!==t.type&&null!=t.firstChildKey)return t.firstChildKey;for(;t;){if(null!=t.nextKey)return t.nextKey;if(null!=t.parentKey)t=this.keyMap.get(t.parentKey);else break}return null}getFirstKey(){return this.firstKey}getLastKey(){var e;let t=null!=this.lastKey?this.keyMap.get(this.lastKey):null;for(;(null==t?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);return null!=(e=null==t?void 0:t.key)?e:null}getItem(e){var t;return null!=(t=this.keyMap.get(e))?t:null}at(){throw Error("Not implemented")}clone(){let e=new this.constructor;return e.keyMap=new Map(this.keyMap),e.firstKey=this.firstKey,e.lastKey=this.lastKey,e}addNode(e){if(this.frozen)throw Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!n}UNSTABLE_filter(e){let t=new n,i=null;for(let n of this)if("section"===n.type&&n.hasChildNodes){let a=n.clone(),o=null;for(let i of this.getChildren(n.key))if(r(i,e,this,t)){let e=i.clone();null==o&&(a.firstChildKey=e.key),null==t.firstKey&&(t.firstKey=a.key),o&&o.parentKey===e.parentKey?(o.nextKey=e.key,e.prevKey=o.key):e.prevKey=null,e.nextKey=null,t.addNode(e),o=e}o&&("header"!==o.type?(a.lastChildKey=o.key,null==i?a.prevKey=null:("section"===i.t
173ype||"separator"===i.type)&&(i.nextKey=a.key,a.prevKey=i.key),a.nextKey=null,i=a,t.addNode(a)):(t.firstKey===a.key&&(t.firstKey=null),t.removeNode(o.key)))}else if("separator"===n.type){let e=n.clone();e.nextKey=null,(null==i?void 0:i.type)==="section"&&(i.nextKey=e.key,e.prevKey=i.key,i=e,t.addNode(e))}else{let a=n.clone();r(a,e,this,t)&&(null==t.firstKey&&(t.firstKey=a.key),null!=i&&"section"!==i.type&&"separator"!==i.type&&i.parentKey===a.parentKey?(i.nextKey=a.key,a.prevKey=i.key):a.prevKey=null,a.nextKey=null,t.addNode(a),i=a)}if((null==i?void 0:i.type)==="separator"&&null===i.nextKey){let e;null!=i.prevKey&&((e=t.getItem(i.prevKey)).nextKey=null),t.removeNode(i.key),i=e}return t.lastKey=(null==i?void 0:i.key)||null,t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function r(e,t,n,r){if("subdialogtrigger"===e.type||"submenutrigger"===e.type){let i=[...n.getChildren(e.key)][0];if(!(i&&t(i.textValue)))return!1;{let e=i.clone();return r.addNode(e),!0}}return"header"===e.type||t(e.textValue)}e.s(["BaseCollection",0,n,"CollectionNode",0,t],982528);class i{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return(null==(e=this.parentNode)?void 0:e.isConnected)||!1}invalidateChildIndices(e){(null==this._minInvalidChildIndex||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e)}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),null==this.firstChild&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.ownerDocument.queueUpdate()}insertBefore(e,t){if(null==t)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(t),this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&this.ownerDocument.isMounted&&(e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class a extends i{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof a?this.parentNode.level+ +("item"===this.node.type):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,t,n,r,i,o,s,l,c;let u=this.nextVisibleSibling,d=this.getMutableNode();if(d.index=this.index,d.level=this.level,d.parentKey=this.parentNode instanceof a?this.parentNode.node.key:null,d.prevKey=null!=(r=null==(e=this.previousVisibleSibling)?void 0:e.node.key)?r:null,d.nextKey=null!=(i=null==u?void 0:u.node.key)?i:null,d.hasChildNodes=!!this.firstChild,d.firstChildKey=null!=(o=null==(t=this.first
173VisibleChild)?void 0:t.node.key)?o:null,d.lastChildKey=null!=(s=null==(n=this.lastVisibleChild)?void 0:n.node.key)?s:null,(null!=d.colSpan||null!=d.colIndex)&&u){let e=(null!=(l=d.colIndex)?l:d.index)+(null!=(c=d.colSpan)?c:1);e!==u.node.colIndex&&(u.getMutableNode().colIndex=e)}}setProps(e,t,n,r){let i=this.getMutableNode(),{value:a,textValue:o,id:s,...l}=e;if(l.ref=t,i.props=l,i.rendered=n,i.render=r,i.value=a,i.textValue=o||("string"==typeof l.children?l.children:"")||e["aria-label"]||"",null!=s&&s!==i.key){if(this.hasSetProps)throw Error("Cannot change the id of an item");i.key=s}null!=l.colSpan&&(i.colSpan=l.colSpan),this.hasSetProps=!0,this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(value){let r="none"===value;if(e.isHidden!==r){var t,n;((null==(t=e.parentNode)?void 0:t.firstVisibleChild)===e||(null==(n=e.parentNode)?void 0:n.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let i=e.previousVisibleSibling,a=e.nextVisibleSibling;i&&e.ownerDocument.markDirty(i),a&&e.ownerDocument.markDirty(a),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new t(e,`react-aria-${++n.nodeId}`)}}e.s(["Document",0,class extends i{get isConnected(){return this.isMounted}createElement(e){return new a(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof a&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof a&&(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,n,r;this.nextCollection.commit(null!=(n=null==(e=this.firstVisibleChild)?void 0:e.node.key)?n:null,null!=(r=null==(t=this.lastVisibleChild)?void 0:t.node.key)?r:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(0!==this.dirtyNodes.size&&!this.queuedRender){for(let e of(this.queuedRender=!0,this.inSubscription=!0,this.subscriptions))e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}],501240);var o=e.i(271645);if(e.s(["useCachedChildren",0,function(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,s=(0,o.useMemo)(()=>new WeakMap,a);return(0,o.useMemo)(()=>{if(n&&"function"==typeof t){let l=[];for(let c of n){let n=s.get(c);if(!n){var e,a;let l=null!=(a=null!=(e=(n=t(c)).props.id)?e:c.key)?a:c.id;if(null==l)throw Error("Could not determine key for item");r&&(l=r+":"+l),n=(0,o.cloneElement)(n,i?{key:l,id:l,value:c}:{key:l}),s.set(c,n)}l.push(n)}return l}if("function"!=typeof t)return t},[t,n,s,r,i])}],815126),"u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let s=(0,o.createContext)(!1);e.s(["Hidden",0,function(e){if((0,o.useContext)(s))return o.default.createElement(o.default.Fragment,null,e.children);let t=o.default.createElement(s.Provider,{value:!0},e.children);return o.default.createElement("template",{"data-react-aria-hidden":!0},t)},"createHideableComponent",0,function(e){let t=(t,n)=>(0,o.useContext)(s)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,o.forwardRef)(t)}],538299);var l=e.i(999661),c=e.i(991247);let u=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],d=u.join(":not([hidden]),")+",[tabindex]:not
173([disabled]):not([hidden])";u.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let h=u.join(':not([hidden]):not([tabindex="-1"]),');function p(e){return e.matches(d)}e.s(["isFocusable",0,p,"isTabbable",0,function(e){return e.matches(h)}],887921);let m=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},f=e=>e&&"window"in e&&e.window===e?e:m(e).defaultView||window;function g(e){if(function(){if(null==y){y=!1;try{document.createElement("div").focus({get preventScroll(){return y=!0,!0}})}catch{}}return y}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}e.s(["getOwnerDocument",0,m,"getOwnerWindow",0,f,"isShadowRoot",0,function(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&"number"==typeof e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}],791884);let y=null;function b(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}e.s(["focusWithoutScrolling",0,g],21318);let v=!1;e.s(["createSyntheticEvent",0,b,"ignoreFocusEvent",()=>v,"preventFocus",0,function(e){for(;e&&!p(e);)e=e.parentElement;let t=f(e),n=t.document.activeElement;if(!n||n===e)return;v=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},a=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,g(n),l()))},o=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,g(n),l()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",o,!0);let l=()=>{cancelAnimationFrame(c),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",o,!0),v=!1,r=!1},c=requestAnimationFrame(l);return l},"setEventTarget",0,function(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})},"useSyntheticBlurEvent",0,function(e){let t=(0,o.useRef)({isFocused:!1,observer:null});(0,l.useLayoutEffect)(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=(0,c.useEffectEvent)(t=>{null==e||e(t)});return(0,o.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(b(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null==(e=t.current.observer)||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}],424220)},936629,437239,346996,674750,317430,717234,700864,682234,859530,389979,849962,e=>{"use strict";let t;var n=e.i(982528),r=e.i(501240),i=e.i(815126),a=e.i(538299),o=e.i(174080),s=e.i(424220),l=e.i(111733);function c(e){return 0===e.mozInputSource&&!!e.isTrusted||((0,l.isAndroid)()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}e.s(["isVirtualClick",0,c,"isVirtualPointerEvent",0,function(e){return!(0,l.isAndroid)()&&0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType}],437239);var u=e.i(791884),d=e.i(271645),h=e.i(454453);let p=null,m=new Set,f=new Map,g=!1,y=!1,b={Tab:!0,Escape:!0};function v(e,t){for(let n of m)n(e,t)}function x(e){g=!0,e.metaKey||!(0,l.isMac)()&&e.altKey||e.ctrlKey||"Control"
173===e.key||"Shift"===e.key||"Meta"===e.key||(p="keyboard",v("keyboard",e))}function k(e){p="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(g=!0,v("pointer",e))}function w(e){c(e)&&(g=!0,p="virtual")}function C(e){e.target!==window&&e.target!==document&&!s.ignoreFocusEvent&&e.isTrusted&&(g||y||(p="virtual",v("virtual",e)),g=!1,y=!1)}function S(){s.ignoreFocusEvent||(g=!1,y=!0)}function E(e){if("u"<typeof window||f.get((0,u.getOwnerWindow)(e)))return;let t=(0,u.getOwnerWindow)(e),n=(0,u.getOwnerDocument)(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){g=!0,r.apply(this,arguments)},n.addEventListener("keydown",x,!0),n.addEventListener("keyup",x,!0),n.addEventListener("click",w,!0),t.addEventListener("focus",C,!0),t.addEventListener("blur",S,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",k,!0),n.addEventListener("pointermove",k,!0),n.addEventListener("pointerup",k,!0)),t.addEventListener("beforeunload",()=>{T(e)},{once:!0}),f.set(t,{focus:r})}let T=(e,t)=>{let n=(0,u.getOwnerWindow)(e),r=(0,u.getOwnerDocument)(e);t&&r.removeEventListener("DOMContentLoaded",t),f.has(n)&&(n.HTMLElement.prototype.focus=f.get(n).focus,r.removeEventListener("keydown",x,!0),r.removeEventListener("keyup",x,!0),r.removeEventListener("click",w,!0),n.removeEventListener("focus",C,!0),n.removeEventListener("blur",S,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",k,!0),r.removeEventListener("pointermove",k,!0),r.removeEventListener("pointerup",k,!0)),f.delete(n))};function I(){return"pointer"!==p}function D(){return p}"u">typeof document&&("loading"!==(t=(0,u.getOwnerDocument)(void 0)).readyState?E(void 0):t.addEventListener("DOMContentLoaded",()=>{E(void 0)}));let N=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function A(){return!1}e.s(["getInteractionModality",0,D,"isFocusVisible",0,I,"setInteractionModality",0,function(e){p=e,v(e,null)},"useFocusVisibleListener",0,function(e,t,n){E(),(0,d.useEffect)(()=>{let t=(t,r)=>{var i;let a,o,s,l,c;i=!!(null==n?void 0:n.isTextInput),a=(0,u.getOwnerDocument)(null==r?void 0:r.target),o="u">typeof window?(0,u.getOwnerWindow)(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?(0,u.getOwnerWindow)(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?(0,u.getOwnerWindow)(null==r?void 0:r.target).HTMLElement:HTMLElement,c="u">typeof window?(0,u.getOwnerWindow)(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(i=i||a.activeElement instanceof o&&!N.has(a.activeElement.type)||a.activeElement instanceof s||a.activeElement instanceof l&&a.activeElement.isContentEditable)&&"keyboard"===t&&r instanceof c&&!b[r.key]||e(I())};return m.add(t),()=>{m.delete(t)}},t)}],346996),e.s(["shadowDOM",0,A],674750);let _=(e=document)=>{var t;if(!A())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(null==(t=n.shadowRoot)?void 0:t.activeElement);)n=n.shadowRoot.activeElement;return n};function P(e){return A()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}e.s(["getActiveElement",0,_,"getEventTarget",0,P,"nodeContains",0,function(e,t){if(!A())return!!t&&!!e&&e.contains(t);if(!e||!t)return!1;let n=t;for(;null!==n;){if(n===e)return!0;n="SLOT"===n.tagName&&n.assignedSlot?n.assignedSlot.parentNode:(0,u.isShadowRoot)(n)?n.host:n.parentNode}return!1}],317430);let M=new Map,R=new Set;function L(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=M.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),M.delete(n.target)),0===M.size)){for(let e of R)e();R.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=M.get(n.target);r||(r=new Set,M.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function j(e){requestAnimationFrame(()=>{0===M.size?e():R.add(e)})}"u">typeof document&&("loading"!==document.readyState?L():document.addEventListener("DOMContentLoaded",L)),e.s(["runAfterTransition",0,j],717234);var O=e.i(21318);function B(e){let t=(0,u.getOwnerDocument)(e),n=_(t);"virtual"===D()?j(()=>{_(t)===n&&e.isConnected&&(0,O.focusWithoutScrolling)(e)}):(0,O.focusWithoutScrolling)(e)}function F(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,d.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}
173,[r,i]),o=(0,s.useSyntheticBlurEvent)(a),l=(0,d.useCallback)(e=>{let t=(0,u.getOwnerDocument)(e.target),r=t?_(t):_();e.target===e.currentTarget&&r===P(e.nativeEvent)&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?l:void 0,onBlur:!t&&(r||i)?a:void 0}}}function H(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}function U(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:H(e.onKeyDown),onKeyUp:H(e.onKeyUp)}}}e.s(["focusSafely",0,B],700864),e.s(["useFocus",0,F],682234),e.s(["useKeyboard",0,U],859530);var z=e.i(999661);function $(e,t){(0,z.useLayoutEffect)(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}e.s(["useSyncRef",0,$],389979);var V=e.i(797547),q=e.i(750179);e.i(882179);let G=d.default.createContext(null);d.default.forwardRef(function(e,t){let{children:n,...r}=e,i=(0,V.useObjectRef)(t),a={...r,ref:i};return d.default.createElement(G.Provider,{value:a},n)}),e.s(["FocusableContext",0,G,"useFocusable",0,function(e,t){let{focusProps:n}=F(e),{keyboardProps:r}=U(e),i=(0,q.mergeProps)(n,r),a=function(e){let t=(0,d.useContext)(G)||{};$(t,e);let{ref:n,...r}=t;return r}(t),o=e.isDisabled?{}:a,s=(0,d.useRef)(e.autoFocus);(0,d.useEffect)(()=>{s.current&&t.current&&B(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:(0,q.mergeProps)({...i,tabIndex:l},o)}}],849962);var W=e.i(802239);let K=(0,d.createContext)(!1),Y=(0,d.createContext)(null);function Z({collection:e,render:t}){return t(e)}let X="function"==typeof d.default.useSyncExternalStore?d.default.useSyncExternalStore:function(e,t,n){let r=(0,h.useIsSSR)(),i=(0,d.useRef)(r);i.current=r;let a=(0,d.useCallback)(()=>i.current?n():t(),[t,n]);return(0,W.useSyncExternalStore)(e,a)},Q=(0,d.createContext)(null);function J(e,t,n,r,i,a){let o=(0,d.useCallback)(e=>{null==e||e.setProps(t,n,r,a)},[t,n,r,a]),s=(0,d.useContext)(Q);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||((o=s.ownerDocument.createElement(e)).setProps(t,n,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?d.default.createElement(Q.Provider,{value:o},i):null}return d.default.createElement(e,{ref:o},i)}function ee(e){return(0,i.useCachedChildren)({...e,addIdAndValue:!0})}let et=(0,d.createContext)(null);function en({children:e}){let t=(0,d.useContext)(Y),n=(0,d.useMemo)(()=>d.default.createElement(Y.Provider,{value:null},d.default.createElement(K.Provider,{value:!0},e)),[e]);return(0,h.useIsSSR)()?d.default.createElement(Q.Provider,{value:t},n):(0,o.createPortal)(n,t)}e.s(["Collection",0,function(e){let t=(0,d.useContext)(et),n=((null==t?void 0:t.dependencies)||[]).concat(e.dependencies),r=e.idScope||(null==t?void 0:t.idScope),i=ee({...e,idScope:r,dependencies:n});return(0,d.useContext)(Y)&&(i=d.default.createElement(en,null,i)),t=(0,d.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),d.default.createElement(et.Provider,{value:t},i)},"CollectionBuilder",0,function(e){if((0,d.useContext)(Y))return e.content;let{collection:t,document:i}=function(e){let[t]=(0,d.useState)(()=>new(0,r.Document)((null==e?void 0:e())||new(0,n.BaseCollection))),i=X((0,d.useCallback)(e=>t.subscribe(e),[t]),(0,d.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,d.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t]));return(0,z.useLayoutEffect)(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:i,document:t}}(e.createCollection);return d.default.createElement(d.default.Fragment,null,d.default.createElement(a.Hidden,null,d.default.createElement(Y.Provider,{value:i},e.content)),d.default.createElement(Z,{render:e.children,collection:t}))},"createBranchComponent",0,function(e,t,n=ee){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,d.forwardRef)((t,i)=>{var a;let o=n(t);return null!=(a=J(e,t,i,null,o,e=>d.default.createElement(r,{node:e})))?a:d.default.createElement(d.default.Fragment,null)});return i.displayName=t.name,i},"createLeafComponent",0,function(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,d.forwardRef)((r,i)=>{let a=(0,d.useContext)(G);if(!(0,d.useContext)(K)){if(t.length>=3)throw Error(t.name+" cannot be rendered outside a collection.");return t(r,i)}return J(e,r,i,"children"in r?r.children:null,null,e=>d.default.createElement(G.Provider,{value:a},d.default.createElement(n,{node:e})))});return r.displayName=t.name,r}],936629)},868032,e=>{"use strict";var t={};t={"ar-AE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"أداة Ø§ÙØªÙاء اÙÙÙÙ",colorSwatch:"تغÙÙØ± Ø§ÙØ£ÙÙØ§Ù",transparent:"Ø´ÙØ§Ù",twoDimensionalSlider:"Ù
ÙÙØ²ÙÙ 2D"},"bg-BG":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"СÑедÑÑво за избиÑане на ÑвÑÑ",colorSwatch:"ÑвеÑна моÑÑÑа",transparent:"пÑозÑаÑен",twoDimensionalSlider:"2D плÑзгаÑ"},"cs-CZ":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"VýbÄr barvy",colorSwatch:"barevný vzorek",transparent:"průhledný",twoDimensionalSlider:"2D posuvnÃk"},"da-DK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farvevælger",colorSwatch:"farveprøve",transparent:"gennemsigtig",twoDimensionalSlider:"2D-skyder"},"de-DE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farbwähler",colorSwatch:"Farbfeld",transparent:"transparent",twoDimensionalSlider:"2D-Schieberegler"},"el-GR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"ÎÏιλογÎÎ±Ï ÏÏÏμάÏÏν",colorSwatch:"ÏÏÏμαÏÎ¹ÎºÏ Î´ÎµÎ¯Î³Î¼Î±",transparent:"διαÏανÎÏ",twoDimensionalSlider:"ΡÏ
θμιÏÏÎ¹ÎºÏ 2D"},"en-US":{colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:e=>`${e.name}: ${e.value}`,colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorSwatch:"color swatch",transparent:"transparent"},"es-ES":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de color",colorSwatch:"muestra de color",transparent:"transparente",twoDimensionalSlider:"Regulador 2D"},"et-EE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Värvivalija",colorSwatch:"värvinäidis",transparent:"läbipaistev",twoDimensionalSlider:"2D-liugur"},"fi-FI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Värimuokkain",colorSwatch:"värimalli",transparent:"läpinäkyvä",twoDimensionalSlider:"2D-liukusäÃ
173¤din"},"fr-FR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\xa0: ${e.value}`,colorPicker:"Sélecteur de couleurs",colorSwatch:"Ãchantillon de couleurs",transparent:"Transparent",twoDimensionalSlider:"Curseur 2D"},"he-IL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"×××ר ×צ××¢××",colorSwatch:"×××××ת צ××¢",transparent:"שק××£",twoDimensionalSlider:"××××× ×× ×××××"},"hr-HR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Odabir boje",colorSwatch:"uzorak boje",transparent:"transparentno",twoDimensionalSlider:"2D klizaÄ"},"hu-HU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"SzÃnválasztó",colorSwatch:"szÃntár",transparent:"átlátszó",twoDimensionalSlider:"2D-csúszka"},"it-IT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selettore colore",colorSwatch:"campione di colore",transparent:"trasparente",twoDimensionalSlider:"Cursore 2D"},"ja-JP":{colorInputLabel:e=>`${e.label}\u{3001}${e.channelLabel}`,colorNameAndValue:e=>`${e.name} : ${e.value}`,colorPicker:"ã«ã©ã¼ããã«ã¼",colorSwatch:"ã«ã©ã¼ã¹ã¦ã©ãã",transparent:"éæ",twoDimensionalSlider:"2D ã¹ã©ã¤ãã¼"},"ko-KR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"ìì í¼ì»¤",colorSwatch:"ìì 견본",transparent:"í¬ëª
ë",twoDimensionalSlider:"2D ì¬ë¼ì´ë"},"lt-LT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Spalvų parinkiklis",colorSwatch:"spalvų pavyzdys",transparent:"skaidrus",twoDimensionalSlider:"2D slankiklis"},"lv-LV":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"KrÄsu atlasÄ«tÄjs",colorSwatch:"krÄsu paraugs",transparent:"caurspÄ«dÄ«gs",twoDimensionalSlider:"2D slÄ«dnis"},"nb-NO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Fargevelger",colorSwatch:"fargekart",transparent:"gjennomsiktig",twoDimensionalSlider:"2D-glidebryter"},"nl-NL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kleurkiezer",colorSwatch:"kleurstaal",transparent:"transparant",twoDimensionalSlider:"2D-schuifregelaar"},"pl-PL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Próbnik kolorów",colorSwatch:"próbka koloru",transparent:"przezroczysty",twoDimensionalSlider:"Suwak 2D"},"pt-BR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cores",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"pt-PT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cor",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"ro-RO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de culori",colorSwatch:"specimen de culoare",transparent:"transparent",twoDimensionalSlider:"Glisor 2D"},"ru-RU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"ÐалиÑÑа ÑвеÑов",colorSwatch:"ÑвеÑовой обÑазеÑ",transparent:"пÑозÑаÑнÑй",twoDimensionalSlider:"ÐолзÑнок 2D"},"sk-SK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Výber farieb",colorSwatch:"vzorkovnÃk farieb",transparent:"transparentný",twoDimensionalSlider:"2D jazdec"},"sl-SI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Izbirnik barv",colorSwatch:"barvna paleta",transparent:"prozorno",twoDimensionalSlider:"2D drsnik"},"sr-SP":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"BiraÄ boja",colorSwatch:"Uzorak boje",transparent:"providno",twoDimensionalSlider:"2D klizaÄ"},"sv-SE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Färgväljaren",colorSwatch:"färgruta",transparent:"genomskinlig",twoDimensionalSlider:"2D-reglage"},"tr-TR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Renk Seçici",colorSwatch:"renk örneÄi",transparent:"saydam",twoDimensionalSlider:"2D sürgü"},"uk-UA":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"ÐалÑÑÑа колÑоÑÑв",colorSwatch:"зÑазок колÑоÑÑ",transparent:"пÑозоÑий",twoDimensionalSlider:"ÐовзÑнок 2D"},"zh-CN":{colorInputLabel:e=>`${e.label}\u{3001}${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\u{FF1A}${e.value}`,colorPicker:"æ¾è²å¨",colorSwatch:"é¢è²è²æ¿",transparent:"éæ",twoDimensionalSlider:"2D æ»å"},"zh-TW":{colorInputLabel:e=>`${e.label}\u{FF0C}${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\u{FF1A}${e.value}`,colorPicker:"檢è²å¨",colorSwatch:"è²ç¥¨",transparent:"éæ",twoDimensionalSlider:"2D æ»æ¡¿"}},e.s(["default",0,t],868032)},754343,e=>{"use strict";var t=e.i(569080);e.s(["useSeparator",0,function(e){let n,r=(0,t.filterDOMProps)(e,{labelable:!0});return("vertical"===e.orientation&&(n="vertical"),"hr"!==e.elementType)?{separatorProps:{...r,role:"separator","aria-orientation":n}}:{separatorProps:r}}])},569080,e=>{"use strict";let t=new Set(["id"]),n=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),r=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),i=/^(data-.*)$/;e.s(["filterDOMProps",0,function(e,a={}){let{labelable:o,isLink:s,propNames:l}=a,c={};for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t.has(a)||o&&n.has(a)||s&&r.has(a)||(null==l?void 0:l.has(a))||i.test(a))&&(c[a]=e[a]);return c}])},111733,e=>{"use strict";function t(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function n(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function r(e){let t=null;return()=>(null==t&&(t=e()),t)}e.i(247167);let i=r(function(){return n(/^Mac/i)}),a=r(function(){return n(/^iPhone/i)}),o=r(function(){return n(/^iPad/i)||i()&&navigator.maxTouchPoints>1}),s=r(function(){return a()||o()}),l=r(function(){return i()||s()}
173),c=r(function(){return t(/AppleWebKit/i)&&!u()}),u=r(function(){return t(/Chrome/i)}),d=r(function(){return t(/Android/i)}),h=r(function(){return t(/Firefox/i)});e.s(["isAndroid",0,d,"isAppleDevice",0,l,"isChrome",0,u,"isFirefox",0,h,"isIOS",0,s,"isIPad",0,o,"isIPhone",0,a,"isMac",0,i,"isWebKit",0,c])},847451,140677,e=>{"use strict";let t=e=>{let t,n,r;return{seq:e+1,state:"idle",batch:new Set,request:(r=new Promise((e,r)=>{t=e,n=r}),{resolve:t,reject:n,value:r}),timer:void 0,start:null,latest:null,abortController:new AbortController}},n=e=>(t,n)=>e-(n-t);e.s(["create",0,e=>{let r=e.name??`batcher:${Math.random().toString(16).slice(2)})`,i=e.scheduler??n(10),a=globalThis.__BATSHIT_DEVTOOLS__?.for(r),o=[t(0)],s=o[0];a?.create({seq:s.seq});let l=()=>{s=t(1),o.push(s)},c=()=>{s.state="in-transit";let t=s.seq,n=e.fetcher([...s.batch],s.abortController.signal),r=s.request;return a?.fetch({seq:t,batch:[...s.batch]}),l(),n.then(e=>{s.state="complete",a?.data({seq:t,data:e}),r.resolve(e)}).catch(e=>{s.state="error",a?.error({seq:t,error:e}),r.reject(e)}).finally(()=>{setTimeout(u)}),n},u=()=>{o=o.filter(e=>"idle"===e.state||"in-transit"===e.state)};return{fetch:async t=>{s.start||(s.start=Date.now()),s.latest=Date.now(),s.batch.add(t),clearTimeout(s.timer);let n=i(s.start,s.latest,s.batch.size);if(a?.queue({seq:s.seq,query:t,batch:[...s.batch],scheduled:n,latest:s.latest,start:s.start}),"immediate"===n){let n=s.request;return c(),n.value.then(n=>e.resolver(n,t))}return"never"===n?s.request.value.then(n=>e.resolver(n,t)):(s.timer=setTimeout(c,n),s.request.value.then(n=>e.resolver(n,t)))},next:()=>c(),abort:()=>{let e=o.pop();for(let t of(e&&"in-transit"===e.state&&(e.state="aborted",e.abortController.abort(),e.request.reject(new DOMException("Aborted","AbortError")),l()),e&&"idle"===e.state&&(e.batch.size>0&&e.request.reject(new DOMException("Aborted","AbortError")),l()),o))"in-transit"===t.state&&(t.state="aborted",t.abortController.abort(),t.request.reject(new DOMException("Aborted","AbortError")))}}},"windowScheduler",0,n],847451);var r=e.i(843476),i=e.i(500932);e.s(["RecommendEmptySmall",0,e=>{let t,n,a=(0,i.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)("path",{d:"M20.1054 13.5537C20.3078 13.2743 20.698 13.212 20.9775 13.4141C21.2569 13.6164 21.3202 14.0066 21.1181 14.2861C18.8085 17.4761 15.7734 19.3848 13.3974 20.75C13.0982 20.9219 12.7159 20.8187 12.5439 20.5196C12.3722 20.2204 12.4754 19.838 12.7744 19.666C15.1202 18.3181 17.9589 16.5183 20.1054 13.5537ZM13.084 4.89645C14.4985 3.81998 16.5383 3.58814 17.958 4.23433C19.0844 4.74714 20.1296 5.58963 20.6191 7.18747C21.0094 8.46181 20.9318 9.67247 20.6318 10.9209C20.2108 12.6724 18.7835 14.305 17.2627 15.6289C15.7151 16.976 13.9452 18.1095 12.6513 18.8457C12.4206 18.9769 12.1591 19.0245 11.9502 19.0244L11.9511 19.0254C11.7296 19.0256 11.4806 18.972 11.2588 18.8457C9.96479 18.1095 8.19501 16.9761 6.64744 15.6289C5.1266 14.305 3.69926 12.6724 3.27831 10.9209C2.97835 9.67251 2.90078 8.46176 3.291 7.18747L3.38963 6.89645C3.91249 5.48492 4.90023 4.71466 5.95506 4.23433C7.37514 3.58788 9.40324 3.82044 10.8174 4.89645C11.2677 5.23916 11.6468 5.69607 11.9502 6.1279C12.2539 5.69611 12.6337 5.2392 13.084 4.89645ZM17.3369 5.59957C16.4551 5.19825 14.9998 5.32472 13.9931 6.09079C13.4054 6.53826 12.9444 7.33069 12.5967 7.92087C12.4618 8.14941 12.2155 8.28996 11.9502 8.29001C11.6848 8.28989 11.4385 8.14953 11.3037 7.92087C10.9553 7.32957 10.4967 6.53806 9.90916 6.09079C8.90204 5.32439 7.45847 5.19851 6.57713 5.59957C5.72984 5.98537 5.05719 6.54436 4.72557 7.62693C4.43844 8.56464 4.47695 9.48675 4.73729 10.5703C5.0432 11.843 6.1587 13.2138 7.63279 14.4971C9.06227 15.7415 10.7176 16.8075 11.9551 17.5147C13.1924 16.8076 14.8478 15.7414 16.2773 14.4971C17.7514 13.2139 18.8669 11.843 19.1728 10.5703C19.4332 9.48674 19.4727 8.56467 19.1855 7.62693C18.8536 6.54351 18.1831 5.98488 17.3369 5.59957Z",fill:"currentColor"}),a[0]=t):t=a[0],a[1]!==e?(n=(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),a[1]=e,a[2]=n):n=a[2],n}],140677)},496481,e=>{"use strict";e.s(["ccount",0,function(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}])},766482,(e,t,n)=>{function r(e,t,n){function r(){var c=Date.now()-s;c<t&&c>=0?i=setTimeout(r,t-c):(i=null,n||(l=e.apply(o,a),o=a=null))}null==t&&(t=100);var i,a,o,s,l,c=function(){o=this,a=arguments,s=Date.now();var c=n&&!i;
173return i||(i=setTimeout(r,t)),c&&(l=e.apply(o,a),o=a=null),l};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(l=e.apply(o,a),o=a=null,clearTimeout(i),i=null)},c}r.debounce=r,t.exports=r},663623,e=>{"use strict";var t=e.i(271645),n=e.i(766482);let r=["x","y","top","bottom","left","right","width","height"];e.s(["default",0,function(e){var i,a,o;let{debounce:s,scroll:l,polyfill:c,offsetSize:u}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e,d=c||("u"<typeof window?class{}:window.ResizeObserver);if(!d)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[h,p]=(0,t.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),m=(0,t.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:h}),f=s?"number"==typeof s?s:s.scroll:null,g=s?"number"==typeof s?s:s.resize:null,y=(0,t.useRef)(!1);(0,t.useEffect)(()=>(y.current=!0,()=>void(y.current=!1)));let[b,v,x]=(0,t.useMemo)(()=>{let e=()=>{let e,t;if(!m.current.element)return;let{left:n,top:i,width:a,height:o,bottom:s,right:l,x:c,y:d}=m.current.element.getBoundingClientRect(),h={left:n,top:i,width:a,height:o,bottom:s,right:l,x:c,y:d};m.current.element instanceof HTMLElement&&u&&(h.height=m.current.element.offsetHeight,h.width=m.current.element.offsetWidth),Object.freeze(h),y.current&&(e=m.current.lastBounds,t=h,!r.every(n=>e[n]===t[n]))&&p(m.current.lastBounds=h)};return[e,g?(0,n.default)(e,g):e,f?(0,n.default)(e,f):e]},[p,u,f,g]);function k(){m.current.scrollContainers&&(m.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",x,!0)),m.current.scrollContainers=null),m.current.resizeObserver&&(m.current.resizeObserver.disconnect(),m.current.resizeObserver=null)}function w(){m.current.element&&(m.current.resizeObserver=new d(x),m.current.resizeObserver.observe(m.current.element),l&&m.current.scrollContainers&&m.current.scrollContainers.forEach(e=>e.addEventListener("scroll",x,{capture:!0,passive:!0})))}return i=x,a=!!l,(0,t.useEffect)(()=>{if(a)return window.addEventListener("scroll",i,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",i,!0)},[i,a]),o=v,(0,t.useEffect)(()=>(window.addEventListener("resize",o),()=>void window.removeEventListener("resize",o)),[o]),(0,t.useEffect)(()=>{k(),w()},[l,x,v]),(0,t.useEffect)(()=>k,[]),[e=>{e&&e!==m.current.element&&(k(),m.current.element=e,m.current.scrollContainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:r,overflowX:i,overflowY:a}=window.getComputedStyle(t);return[r,i,a].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),w())},h,b]}])},104100,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!a)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,o,d=arguments[0],h=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(t=arguments[h],null!=t)for(n in t)r=u(d,n),d!==(i=u(t,n))&&(m&&i&&(l(i)||(a=s(i)))?(a?(a=!1,o=r&&s(r)?r:[]):o=r&&l(r)?r:{},c(d,{name:n,newValue:e(m,o,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},175765,420061,834425,660787,541991,e=>{"use strict";function t(e){if(e)throw e}var n=e.i(104100);function r(){}function i(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){return e&&"object"==typeof e?"position"in e||"type"in e?s(e.position):"start"in e||"end"in e?s(e):"line"in e||"column"in e?o(e):"":""}function o(e){return l(e&&e.line)+":"+l(e&&e.column)}function s(e){return o(e&&e.start)+"-"+o(e&&e.end)}function l(e){return e&&"number"==typeof e?e:1}e.s(["ok",0,r],420061),e.s(["stringifyPosition",0,a],834425);
173class c extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=s?s.line:void 0,this.name=a(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}c.prototype.file="",c.prototype.name="",c.prototype.reason="",c.prototype.message="",c.prototype.stack="",c.prototype.column=void 0,c.prototype.line=void 0,c.prototype.ancestors=void 0,c.prototype.cause=void 0,c.prototype.fatal=void 0,c.prototype.place=void 0,c.prototype.ruleId=void 0,c.prototype.source=void 0,e.s(["VFileMessage",0,c],660787);let u=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');m(e);let r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(i=a):(s=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},d=function(e){let t;if(m(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},h=function(e){let t;m(e);let n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){let s=e.codePointAt(n);if(47===s){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1)}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},p=function(...e){var t;let n,r,i,a=-1;for(;++a<e.length;)m(e[a]),e[a]&&(i=void 0===i?e[a]:i+"/"+e[a]);return void 0===i?".":(m(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",a=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else if(47===n)break;else n=47;if(47===n){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",a=0):a=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=l,s=0;continue}}else if(i.length>0){i="",a=0,o=l,s=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function m(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function f(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let g=["history","path","basename","stem","extname","dirname"];class y{constructor(e){let t,n;t=e?f(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<g.length;){const e=g[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)g.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?u(this.path):void 0}set basename(e){v(e,"basename"),b(e,"basename"),this.path=p(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?d(this.path):void 0}set dirname(e){x(this.basename,"dirname"),this.path=p(e||"",this.basename)}get extname(){return"string"==typeof this.path?h(this.path):void 0}set extname(e){if(b(e,"extname"),x(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");
173if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=p(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){f(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!f(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),v(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?u(this.path,this.extname):void 0}set stem(e){v(e,"stem"),b(e,"stem"),this.path=p(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new c(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function b(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function v(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function x(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}e.s(["VFile",0,y],541991);let k=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},w={}.hasOwnProperty,C=new class e extends k{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(a,...o){let s=e[++n],l=-1;if(a)return void r(a);for(;++l<t.length;)(null===o[l]||void 0===o[l])&&(o[l]=t[l]);t=o,s?(function(e,t){let n;return function(...t){let a,o=e.length>t.length;o&&t.push(r);try{a=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(a&&a.then&&"function"==typeof a.then?a.then(i,r):a instanceof Error?r(a):i(a))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(s,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let e=this.attachers[r];t.use(...e)}return t.data((0,n.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2==arguments.length?(T("data",this.frozen),this.namespace[e]=t,this):w.call(this.namespace,e)&&this.namespace[e]||void 0:e?(T("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=N(e),n=this.parser||this.Parser;return S("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),S("process",this.parser||this.Parser),E("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(i,a){let o=N(e),s=n.parse(o);function l(e,n){e||!n?a(e):i?i(n):(r(),t(void 0,n))}n.run(s,o,function(e,t,r){var i,a;if(e||!t||!r)return l(e);let o=n.stringify(t,r);"string"==typeof(i=o)||(a=i)&&"object"==typeof a&&"byteLength"in a&&"byteOffset"in a?r.value=o:r.result=
173o,l(e,r)})}}processSync(e){let n,i=!1;return this.freeze(),S("processSync",this.parser||this.Parser),E("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){i=!0,t(e),n=r}),D("processSync","process",i),r(),n}run(e,t,n){I(e),this.freeze();let i=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){r();let s=N(t);i.run(e,s,function(t,i,s){let l=i||e;t?o(t):a?a(l):(r(),n(void 0,l,s))})}}runSync(e,n){let i,a=!1;return this.run(e,n,function(e,n){t(e),i=n,a=!0}),D("runSync","run",a),r(),i}stringify(e,t){this.freeze();let n=N(t),r=this.compiler||this.Compiler;return E("stringify",r),I(e),r(e,n)}use(e,...t){let r=this.attachers,a=this.namespace;if(T("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else if("object"==typeof e)Array.isArray(e)?s(e):o(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function o(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(a.settings=(0,n.default)(!0,a.settings,e.settings))}function s(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)l(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;l(t,n)}else o(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function l(e,t){let a=-1,o=-1;for(;++a<r.length;)if(r[a][0]===e){o=a;break}if(-1===o)r.push([e,...t]);else if(t.length>0){let[a,...s]=t,l=r[o][1];i(l)&&i(a)&&(a=(0,n.default)(!0,l,a)),r[o]=[e,a,...s]}}}}().freeze();function S(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function E(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function T(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function I(e){if(!i(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function D(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function N(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new y(e)}e.s(["unified",0,C],175765)},227118,76696,359091,124963,e=>{"use strict";var t=e.i(241631),n=e.i(563270),r=e.i(369587),i=e.i(817139),a=e.i(393982),o=e.i(496481);function s(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}e.s(["parse",0,function(e){let t=[],n=String(e||""),r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);let e=n.slice(i,r).trim();
173(e||!a)&&t.push(e),i=r+1,r=n.indexOf(",",i)}return t},"stringify",0,s],76696);var l=e.i(804993),c=e.i(634588),u=e.i(187441);let d=/[A-Z]/g,h=/-[a-z]/g,p=/^data[-\w.:]+$/i;function m(e){return"-"+e.toLowerCase()}function f(e){return e.charAt(1).toUpperCase()}function g(e){return e.join(" ").trim()}e.s(["parse",0,function(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]},"stringify",0,g],359091);var y=e.i(800681);let b=/[ \t\n\f\r]/g;function v(e){return"object"==typeof e?"text"===e.type&&x(e.value):x(e)}function x(e){return""===e.replace(b,"")}e.s(["whitespace",0,v],124963);let k=S(1),w=S(-1),C=[];function S(e){return function(t,n,r){let i=t?t.children:C,a=(n||0)+e,o=i[a];if(!r)for(;o&&v(o);)a+=e,o=i[a];return o}}let E={}.hasOwnProperty;function T(e){return function(t,n,r){return E.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let I=T({body:function(e,t,n){let r=k(n,t);return!r||"comment"!==r.type},caption:D,colgroup:D,dd:function(e,t,n){let r=k(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=k(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:D,html:function(e,t,n){let r=k(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=k(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=k(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=k(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=k(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:N,rt:N,tbody:function(e,t,n){let r=k(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:A,tfoot:function(e,t,n){return!k(n,t)},th:A,thead:function(e,t,n){let r=k(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=k(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function D(e,t,n){let r=k(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&v(r.value.charAt(0)))}function N(e,t,n){let r=k(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function A(e,t,n){let r=k(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let _=T({body:function(e){let t=k(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&v(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=w(n,t),i=k(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&I(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=k(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=w(n,t),i=k(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&I(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),P={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>
173`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},M=["<","&"];function R(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:(0,y.stringifyEntities)(e.value,Object.assign({},r.settings.characterReferences,{subset:M}))}let L=(0,r.zwitch)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:i.comment,doctype:a.doctype,element:function(e,t,r,i){let a,b=i.schema,v="svg"!==b.space&&i.settings.omitOptionalTags,x="svg"===b.space?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase()),k=[];"html"===b.space&&"svg"===e.tagName&&(i.schema=n.svg);let w=function(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r,i=function(e,t){let n=(0,u.normalize)(t),r=t,i=c.Info;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&p.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(h,f);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!h.test(e)){let n=e.replace(d,m);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=l.DefinedInfo}return new i(r,t)}(e.schema,t),a=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,b=+!e.settings.allowDangerousCharacters,v=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let x=(0,y.stringifyEntities)(i.attribute,Object.assign({},e.settings.characterReferences,{subset:P.name[a][b]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?s:g)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?x:(e.settings.preferUnquoted&&(r=(0,y.stringifyEntities)(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:P.unquoted[a][b]}))),r!==n&&(e.settings.quoteSmart&&(0,o.ccount)(n,v)>(0,o.ccount)(n,e.alternative)&&(v=e.alternative),r=v+(0,y.stringifyEntities)(n,Object.assign({},e.settings.characterReferences,{subset:("'"===v?P.single:P.double)[a][b],attribute:!0}))+v),x+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(i,e.properties),C=i.all("html"===b.space&&"template"===e.tagName?e.content:e);return i.schema=b,C&&(x=!1),!w&&v&&_(e,t,r)||(k.push("<",e.tagName,w?" "+w:""),x&&("svg"===b.space||i.settings.closeSelfClosing)&&(a=w.charAt(w.length-1),(!i.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&k.push(" "),k.push("/")),k.push(">")),k.push(C),x||v&&I(e,t,r)||k.push("</"+e.tagName+">"),k.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:R(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:R}}),j={},O={},B=[];function F(e,t,n){return L(e,t,n,this)}function H(e){let t=[],n=e&&e.children||B,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}e.s(["toHtml",0,function(e,r){let i=r||j,a=i.quote||'"';if('"'!==a&&"'"!==a)throw Error("Invalid quote `"+a+"`, expected `'` or `\"`");return({one:F,all:H,settings:{omitOptionalTags:i.omitOptionalTags||!1,allowParseErrors:i.allowParseErrors||!1,allowDangerousCharacters:i.allowDangerousCharacters||!1,quoteSmart:i.quoteSmart||!1,preferUnquoted:i.preferUnquoted||!1,tightAttributes:i.tightAttributes||!1,upperDoctype:i.upperDoctype||!1,tightDoctype:i.tightDoctype||!1,bogusComments:i.bogusComments||!1,tightCommaSeparatedLists:i.tightCommaSeparatedLists||!1,tightSelfClosing:i.tightSelfClosing||!1,collapseEmptyAttributes:i.collapseEmptyAttributes||!1,allowDangerousHtml:i.allowDangerousHtml||!1,voids:i.voids||t.htmlVoidElements,characterReferences:i.characterReferences||O,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:"svg"===i.space?n.svg:n.html,quote:a,alternative:'"'===a?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}],227118)},241631,187441,634588,804993,563270,369587,800681,817139,393982,e=>{"use strict";let t;e.s(["htmlVoidElements",0,["area","base","basefont","bgsound","br","col","command","embed","frame","hr","
173image","img","input","keygen","link","meta","param","source","track","wbr"]],241631);class n{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function r(e,t){let r={},i={};for(let t of e)Object.assign(r,t.property),Object.assign(i,t.normal);return new n(r,i,t)}function i(e){return e.toLowerCase()}n.prototype.normal={},n.prototype.property={},n.prototype.space=void 0,e.s(["normalize",0,i],187441);class a{constructor(e,t){this.attribute=t,this.property=e}}a.prototype.attribute="",a.prototype.booleanish=!1,a.prototype.boolean=!1,a.prototype.commaOrSpaceSeparated=!1,a.prototype.commaSeparated=!1,a.prototype.defined=!1,a.prototype.mustUseProperty=!1,a.prototype.number=!1,a.prototype.overloadedBoolean=!1,a.prototype.property="",a.prototype.spaceSeparated=!1,a.prototype.space=void 0,e.s(["Info",0,a],634588);let o=0,s=m(),l=m(),c=m(),u=m(),d=m(),h=m(),p=m();function m(){return 2**++o}e.s(["boolean",0,s,"booleanish",0,l,"commaOrSpaceSeparated",0,p,"commaSeparated",0,h,"number",0,u,"overloadedBoolean",0,c,"spaceSeparated",0,d],561341);var f=e.i(561341);let g=Object.keys(f);class y extends a{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<g.length;){const e=g[i];!function(e,t,n){n&&(e[t]=n)}(this,g[i],(n&f[e])===f[e])}}}function b(e){let t={},r={};for(let[n,a]of Object.entries(e.properties)){let o=new y(n,e.transform(e.attributes||{},n),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),t[n]=o,r[i(n)]=n,r[i(o.attribute)]=n}return new n(t,r,e.space)}y.prototype.defined=!0,e.s(["DefinedInfo",0,y],804993);let v=b({properties:{ariaActiveDescendant:null,ariaAtomic:l,ariaAutoComplete:null,ariaBusy:l,ariaChecked:l,ariaColCount:u,ariaColIndex:u,ariaColSpan:u,ariaControls:d,ariaCurrent:null,ariaDescribedBy:d,ariaDetails:null,ariaDisabled:l,ariaDropEffect:d,ariaErrorMessage:null,ariaExpanded:l,ariaFlowTo:d,ariaGrabbed:l,ariaHasPopup:null,ariaHidden:l,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:d,ariaLevel:u,ariaLive:null,ariaModal:l,ariaMultiLine:l,ariaMultiSelectable:l,ariaOrientation:null,ariaOwns:d,ariaPlaceholder:null,ariaPosInSet:u,ariaPressed:l,ariaReadOnly:l,ariaRelevant:null,ariaRequired:l,ariaRoleDescription:d,ariaRowCount:u,ariaRowIndex:u,ariaRowSpan:u,ariaSelected:l,ariaSetSize:u,ariaSort:null,ariaValueMax:u,ariaValueMin:u,ariaValueNow:u,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function x(e,t){return t in e?e[t]:t}function k(e,t){return x(e,t.toLowerCase())}let w=b({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:h,acceptCharset:d,accessKey:d,action:null,allow:null,allowFullScreen:s,allowPaymentRequest:s,allowUserMedia:s,alt:null,as:null,async:s,autoCapitalize:null,autoComplete:d,autoFocus:s,autoPlay:s,blocking:d,capture:null,charSet:null,checked:s,cite:null,className:d,cols:u,colSpan:null,content:null,contentEditable:l,controls:s,controlsList:d,coords:u|h,crossOrigin:null,data:null,dateTime:null,decoding:null,default:s,defer:s,dir:null,dirName:null,disabled:s,download:c,draggable:l,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:s,formTarget:null,headers:d,height:u,hidden:c,high:u,href:null,hrefLang:null,htmlFor:d,httpEquiv:d,id:null,imageSizes:null,imageSrcSet:null,inert:s,inputMode:null,integrity:null,is:null,isMap:s,itemId:null,itemProp:d,itemRef:d,itemScope:s,itemType:d,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:s,low:u,manifest:null,max:null,maxLength:u,media:null,method:null,min:null,minLength:u,multiple:s,muted:s,name:null,nonce:null,noModule:s,noValidate:s,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:s,optimum:u,pattern:null,ping:d,placeholder:null,playsInl
173ine:s,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:s,referrerPolicy:null,rel:d,required:s,reversed:s,rows:u,rowSpan:u,sandbox:d,scope:null,scoped:s,seamless:s,selected:s,shadowRootClonable:s,shadowRootDelegatesFocus:s,shadowRootMode:null,shape:null,size:u,sizes:null,slot:null,span:u,spellCheck:l,src:null,srcDoc:null,srcLang:null,srcSet:null,start:u,step:null,style:null,tabIndex:u,target:null,title:null,translate:null,type:null,typeMustMatch:s,useMap:null,value:l,width:u,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:d,axis:null,background:null,bgColor:null,border:u,borderColor:null,bottomMargin:u,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:s,declare:s,event:null,face:null,frame:null,frameBorder:null,hSpace:u,leftMargin:u,link:null,longDesc:null,lowSrc:null,marginHeight:u,marginWidth:u,noResize:s,noHref:s,noShade:s,noWrap:s,object:null,profile:null,prompt:null,rev:null,rightMargin:u,rules:null,scheme:null,scrolling:l,standby:null,summary:null,text:null,topMargin:u,valueType:null,version:null,vAlign:null,vLink:null,vSpace:u,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:s,disableRemotePlayback:s,prefix:null,property:null,results:u,security:null,unselectable:null},space:"html",transform:k}),C=b({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
173-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:p,accentHeight:u,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:u,amplitude:u,arabicForm:null,ascent:u,attributeName:null,attributeType:null,azimuth:u,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:u,by:null,calcMode:null,capHeight:u,className:d,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:u,diffuseConstant:u,direction:null,display:null,dur:null,divisor:u,dominantBaseline:null,download:s,dx:null,dy:null,edgeMode:null,editable:null,elevation:u,enableBackground:null,end:null,event:null,exponent:u,externalResourcesRequired:null,fill:null,fillOpacity:u,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:h,g2:h,glyphName:h,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:u,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:u,horizOriginX:u,horizOriginY:u,id:null,ideographic:u,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:u,k:u,k1:u,k2:u,k3:u,k4:u,kernelMatrix:p,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:u,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:u,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
173Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:u,overlineThickness:u,paintOrder:null,panose1:null,path:null,pathLength:u,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:d,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:u,pointsAtY:u,pointsAtZ:u,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:p,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:p,rev:p,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:p,requiredFeatures:p,requiredFonts:p,requiredFormats:p,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:u,specularExponent:u,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:u,strikethroughThickness:u,string:null,stroke:null,strokeDashArray:p,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:u,strokeOpacity:u,strokeWidth:null,style:null,surfaceScale:u,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:p,tabIndex:u,tableValues:null,target:null,targetX:u,targetY:u,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:p,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:u,underlineThickness:u,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:u,values:null,vAlphabetic:u,vMathematical:u,vectorEffect:null,vHanging:u,vIdeographic:u,version:null,vertAdvY:u,vertOriginX:u,vertOriginY:u,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:u,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:x}),S=b({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),E=b({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:k}),T=b({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),I=r([v,w,S,E,T],"html"),D=r([v,C,S,E,T],"svg");e.s(["html",0,I,"svg",0,D],563270);let N={}.hasOwnProperty;e.s(["zwitch",0,function(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&N.call(t,e)){let n=String(t[e]);i=N.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}],369587);let A=/["&'<>`]/g,_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,M=/[|\\{}()[\]^$+*?.]/g,R=new WeakMap,L=/[\dA-Fa-f]/,j=/\d/,O=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","
173sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],B={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"Â¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"Â",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"Ã",Aacute:"Ã",Acirc:"Ã",Atilde:"Ã",Auml:"Ã",Aring:"Ã
",AElig:"Ã",Ccedil:"Ã",Egrave:"Ã",Eacute:"Ã",Ecirc:"Ã",Euml:"Ã",Igrave:"Ã",Iacute:"Ã",Icirc:"Ã",Iuml:"Ã",ETH:"Ã",Ntilde:"Ã",Ograve:"Ã",Oacute:"Ã",Ocirc:"Ã",Otilde:"Ã",Ouml:"Ã",times:"Ã",Oslash:"Ã",Ugrave:"Ã",Uacute:"Ã",Ucirc:"Ã",Uuml:"Ã",Yacute:"Ã",THORN:"Ã",szlig:"Ã",agrave:"à ",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"Ã¥",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"Ã",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"Æ",Alpha:"Î",Beta:"Î",Gamma:"Î",Delta:"Î",Epsilon:"Î",Zeta:"Î",Eta:"Î",Theta:"Î",Iota:"Î",Kappa:"Î",Lambda:"Î",Mu:"Î",Nu:"Î",Xi:"Î",Omicron:"Î",Pi:"Î ",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Î¥",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"Ï",rho:"Ï",sigmaf:"Ï",sigma:"Ï",tau:"Ï",upsilon:"Ï
",phi:"Ï",chi:"Ï",psi:"Ï",omega:"Ï",thetasym:"Ï",upsih:"Ï",piv:"Ï",bull:"â¢",hellip:"â¦",prime:"â²",Prime:"â³",oline:"â¾",frasl:"â",weierp:"â",image:"â",real:"â",trade:"â¢",alefsym:"âµ",larr:"â",uarr:"â",rarr:"â",darr:"â",harr:"â",crarr:"âµ",lArr:"â",uArr:"â",rArr:"â",dArr:"â",hArr:"â",forall:"â",part:"â",exist:"â",empty:"â
",nabla:"â",isin:"â",notin:"â",ni:"â",prod:"â",sum:"â",minus:"â",lowast:"â",radic:"â",prop:"â",infin:"â",ang:"â ",and:"â§",or:"â¨",cap:"â©",cup:"âª",int:"â«",there4:"â´",sim:"â¼",cong:"â
",asymp:"â",ne:"â ",equiv:"â¡",le:"â¤",ge:"â¥",sub:"â",sup:"â",nsub
173:"â",sube:"â",supe:"â",oplus:"â",otimes:"â",perp:"â¥",sdot:"â
",lceil:"â",rceil:"â",lfloor:"â",rfloor:"â",lang:"â©",rang:"âª",loz:"â",spades:"â ",clubs:"â£",hearts:"â¥",diams:"â¦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Å",oelig:"Å",Scaron:"Å ",scaron:"Å¡",Yuml:"Ÿ",circ:"Ë",tilde:"Ë",ensp:"â",emsp:"â",thinsp:"â",zwnj:"â",zwj:"â",lrm:"â",rlm:"â",ndash:"â",mdash:"â",lsquo:"â",rsquo:"â",sbquo:"â",ldquo:"â",rdquo:"â",bdquo:"â",dagger:"â ",Dagger:"â¡",permil:"â°",lsaquo:"â¹",rsaquo:"âº",euro:"â¬"},F=["cent","copy","divide","gt","lt","not","para","times"],H={}.hasOwnProperty,U={};for(t in B)H.call(B,t)&&(U[B[t]]=t);let z=/[^\dA-Za-z]/;function $(e,t,n){var r,i;let a,o,s=(r=n.omitOptionalSemicolons,a="&#x"+e.toString(16).toUpperCase(),r&&t&&!L.test(String.fromCharCode(t))?a:a+";");if((n.useNamedReferences||n.useShortestReferences)&&(o=function(e,t,n,r){let i=String.fromCharCode(e);if(H.call(U,i)){let e=U[i],a="&"+e;return n&&O.includes(e)&&!F.includes(e)&&(!r||t&&61!==t&&z.test(String.fromCharCode(t)))?a:a+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let r,a=(i=n.omitOptionalSemicolons,r="&#"+String(e),i&&t&&!j.test(String.fromCharCode(t))?r:r+";");a.length<s.length&&(s=a)}return o&&(!n.useShortestReferences||o.length<s.length)?o:s}function V(e,t){let n;var r,i=e,a=Object.assign({format:$},t);if(i=i.replace(a.subset?(r=a.subset,(n=R.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(M,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),R.set(r,n)),n):A,o),a.subset||a.escapeOnly)return i;return i.replace(_,function(e,t,n){return a.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),a)}).replace(P,o);function o(e,t,n){return a.format(e.charCodeAt(0),n.charCodeAt(t+1),a)}}e.s(["stringifyEntities",0,V],800681);let q=/^>|^->|<!--|-->|--!>|<!-$/g,G=[">"],W=["<",">"];e.s(["comment",0,function(e,t,n,r){return r.settings.bogusComments?"<?"+V(e.value,Object.assign({},r.settings.characterReferences,{subset:G}))+">":"<!--"+e.value.replace(q,function(e){return V(e,Object.assign({},r.settings.characterReferences,{subset:W}))})+"-->"}],817139),e.s(["doctype",0,function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}],393982)},716400,e=>{"use strict";class t{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,n){return n?e&&e.loc&&n.loc&&e.loc.lexer===n.loc.lexer?new t(e.loc.lexer,e.loc.start,n.loc.end):null:e&&e.loc}}class n{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,r){return new n(r,t.range(this,e))}}
173class r{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i=t&&t.loc;if(i&&i.start<=i.end){var a,o,s=i.lexer.input;a=i.start,o=i.end,a===s.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=s.slice(a,o).replace(/[^]/g,"$&̲");n+=(a>15?"â¦"+s.slice(a-15,a):s.slice(0,a))+l+(o+15<s.length?s.slice(o,o+15)+"â¦":s.slice(o))}var c=Error(n);return c.name="ParseError",c.__proto__=r.prototype,c.position=a,null!=a&&null!=o&&(c.length=o-a),c.rawMessage=e,c}}r.prototype.__proto__=Error.prototype;var i,a,o=/([A-Z])/g,s={"&":"&",">":">","<":"<",'"':""","'":"'"},l=/[&><"']/g,c=function e(t){if("ordgroup"===t.type||"color"===t.type)if(1===t.body.length)return e(t.body[0]);else return t;return"font"===t.type?e(t.body):t},u=function(e){if(!e)throw Error("Expected non-null, but got "+String(e));return e},d=function(e,t){return -1!==e.indexOf(t)},h=function(e,t){return void 0===e?t:e},p=function(e){return String(e).replace(l,e=>s[e])},m=function(e){return e.replace(o,"-$1").toLowerCase()},f=function(e){var t=c(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},g=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},y={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class b{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},y)if(y.hasOwnProperty(t)){var n=y[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:function(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}(n)}}reportNonstrict(e,t,n){var i=this.strict;if("function"==typeof i&&(i=i(e,t,n)),i&&"ignore"!==i){if(!0===i||"error"===i)throw new r("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" [")+e+"]",n);"warn"===i?"u">typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" [")+e+"]"):"u">typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+t+" [")+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!!r&&"ignore"!==r&&(!0===r||"error"===r||("warn"===r?("u">typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" [")+e+"]"),!1):("u">typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" [")+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=g(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}}class v{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return x[k[this.id]]}sub(){return x[w[this.id]]}fracNum(){return x[C[this.id]]}fracDen(){return x[S[this.id]]}cramp(){return x[E[this.id]]}text(){return x[T[this.id]]}isTight(){return this.size>=2}}var x=[new v(0,0,!1),new v(1,0,!0),new v(2,1,!1),new v(3,1,!0),new v(4,2,!1),new v(5,2,!0),new v(6,3,!1),new v(7,3,!0)],k=[4,5,4,5,6,7,
1736,7],w=[5,5,5,5,7,7,7,7],C=[2,3,4,5,6,7,6,7],S=[3,3,5,5,7,7,7,7],E=[1,1,3,3,5,5,7,7],T=[0,1,2,3,2,3,2,3],I={DISPLAY:x[0],TEXT:x[2],SCRIPT:x[4],SCRIPTSCRIPT:x[6]},D=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],N=[];function A(e){for(var t=0;t<N.length;t+=2)if(e>=N[t]&&e<=N[t+1])return!0;return!1}D.forEach(e=>e.blocks.forEach(e=>N.push(...e)));var _=function(e,t,n){t*=1e3;var r,i,a,o,s,l,c="";switch(e){case"sqrtMain":c="M95,"+(622+(r=t)+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+r/2.075+" -"+r+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+r)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+r)+" 80h400000v"+(40+r)+"h-400000z";break;case"sqrtSize1":c="M263,"+(601+(i=t)+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+i/2.084+" -"+i+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+i)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+i)+" 80h400000v"+(40+i)+"h-400000z";break;case"sqrtSize2":c="M983 "+(10+(a=t)+80)+"\nl"+a/3.13+" -"+a+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+a)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+a)+" 80h400000v"+(40+a)+"h-400000z";break;case"sqrtSize3":c="M424,"+(2398+(o=t)+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+o/4.223+" -"+o+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+o)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+o)+" 80\nh400000v"+(40+o)+"h-400000z";break;case"sqrtSize4":c="M473,"+(2713+(s=t)+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+s/5.298+" -"+s+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+s)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+s)+" 80h400000v"+(40+s)+"H1017.7z";break;case"sqrtTall":c="M702 "+((l=t)+80)+"H400000"+(40+l)+"\nH742v"+(n-54-80-l)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+l)+"H742z"}return c},P=function(e,t){switch(e){case"â":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"â£":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"â¥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V")+t+" H367z";case"â":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"â¢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"â¥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"âª":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"â":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"â":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V")+t+" H478z";default:return""}},
vendor: 10,243 bytes, line 173
173M={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2
vendor: 5,314 bytes, line 173
1736.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},
173R=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw Error("Unknown stretchy delimiter.")}};class L{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return d(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>e.toText()).join("")}}var j
vendor: 57,629 bytes, line 173
173={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},
173O={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},B={Ã
:"A",Ã:"D",Ã:"o",Ã¥:"a",ð:"d",þ:"o",Ð:"A",Ð:"B",Ð:"B",Ð:"F",Ð:"A",Ð:"E",Ð:"K",Ð:"3",Ð:"N",Ð:"N",Ð:"K",Ð:"N",Ð:"M",Ð:"H",Ð:"O",Ð:"N",Ð :"P",С:"C",Т:"T",У:"y",Ф:"O",Ð¥:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Ð:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",Ñ:"p",Ñ:"c",Ñ:"o",Ñ:"y",Ñ:"b",Ñ
:"x",Ñ:"n",Ñ:"n",Ñ:"w",Ñ:"w",Ñ:"a",Ñ:"m",Ñ:"a",Ñ:"e",Ñ:"m",Ñ:"r"};function F(e,t,n){if(!j[t])throw Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=j[t][r];if(!i&&e[0]in B&&(r=B[e[0]].charCodeAt(0),i=j[t][r]),!i&&"text"===n&&A(r)&&(i=j[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var H={},U=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],z=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],$=function(e,t){return t.size<2?e:U[e-1][t.size-1]};class V{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||V.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=z[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,ph
173antom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new V(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:$(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:z[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=$(V.BASESIZE,e);return this.size===t&&this.textSize===V.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==V.BASESIZE?["sizing","reset-size"+this.size,"size"+V.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!H[t=e>=5?0:e>=3?1:2]){var n=H[t]={cssEmPerMu:O.quad[t]/18};for(var r in O)O.hasOwnProperty(r)&&(n[r]=O[r][t])}return H[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}V.BASESIZE=6;var q={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},G={ex:!0,em:!0,mu:!0},W=function(e){return"string"!=typeof e&&(e=e.unit),e in q||e in G||"ex"===e},K=function(e,t){var n,i;if(e.unit in q)n=q[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{if(i=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=i.fontMetrics().xHeight;else if("em"===e.unit)n=i.fontMetrics().quad;else throw new r("Invalid unit: '"+e.unit+"'");i!==t&&(n*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Y=function(e){return+e.toFixed(4)+"em"},Z=function(e){return e.filter(e=>e).join(" ")},X=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Q=function(e){var t=document.createElement(e);for(var n in t.className=Z(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)t.appendChild(this.children[i].toNode());return t},J=/[\s"'>/=\x00-\x1f]/,ee=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+p(Z(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=m(i)+":"+this.style[i]+";");for(var a in n&&(t+=' style="'+p(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(a)){if(J.test(a))throw new r("Invalid attribute name '"+a+"'");t+=" "+a+'="'+p(this.attributes[a])+'"'}t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+("</"+e+">")};class et{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,X.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return d(this.classes,e)}toNode(){return Q.call(this,"span")}toMarkup(){return ee.call(this,"span")}}class en{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,X.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return d(this.classes,e)}toNode(){return Q.call(this,"a")}toMarkup(){return ee.call(this,"a")}}class er{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return d(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+p(this.src)+'" alt="'+p(this.alt)+'"',t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=m(n)+":"+this.style[n]+";");return t&&(e+=' style="'+p(t)+'"'),e+="'/>"}}var ei={î:"ıÌ",ï:"ıÌ",Ã:"ıÌ",ì:"ıÌ"};class ea{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<D.length;t++)for(var n=D[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïÃì]/.test(this.text)&&(this.text=ei[this.text])}hasClass(e){return d(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=Y(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Z(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=p(Z(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=m(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+p(n)+'"');var i=p(this.text);return e?(t+=">",t+=i,t+="</span>"):i}}class eo{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+p(this.attributes[t])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+"</svg>"}}class es{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",M[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+p(this.alternate)+'"/>':'<path d="'+p(M[this.pathName])+'"/>'}}
173class el{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+p(this.attributes[t])+'"');return e+"/>"}}function ec(e){if(e instanceof ea)return e;throw Error("Expected symbolNode but got "+String(e)+".")}var eu={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ed={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},eh={math:{},text:{}};function ep(e,t,n,r,i,a){eh[e][i]={font:t,group:n,replace:r},a&&r&&(eh[e][r]=eh[e][i])}var em="math",ef="text",eg="main",ey="accent-token",eb="close",ev="inner",ex="mathord",ek="op-token",ew="open",eC="punct",eS="spacing",eE="textord";ep(em,eg,"rel","â¡","\\equiv",!0),ep(em,eg,"rel","âº","\\prec",!0),ep(em,eg,"rel","â»","\\succ",!0),ep(em,eg,"rel","â¼","\\sim",!0),ep(em,eg,"rel","â¥","\\perp"),ep(em,eg,"rel","⪯","\\preceq",!0),ep(em,eg,"rel","⪰","\\succeq",!0),ep(em,eg,"rel","â","\\simeq",!0),ep(em,eg,"rel","â£","\\mid",!0),ep(em,eg,"rel","âª","\\ll",!0),ep(em,eg,"rel","â«","\\gg",!0),ep(em,eg,"rel","â","\\asymp",!0),ep(em,eg,"rel","â¥","\\parallel"),ep(em,eg,"rel","â","\\bowtie",!0),ep(em,eg,"rel","â£","\\smile",!0),ep(em,eg,"rel","â","\\sqsubseteq",!0),ep(em,eg,"rel","â","\\sqsupseteq",!0),ep(em,eg,"rel","â","\\doteq",!0),ep(em,eg,"rel","â¢","\\frown",!0),ep(em,eg,"rel","â","\\ni",!0),ep(em,eg,"rel","â","\\propto",!0),ep(em,eg,"rel","â¢","\\vdash",!0),ep(em,eg,"rel","â£","\\dashv",!0),ep(em,eg,"rel","â","\\owns"),ep(em,eg,eC,".","\\ldotp"),ep(em,eg,eC,"â
","\\cdotp"),ep(em,eg,eE,"#","\\#"),ep(ef,eg,eE,"#","\\#"),ep(em,eg,eE,"&","\\&"),ep(ef,eg,eE,"&","\\&"),ep(em,eg,eE,"âµ","\\aleph",!0),ep(em,eg,eE,"â","\\forall",!0),ep(em,eg,eE,"â","\\hbar",!0),ep(em,eg,eE,"â","\\exists",!0),ep(em,eg,eE,"â","\\nabla",!0),ep(em,eg,eE,"â","\\flat",!0),ep(em,eg,eE,"â","\\ell",!0),ep(em,eg,eE,"â®","\\natural",!0),ep(em,eg,eE,"â£","\\clubsuit",!0),ep(em,eg,eE,"â","\\wp",!0),ep(em,eg,eE,"â¯","\\sharp",!0),ep(em,eg,eE,"â¢","\\diamondsuit",!0),ep(em,eg,eE,"â","\\Re",!0),ep(em,eg,eE,"â¡","\\heartsuit",!0),ep(em,eg,eE,"â","\\Im",!0),ep(em,eg,eE,"â ","\\spadesuit",!0),ep(em,eg,eE,"§","\\S",!0),ep(ef,eg,eE,"§","\\S"),ep(em,eg,eE,"¶","\\P",!0),ep(ef,eg,eE,"¶","\\P"),ep(em,eg,eE,"â ","\\dag"),ep(ef,eg,eE,"â ","\\dag"),ep(ef,eg,eE,"â ","\\textdagger"),ep(em,eg,eE,"â¡","\\ddag"),ep(ef,eg,eE,"â¡","\\ddag"),ep(ef,eg,eE,"â¡","\\textdaggerdbl"),ep(em,eg,eb,"â±","\\rmoustache",!0),ep(em,eg,ew,"â°","\\lmoustache",!0),ep(em,eg,eb,"â¯","\\rgroup",!0),ep(em,eg,ew,"â®","\\lgroup",!0),ep(em,eg,"bin","â","\\mp",!0),ep(em,eg,"bin","â","\\ominus",!0),ep(em,eg,"bin","â","\\uplus",!0),ep(em,eg,"bin","â","\\sqcap",!0),ep(em,eg,"bin","â","\\ast"),ep(em,eg,"bin","â","\\sqcup",!0),ep(em,eg,"bin","â¯","\\bigcirc",!0),ep(em,eg,"bin","â","\\bullet",!0),ep(em,eg,"bin","â¡","\\ddagger"),ep(em,eg,"bin","â","\\wr",!0),ep(em,eg,"bin","⨿","\\amalg"),ep(em,eg,"bin","&","\\And"),ep(em,eg,"rel","âµ","\\longleftarrow",!0),ep(em,eg,"rel","â","\\Leftarrow",!0),ep(em,eg,"rel","â¸","\\Longleftarrow",!0),ep(em,eg,"rel","â¶","\\longrightarrow",!0),ep(em,eg,"rel","â","\\Rightarrow",!0),ep(em,eg,"rel","â¹","\\Longrightarrow",!0),ep(em,eg,"rel","â","\\leftrightarrow",!0),ep(em,eg,"rel","â·","\\longleftrightarrow",!0),ep(em,eg,"rel","â","\\Leftrightarrow",!0),ep(em,eg,"rel","âº","\\Longleftrightarrow",!0),ep(em,eg,"rel","â¦","\\mapsto",!0),ep(em,eg,"rel","â¼","\\longmapsto",!0),ep(em,eg,"rel","â","\\nearrow",!0),ep(em,eg,"rel","â©","\\hookleftarrow",!0),ep(em,eg,"rel","âª","\\hookrightarrow",!0),ep(em,eg,"rel","â","\\searrow",!0),ep(em,eg,"rel","â¼","\\leftharpoonup",!0),ep(em,eg,"rel","â","\\rightharpoonup",!0),ep(em,eg,"rel","â","\\swarrow",!0),ep(em,eg,"rel","â½","\\leftharpoondown",!0),ep(em,eg,"rel","â","\\rightharpoondown",!0),ep(em,eg,"rel","â","\\nwarrow",!0),ep(em,eg,"rel","â","\\rightleftharpoons",!0),ep(em,"ams","rel","â®","\\nless",!0),ep(em,"ams","rel","î","\\@nleqslant"),ep(em,"ams","rel","î","\\@nleqq"),ep(em,"ams","rel","âª","\\lneq",!0),ep(em,"ams","rel","â¨","\\lneqq",!0),ep(em,"ams","rel","î
173","\\@lvertneqq"),ep(em,"ams","rel","â¦","\\lnsim",!0),ep(em,"ams","rel","âª","\\lnapprox",!0),ep(em,"ams","rel","â","\\nprec",!0),ep(em,"ams","rel","â ","\\npreceq",!0),ep(em,"ams","rel","â¨","\\precnsim",!0),ep(em,"ams","rel","⪹","\\precnapprox",!0),ep(em,"ams","rel","â","\\nsim",!0),ep(em,"ams","rel","î","\\@nshortmid"),ep(em,"ams","rel","â¤","\\nmid",!0),ep(em,"ams","rel","â¬","\\nvdash",!0),ep(em,"ams","rel","â","\\nvDash",!0),ep(em,"ams","rel","âª","\\ntriangleleft"),ep(em,"ams","rel","â¬","\\ntrianglelefteq",!0),ep(em,"ams","rel","â","\\subsetneq",!0),ep(em,"ams","rel","î","\\@varsubsetneq"),ep(em,"ams","rel","â«","\\subsetneqq",!0),ep(em,"ams","rel","î","\\@varsubsetneqq"),ep(em,"ams","rel","â¯","\\ngtr",!0),ep(em,"ams","rel","î","\\@ngeqslant"),ep(em,"ams","rel","î","\\@ngeqq"),ep(em,"ams","rel","âª","\\gneq",!0),ep(em,"ams","rel","â©","\\gneqq",!0),ep(em,"ams","rel","î","\\@gvertneqq"),ep(em,"ams","rel","â§","\\gnsim",!0),ep(em,"ams","rel","âª","\\gnapprox",!0),ep(em,"ams","rel","â","\\nsucc",!0),ep(em,"ams","rel","â¡","\\nsucceq",!0),ep(em,"ams","rel","â©","\\succnsim",!0),ep(em,"ams","rel","⪺","\\succnapprox",!0),ep(em,"ams","rel","â","\\ncong",!0),ep(em,"ams","rel","î","\\@nshortparallel"),ep(em,"ams","rel","â¦","\\nparallel",!0),ep(em,"ams","rel","â¯","\\nVDash",!0),ep(em,"ams","rel","â«","\\ntriangleright"),ep(em,"ams","rel","â","\\ntrianglerighteq",!0),ep(em,"ams","rel","î","\\@nsupseteqq"),ep(em,"ams","rel","â","\\supsetneq",!0),ep(em,"ams","rel","î","\\@varsupsetneq"),ep(em,"ams","rel","â«","\\supsetneqq",!0),ep(em,"ams","rel","î","\\@varsupsetneqq"),ep(em,"ams","rel","â®","\\nVdash",!0),ep(em,"ams","rel","⪵","\\precneqq",!0),ep(em,"ams","rel","⪶","\\succneqq",!0),ep(em,"ams","rel","î","\\@nsubseteqq"),ep(em,"ams","bin","â´","\\unlhd"),ep(em,"ams","bin","âµ","\\unrhd"),ep(em,"ams","rel","â","\\nleftarrow",!0),ep(em,"ams","rel","â","\\nrightarrow",!0),ep(em,"ams","rel","â","\\nLeftarrow",!0),ep(em,"ams","rel","â","\\nRightarrow",!0),ep(em,"ams","rel","â®","\\nleftrightarrow",!0),ep(em,"ams","rel","â","\\nLeftrightarrow",!0),ep(em,"ams","rel","â³","\\vartriangle"),ep(em,"ams",eE,"â","\\hslash"),ep(em,"ams",eE,"â½","\\triangledown"),ep(em,"ams",eE,"â","\\lozenge"),ep(em,"ams",eE,"â","\\circledS"),ep(em,"ams",eE,"®","\\circledR"),ep(ef,"ams",eE,"®","\\circledR"),ep(em,"ams",eE,"â¡","\\measuredangle",!0),ep(em,"ams",eE,"â","\\nexists"),ep(em,"ams",eE,"â§","\\mho"),ep(em,"ams",eE,"â²","\\Finv",!0),ep(em,"ams",eE,"â
","\\Game",!0),ep(em,"ams",eE,"âµ","\\backprime"),ep(em,"ams",eE,"â²","\\blacktriangle"),ep(em,"ams",eE,"â¼","\\blacktriangledown"),ep(em,"ams",eE,"â ","\\blacksquare"),ep(em,"ams",eE,"â§«","\\blacklozenge"),ep(em,"ams",eE,"â
","\\bigstar"),ep(em,"ams",eE,"â¢","\\sphericalangle",!0),ep(em,"ams",eE,"â","\\complement",!0),ep(em,"ams",eE,"ð","\\eth",!0),ep(ef,eg,eE,"ð","ð"),ep(em,"ams",eE,"â±","\\diagup"),ep(em,"ams",eE,"â²","\\diagdown"),ep(em,"ams",eE,"â¡","\\square"),ep(em,"ams",eE,"â¡","\\Box"),ep(em,"ams",eE,"â","\\Diamond"),ep(em,"ams",eE,"Â¥","\\yen",!0),ep(ef,"ams",eE,"Â¥","\\yen",!0),ep(em,"ams",eE,"â","\\checkmark",!0),ep(ef,"ams",eE,"â","\\checkmark"),ep(em,"ams",eE,"â¶","\\beth",!0),ep(em,"ams",eE,"â¸","\\daleth",!0),ep(em,"ams",eE,"â·","\\gimel",!0),ep(em,"ams",eE,"Ï","\\digamma",!0),ep(em,"ams",eE,"ϰ","\\varkappa"),ep(em,"ams",ew,"â","\\@ulcorner",!0),ep(em,"ams",eb,"â","\\@urcorner",!0),ep(em,"ams",ew,"â","\\@llcorner",!0),ep(em,"ams",eb,"â","\\@lrcorner",!0),ep(em,"ams","rel","â¦","\\leqq",!0),ep(em,"ams","rel","⩽","\\leqslant",!0),ep(em,"ams","rel","âª","\\eqslantless",!0),ep(em,"ams","rel","â²","\\lesssim",!0),ep(em,"ams","rel","âª
","\\lessapprox",!0),ep(em,"ams","rel","â","\\approxeq",!0),ep(em,"ams","bin","â","\\lessdot"),ep(em,"ams","rel","â","\\lll",!0),ep(em,"ams","rel","â¶","\\lessgtr",!0),ep(em,"ams","rel","â","\\lesseqgtr",!0),ep(em,"ams","rel","âª","\\lesseqqgtr",!0),ep(em,"ams","rel","â","\\doteqdot"),ep(em,"ams","rel","â","\\risingdotseq",!0),ep(em,"ams","rel","â","\\fallingdotseq",!0),ep(em,"ams","rel","â½","\\backsim",!0),ep(em,"ams","rel","â","\\backsimeq",!0),ep(em,"ams","rel","â«
","\\subseteqq",!0),ep(em,"ams","rel","â","\\Subset",!0),ep(em,"ams","rel","â","\\sqsubset",!0),ep(em,"ams","rel","â¼","\\preccurlyeq",!0),ep(em,"ams","rel","â","\\curlyeqprec",!0),ep(em,"ams","rel","â¾","\\precsim",!0),ep(em,"ams","rel","⪷","\\precapprox",!0),ep(em,"ams","rel","â²","\\vartriangleleft"),ep(em,"ams","rel","â´","\\trianglelefteq"),ep(em,"ams","rel","â¨","\\vDash",!0),ep(em,"ams","rel","âª","\\Vvdash",!0),ep(em,"ams","rel","â£","\\smallsmile"),ep(em,"ams","rel","â¢","\\smallfrown"),ep(em,"ams","rel","â","\\bumpeq",!0),ep(em,"ams","rel","â","\\Bumpeq",!0),ep(em,"ams","rel","â§","\\geqq",!0),ep(em,"ams","rel","⩾","\\geqslant",!0),ep(em,"ams","rel","âª","\\eqslantgtr",!0),ep(em,"ams","rel","â³","\\gtrsim",!0),ep(em,"ams","rel","âª","\\gtrapprox",!0),ep(em,"ams","bin","â","\\gtrdot"),ep(em,"ams","rel","â","\\ggg",!0),ep(em,"ams","rel","â·","\\gtrless",!0),ep(em,"ams","rel","â","\\gtreqless",!0),ep(em,"ams","rel","âª","\\gtreqqless",!0),ep(em,"ams","rel","â","\\eqcirc",!0),ep(em,"ams","rel","â","\\circeq",!0),ep(em,"ams","rel","â","\\triangleq",!0),ep(em,"ams","rel","â¼","\\thicksim"),ep(em,"ams","rel","â","\\thickapprox"),ep(em,"ams","rel","â«","\\supseteqq",!0),ep(em,"ams","rel","â","\\Supset",!0),ep(em,"ams","rel","â","\\sqsupset",!0),ep(em,"ams","rel","â½","\\succcurlyeq",!0),ep(em,"ams","rel","â","\\curlyeqsucc",!0),ep(em,"ams","rel","â¿","\\succsim",!0),ep(em,"ams","rel","⪸","\\succapprox",!0),ep(em,"ams","rel","â³","\\vartriangleright"),ep(em,"ams","rel","âµ","\\trianglerighteq"),ep(em,"ams","rel","â©","\\Vdash",!0),ep(em,"ams","rel","â£","\\shortmid"),ep(em,"ams","rel","â¥","\\shortparallel"),ep(em,"ams","rel","â¬","\\between",!0),ep(em,"ams","rel","â","\\pitchfork",!0),ep(em,"ams","rel","â","\\varpropto"),ep(em,"ams","rel","â","\\blacktriangleleft"),ep(em,"ams","rel","â´","\\therefore",!0),ep(em,"ams","rel","â","\\backepsilon"),ep(em,"ams","rel","â¶","\\blacktriangleright"),ep(em,"ams","rel","âµ","\\because",!0),ep(em,"ams","rel","â","\\llless"),ep(em,"ams","rel","â","\\gggtr"),ep(em,"ams","bin","â²","\\lhd"),ep(em,"ams","bin","â³","\\rhd"),ep(em,"ams","rel","â","\\eqsim",!0),ep(em,eg,"rel","â","\\Join"),ep(em,"ams","rel","â","\\Doteq",!0),ep(em,"ams","bin","â","\\dotplus",!0),ep(em,"ams","bin","â","\\smallsetminus"),ep(em,"ams","bin","â","\\Cap",!0),ep(em,"ams","bin","â","\\Cup",!0),ep(em,"ams","bin","â©","\\doublebarwedge",!0),ep(em,"ams","bin","â","\\boxminus",!0),ep(em,"ams","bin","â","\\boxplus",!0),ep(em,"ams","bin","â","\\divi
173deontimes",!0),ep(em,"ams","bin","â","\\ltimes",!0),ep(em,"ams","bin","â","\\rtimes",!0),ep(em,"ams","bin","â","\\leftthreetimes",!0),ep(em,"ams","bin","â","\\rightthreetimes",!0),ep(em,"ams","bin","â","\\curlywedge",!0),ep(em,"ams","bin","â","\\curlyvee",!0),ep(em,"ams","bin","â","\\circleddash",!0),ep(em,"ams","bin","â","\\circledast",!0),ep(em,"ams","bin","â
","\\centerdot"),ep(em,"ams","bin","âº","\\intercal",!0),ep(em,"ams","bin","â","\\doublecap"),ep(em,"ams","bin","â","\\doublecup"),ep(em,"ams","bin","â ","\\boxtimes",!0),ep(em,"ams","rel","â¢","\\dashrightarrow",!0),ep(em,"ams","rel","â ","\\dashleftarrow",!0),ep(em,"ams","rel","â","\\leftleftarrows",!0),ep(em,"ams","rel","â","\\leftrightarrows",!0),ep(em,"ams","rel","â","\\Lleftarrow",!0),ep(em,"ams","rel","â","\\twoheadleftarrow",!0),ep(em,"ams","rel","â¢","\\leftarrowtail",!0),ep(em,"ams","rel","â«","\\looparrowleft",!0),ep(em,"ams","rel","â","\\leftrightharpoons",!0),ep(em,"ams","rel","â¶","\\curvearrowleft",!0),ep(em,"ams","rel","âº","\\circlearrowleft",!0),ep(em,"ams","rel","â°","\\Lsh",!0),ep(em,"ams","rel","â","\\upuparrows",!0),ep(em,"ams","rel","â¿","\\upharpoonleft",!0),ep(em,"ams","rel","â","\\downharpoonleft",!0),ep(em,eg,"rel","â¶","\\origof",!0),ep(em,eg,"rel","â·","\\imageof",!0),ep(em,"ams","rel","â¸","\\multimap",!0),ep(em,"ams","rel","â","\\leftrightsquigarrow",!0),ep(em,"ams","rel","â","\\rightrightarrows",!0),ep(em,"ams","rel","â","\\rightleftarrows",!0),ep(em,"ams","rel","â ","\\twoheadrightarrow",!0),ep(em,"ams","rel","â£","\\rightarrowtail",!0),ep(em,"ams","rel","â¬","\\looparrowright",!0),ep(em,"ams","rel","â·","\\curvearrowright",!0),ep(em,"ams","rel","â»","\\circlearrowright",!0),ep(em,"ams","rel","â±","\\Rsh",!0),ep(em,"ams","rel","â","\\downdownarrows",!0),ep(em,"ams","rel","â¾","\\upharpoonright",!0),ep(em,"ams","rel","â","\\downharpoonright",!0),ep(em,"ams","rel","â","\\rightsquigarrow",!0),ep(em,"ams","rel","â","\\leadsto"),ep(em,"ams","rel","â","\\Rrightarrow",!0),ep(em,"ams","rel","â¾","\\restriction"),ep(em,eg,eE,"â","`"),ep(em,eg,eE,"$","\\$"),ep(ef,eg,eE,"$","\\$"),ep(ef,eg,eE,"$","\\textdollar"),ep(em,eg,eE,"%","\\%"),ep(ef,eg,eE,"%","\\%"),ep(em,eg,eE,"_","\\_"),ep(ef,eg,eE,"_","\\_"),ep(ef,eg,eE,"_","\\textunderscore"),ep(em,eg,eE,"â ","\\angle",!0),ep(em,eg,eE,"â","\\infty",!0),ep(em,eg,eE,"â²","\\prime"),ep(em,eg,eE,"â³","\\triangle"),ep(em,eg,eE,"Î","\\Gamma",!0),ep(em,eg,eE,"Î","\\Delta",!0),ep(em,eg,eE,"Î","\\Theta",!0),ep(em,eg,eE,"Î","\\Lambda",!0),ep(em,eg,eE,"Î","\\Xi",!0),ep(em,eg,eE,"Î ","\\Pi",!0),ep(em,eg,eE,"Σ","\\Sigma",!0),ep(em,eg,eE,"Î¥","\\Upsilon",!0),ep(em,eg,eE,"Φ","\\Phi",!0),ep(em,eg,eE,"Ψ","\\Psi",!0),ep(em,eg,eE,"Ω","\\Omega",!0),ep(em,eg,eE,"A","Î"),ep(em,eg,eE,"B","Î"),ep(em,eg,eE,"E","Î"),ep(em,eg,eE,"Z","Î"),ep(em,eg,eE,"H","Î"),ep(em,eg,eE,"I","Î"),ep(em,eg,eE,"K","Î"),ep(em,eg,eE,"M","Î"),ep(em,eg,eE,"N","Î"),ep(em,eg,eE,"O","Î"),ep(em,eg,eE,"P","Ρ"),ep(em,eg,eE,"T","Τ"),ep(em,eg,eE,"X","Χ"),ep(em,eg,eE,"¬","\\neg",!0),ep(em,eg,eE,"¬","\\lnot"),ep(em,eg,eE,"â¤","\\top"),ep(em,eg,eE,"â¥","\\bot"),ep(em,eg,eE,"â
","\\emptyset"),ep(em,"ams",eE,"â
","\\varnothing"),ep(em,eg,ex,"α","\\alpha",!0),ep(em,eg,ex,"β","\\beta",!0),ep(em,eg,ex,"γ","\\gamma",!0),ep(em,eg,ex,"δ","\\delta",!0),ep(em,eg,ex,"ϵ","\\epsilon",!0),ep(em,eg,ex,"ζ","\\zeta",!0),ep(em,eg,ex,"η","\\eta",!0),ep(em,eg,ex,"θ","\\theta",!0),ep(em,eg,ex,"ι","\\iota",!0),ep(em,eg,ex,"κ","\\kappa",!0),ep(em,eg,ex,"λ","\\lambda",!0),ep(em,eg,ex,"μ","\\mu",!0),ep(em,eg,ex,"ν","\\nu",!0),ep(em,eg,ex,"ξ","\\xi",!0),ep(em,eg,ex,"ο","\\omicron",!0),ep(em,eg,ex,"Ï","\\pi",!0),ep(em,eg,ex,"Ï","\\rho",!0),ep(em,eg,ex,"Ï","\\sigma",!0),ep(em,eg,ex,"Ï","\\tau",!0),ep(em,eg,ex,"Ï
","\\upsilon",!0),ep(em,eg,ex,"Ï","\\phi",!0),ep(em,eg,ex,"Ï","\\chi",!0),ep(em,eg,ex,"Ï","\\psi",!0),ep(em,eg,ex,"Ï","\\omega",!0),ep(em,eg,ex,"ε","\\varepsilon",!0),ep(em,eg,ex,"Ï","\\vartheta",!0),ep(em,eg,ex,"Ï","\\varpi",!0),ep(em,eg,ex,"ϱ","\\varrho",!0),ep(em,eg,ex,"Ï","\\varsigma",!0),ep(em,eg,ex,"Ï","\\varphi",!0),ep(em,eg,"bin","â","*",!0),ep(em,eg,"bin","+","+"),ep(em,eg,"bin","â","-",!0),ep(em,eg,"bin","â
","\\cdot",!0),ep(em,eg,"bin","â","\\circ",!0),ep(em,eg,"bin","÷","\\div",!0),ep(em,eg,"bin","±","\\pm",!0),ep(em,eg,"bin","Ã","\\times",!0),ep(em,eg,"bin","â©","\\cap",!0),ep(em,eg,"bin","âª","\\cup",!0),ep(em,eg,"bin","â","\\setminus",!0),ep(em,eg,"bin","â§","\\land"),ep(em,eg,"bin","â¨","\\lor"),ep(em,eg,"bin","â§","\\wedge",!0),ep(em,eg,"bin","â¨","\\vee",!0),ep(em,eg,eE,"â","\\surd"),ep(em,eg,ew,"â¨","\\langle",!0),ep(em,eg,ew,"â£","\\lvert"),ep(em,eg,ew,"â¥","\\lVert"),ep(em,eg,eb,"?","?"),ep(em,eg,eb,"!","!"),ep(em,eg,eb,"â©","\\rangle",!0),ep(em,eg,eb,"â£","\\rvert"),ep(em,eg,eb,"â¥","\\rVert"),ep(em,eg,"rel","=","="),ep(em,eg,"rel",":",":"),ep(em,eg,"rel","â","\\approx",!0),ep(em,eg,"rel","â
","\\cong",!0),ep(em,eg,"rel","â¥","\\ge"),ep(em,eg,"rel","â¥","\\geq",!0),ep(em,eg,"rel","â","\\gets"),ep(em,eg,"rel",">","\\gt",!0),ep(em,eg,"rel","â","\\in",!0),ep(em,eg,"rel","î ","\\@not"),ep(em,eg,"rel","â","\\subset",!0),ep(em,eg,"rel","â","\\supset",!0),ep(em,eg,"rel","â","\\subseteq",!0),ep(em,eg,"rel","â","\\supseteq",!0),ep(em,"ams","rel","â","\\nsubseteq",!0),ep(em,"ams","rel","â","\\nsupseteq",!0),ep(em,eg,"rel","â¨","\\models"),ep(em,eg,"rel","â","\\leftarrow",!0),ep(em,eg,"rel","â¤","\\le"),ep(em,eg,"rel","â¤","\\leq",!0),ep(em,eg,"rel","<","\\lt",!0),ep(em,eg,"rel","â","\\rightarrow",!0),ep(em,eg,"rel","â","\\to"),ep(em,"ams","rel","â±","\\ngeq",!0),ep(em,"ams","rel","â°","\\nleq",!0),ep(em,eg,eS," ","\\ "),ep(em,eg,eS," ","\\space"),ep(em,eg,eS," ","\\nobreakspace"),ep(ef,eg,eS," ","\\ "),ep(ef,eg,eS," "," "),ep(ef,eg,eS," ","\\space"),ep(ef,eg,eS," ","\\nobreakspace"),ep(em,eg,eS,null,"\\nobreak"),ep(em,eg,eS,null,"\\allowbreak"),ep(em,eg,eC,",",","),ep(em,eg,eC,";",";"),ep(em,"ams","bin","â¼","\\barwedge",!0),ep(em,"ams","bin","â»","\\veebar",!0),ep(em,eg,"bin","â","\\odot",!0),ep(em,eg,"bin","â","\\oplus",!0),ep(em,eg,"bin","â","\\otimes",!0),ep(em,eg,eE,"â","\\partial",!0),ep(em,eg,"bin","â","\\oslash",!0),ep(em,"ams","bin","â","\\circledcirc",!0),ep(em,"ams","bin","â¡","\\boxdot",!0),ep(em,eg,"bin","â³","\\bigtri
173angleup"),ep(em,eg,"bin","â½","\\bigtriangledown"),ep(em,eg,"bin","â ","\\dagger"),ep(em,eg,"bin","â","\\diamond"),ep(em,eg,"bin","â","\\star"),ep(em,eg,"bin","â","\\triangleleft"),ep(em,eg,"bin","â¹","\\triangleright"),ep(em,eg,ew,"{","\\{"),ep(ef,eg,eE,"{","\\{"),ep(ef,eg,eE,"{","\\textbraceleft"),ep(em,eg,eb,"}","\\}"),ep(ef,eg,eE,"}","\\}"),ep(ef,eg,eE,"}","\\textbraceright"),ep(em,eg,ew,"{","\\lbrace"),ep(em,eg,eb,"}","\\rbrace"),ep(em,eg,ew,"[","\\lbrack",!0),ep(ef,eg,eE,"[","\\lbrack",!0),ep(em,eg,eb,"]","\\rbrack",!0),ep(ef,eg,eE,"]","\\rbrack",!0),ep(em,eg,ew,"(","\\lparen",!0),ep(em,eg,eb,")","\\rparen",!0),ep(ef,eg,eE,"<","\\textless",!0),ep(ef,eg,eE,">","\\textgreater",!0),ep(em,eg,ew,"â","\\lfloor",!0),ep(em,eg,eb,"â","\\rfloor",!0),ep(em,eg,ew,"â","\\lceil",!0),ep(em,eg,eb,"â","\\rceil",!0),ep(em,eg,eE,"\\","\\backslash"),ep(em,eg,eE,"â£","|"),ep(em,eg,eE,"â£","\\vert"),ep(ef,eg,eE,"|","\\textbar",!0),ep(em,eg,eE,"â¥","\\|"),ep(em,eg,eE,"â¥","\\Vert"),ep(ef,eg,eE,"â¥","\\textbardbl"),ep(ef,eg,eE,"~","\\textasciitilde"),ep(ef,eg,eE,"\\","\\textbackslash"),ep(ef,eg,eE,"^","\\textasciicircum"),ep(em,eg,"rel","â","\\uparrow",!0),ep(em,eg,"rel","â","\\Uparrow",!0),ep(em,eg,"rel","â","\\downarrow",!0),ep(em,eg,"rel","â","\\Downarrow",!0),ep(em,eg,"rel","â","\\updownarrow",!0),ep(em,eg,"rel","â","\\Updownarrow",!0),ep(em,eg,ek,"â","\\coprod"),ep(em,eg,ek,"â","\\bigvee"),ep(em,eg,ek,"â","\\bigwedge"),ep(em,eg,ek,"â¨","\\biguplus"),ep(em,eg,ek,"â","\\bigcap"),ep(em,eg,ek,"â","\\bigcup"),ep(em,eg,ek,"â«","\\int"),ep(em,eg,ek,"â«","\\intop"),ep(em,eg,ek,"â¬","\\iint"),ep(em,eg,ek,"â","\\iiint"),ep(em,eg,ek,"â","\\prod"),ep(em,eg,ek,"â","\\sum"),ep(em,eg,ek,"â¨","\\bigotimes"),ep(em,eg,ek,"â¨","\\bigoplus"),ep(em,eg,ek,"â¨","\\bigodot"),ep(em,eg,ek,"â®","\\oint"),ep(em,eg,ek,"â¯","\\oiint"),ep(em,eg,ek,"â°","\\oiiint"),ep(em,eg,ek,"â¨","\\bigsqcup"),ep(em,eg,ek,"â«","\\smallint"),ep(ef,eg,ev,"â¦","\\textellipsis"),ep(em,eg,ev,"â¦","\\mathellipsis"),ep(ef,eg,ev,"â¦","\\ldots",!0),ep(em,eg,ev,"â¦","\\ldots",!0),ep(em,eg,ev,"â¯","\\@cdots",!0),ep(em,eg,ev,"â±","\\ddots",!0),ep(em,eg,eE,"â®","\\varvdots"),ep(ef,eg,eE,"â®","\\varvdots"),ep(em,eg,ey,"Ë","\\acute"),ep(em,eg,ey,"Ë","\\grave"),ep(em,eg,ey,"¨","\\ddot"),ep(em,eg,ey,"~","\\tilde"),ep(em,eg,ey,"Ë","\\bar"),ep(em,eg,ey,"Ë","\\breve"),ep(em,eg,ey,"Ë","\\check"),ep(em,eg,ey,"^","\\hat"),ep(em,eg,ey,"â","\\vec"),ep(em,eg,ey,"Ë","\\dot"),ep(em,eg,ey,"Ë","\\mathring"),ep(em,eg,ex,"î±","\\@imath"),ep(em,eg,ex,"î·","\\@jmath"),ep(em,eg,eE,"ı","ı"),ep(em,eg,eE,"È·","È·"),ep(ef,eg,eE,"ı","\\i",!0),ep(ef,eg,eE,"È·","\\j",!0),ep(ef,eg,eE,"Ã","\\ss",!0),ep(ef,eg,eE,"æ","\\ae",!0),ep(ef,eg,eE,"Å","\\oe",!0),ep(ef,eg,eE,"ø","\\o",!0),ep(ef,eg,eE,"Ã","\\AE",!0),ep(ef,eg,eE,"Å","\\OE",!0),ep(ef,eg,eE,"Ã","\\O",!0),ep(ef,eg,ey,"Ë","\\'"),ep(ef,eg,ey,"Ë","\\`"),ep(ef,eg,ey,"Ë","\\^"),ep(ef,eg,ey,"Ë","\\~"),ep(ef,eg,ey,"Ë","\\="),ep(ef,eg,ey,"Ë","\\u"),ep(ef,eg,ey,"Ë","\\."),ep(ef,eg,ey,"¸","\\c"),ep(ef,eg,ey,"Ë","\\r"),ep(ef,eg,ey,"Ë","\\v"),ep(ef,eg,ey,"¨",'\\"'),ep(ef,eg,ey,"Ë","\\H"),ep(ef,eg,ey,"â¯","\\textcircled");var eT={"--":!0,"---":!0,"``":!0,"''":!0};ep(ef,eg,eE,"â","--",!0),ep(ef,eg,eE,"â","\\textendash"),ep(ef,eg,eE,"â","---",!0),ep(ef,eg,eE,"â","\\textemdash"),ep(ef,eg,eE,"â","`",!0),ep(ef,eg,eE,"â","\\textquoteleft"),ep(ef,eg,eE,"â","'",!0),ep(ef,eg,eE,"â","\\textquoteright"),ep(ef,eg,eE,"â","``",!0),ep(ef,eg,eE,"â","\\textquotedblleft"),ep(ef,eg,eE,"â","''",!0),ep(ef,eg,eE,"â","\\textquotedblright"),ep(em,eg,eE,"°","\\degree",!0),ep(ef,eg,eE,"°","\\degree"),ep(ef,eg,eE,"°","\\textdegree",!0),ep(em,eg,eE,"£","\\pounds"),ep(em,eg,eE,"£","\\mathsterling",!0),ep(ef,eg,eE,"£","\\pounds"),ep(ef,eg,eE,"£","\\textsterling",!0),ep(em,"ams",eE,"â ","\\maltese"),ep(ef,"ams",eE,"â ","\\maltese");for(var eI='0123456789/@."',eD=0;eD<eI.length;eD++){var eN=eI.charAt(eD);ep(em,eg,eE,eN,eN)}for(var eA='0123456789!@*()-=+";:?/.,',e_=0;e_<eA.length;e_++){var eP=eA.charAt(e_);ep(ef,eg,eE,eP,eP)}for(var eM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",eR=0;eR<eM.length;eR++){var eL=eM.charAt(eR);ep(em,eg,ex,eL,eL),ep(ef,eg,eE,eL,eL)}ep(em,"ams",eE,"C","â"),ep(ef,"ams",eE,"C","â"),ep(em,"ams",eE,"H","â"),ep(ef,"ams",eE,"H","â"),ep(em,"ams",eE,"N","â"),ep(ef,"ams",eE,"N","â"),ep(em,"ams",eE,"P","â"),ep(ef,"ams",eE,"P","â"),ep(em,"ams",eE,"Q","â"),ep(ef,"ams",eE,"Q","â"),ep(em,"ams",eE,"R","â"),ep(ef,"ams",eE,"R","â"),ep(em,"ams",eE,"Z","â¤"),ep(ef,"ams",eE,"Z","â¤"),ep(em,eg,ex,"h","â"),ep(ef,eg,ex,"h","â");for(var ej="",eO=0;eO<eM.length;eO++){var eB=eM.charAt(eO);ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56320+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56372+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56424+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56580+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56684+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56736+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56788+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56840+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56944+eO)),ep(ef,eg,eE,eB,ej),eO<26&&(ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56632+eO)),ep(ef,eg,eE,eB,ej),ep(em,eg,ex,eB,ej=String.fromCharCode(55349,56476+eO)),ep(ef,eg,eE,eB,ej))}ep(em,eg,ex,"k",ej=String.fromCharCode(55349,56668)),ep(ef,eg,eE,"k",ej);for(var eF=0;eF<10;eF++){var eH=eF.toString();ep(em,eg,ex,eH,ej=String.fromCharCode(55349,57294+eF)),ep(ef,eg,eE,eH,ej),ep(em,eg,ex,eH,ej=String.fromCharCode(55349,57314+eF)),ep(ef,eg,eE,eH,ej),ep(em,eg,ex,eH,ej=String.fromCharCode(55349,57324+eF)),ep(ef,eg,eE,eH,ej),ep(em,eg,ex,eH,ej=String.fromCharCode(55349,57334+eF)),ep(ef,eg,eE,eH,ej)}for(var eU="ÃÃþ",ez=0;ez<eU.length;ez++){var e$=eU.charAt(ez);ep(em,eg,ex,e$,e$),ep(ef,eg,eE,e$,e$)}var eV=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],eq=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],eG=function(e,t){var n=(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320)+65536,i=+("math"!==t);if(119808<=n&&n<120484){var a=Math.floor((n-119808)/26);return[eV[a][2],eV[a][i]]}if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return[eq[o][2],eq[o][i]]}if(120485===n||120486===n)return[eV[0][2],eV[0][i]];if(120486<n&&n<120782)return["",""];throw new r("Unsupported character: "+e)},eW=function(e,t,n){return eh[n][e]&&eh[n][e].replace&&(e=eh[n][e].replace),{value:e,metrics:F(e,t,n)}},eK=function(e,t,n,r,i){var a,o=eW(e,t,n),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),a=new ea(e,s.height,s.depth,l,s.skew,s.width,i)}else"u">typeof console&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '")+n+"'"),a=new ea(e,0,0,0,0,0,i);if(r){a.maxFontSize=r.sizeMultiplier,r.style.isTight()&&a.classes.push("mtight");var c=r.getColor();c&&(a.style.color=c)}return a},eY=(e,t)=>
173{if(Z(e.classes)!==Z(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},eZ=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},eX=function(e,t,n,r){var i=new et(e,t,n,r);return eZ(i),i},eQ=(e,t,n,r)=>new et(e,t,n,r),eJ=function(e){var t=new L(e);return eZ(t),t},e1=function(e){if("individualShift"===e.positionType){for(var t,n=e.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,a=i,o=1;o<n.length;o++){var s=-n[o].shift-a-n[o].elem.depth,l=s-(n[o-1].elem.height+n[o-1].elem.depth);a+=s,r.push({type:"kern",size:l}),r.push(n[o])}return{children:r,depth:i}}if("top"===e.positionType){for(var c=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];c-="kern"===d.type?d.size:d.elem.height+d.elem.depth}t=c}else if("bottom"===e.positionType)t=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw Error('First child must have type "elem".');if("shift"===e.positionType)t=-h.elem.depth-e.positionData;else if("firstBaseline"===e.positionType)t=-h.elem.depth;else throw Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:t}},e0=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},e2={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},e4={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},e3=function(e,t,n,r){return(void 0===r&&(r=[]),"boldsymbol"===n.font&&eW(e,"Main-Bold",t).metrics)?eK(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===eh[t][e].font?eK(e,"Main-Regular",t,n,r):eK(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},e5=function(e,t,n){var r=eX([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Y(r.height),r.maxFontSize=1,r},e6=function(e,t,n,r){var i=new en(e,t,n,r);return eZ(i),i},e7=function(e,t){return e instanceof L?eX([],[e],t):e},e8=function(e,t){for(var n,{children:r,depth:i}=e1(e),a=0,o=0;o<r.length;o++){var s=r[o];if("elem"===s.type){var l=s.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var c=eX(["pstrut"],[]);c.style.height=Y(a);for(var u=[],d=i,h=i,p=i,m=0;m<r.length;m++){var f=r[m];if("kern"===f.type)p+=f.size;else{var g=f.elem,y=eX(f.wrapperClasses||[],[c,g],void 0,f.wrapperStyle||{});y.style.top=Y(-a-p-g.depth),f.marginLeft&&(y.style.marginLeft=f.marginLeft),f.marginRight&&(y.style.marginRight=f.marginRight),u.push(y),p+=g.height+g.depth}d=Math.min(d,p),h=Math.max(h,p)}var b=eX(["vlist"],u);if(b.style.height=Y(h),d<0){var v=eX([],[]),x=eX(["vlist"],[v]);x.style.height=Y(-d);var k=eX(["vlist-s"],[new ea("â")]);n=[eX(["vlist-r"],[b,k]),eX(["vlist-r"],[x])]}else n=[eX(["vlist-r"],[b])];var w=eX(["vlist-t"],n);return 2===n.length&&w.classes.push("vlist-t2"),w.height=h,w.depth=-d,w},e9=function(e,t,n){var r=e.mode,i=e.text,a=["mord"],o="math"===r||"text"===r&&t.font,s=o?t.font:t.fontFamily,l="",c="";if(55349===i.charCodeAt(0)&&([l,c]=eG(i,r)),l.length>0)return eK(i,l,r,t,a.concat(c));if(s){if("boldsymbol"===s){var u,d,h="textord"!==n&&eW(i,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"};u=h.fontName,d=[h.fontClass]}else o?(u=e2[s].fontName,d=[s]):(u=e0(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(eW(i,u,r).metrics)return eK(i,u,r,t,a.concat(d));if(eT.hasOwnProperty(i)&&"Typewriter"===u.slice(0,10)){for(var p=[],m=0;m<i.length;m++)p.push(eK(i[m],u,r,t,a.concat(d)));return eJ(p)}}if("mathord"===n)return eK(i,"Math-Italic",r,t,a.concat(["mathnormal"]));if("textord"===n){var f=eh[r][i]&&eh[r][i].font;if("ams"===f)return eK(i,e0("amsrm",t.fontWeight,t.fontShape),r,t,a.concat("amsrm",t.fontWeight,t.fontShape));if("main"===f||!f)return eK(i,e0("textrm",t.fontWeight,t.fontShape),r,t,a.concat(t.fontWeight,t.fontShape));var g=e0(f,t.fontWeight,t.fontShape);return eK(i,g,r,t,a.concat(g,t.fontWeight,t.fontShape))}throw Error("unexpected type: "+n+" in makeOrd")},te=(e,t)=>
173{var n=eX(["mspace"],[],t),r=K(e,t);return n.style.marginRight=Y(r),n},tt=function(e,t){var[n,r,i]=e4[e],a=eQ(["overlay"],[new eo([new es(n)],{width:Y(r),height:Y(i),style:"width:"+Y(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"})],t);return a.height=i,a.style.height=Y(i),a.style.width=Y(r),a},tn=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof ea&&r instanceof ea&&eY(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},tr={number:3,unit:"mu"},ti={number:4,unit:"mu"},ta={number:5,unit:"mu"},to={mord:{mop:tr,mbin:ti,mrel:ta,minner:tr},mop:{mord:tr,mop:tr,mrel:ta,minner:tr},mbin:{mord:ti,mop:ti,mopen:ti,minner:ti},mrel:{mord:ta,mop:ta,mopen:ta,minner:ta},mopen:{},mclose:{mop:tr,mbin:ti,mrel:ta,minner:tr},mpunct:{mord:tr,mop:tr,mrel:ta,mopen:tr,mclose:tr,mpunct:tr,minner:tr},minner:{mord:tr,mop:tr,mbin:ti,mrel:ta,mopen:tr,mpunct:tr,minner:tr}},ts={mord:{mop:tr},mop:{mord:tr,mop:tr},mbin:{},mrel:{},mopen:{},mclose:{mop:tr},mpunct:{},minner:{mop:tr}},tl={},tc={},tu={};function td(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l<n.length;++l)tl[n[l]]=s;t&&(a&&(tc[t]=a),o&&(tu[t]=o))}function th(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;td({type:t,names:[],props:{numArgs:0},handler(){throw Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var tp=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},tm=function(e){return"ordgroup"===e.type?e.body:[e]},tf=["leftmost","mbin","mopen","mrel","mop","mpunct"],tg=["rightmost","mrel","mclose","mpunct"],ty={display:I.DISPLAY,text:I.TEXT,script:I.SCRIPT,scriptscript:I.SCRIPTSCRIPT},tb={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},tv=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=tE(e[a],t);if(o instanceof L){var s=o.children;i.push(...s)}else i.push(o)}if(tn(i),!n)return i;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(ty[c.style]))}var u=eX([r[0]||"leftmost"],[],t),h=eX([r[1]||"rightmost"],[],t),p="root"===n;return tx(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&d(tg,r)?t.classes[0]="mord":"mbin"===r&&d(tf,n)&&(e.classes[0]="mord")},{node:u},h,p),tx(i,(e,t)=>{var n=tC(t),r=tC(e),i=n&&r?e.hasClass("mtight")?ts[n][r]:to[n][r]:null;if(i)return te(i,l)},{node:u},h,p),i},tx=function e(t,n,r,i,a){i&&t.push(i);for(var o=0;o<t.length;o++){let i;var s=t[o],l=tk(s);if(l){e(l.children,n,r,null,a);continue}var c=!s.hasClass("mspace");if(c){var u=n(s,r.node);u&&(r.insertAfter?r.insertAfter(u):(t.unshift(u),o++))}c?r.node=s:a&&s.hasClass("newline")&&(r.node=eX(["leftmost"])),i=o,r.insertAfter=e=>{t.splice(i+1,0,e),o++}}i&&t.pop()},tk=function(e){return e instanceof L||e instanceof en||e instanceof et&&e.hasClass("enclosing")?e:null},tw=function e(t,n){var r=tk(t);if(r){var i=r.children;if(i.length){if("right"===n)return e(i[i.length-1],"right");else if("left"===n)return e(i[0],"left")}}return t},tC=function(e,t){return e?(t&&(e=tw(e,t)),tb[e.classes[0]]||null):null},tS=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return eX(t.concat(n))},tE=function(e,t,n){if(!e)return eX();if(tc[e.type]){var i=tc[e.type](e,t);if(n&&t.size!==n.size){i=eX(t.sizingClasses(n),[i],t);var a=t.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}throw new r("Got group of unknown type: '"+e.type+"'")};function tT(e,t){var n=eX(["base"],e,t),r=eX(["strut"]);return r.style.height=Y(n.height+n.depth),n.depth&&(r.style.verticalAlign=Y(-n.depth)),n.children.unshift(r),n}function tI(e,t){var n,r,i=null;1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body);var a=tv(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(n=a.pop());for(var o=[],s=[],l=0;l<a.length;l++)if(s.push(a[l]),a[l].hasClass("mbin")||a[l].hasClass("mrel")||a[l].hasClass("allowbreak")){for(var c=!1;l<a.length-1&&a[l+1].hasClass("mspace")&&!a[l+1].hasClass("newline");)l++,s.push(a[l]),a[l].hasClass("nobreak")&&(c=!0);c||(o.push(tT(s,t)),s=[])}else a[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(tT(s,t)),s=[]),o.push(a[l]));s.length>0&&o.push(tT(s,t)),i?((r=tT(tv(i,t,!0))).classes=["tag"],o.push(r)):n&&o.push(n);var u=eX(["katex-html"],o);if(u.setAttribute("aria-hidden","true"),r){var d=r.children[0];d.style.height=Y(u.height+u.depth),u.depth&&(d.style.verticalAlign=Y(-u.depth))}return u}function tD(e){return new L(e)}class tN{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Z(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof tA&&this.children[n+1]instanceof tA){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof tA;)r+=this.children[++n].toText();e.appendChild(new tA(r).toNode())}
173else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=p(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+p(Z(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+("</"+this.type+">")}toText(){return this.children.map(e=>e.toText()).join("")}}class tA{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return p(this.toText())}toText(){return this.text}}var t_=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="â":e>=.1666&&e<=.1667?this.character="â":e>=.2222&&e<=.2223?this.character="â
":e>=.2777&&e<=.2778?this.character="â
â":e>=-.05556&&e<=-.05555?this.character="ââ£":e>=-.1667&&e<=-.1666?this.character="ââ£":e>=-.2223&&e<=-.2222?this.character="ââ£":e>=-.2778&&e<=-.2777?this.character="â
â£":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Y(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Y(this.width)+'"/>'}toText(){return this.character?this.character:" "}},tP=function(e,t,n){return eh[t][e]&&eh[t][e].replace&&55349!==e.charCodeAt(0)&&!(eT.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6)))&&(e=eh[t][e].replace),new tA(e)},tM=function(e){return 1===e.length?e[0]:new tN("mrow",e)},tR=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"sans-serif-bold-italic";else if("textit"===t.fontShape)return"sans-serif-italic";else if("textbf"===t.fontWeight)return"bold-sans-serif";else return"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";else if("mathfrak"===n)return"fraktur";else if("mathscr"===n||"mathcal"===n)return"script";else if("mathsf"===n)return"sans-serif";else if("mathtt"===n)return"monospace";var i=e.text;return d(["\\imath","\\jmath"],i)?null:(eh[r][i]&&eh[r][i].replace&&(i=eh[r][i].replace),F(i,e2[n].fontName,r))?e2[n].variant:null};function tL(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof tA&&"."===t.text}if("mo"!==e.type||1!==e.children.length||"true"!==e.getAttribute("separator")||"0em"!==e.getAttribute("lspace")||"0em"!==e.getAttribute("rspace"))return!1;var n=e.children[0];return n instanceof tA&&","===n.text}var tj=function(e,t,n){if(1===e.length){var r,i=tB(e[0],t);return n&&i instanceof tN&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],o=0;o<e.length;o++){var s=tB(e[o],t);if(s instanceof tN&&r instanceof tN){if("mtext"===s.type&&"mtext"===r.type&&s.getAttribute("mathvariant")===r.getAttribute("mathvariant")){r.children.push(...s.children);continue}else if("mn"===s.type&&"mn"===r.type){r.children.push(...s.children);continue}else if(tL(s)&&"mn"===r.type){r.children.push(...s.children);continue}else if("mn"===s.type&&tL(r))s.children=[...r.children,...s.children],a.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===r.type||tL(r))){var l=s.children[0];l instanceof tN&&"mn"===l.type&&(l.children=[...r.children,...l.children],a.pop())}else if("mi"===r.type&&1===r.children.length){var c=r.children[0];if(c instanceof tA&&"̸"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var u=s.children[0];u instanceof tA&&u.text.length>0&&(u.text=u.text.slice(0,1)+"̸"+u.text.slice(1),a.pop())}}}a.push(s),r=s}return a}
173,tO=function(e,t,n){return tM(tj(e,t,n))},tB=function(e,t){if(!e)return new tN("mrow");if(tu[e.type])return tu[e.type](e,t);throw new r("Got group of unknown type: '"+e.type+"'")};function tF(e,t,n,r,i){var a,o=tj(e,n);a=1===o.length&&o[0]instanceof tN&&d(["mrow","mtable"],o[0].type)?o[0]:new tN("mrow",o);var s=new tN("annotation",[new tA(t)]);s.setAttribute("encoding","application/x-tex");var l=new tN("semantics",[a,s]),c=new tN("math",[l]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block"),eX([i?"katex":"katex-mathml"],[c])}var tH=function(e){return new V({style:e.displayMode?I.DISPLAY:I.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},tU=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=eX(n,[e])}return e},tz=function(e,t,n){var r,i=tH(n);return"mathml"===n.output?tF(e,t,i,n.displayMode,!0):tU(r="html"===n.output?eX(["katex"],[tI(e,i)]):eX(["katex"],[tF(e,t,i,n.displayMode,!1),tI(e,i)]),n)},t$={widehat:"^",widecheck:"Ë",widetilde:"~",utilde:"~",overleftarrow:"â",underleftarrow:"â",xleftarrow:"â",overrightarrow:"â",underrightarrow:"â",xrightarrow:"â",underbrace:"â",overbrace:"â",overgroup:"â ",undergroup:"â¡",overleftrightarrow:"â",underleftrightarrow:"â",xleftrightarrow:"â",Overrightarrow:"â",xRightarrow:"â",overleftharpoon:"â¼",xleftharpoonup:"â¼",overrightharpoon:"â",xrightharpoonup:"â",xLeftarrow:"â",xLeftrightarrow:"â",xhookleftarrow:"â©",xhookrightarrow:"âª",xmapsto:"â¦",xrightharpoondown:"â",xleftharpoondown:"â½",xrightleftharpoons:"â",xleftrightharpoons:"â",xtwoheadleftarrow:"â",xtwoheadrightarrow:"â ",xlongequal:"=",xtofrom:"â",xrightleftarrows:"â",xrightequilibrium:"â",xleftequilibrium:"â","\\cdrightarrow":"â","\\cdleftarrow":"â","\\cdlongequal":"="},tV={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},tq=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=eX(["stretchy",t],[],i),"fbox"===t){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new el({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new el({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),a=eQ([],[new eo(l,{width:"100%",height:Y(o)})],i)}return a.height=o,a.style.height=Y(o),a},tG=function(e){var t=new tN("mo",[new tA(t$[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},tW=function(e,t){var{span:n,minWidth:r,height:i}=function(){var n=4e5,r=e.label.slice(1);if(d(["widehat","widecheck","widetilde","utilde"],r)){var i,a,o,s,l="ordgroup"===(s=e.base).type?s.body.length:1;if(l>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,o=.42,a=r+"4"):(i=312,n=2340,o=.34,a="tilde4");else{var c=[1,1,2,2,3,3][l];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][c],i=[0,239,300,360,420][c],o=[0,.24,.3,.3,.36,.42][c],a=r+c):(n=[0,600,1033,2339,2340][c],i=[0,260,286,306,312][c],o=[0,.26,.286,.3,.306,.34][c],a="tilde"+c)}return{span:eQ([],[new eo([new es(a)],{width:"100%",height:Y(o),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"})],t),minWidth:0,height:o}}var u,h,p=[],m=tV[r],[f,g,y]=m,b=y/1e3,v=f.length;if(1===v)u=["hide-tail"],h=[m[3]];else if(2===v)u=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else if(3===v)u=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"];else throw Error("Correct katexImagesData or update code here to supp
173ort\n "+v+" children.");for(var x=0;x<v;x++){var k=new eo([new es(f[x])],{width:"400em",height:Y(b),viewBox:"0 0 "+n+" "+y,preserveAspectRatio:h[x]+" slice"}),w=eQ([u[x]],[k],t);if(1===v)return{span:w,minWidth:g,height:b};w.style.height=Y(b),p.push(w)}return{span:eX(["stretchy"],p,t),minWidth:g,height:b}}();return n.height=i,n.style.height=Y(i),r>0&&(n.style.minWidth=Y(r)),n};function tK(e,t){if(!e||e.type!==t)throw Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function tY(e){var t=tZ(e);if(!t)throw Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function tZ(e){return e&&("atom"===e.type||ed.hasOwnProperty(e.type))?e:null}var tX=(e,t)=>{e&&"supsub"===e.type?(s=(l=tK(e.base,"accent")).base,e.base=s,u=function(e){if(e instanceof et)return e;throw Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(tE(e,t)),e.base=l):s=(l=tK(e,"accent")).base;var n=tE(s,t.havingCrampedStyle()),r=l.isShifty&&f(s),i=0;r&&(i=ec(tE(c(s),t.havingCrampedStyle())).skew);var a="\\c"===l.label,o=a?n.height+n.depth:Math.min(n.height,t.fontMetrics().xHeight);if(l.isStretchy)p=e8({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"elem",elem:p=tW(l,t),wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+Y(2*i)+")",marginLeft:Y(2*i)}:void 0}]},t);else{"\\vec"===l.label?(d=tt("vec",t),h=e4.vec[1]):((d=ec(d=e9({mode:l.mode,text:l.label},t,"textord"))).italic=0,h=d.width,a&&(o+=d.depth));var s,l,u,d,h,p=eX(["accent-body"],[d]),m="\\textcircled"===l.label;m&&(p.classes.push("accent-full"),o=n.height);var g=i;m||(g-=h/2),p.style.left=Y(g),"\\textcircled"===l.label&&(p.style.top=".2em"),p=e8({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:-o},{type:"elem",elem:p}]},t)}var y=eX(["mord","accent"],[p],t);return u?(u.children[0]=y,u.height=Math.max(y.height,u.height),u.classes[0]="mord",u):y},tQ=(e,t)=>{var n=e.isStretchy?tG(e.label):new tN("mo",[tP(e.label,e.mode)]),r=new tN("mover",[tB(e.base,t),n]);return r.setAttribute("accent","true"),r},tJ=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));td({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=tp(t[0]),r=!tJ.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:tX,mathmlBuilder:tQ}),td({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:tX,mathmlBuilder:tQ}),td({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=tE(e.base,t),r=tW(e,t),i=.12*("\\utilde"===e.label);return eX(["mord","accentunder"],[e8({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t)],t)},mathmlBuilder:(e,t)=>{var n=tG(e.label),r=new tN("munder",[tB(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var t1=e=>{var t=new tN("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function t0(e,t){var n=tv(e.body,t,!0);return eX([e.mclass],n,t)}function t2(e,t){var n,r=tj(e.body,t);return"minner"===e.mclass?n=new tN("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new tN("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new tN("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}td({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r,i=t.style,a=t.havingStyle(i.sup()),o=e7(tE(e.body,a,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(s+"-arrow-pad"),e.below&&(a=t.havingStyle(i.sub()),(n=e7(tE(e.below,a,t),t)).classes.push(s+"-arrow-pad"));var l=tW(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>
173.25||"\\xleftequilibrium"===e.label)&&(u-=o.depth),n){var d=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;r=e8({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:d}]},t)}else r=e8({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c}]},t);return r.children[0].children[0].children[1].classes.push("svg-align"),eX(["mrel","x-arrow"],[r],t)},mathmlBuilder(e,t){var n,r=tG(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var i=t1(tB(e.body,t));n=e.below?new tN("munderover",[r,t1(tB(e.below,t)),i]):new tN("mover",[r,i])}else n=e.below?new tN("munder",[r,t1(tB(e.below,t))]):new tN("mover",[r,n=t1()]);return n}}),td({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:tm(i),isCharacterBox:f(i)}},htmlBuilder:t0,mathmlBuilder:t2});var t4=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"===t.type&&("bin"===t.family||"rel"===t.family)?"m"+t.family:"mord"};td({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:t4(t[0]),body:tm(t[1]),isCharacterBox:f(t[1])}}}),td({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:i}=e,a=t[1],o=t[0];n="\\stackrel"!==i?t4(a):"mrel";var s={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:tm(a)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===i?null:o,sub:"\\underset"===i?o:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:f(l)}},htmlBuilder:t0,mathmlBuilder:t2}),td({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:t4(t[0]),body:tm(t[0])}},htmlBuilder(e,t){var n=tv(e.body,t,!0),r=eX([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=new tN("mstyle",tj(e.body,t));return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var t3={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},t5=()=>({type:"styling",body:[],mode:"math",style:"display"}),t6=e=>"textord"===e.type&&"@"===e.text,t7=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;td({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=e7(tE(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=Y(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new tN("mrow",[tB(e.label,t)]);return(n=new tN("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new tN("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),td({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=e7(tE(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new tN("mrow",[tB(e.fragment,t)])}),td({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var n,{parser:i}=e,a=tK(t[0],"ordgroup").body,o="",s=0;s<a.length;s++)o+=tK(a[s],"textord").text;var l=parseInt(o);if(isNaN(l))throw new r("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new r("\\@char with invalid code point "+o);return l<=65535?n=String.fromCharCode(l):(l-=65536,n=String.fromCharCode((l>>10)+55296,(1023&l)+56320)),{type:"textord",mode:i.mode,text:n}}});var t8=(e,t)=>eJ(tv(e.body,t.withColor(e.color),!1)),t9=(e,t)=>
173{var n=new tN("mstyle",tj(e.body,t.withColor(e.color)));return n.setAttribute("mathcolor",e.color),n};td({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=tK(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:tm(i)}},htmlBuilder:t8,mathmlBuilder:t9}),td({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=tK(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var a=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:a}},htmlBuilder:t8,mathmlBuilder:t9}),td({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i="["===r.gullet.future().text?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:i&&tK(i,"size").value}},htmlBuilder(e,t){var n=eX(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Y(K(e.size,t)))),n},mathmlBuilder(e,t){var n=new tN("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Y(K(e.size,t)))),n}});var ne={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},nt=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new r("Expected a control sequence",e);return t},nn=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};td({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var i=t.fetch();if(ne[i.text])return("\\global"===n||"\\\\globallong"===n)&&(i.text=ne[i.text]),tK(t.parseFunction(),"internal");throw new r("Invalid token after macro prefix",i)}}),td({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var t,{parser:n,funcName:i}=e,a=n.gullet.popToken(),o=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new r("Expected a control sequence",a);for(var s=0,l=[[]];"{"!==n.gullet.future().text;)if("#"===(a=n.gullet.popToken()).text){if("{"===n.gullet.future().text){t=n.gullet.future(),l[s].push("{");break}if(a=n.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new r('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new r('Argument number "'+a.text+'" out of order');s++,l.push([])}else if("EOF"===a.text)throw new r("Expected a macro definition");else l[s].push(a.text);var{tokens:c}=n.gullet.consumeArg();return t&&c.unshift(t),("\\edef"===i||"\\xdef"===i)&&(c=n.gullet.expandTokens(c)).reverse(),n.gullet.macros.set(o,{tokens:c,numArgs:s,delimiters:l},i===ne[i]),{type:"internal",mode:n.mode}}}),td({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var t,{parser:n,funcName:r}=e,i=nt(n.gullet.popToken());n.gullet.consumeSpaces();var a=("="===(t=n.gullet.popToken()).text&&" "===(t=n.gullet.popToken()).text&&(t=n.gullet.popToken()),t);return nn(n,i,a,"\\\\globallet"===r),{type:"internal",mode:n.mode}}}),td({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=nt(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return nn(t,r,a,"\\\\globalfuture"===n),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var nr=function(e,t,n){var r=F(eh.math[e]&&eh.math[e].replace||e,t,n);if(!r)throw Error("Unsupported symbol "+e+" and font size "+t+".");return r},ni=function(e,t,n,r){var i=n.havingBaseStyle(t),a=eX(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},na=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Y(i),e.height-=i,e.depth+=i},no=function(e,t,n,r,i,a){var o=ni(eK(e,"Main-Regular",i,r),t,r,a);return n&&na(o,r,t),o},ns=function(e,t,n,r,i,a){var o=eK(e,"Size"+t+"-Regular",i,r),s=ni(eX(["delimsizing","size"+t],[o],r),I.TEXT,r,a);return n&&na(s,r,I.TEXT),s},nl=function(e,t,n){return{type:"elem",elem:eX(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[eX([],[eK(e,t,n
173)])])}},nc=function(e,t,n){var r=j["Size4-Regular"][e.charCodeAt(0)]?j["Size4-Regular"][e.charCodeAt(0)][4]:j["Size1-Regular"][e.charCodeAt(0)][4],i=eQ([],[new eo([new es("inner",P(e,Math.round(1e3*t)))],{width:Y(r),height:Y(t),style:"width:"+Y(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"})],n);return i.height=t,i.style.height=Y(t),i.style.width=Y(r),{type:"elem",elem:i}},nu={type:"kern",size:-.008},nd=["|","\\lvert","\\rvert","\\vert"],nh=["\\|","\\lVert","\\rVert","\\Vert"],np=function(e,t,n,r,i,a){var o,s,l,c,u="",h=0;o=l=c=e,s=null;var p="Size1-Regular";"\\uparrow"===e?l=c="â":"\\Uparrow"===e?l=c="â":"\\downarrow"===e?o=l="â":"\\Downarrow"===e?o=l="â":"\\updownarrow"===e?(o="\\uparrow",l="â",c="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="â",c="\\Downarrow"):d(nd,e)?(l="â£",u="vert",h=333):d(nh,e)?(l="â¥",u="doublevert",h=556):"["===e||"\\lbrack"===e?(o="â¡",l="â¢",c="â£",p="Size4-Regular",u="lbrack",h=667):"]"===e||"\\rbrack"===e?(o="â¤",l="â¥",c="â¦",p="Size4-Regular",u="rbrack",h=667):"\\lfloor"===e||"â"===e?(l=o="â¢",c="â£",p="Size4-Regular",u="lfloor",h=667):"\\lceil"===e||"â"===e?(o="â¡",l=c="â¢",p="Size4-Regular",u="lceil",h=667):"\\rfloor"===e||"â"===e?(l=o="â¥",c="â¦",p="Size4-Regular",u="rfloor",h=667):"\\rceil"===e||"â"===e?(o="â¤",l=c="â¥",p="Size4-Regular",u="rceil",h=667):"("===e||"\\lparen"===e?(o="â",l="â",c="â",p="Size4-Regular",u="lparen",h=875):")"===e||"\\rparen"===e?(o="â",l="â",c="â ",p="Size4-Regular",u="rparen",h=875):"\\{"===e||"\\lbrace"===e?(o="â§",s="â¨",c="â©",l="âª",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="â«",s="â¬",c="â",l="âª",p="Size4-Regular"):"\\lgroup"===e||"â®"===e?(o="â§",c="â©",l="âª",p="Size4-Regular"):"\\rgroup"===e||"â¯"===e?(o="â«",c="â",l="âª",p="Size4-Regular"):"\\lmoustache"===e||"â°"===e?(o="â§",c="â",l="âª",p="Size4-Regular"):("\\rmoustache"===e||"â±"===e)&&(o="â«",c="â©",l="âª",p="Size4-Regular");var m=nr(o,p,i),f=m.height+m.depth,g=nr(l,p,i),y=g.height+g.depth,b=nr(c,p,i),v=b.height+b.depth,x=0,k=1;if(null!==s){var w=nr(s,p,i);x=w.height+w.depth,k=2}var C=f+v+x,S=Math.max(0,Math.ceil((t-C)/(k*y))),E=C+S*k*y,T=r.fontMetrics().axisHeight;n&&(T*=r.sizeMultiplier);var D=E/2-T,N=[];if(u.length>0){var A=Math.round(1e3*E),_=R(u,Math.round(1e3*(E-f-v))),P=new es(u,_),M=(h/1e3).toFixed(3)+"em",L=(A/1e3).toFixed(3)+"em",j=eQ([],[new eo([P],{width:M,height:L,viewBox:"0 0 "+h+" "+A})],r);j.height=A/1e3,j.style.width=M,j.style.height=L,N.push({type:"elem",elem:j})}else{if(N.push(nl(c,p,i)),N.push(nu),null===s)N.push(nc(l,E-f-v+.016,r));else{var O=(E-f-v-x)/2+.016;N.push(nc(l,O,r)),N.push(nu),N.push(nl(s,p,i)),N.push(nu),N.push(nc(l,O,r))}N.push(nu),N.push(nl(o,p,i))}var B=r.havingBaseStyle(I.TEXT);return ni(eX(["delimsizing","mult"],[e8({positionType:"bottom",positionData:D,children:N},B)],B),I.TEXT,r,a)},nm=function(e,t,n,r,i){var a=_(e,r,n);return eQ(["hide-tail"],[new eo([new es(e,a)],{width:"400em",height:Y(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"})],i)},nf=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","\\surd"],ng=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±"],ny=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],nb=[0,1.2,1.8,2.4,3],nv=[{type:"small",style:I.SCRIPTSCRIPT},{type:"small",style:I.SCRIPT},{type:"small",style:I.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],nx=[{type:"small",style:I.SCRIPTSCRIPT},{type:"small",style:I.SCRIPT},{type:"small",style:I.TEXT},{type:"stack"}],nk=[{type:"small",style:I.SCRIPTSCRIPT},{type:"small",style:I.SCRIPT},{type:"small",style:I.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],nw=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw Error("Add support for delim type '"+e.type+"' here.")},nC=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size),a=i;a<n.length&&"stack"!==n[a].type;a++){var o=nr(e,nw(n[a]),"math"),s=o.height+o.depth;if("small"===n[a].type&&(s*=r.havingBaseStyle(n[a].style).sizeMultiplier),s>t)return n[a]}return n[n.length-1]},nS=function(e,t,n,r,i,a){"<"===e||"\\lt"===e||"â¨"===e?e="\\langle":(">"===e||"\\gt"===e||"â©"===e)&&(e="\\rangle");var o=d(ny,e)?nv:d(nf,e)?nk:nx,s=nC(e,t,o,r);return"small"===s.type?no(e,s.style,n,r,i,a):"large"===s.type?ns(e,s.size,n,r,i,a):np(e,t,n,r,i,a)},nE=function(e,t){var n,r,i=t.havingBaseSizing(),a=nC("\\surd",e*i.sizeMultiplier,nk,i),o=i.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,u=0;return"small"===a.type?(u=1e3+1e3*s+80,e<1?o=1:e<1.4&&(o=.7),l=(1+s+.08)/o,c=(1+s)/o,(n=nm("sqrtMain",l,u,s,t)).style.minWidth="0.853em",r=.833/o):"large"===a.type?(u=1080*nb[a.size],c=(nb[a.size]+s)/o,l=(nb[a.size]+s+.08)/o,(n=nm("sqrtSize"+a.size,l,u,s,t)).style.minWidth="1.02em",r=1/o):(l=e+s+.08,c=e+s,(n=nm("sqrtTall",l,u=Math.floor(1e3*e+s)+80,s,t)).style.minWidth="0.742em",r=1.
173056),n.height=c,n.style.height=Y(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},nT=function(e,t,n,i,a){if("<"===e||"\\lt"===e||"â¨"===e?e="\\langle":(">"===e||"\\gt"===e||"â©"===e)&&(e="\\rangle"),d(nf,e)||d(ny,e))return ns(e,t,!1,n,i,a);if(d(ng,e))return np(e,nb[t],!1,n,i,a);throw new r("Illegal delimiter: '"+e+"'")},nI=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return nS(e,Math.max(l/500*901,2*l-s),!0,r,i,a)},nD={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},nN=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","<",">","\\langle","â¨","\\rangle","â©","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function nA(e,t){var n=tZ(e);if(n&&d(nN,n.text))return n;if(n)throw new r("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e);throw new r("Invalid delimiter type '"+e.type+"'",e)}function n_(e){if(!e.body)throw Error("Bug: The leftright ParseNode wasn't fully parsed.")}td({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=nA(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:nD[e.funcName].size,mclass:nD[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?eX([e.mclass]):nT(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(tP(e.delim,e.mode));var n=new tN("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=Y(nb[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),td({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");
173if(n&&"string"!=typeof n)throw new r("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:nA(t[0],e).text,color:n}}}),td({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=nA(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=tK(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{n_(e);for(var n,r,i=tv(e.body,t,!0,["mopen","mclose"]),a=0,o=0,s=!1,l=0;l<i.length;l++)i[l].isMiddle?s=!0:(a=Math.max(i[l].height,a),o=Math.max(i[l].depth,o));if(a*=t.sizeMultiplier,o*=t.sizeMultiplier,n="."===e.left?tS(t,["mopen"]):nI(e.left,a,o,t,e.mode,["mopen"]),i.unshift(n),s)for(var c=1;c<i.length;c++){var u=i[c].isMiddle;u&&(i[c]=nI(u.delim,a,o,u.options,e.mode,[]))}if("."===e.right)r=tS(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=nI(e.right,a,o,d,e.mode,["mclose"])}return i.push(r),eX(["minner"],i,t)},mathmlBuilder:(e,t)=>{n_(e);var n=tj(e.body,t);if("."!==e.left){var r=new tN("mo",[tP(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var i=new tN("mo",[tP(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return tM(n)}}),td({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=nA(t[0],e);if(!e.parser.leftrightDepth)throw new r("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=tS(t,[]);else{n=nT(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=new tN("mo",["\\vert"===e.delim||"|"===e.delim?tP("|","text"):tP(e.delim,e.mode)]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var nP=(e,t)=>{var n,r,i=e7(tE(e.body,t),t),a=e.label.slice(1),o=t.sizeMultiplier,s=0,l=f(e.body);if("sout"===a)(n=eX(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/o,s=-.5*t.fontMetrics().xHeight;else if("phase"===a){var c=K({number:.6,unit:"pt"},t),u=K({number:.35,unit:"ex"},t);o/=t.havingBaseSizing().sizeMultiplier;var d=i.height+i.depth+c+u;i.style.paddingLeft=Y(d/2+c);var h=Math.floor(1e3*d*o);(n=eQ(["hide-tail"],[new eo([new es("phase","M400000 "+h+" H0 L"+h/2+" 0 l65 45 L145 "+(h-80)+" H400000z")],{width:"400em",height:Y(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"})],t)).style.height=Y(d),s=i.depth+c+u}else{/cancel/.test(a)?l||i.classes.push("cancel-pad"):"angl"===a?i.classes.push("anglpad"):i.classes.push("boxpad");var p=0,m=0,g=0;/box/.test(a)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=p=t.fontMetrics().fboxsep+("colorbox"===a?0:g)):"angl"===a?(p=4*(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),m=Math.max(0,.25-i.depth)):m=p=.2*!!l,n=tq(i,a,p,m,t),/fbox|boxed|fcolorbox/.test(a)?(n.style.borderStyle="solid",n.style.borderWidth=Y(g)):"angl"===a&&.049!==g&&(n.style.borderTopWidth=Y(g),n.style.borderRightWidth=Y(g)),s=i.depth+m,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}return r=e.backgroundColor?e8({positionType:"individualShift",children:[{type:"elem",elem:n,shift:s},{type:"elem",elem:i,shift:0}]},t):e8({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:n,shift:s,wrapperClasses:/cancel|phase/.test(a)?["svg-align"]:[]}]},t),(/cancel/.test(a)&&(r.height=i.height,r.depth=i.depth),/cancel/.test(a)&&!l)?eX(["mord","cancel-lap"],[r],t):eX(["mord"],[r],t)},nM=(e,t)=>{var n=0,r=new tN(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[tB(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};td({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=tK(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:nP,mathmlBuilder:nM}),td({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=tK(t[0],"color-token").color,o=tK(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:nP,mathmlBuilder:nM}),td({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),td({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:nP,mathmlBuilder:nM}),td({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var nR={};function nL(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:
173a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)nR[n[l]]=s;a&&(tc[t]=a),o&&(tu[t]=o)}var nj={};function nO(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var nB=e=>{if(!e.parser.settings.displayMode)throw new r("{"+e.envName+"} can be used only in display mode.")};function nF(e){if(-1===e.indexOf("ed"))return -1===e.indexOf("*")}function nH(e,t,i){var{hskipBeforeAndAfter:a,addJot:o,cols:s,arraystretch:l,colSeparationType:c,autoTag:u,singleRow:d,emptySingleRow:h,maxNumCols:p,leqno:m}=t;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var f=e.gullet.expandMacroAsText("\\arraystretch");if(null==f)l=1;else if(!(l=parseFloat(f))||l<0)throw new r("Invalid \\arraystretch: "+f)}e.gullet.beginGroup();var g=[],y=[g],b=[],v=[],x=null!=u?[]:void 0;function k(){u&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new n("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!u&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(k(),v.push(nO(e));;){var C=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),C={type:"ordgroup",mode:e.mode,body:C},i&&(C={type:"styling",mode:e.mode,style:i,body:[C]}),g.push(C);var S=e.fetch().text;if("&"===S){if(p&&g.length===p)if(d||c)throw new r("Too many tab characters: &",e.nextToken);else e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.");e.consume()}else if("\\end"===S){w(),1===g.length&&"styling"===C.type&&0===C.body[0].body.length&&(y.length>1||!h)&&y.pop(),v.length<y.length+1&&v.push([]);break}else if("\\\\"===S){e.consume();var E=void 0;" "!==e.gullet.future().text&&(E=e.parseSizeGroup(!0)),b.push(E?E.value:null),w(),v.push(nO(e)),g=[],y.push(g),k()}else throw new r("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:l,body:y,cols:s,rowGaps:b,hskipBeforeAndAfter:a,hLinesBeforeRow:v,colSeparationType:c,tags:x,leqno:m}}function nU(e){return"d"===e.slice(0,1)?"display":"text"}var nz=function(e,t){var n,i,a,o,s=e.body.length,l=e.hLinesBeforeRow,c=0,u=Array(s),d=[],p=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),m=1/t.fontMetrics().ptPerEm,f=5*m;e.colSeparationType&&"small"===e.colSeparationType&&(f=.2778*(t.havingStyle(I.SCRIPT).sizeMultiplier/t.sizeMultiplier));var g="CD"===e.colSeparationType?K({number:3,unit:"ex"},t):12*m,y=3*m,b=e.arraystretch*g,v=.7*b,x=.3*b,k=0;function w(e){for(var t=0;t<e.length;++t)t>0&&(k+=.25),d.push({pos:k,isDashed:e[t]})}for(w(l[0]),n=0;n<e.body.length;++n){var C=e.body[n],S=v,E=x;c<C.length&&(c=C.length);var T=Array(C.length);for(i=0;i<C.length;++i){var D=tE(C[i],t);E<D.depth&&(E=D.depth),S<D.height&&(S=D.height),T[i]=D}var N=e.rowGaps[n],A=0;N&&(A=K(N,t))>0&&(E<(A+=x)&&(E=A),A=0),e.addJot&&(E+=y),T.height=S,T.depth=E,T.pos=k+=S,k+=E+A,u[n]=T,w(l[n+1])}var _=k/2+t.fontMetrics().axisHeight,P=e.cols||[],M=[],R=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<s;++n){var L=u[n],j=L.pos-_,O=e.tags[n],B=void 0;(B=!0===O?eX(["eqn-num"],[],t):!1===O?eX([],[],t):eX([],tv(O,t,!0),t)).depth=L.depth,B.height=L.height,R.push({type:"elem",elem:B,shift:j})}for(i=0,o=0;i<c||o<P.length;++i,++o){for(var F=P[o]||{},H=!0;"separator"===F.type;){if(H||((a=eX(["arraycolsep"],[])).style.width=Y(t.fontMetrics().doubleRuleSep),M.push(a)),"|"===F.separator||":"===F.separator){var U="|"===F.separator?"solid":"dashed",z
173=eX(["vertical-separator"],[],t);z.style.height=Y(k),z.style.borderRightWidth=Y(p),z.style.borderRightStyle=U,z.style.margin="0 "+Y(-p/2);var $=k-_;$&&(z.style.verticalAlign=Y(-$)),M.push(z)}else throw new r("Invalid separator type: "+F.separator);F=P[++o]||{},H=!1}if(!(i>=c)){var V=void 0;(i>0||e.hskipBeforeAndAfter)&&0!==(V=h(F.pregap,f))&&((a=eX(["arraycolsep"],[])).style.width=Y(V),M.push(a));var q=[];for(n=0;n<s;++n){var G=u[n],W=G[i];if(W){var Z=G.pos-_;W.depth=G.depth,W.height=G.height,q.push({type:"elem",elem:W,shift:Z})}}q=e8({positionType:"individualShift",children:q},t),q=eX(["col-align-"+(F.align||"c")],[q]),M.push(q),(i<c-1||e.hskipBeforeAndAfter)&&0!==(V=h(F.postgap,f))&&((a=eX(["arraycolsep"],[])).style.width=Y(V),M.push(a))}}if(u=eX(["mtable"],M),d.length>0){for(var X=e5("hline",t,p),Q=e5("hdashline",t,p),J=[{type:"elem",elem:u,shift:0}];d.length>0;){var ee=d.pop(),et=ee.pos-_;ee.isDashed?J.push({type:"elem",elem:Q,shift:et}):J.push({type:"elem",elem:X,shift:et})}u=e8({positionType:"individualShift",children:J},t)}if(0===R.length)return eX(["mord"],[u],t);var en=e8({positionType:"individualShift",children:R},t);return eJ([u,en=eX(["tag"],[en],t)])},n$={c:"center ",l:"left ",r:"right "},nV=function(e,t){for(var n=[],r=new tN("mtd",[],["mtr-glue"]),i=new tN("mtd",[],["mml-eqn-num"]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],l=0;l<o.length;l++)s.push(new tN("mtd",[tB(o[l],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new tN("mtr",s))}var c=new tN("mtable",n),u=.5===e.arraystretch?.1:.16+e.arraystretch-1+.09*!!e.addJot;c.setAttribute("rowspacing",Y(u));var d="",h="";if(e.cols&&e.cols.length>0){var p=e.cols,m="",f=!1,g=0,y=p.length;"separator"===p[0].type&&(d+="top ",g=1),"separator"===p[p.length-1].type&&(d+="bottom ",y-=1);for(var b=g;b<y;b++)"align"===p[b].type?(h+=n$[p[b].align],f&&(m+="none "),f=!0):"separator"===p[b].type&&f&&(m+="|"===p[b].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",h.trim()),/[sd]/.test(m)&&c.setAttribute("columnlines",m.trim())}if("align"===e.colSeparationType){for(var v=e.cols||[],x="",k=1;k<v.length;k++)x+=k%2?"0em ":"1em ";c.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var w="",C=e.hLinesBeforeRow;d+=(C[0].length>0?"left ":"")+(C[C.length-1].length>0?"right ":"");for(var S=1;S<C.length-1;S++)w+=0===C[S].length?"none ":C[S][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==d&&(c=new tN("menclose",[c])).setAttribute("notation",d.trim()),e.arraystretch&&e.arraystretch<1&&(c=new tN("mstyle",[c])).setAttribute("scriptlevel","1"),c},nq=function(e,t){-1===e.envName.indexOf("ed")&&nB(e);var n,i=[],a=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,s=nH(e.parser,{cols:i,addJot:!0,autoTag:o?void 0:nF(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var u="",d=0;d<t[0].body.length;d++)u+=tK(t[0].body[d],"textord").text;l=2*(n=Number(u))}var h=!l;s.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var i=tK(e[t],"styling");tK(i.body[0],"ordgroup").body.unshift(c)}if(h)l<e.length&&(l=e.length);else{var a=e.length/2;if(n<a)throw new r("Too many math in a row: expected "+n+", but got "+a,e[0])}});for(var p=0;p<l;++p){var m="r",f=0;p%2==1?m="l":p>0&&h&&(f=1),i[p]={type:"align",align:m,pregap:f,postgap:0}}return s.colSeparationType=h?"align":"alignat",s};nL({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(tZ(t[0])?[t[0]]:tK(t[0],"ordgroup").body).map(function(e){var t=tY(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new r("Unknown column alignment: "+t,e)}),i={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return nH(e.parser,i,nU(e.envName))},htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,-1==="lcr".indexOf(n))throw new r("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),i.cols=[{type:"align",align:n}]}}var o=nH(e.parser,i,nU(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=nH(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(tZ(t[0])?[t[0]]:tK(t[0],"ordgroup").body).map(function(e){var t=tY(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new r("Unknown column alignment: "+t,e)});if(n.length>1)throw new r("{subarray} can contain only one column");var i={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((i=nH(e.parser,i,"script")).body.length>0&&i.body[0].length>1)throw new r("{subarray} can contain only one column");return i},htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=nH(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},nU(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:nq,htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){d(["gather","gather*"],e.envName)&&nB(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:nF(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return nH(e.parser,t,"display")},htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:nq,htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){nB(e);var t={autoTag:nF(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return nH(e.parser,t,"display")},htmlBuilder:nz,mathmlBuilder:nV}),nL({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(nB(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"===n||"\\\\"===n)e.consume();else if("\\end"===n){0===t[t.length-1].length&&t.pop();break}else throw new r("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var i=[],a=[i],o=0;o<t.length;o++){for(var s=t[o],l=t5(),c=0;c<s.length;c++)if(t6(s[c])){i.push(l);var u=tY(s[c+=1]).text,d=[,,];if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var p=!0,m=c+1;m<s.length;m++){if(t7(s[m],u)){p=!1,c=m;break}if(t6(s[m]))throw new r("Missing a "+u+" character to complete a CD arrow.",s[m]);d[h].body.push(s[m])}if(p)throw new r("Missing a "+u+" character to complete a CD arrow.",s[c])}else throw new r('Expected one of "<>AV=|." after @',s[c]);var f={type:"styling",body:[function(e,t,n){var r=t3[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i=n.callFunction("\\\\cdleft",[t[0]],[]),a=n.callFunction("\\Big",[{type:"atom",text:r,mode:"math",family:"rel"}],[]),o=n.callFunction("\\\\cdright",[t[1]],[]);return n.callFunction("\\\\cdparent",[{type:"ordgroup",mode:"math",body:[i,a,o]}],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);
173case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}(u,d,e)],mode:"math",style:"display"};i.push(f),l=t5()}else l.body.push(s[c]);o%2==0?i.push(l):i.shift(),i=[],a.push(i)}e.gullet.endGroup(),e.gullet.endGroup();var g=Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:g,colSeparationType:"CD",hLinesBeforeRow:Array(a.length+1).fill([])}}(e.parser)),htmlBuilder:nz,mathmlBuilder:nV}),nj["\\nonumber"]="\\gdef\\@eqnsw{0}",nj["\\notag"]="\\nonumber",td({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new r(e.funcName+" valid only within array environment")}}),td({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:i}=e,a=t[0];if("ordgroup"!==a.type)throw new r("Invalid environment name",a);for(var o="",s=0;s<a.body.length;++s)o+=tK(a.body[s],"textord").text;if("\\begin"===i){if(!nR.hasOwnProperty(o))throw new r("No such environment: "+o,a);var l=nR[o],{args:c,optArgs:u}=n.parseArguments("\\begin{"+o+"}",l),d={mode:n.mode,envName:o,parser:n},h=l.handler(d,c,u);n.expect("\\end",!1);var p=n.nextToken,m=tK(n.parseFunction(),"environment");if(m.name!==o)throw new r("Mismatch: \\begin{"+o+"} matched by \\end{"+m.name+"}",p);return h}return{type:"environment",mode:n.mode,name:o,nameGroup:a}}});var nG=(e,t)=>{var n=e.font,r=t.withFont(n);return tE(e.body,r)},nW=(e,t)=>{var n=e.font,r=t.withFont(n);return tB(e.body,r)},nK={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};td({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=tp(t[0]),a=r;return a in nK&&(a=nK[a]),{type:"font",mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:nG,mathmlBuilder:nW}),td({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=f(r);return{type:"mclass",mode:n.mode,mclass:t4(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}}),td({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:o}}},htmlBuilder:nG,mathmlBuilder:nW});var nY=(e,t)=>{var n=t;return"display"===e?n=n.id>=I.SCRIPT.id?n.text():I.DISPLAY:"text"===e&&n.size===I.DISPLAY.size?n=I.TEXT:"script"===e?n=I.SCRIPT:"scriptscript"===e&&(n=I.SCRIPTSCRIPT),n},nZ=(e,t)=>{var n,r,i,a,o,s,l,c,u,d,h,p=nY(e.size,t.style),m=p.fracNum(),f=p.fracDen();n=t.havingStyle(m);var g=tE(e.numer,n,t);if(e.continued){var y=8.5/t.fontMetrics().ptPerEm,b=3.5/t.fontMetrics().ptPerEm;g.height=g.height<y?y:g.height,g.depth=g.depth<b?b:g.depth}n=t.havingStyle(f);var v=tE(e.denom,n,t);if(e.hasBarLine?(e.barSize?(i=K(e.barSize,t),r=e5("frac-line",t,i)):r=e5("frac-line",t),i=r.height,a=r.height):(r=null,i=0,a=t.fontMetrics().defaultRuleThickness),p.size===I.DISPLAY.size||"display"===e.size?(o=t.fontMetrics().num1,s=i>0?3*a:7*a,l=t.fontMetrics().denom1):(i>0?(o=t.fontMetrics().num2,s=a):(o=t.fontMetrics().num3,s=3*a),l=t.fontMetrics().denom2),r){var x=t.fontMetrics().axisHeight;o-g.depth-(x+.5*i)<s&&(o+=s-(o-g.depth-(x+.5*i))),x-.5*i-(v.height-l)<s&&(l+=s-(x-.5*i-(v.height-l))),c=e8({positionType:"individualShift",children:[{type:"elem",elem:v,shift:l},{type:"elem",elem:r,shift:-(x-.5*i)},{type:"elem",elem:g,shift:-o}]},t)}else{var k=o-g.depth-(v.height-l);k<s&&(o+=.5*(s-k),l+=.5*(s-k)),c=e8({positionType:"individualShift",children:[{type:"elem",elem:v,shift:l},{type:"elem",elem:g,shift:-o}]},t)}return n=t.havingStyle(p),c.height*=n.sizeMultiplier/t.sizeMultiplier,c.depth*=n.sizeMultiplier/t.sizeMultiplier,u=p.size===I.DISPLAY.size?t.fontMetrics().delim1:p.size===I.SCRIPTSCRIPT.size?t.havingStyle(I.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,d=null==e.leftDelim?tS(t,["mopen"]):nS(e.leftDelim,u,!0,t.havingStyle(p),e.mode,["mopen"]),h=e.continued?eX([]):null==e.rightDelim?tS(t,["mclose"]):nS(e.rightDelim,u,!0,t.havingStyle(p),e.mode,["mclose"]),eX(["mord"].concat(n.sizingClasses(t)),[d,eX(["mfrac"],[c]),h],t)},nX=(e,t)=>{var n=new tN("mfrac",[tB(e.numer,t),tB(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=K(e.barSize,t);n.setAttribute("linethickness",Y(r))}}else n.setAttribute("linethickness","0px");var i=nY(e.size,t.style);if(i.size!==t.style.size){n=new tN("mstyle",[n]);var a=i.size===I.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",a),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new tN("mo",[new tA(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(n),null!=e.rightDelim){var l=new tN("mo",[new tA(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return tM(o)}return n};td({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:i}=e,a=t[0],o=t[1],s=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:a,denom:o,hasBarLine:n,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:nZ,mathmlBuilder:nX}),td({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),td({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:i}}});var nQ=["display","text","script","scriptscript"],nJ=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};td({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,i=t[4],a=t[5],o=tp(t[0]),s="atom"===o.type&&"open"===o.family?nJ(o.text):null,l=tp(t[1]),c="atom"===l.type&&"close"===l.family?nJ(l.text):null,u=tK(t[2],"size"),d=null;n=!!u.isBlank||(d=u.value).number>0;var h="auto",p=t[3];return"ordgroup"===p.type?p.body.length>0&&(h=nQ[Number(tK(p.body[0],"textord").text)]):h=nQ[Number((p=tK(p,"textord")).text)],{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:n,barSize:d,leftDelim:s,rightDelim:c,size:h}},htmlBuilder:nZ,mathmlBuilder:nX}),td({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infi
vendor: 5,837 bytes, line 173
173x:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:tK(t[0],"size").value,token:i}}}),td({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=u(tK(t[1],"infix").size),o=t[2],s=a.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:nZ,mathmlBuilder:nX});var n1=(e,t)=>{var n,r,i,a=t.style;"supsub"===e.type?(n=e.sup?tE(e.sup,t.havingStyle(a.sup()),t):tE(e.sub,t.havingStyle(a.sub()),t),r=tK(e.base,"horizBrace")):r=tK(e,"horizBrace");var o=tE(r.base,t.havingBaseStyle(I.DISPLAY)),s=tW(r,t);if(r.isOver?(i=e8({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=e8({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=eX(["mord",r.isOver?"mover":"munder"],[i],t);i=r.isOver?e8({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):e8({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return eX(["mord",r.isOver?"mover":"munder"],[i],t)};td({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:n1,mathmlBuilder:(e,t)=>{var n=tG(e.label);return new tN(e.isOver?"mover":"munder",[tB(e.base,t),n])}}),td({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=tK(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:tm(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=tv(e.body,t,!1);return e6(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=tO(e.body,t);return n instanceof tN||(n=new tN("mrow",[n])),n.setAttribute("href",e.href),n}}),td({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=tK(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<r.length;a++){var o=r[a];"~"===o&&(o="\\textasciitilde"),i.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:tm(s)}}}),td({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:tm(t[0])}},htmlBuilder:(e,t)=>eJ(tv(e.body,t,!1)),mathmlBuilder:(e,t)=>new tN("mrow",tj(e.body,t))}),td({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:i,funcName:a,token:o}=e,s=tK(t[0],"raw").string,l=t[1];i.settings.strict&&i.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c={};switch(a){case"\\htmlClass":c.class=s,n={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,n={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,n={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var u=s.split(","),d=0;d<u.length;d++){var h=u[d].split("=");if(2!==h.length)throw new r("Error parsing key-value for \\htmlData");c["data-"+h[0].trim()]=h[1].trim()}n={command:"\\htmlData",attributes:c};break;default:throw Error("Unrecognized html command")}return i.settings.isTrusted(n)?{type:"html",mode:i.mode,attributes:c,body:tm(l)}:i.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=tv(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=eX(r,n,t);for(var a in e.attributes)"class"!==a&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>tO(e.body,t)}),td({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:tm(t[0]),mathml:tm(t[1])}},htmlBuilder:(e,t)=>eJ(tv(e.html,t,!1)),mathmlBuilder:(e,t)=>tO(e.mathml,t)});var n0=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new r("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!W(n))throw new r("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};td({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:i}=e,a={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(n[0])for(var c=tK(n[0],"raw").string.split(","),u=0;u<c.length;u++){var d=c[u].split("=");if(2===d.length){var h=d[1].trim();switch(d[0].trim()){case"alt":l=h;break;case"width":a=n0(h);break;case"height":o=n0(h);break;case"totalheight":s=n0(h);break;default:throw new r("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var p=tK(t[0],"url").url;return(""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),i.settings.isTrusted({command:"\\includegraphics",url:p}))?{type:"includegraphics",mode:i.mode,alt:l,width:a,height:o,totalheight:s,src:p}:i.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=K(e.height,t),r=0;e.totalheight.number>0&&(r=K(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=K(e.width,t));
173var a={height:Y(n+r)};i>0&&(a.width=Y(i)),r>0&&(a.verticalAlign=Y(-r));var o=new er(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new tN("mglyph",[]);n.setAttribute("alt",e.alt);var r=K(e.height,t),i=0;if(e.totalheight.number>0&&(i=K(e.totalheight,t)-r,n.setAttribute("valign",Y(-i))),n.setAttribute("height",Y(r+i)),e.width.number>0){var a=K(e.width,t);n.setAttribute("width",Y(a))}return n.setAttribute("src",e.src),n}}),td({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=tK(t[0],"size");if(n.settings.strict){var a="m"===r[1],o="mu"===i.value.unit;a?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:(e,t)=>te(e.dimension,t),mathmlBuilder:(e,t)=>new t_(K(e.dimension,t))}),td({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{"clap"===e.alignment?(n=eX([],[tE(e.body,t)]),n=eX(["inner"],[n],t)):n=eX(["inner"],[tE(e.body,t)]);var n,r=eX(["fix"],[]),i=eX([e.alignment],[n,r],t),a=eX(["strut"]);return a.style.height=Y(i.height+i.depth),i.depth&&(a.style.verticalAlign=Y(-i.depth)),i.children.unshift(a),i=eX(["thinbox"],[i],t),eX(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new tN("mpadded",[tB(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),td({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var a="\\("===n?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:o}}}),td({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new r("Mismatched "+e.funcName)}});var n2=(e,t)=>{switch(t.style.size){case I.DISPLAY.size:return e.display;case I.TEXT.size:return e.text;case I.SCRIPT.size:return e.script;case I.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};td({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:tm(t[0]),text:tm(t[1]),script:tm(t[2]),scriptscript:tm(t[3])}},htmlBuilder:(e,t)=>eJ(tv(n2(e,t),t,!1)),mathmlBuilder:(e,t)=>tO(n2(e,t),t)});var n4=(e,t,n,r,i,a,o)=>{e=eX([],[e]);var s,l,c,u=n&&f(n);if(t){var d=tE(t,r.havingStyle(i.sup()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=tE(n,r.havingStyle(i.sub()),r);s={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}if(l&&s)c=e8({positionType:"bottom",positionData:r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Y(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Y(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r);else if(s)c=e8({positionType:"top",positionData:e.height-o,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Y(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r);else{if(!l)return e;c=e8({positionType:"bottom",positionData:e.depth+o,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Y(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var p=[c];if(s&&0!==a&&!u){var m=eX(["mspace"],[],r);m.style.marginRight=Y(a),p.unshift(m)}return eX(["mop","op-limits"],p,r)},n3=["\\smallint"],n5=(e,t)=>{var n,r,i,a,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=tK(e.base,"op"),o=!0):i=tK(e,"op");var s=t.style,l=!1;if(s.size===I.DISPLAY.size&&i.symbol&&!d(n3,i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",u="";if(("\\oiint"===i.name||"\\oiiint"===i.name)&&(u=i.name.slice(1),i.name="oiint"===u?"\\iint":"\\iiint"),a=eK(i.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),u.length>0){var h=a.italic;a=e8({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:tt(u+"Size"+(l?"2":"1"),t),shift:.08*!!l}]}
173,t),i.name="\\"+u,a.classes.unshift("mop"),a.italic=h}}else if(i.body){var p=tv(i.body,t,!0);1===p.length&&p[0]instanceof ea?(a=p[0]).classes[0]="mop":a=eX(["mop"],p,t)}else{for(var m=[],f=1;f<i.name.length;f++)m.push(e3(i.name[f],i.mode,t));a=eX(["mop"],m,t)}var g=0,y=0;return((a instanceof ea||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(g=(a.height-a.depth)/2-t.fontMetrics().axisHeight,y=a.italic),o)?n4(a,n,r,t,s,y,g):(g&&(a.style.position="relative",a.style.top=Y(g)),a)},n6=(e,t)=>{var n;if(e.symbol)n=new tN("mo",[tP(e.name,e.mode)]),d(n3,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new tN("mo",tj(e.body,t));else{n=new tN("mi",[new tA(e.name.slice(1))]);var r=new tN("mo",[tP("â¡","text")]);n=e.parentIsSupSub?new tN("mrow",[n,r]):tD([n,r])}return n},n7={"â":"\\prod","â":"\\coprod","â":"\\sum","â":"\\bigwedge","â":"\\bigvee","â":"\\bigcap","â":"\\bigcup","â¨":"\\bigodot","â¨":"\\bigoplus","â¨":"\\bigotimes","â¨":"\\biguplus","â¨":"\\bigsqcup"};td({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","â","â","â","â","â","â","â","â¨","â¨","â¨","â¨","â¨"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return 1===i.length&&(i=n7[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:n5,mathmlBuilder:n6}),td({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:tm(r)}},htmlBuilder:n5,mathmlBuilder:n6});var n8={"â«":"\\int","â¬":"\\iint","â":"\\iiint","â®":"\\oint","â¯":"\\oiint","â°":"\\oiiint"};td({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:n5,mathmlBuilder:n6}),td({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:n5,mathmlBuilder:n6}),td({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","â«","â¬","â","â®","â¯","â°"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=n8[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:n5,mathmlBuilder:n6});var n9=(e,t)=>{var n,r,i,a,o=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,i=tK(e.base,"operatorname"),o=!0):i=tK(e,"operatorname"),i.body.length>0){for(var s=tv(i.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),t.withFont("mathrm"),!0),l=0;l<s.length;l++){var c=s[l];c instanceof ea&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=eX(["mop"],s,t)}else a=eX(["mop"],[],t);return o?n4(a,n,r,t,t.style,0,0):a};function re(e,t,n){for(var r=tv(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf("sizing");o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]==="reset-size"+t.size&&(r[a].classes[o+1]="reset-size"+n.size),r[a].height*=i,r[a].depth*=i}return eJ(r)}td({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:tm(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:n9,mathmlBuilder:(e,t)=>{for(var n=tj(e.body,t.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var a=n[i];if(a instanceof t_);else if(a instanceof tN)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=a.children[0];1===a.children.length&&o instanceof tA?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}r&&(n=[new tA(n.map(e=>e.toText()).join(""))]);var s=new tN("mi",n);s.setAttribute("mathvariant","normal");var l=new tN("mo",[tP("â¡","text")]);return e.parentIsSupSub?new tN("mrow",[s,l]):tD([s,l])}}),nj["\\operatorname"]="\\@ifstar\\operatornamewithlimits\\operatorname@",th({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?eJ(tv(e.body,t,!1)):eX(["mord"],tv(e.body,t,!0),t),mathmlBuilder:(e,t)=>tO(e.body,t,!0)}),td({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=tE(e.body,t.havingCrampedStyle()),r=e5("overline-line",t),i=t.fontMetrics().defaultRuleThickness;return eX(["mord","overline"],[e8({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t)],t)},mathmlBuilder(e,t){var n=new tN("mo",[new tA("â¾")]);n.setAttribute("stretchy","true");var r=new tN("mover",[tB(e.body,t),n]);return r.setAttribute("accent","true"),r}}),td({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:tm(r)}},htmlBuilder:(e,t)=>eJ(tv(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new tN("mphantom",tj(e.body,t))}),td({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>
173{var n=eX([],[tE(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return eX(["mord"],[n=e8({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t)],t)},mathmlBuilder:(e,t)=>{var n=new tN("mphantom",tj(tm(e.body),t)),r=new tN("mpadded",[n]);return r.setAttribute("height","0px"),r.setAttribute("depth","0px"),r}}),td({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=eX(["inner"],[tE(e.body,t.withPhantom())]),r=eX(["fix"],[]);return eX(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=new tN("mphantom",tj(tm(e.body),t)),r=new tN("mpadded",[n]);return r.setAttribute("width","0px"),r}}),td({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=tK(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=tE(e.body,t);return e8({positionType:"shift",positionData:-K(e.dy,t),children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new tN("mpadded",[tB(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),td({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),td({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],a=tK(t[0],"size"),o=tK(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&tK(i,"size").value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=eX(["mord","rule"],[],t),r=K(e.width,t),i=K(e.height,t),a=e.shift?K(e.shift,t):0;return n.style.borderRightWidth=Y(r),n.style.borderTopWidth=Y(i),n.style.bottom=Y(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=1.125*i*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=K(e.width,t),r=K(e.height,t),i=e.shift?K(e.shift,t):0,a=t.color&&t.getColor()||"black",o=new tN("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",Y(n)),o.setAttribute("height",Y(r));var s=new tN("mpadded",[o]);return i>=0?s.setAttribute("height",Y(i)):(s.setAttribute("height",Y(i)),s.setAttribute("depth",Y(-i))),s.setAttribute("voffset",Y(i)),s}});var rt=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];td({type:"sizing",names:rt,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:rt.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return re(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new tN("mstyle",tj(e.body,n));return r.setAttribute("mathsize",Y(n.sizeMultiplier)),r}}),td({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&tK(n[0],"ordgroup");if(o)for(var s="",l=0;l<o.body.length;++l)if("t"===(s=o.body[l].text))i=!0;else if("b"===s)a=!0;else{i=!1,a=!1;break}else i=!0,a=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=eX([],[tE(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var i=0;i<n.children.length;i++)n.children[i].depth=0;return eX(["mord"],[e8({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t)],t)},mathmlBuilder:(e,t)=>{var n=new tN("mpadded",[tB(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),td({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:"sqrt",mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=tE(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=e7(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;
173t.style.id<I.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:l}=nE(n.height+n.depth+a+r,t),c=o.height-s;c>n.height+n.depth+a&&(a=(a+c-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=Y(l);var d=e8({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:o},{type:"kern",size:s}]},t);if(!e.index)return eX(["mord","sqrt"],[d],t);var h=t.havingStyle(I.SCRIPTSCRIPT),p=tE(e.index,h,t),m=eX(["root"],[e8({positionType:"shift",positionData:-(.6*(d.height-d.depth)),children:[{type:"elem",elem:p}]},t)]);return eX(["mord","sqrt"],[m,d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new tN("mroot",[tB(n,t),tB(r,t)]):new tN("msqrt",[tB(n,t)])}});var rn={display:I.DISPLAY,text:I.TEXT,script:I.SCRIPT,scriptscript:I.SCRIPTSCRIPT};td({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=rn[e.style],r=t.havingStyle(n).withFont("");return re(e.body,r,t)},mathmlBuilder(e,t){var n=rn[e.style],r=t.havingStyle(n),i=new tN("mstyle",tj(e.body,r)),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",a[0]),i.setAttribute("displaystyle",a[1]),i}});var rr=function(e,t){var n=e.base;if(!n)return null;if("op"===n.type)return n.limits&&(t.style.size===I.DISPLAY.size||n.alwaysHandleSupSub)?n5:null;if("operatorname"===n.type)return n.alwaysHandleSupSub&&(t.style.size===I.DISPLAY.size||n.limits)?n9:null;if("accent"===n.type)return f(n.base)?tX:null;if("horizBrace"===n.type)return!e.sub===n.isOver?n1:null;else return null};th({type:"supsub",htmlBuilder(e,t){var n,r,i,a,o=rr(e,t);if(o)return o(e,t);var{base:s,sup:l,sub:c}=e,u=tE(s,t),d=t.fontMetrics(),h=0,p=0,m=s&&f(s);if(l){var g=t.havingStyle(t.style.sup());n=tE(l,g,t),m||(h=u.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(c){var y=t.havingStyle(t.style.sub());r=tE(c,y,t),m||(p=u.depth+y.fontMetrics().subDrop*y.sizeMultiplier/t.sizeMultiplier)}i=t.style===I.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var b=t.sizeMultiplier,v=Y(.5/d.ptPerEm/b),x=null;if(r){var k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(u instanceof ea||k)&&(x=Y(-u.italic))}if(n&&r){h=Math.max(h,i,n.depth+.25*d.xHeight),p=Math.max(p,d.sub2);var w=4*d.defaultRuleThickness;if(h-n.depth-(r.height-p)<w){p=w-(h-n.depth)+r.height;var C=.8*d.xHeight-(h-n.depth);C>0&&(h+=C,p-=C)}a=e8({positionType:"individualShift",children:[{type:"elem",elem:r,shift:p,marginRight:v,marginLeft:x},{type:"elem",elem:n,shift:-h,marginRight:v}]},t)}else if(r)a=e8({positionType:"shift",positionData:p=Math.max(p,d.sub1,r.height-.8*d.xHeight),children:[{type:"elem",elem:r,marginLeft:x,marginRight:v}]},t);else if(n)a=e8({positionType:"shift",positionData:-(h=Math.max(h,i,n.depth+.25*d.xHeight)),children:[{type:"elem",elem:n,marginRight:v}]},t);else throw Error("supsub must have either sup or sub.");return eX([tC(u,"right")||"mord"],[u,eX(["msupsub"],[a])],t)},mathmlBuilder(e,t){var n,r,i=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(i=!0,n=e.base.isOver),e.base&&("op"===e.base.type||"operatorname"===e.base.type)&&(e.base.parentIsSupSub=!0);var a=[tB(e.base,t)];if(e.sub&&a.push(tB(e.sub,t)),e.sup&&a.push(tB(e.sup,t)),i)r=n?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;r=o&&"op"===o.type&&o.limits&&t.style===I.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===I.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;r=s&&"op"===s.type&&s.limits&&(t.style===I.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===I.DISPLAY)?"munder":"msub"}else{var l=e.base;r=l&&"op"===l.type&&l.limits&&(t.style===I.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===I.DISPLAY)?"mover":"msup"}return new tN(r,a)}}),th({type:"atom",htmlBuilder:(e,t)=>e3(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new tN("mo",[tP(e.text,e.mode)]);if("bin"===e.family){var r=tR(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):("open"===e.family||"close"===e.family)&&n.setAttribute("stretchy","false");return n}});var ri={mi:"italic",mn:"normal",mtext:"normal"};th({type:"mathord",htmlBuilder:(e,t)=>e9(e,t,"mathord"),mathmlBuilder(e,t){var n=new tN("mi",[tP(e.text,e.mode,t)]),r=tR(e,t)||"italic";return r!==ri[n.type]&&n.setAttribute("mathvariant",r),n}}),th({type:"textord",htmlBuilder:(e,t)=>e9(e,t,"textord"),mathmlBuilder(e,t){var n,r=tP(e.text,e.mode,t),i=tR(e,t)||"normal";return i!==ri[(n="text"===e.mode?new tN("mtext",[r]):/[0-9]/.test(e.text)?new tN("mn",[r]):"\\prime"===e.text?new tN("mo",[r]):new tN("mi",[r])).type]&&n.setAttribute("mathvariant",i),n}});var ra={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ro={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};th({type:"spacing",htmlBuilder(e,t){if(ro.hasOwnProperty(e.text)){var n=ro[e.text].className||"";if("text"!==e.mode)return eX(["mspace",n],[e3(e.text,e.mode,t)],t);var i=e9(e,t,"textord");return i.classes.push(n),i}if(ra.hasOwnProperty(e.text))return eX(["mspace",ra[e.text]],[],t);throw new r('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){var n;if(ro.hasOwnProperty(e.text))n=new tN("mtext",[new tA("Â ")]);else if(ra.hasOwnProperty(e.text))return new tN("mspace");else throw new r('Unknown type of space "'+e.text+'"');return n}});var rs=()=>{var e=new tN("mtd",[]);return e.setAttribute("width","50%"),e};th({type:"tag",mathmlBuilder(e,t){var n=new tN("mtable",[new tN("mtr",[rs(),new tN("mtd",[tO(e.body,t)]),rs(),new tN("mtd",[tO(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var rl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},rc={"\\textbf":"textbf","\\textmd":"textmd"},ru={"\\textit":"textit","\\textup":"textup"},rd=(e,t)=>{var n=e.font;return n?rl[n]?t.withTextFontFamily(rl[n]):rc[n]?t.withTextFontWeight(rc[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(ru[n]):t};td({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:tm(i),font:r}},htmlBuilder(e,t){var n=rd(e,t);return eX(["mord","text"],tv(e.body,n,!0),n)},mathmlBuilder(e,t){var n=rd(e,t);return tO(e.body,n)}}),td({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=tE(e.body,t),r=e5("underline-line",t),i=t.fontMetrics().defaultRuleThickness;return eX(["mord","underline"],[e8({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t)],t)},mathmlBuilder(e,t){var n=new tN("mo",[new tA("â¾")]);n.setAttribute("stretchy","true");var r=new tN("munder",[tB(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}
173),td({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=tE(e.body,t),r=t.fontMetrics().axisHeight;return e8({positionType:"shift",positionData:.5*(n.height-r-(n.depth+r)),children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new tN("mpadded",[tB(e.body,t)],["vcenter"])}),td({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new r("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=rh(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];"~"===o&&(o="\\textasciitilde"),r.push(eK(o,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return eX(["mord","text"].concat(i.sizingClasses(t)),tn(r),i)},mathmlBuilder(e,t){var n=new tN("mtext",[new tA(rh(e))]);return n.setAttribute("mathvariant","monospace"),n}});var rh=e=>e.body.replace(/ /g,e.star?"â£":" "),rp="[ \r\n ]",rm="[Ì-ͯ]",rf=RegExp(rm+"+$"),rg="("+rp+"+)|\\\\(\n|[ \r ]+\n?)[ \r ]*|([!-\\[\\]-â§âª-í¿ï¤-ï¿¿]"+rm+"*|[\uD800-\uDBFF][\uDC00-\uDFFF]"+rm+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)"+rp+"*|\\\\[^\uD800-\uDFFF])";class ry{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=RegExp(rg,"g"),this.catcodes={"%":14,"~":13}}
173setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,i=this.tokenRegex.lastIndex;if(i===e.length)return new n("EOF",new t(this,i,i));var a=this.tokenRegex.exec(e);if(null===a||a.index!==i)throw new r("Unexpected character: '"+e[i]+"'",new n(e[i],new t(this,i,i+1)));var o=a[6]||a[3]||(a[2]?"\\ ":" ");if(14===this.catcodes[o]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return -1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new n(o,new t(this,i,this.tokenRegex.lastIndex))}}class rb{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new r("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}nj["\\noexpand"]=function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}},nj["\\expandafter"]=function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}},nj["\\@firstoftwo"]=function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}},nj["\\@secondoftwo"]=function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}},nj["\\@ifnextchar"]=function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}},nj["\\@ifstar"]="\\@ifnextchar *{\\@firstoftwo{#1}}",nj["\\TextOrMath"]=function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}};var rv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};nj["\\char"]=function(e){var t,n,i=e.popToken(),a="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])a=i.text.charCodeAt(1);else if("EOF"===i.text)throw new r("\\char` missing argument");else a=i.text.charCodeAt(0);else t=10;if(t){if(null==(a=rv[i.text])||a>=t)throw new r("Invalid base-"+t+" digit "+i.text);for(;null!=(n=rv[e.future().text])&&n<t;)a*=t,a+=n,e.popToken()}return"\\@char{"+a+"}"};var rx=(e,t,n,i)=>{var a=e.consumeArg().tokens;if(1!==a.length)throw new r("\\newcommand's first argument must be a macro name");var o=a[0].text,s=e.isDefined(o);if(s&&!t)throw new r("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!n)throw new r("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(a=e.consumeArg().tokens).length&&"["===a[0].text){for(var c="",u=e.expandNextToken();"]"!==u.text&&"EOF"!==u.text;)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new r("Invalid number of arguments: "+c);l=parseInt(c),a=e.consumeArg().tokens}return s&&i||e.macros.set(o,{tokens:a,numArgs:l}),""};nj["\\newcommand"]=e=>rx(e,!1,!0,!1),nj["\\renewcommand"]=e=>rx(e,!0,!1,!1),nj["\\providecommand"]=e=>rx(e,!0,!0,!0),nj["\\message"]=e=>(console.log(e.consumeArgs(1)[0].reverse().map(e=>e.text).join("")),""),nj["\\errmessage"]=e=>(console.error(e.consumeArgs(1)[0].reverse().map(e=>e.text).join("")),""),nj["\\show"]=e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),tl[n],eh.math[n],eh.text[n]),""},nj["\\bgroup"]="{",nj["\\egroup"]="}",nj["~"]="\\nobreakspace",nj["\\lq"]="`",nj["\\rq"]="'",nj["\\aa"]="\\r a",nj["\\AA"]="\\r A",nj["\\textcopyright"]="\\html@mathml{\\textcircled{c}}{\\char`©}",nj["\\copyright"]="\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}",nj["\\textregistered"]="\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}",nj["â¬"]="\\mathscr{B}",nj["â°"]="\\mathscr{E}",nj["â±"]="\\mathscr{F}",nj["â"]="\\mathscr{H}",nj["â"]="\\mathscr{I}",nj["â"]="\\mathscr{L}",nj["â³"]="\\mathscr{M}",nj["â"]="\\mathscr{R}",nj["â"]="\\mathfrak{C}",nj["â"]="\\mathfrak{H}",nj["â¨"]="\\mathfrak{Z}",nj["\\Bbbk"]="\\Bbb{k}",nj["·"]="\\cdotp",nj["\\llap"]="\\mathllap{\\textrm{#1}}",nj["\\rlap"]="\\mathrlap{\\textrm{#1}}",nj["\\clap"]="\\mathclap{\\textrm{#1}}",nj["\\mathstrut"]="\\vphantom{(}",nj["\\underbar"]="\\underline{\\text{#1}}",nj["\\not"]='\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}',nj["\\neq"]="\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`â }}",nj["\\ne"]="\\neq",nj["â "]="\\neq",nj["\\notin"]="\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`â}}",nj["â"]="\\notin",nj["â"]="\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`â}}",nj["â"]="\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`â}}",nj["â"]="\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`â}}",nj["â"]="\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`â}}",nj["â"]="\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`â}}",nj["â"]="\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`â}}",nj["â"]="\\html@mathml{\\stackrel{\\tiny?}{=}}
173{\\mathrel{\\char`â}}",nj["â"]="\\perp",nj["â¼"]="\\mathclose{!\\mkern-0.8mu!}",nj["â"]="\\notni",nj["â"]="\\ulcorner",nj["â"]="\\urcorner",nj["â"]="\\llcorner",nj["â"]="\\lrcorner",nj["©"]="\\copyright",nj["®"]="\\textregistered",nj["ï¸"]="\\textregistered",nj["\\ulcorner"]='\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}',nj["\\urcorner"]='\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}',nj["\\llcorner"]='\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}',nj["\\lrcorner"]='\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}',nj["\\vdots"]="{\\varvdots\\rule{0pt}{15pt}}",nj["â®"]="\\vdots",nj["\\varGamma"]="\\mathit{\\Gamma}",nj["\\varDelta"]="\\mathit{\\Delta}",nj["\\varTheta"]="\\mathit{\\Theta}",nj["\\varLambda"]="\\mathit{\\Lambda}",nj["\\varXi"]="\\mathit{\\Xi}",nj["\\varPi"]="\\mathit{\\Pi}",nj["\\varSigma"]="\\mathit{\\Sigma}",nj["\\varUpsilon"]="\\mathit{\\Upsilon}",nj["\\varPhi"]="\\mathit{\\Phi}",nj["\\varPsi"]="\\mathit{\\Psi}",nj["\\varOmega"]="\\mathit{\\Omega}",nj["\\substack"]="\\begin{subarray}{c}#1\\end{subarray}",nj["\\colon"]="\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax",nj["\\boxed"]="\\fbox{$\\displaystyle{#1}$}",nj["\\iff"]="\\DOTSB\\;\\Longleftrightarrow\\;",nj["\\implies"]="\\DOTSB\\;\\Longrightarrow\\;",nj["\\impliedby"]="\\DOTSB\\;\\Longleftarrow\\;",nj["\\dddot"]="{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}",nj["\\ddddot"]="{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}";var rk={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};nj["\\dots"]=function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in rk?t=rk[n]:"\\not"===n.slice(0,4)?t="\\dotsb":n in eh.math&&d(["bin","rel"],eh.math[n].group)&&(t="\\dotsb"),t};var rw={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};nj["\\dotso"]=function(e){return e.future().text in rw?"\\ldots\\,":"\\ldots"},nj["\\dotsc"]=function(e){var t=e.future().text;return t in rw&&","!==t?"\\ldots\\,":"\\ldots"},nj["\\cdots"]=function(e){return e.future().text in rw?"\\@cdots\\,":"\\@cdots"},nj["\\dotsb"]="\\cdots",nj["\\dotsm"]="\\cdots",nj["\\dotsi"]="\\!\\cdots",nj["\\dotsx"]="\\ldots\\,",nj["\\DOTSI"]="\\relax",nj["\\DOTSB"]="\\relax",nj["\\DOTSX"]="\\relax",nj["\\tmspace"]="\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax",nj["\\,"]="\\tmspace+{3mu}{.1667em}",nj["\\thinspace"]="\\,",nj["\\>"]="\\mskip{4mu}",nj["\\:"]="\\tmspace+{4mu}{.2222em}",nj["\\medspace"]="\\:",nj["\\;"]="\\tmspace+{5mu}{.2777em}",nj["\\thickspace"]="\\;",nj["\\!"]="\\tmspace-{3mu}{.1667em}",nj["\\negthinspace"]="\\!",nj["\\negmedspace"]="\\tmspace-{4mu}{.2222em}",nj["\\negthickspace"]="\\tmspace-{5mu}{.277em}",nj["\\enspace"]="\\kern.5em ",nj["\\enskip"]="\\hskip.5em\\relax",nj["\\quad"]="\\hskip1em\\relax",nj["\\qquad"]="\\hskip2em\\relax",nj["\\tag"]="\\@ifstar\\tag@literal\\tag@paren",nj["\\tag@paren"]="\\tag@literal{({#1})}",nj["\\tag@literal"]=e=>{if(e.macros.get("\\df@tag"))throw new r("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"},nj["\\bmod"]="\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}",nj["\\pod"]="\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)",nj["\\pmod"]="\\pod{{\\rm mod}\\mkern6mu#1}",nj["\\mod"]="\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1",nj["\\newline"]="\\\\\\relax",nj["\\TeX"]="\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}";var rC=Y(j["Main-Regular"][84][1]-.7*j["Main-Regular"][65][1]);nj["\\LaTeX"]="\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+rC+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}",nj["\\KaTeX"]="\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+rC+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}",nj["\\hspace"]="\\@ifstar\\@hspacer\\@hspace",nj["\\@hspace"]="\\hskip #1\\relax",nj["\\@hspacer"]="\\rule{0pt}{0pt}\\hskip #1\\relax",nj["\\ordinarycolon"]=":",nj["\\vcentcolon"]="\\mathrel{\\mathop\\ordinarycolon}",nj["\\dblcolon"]='\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}',nj["\\coloneqq"]='\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}',nj["\\Coloneqq"]='\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}',nj["\\coloneq"]='\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}',nj["\\Coloneq"]='\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}',nj["\\eqqcolon"]='\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}',nj["\\Eqqcolon"]='\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}',nj["\\eqcolon"]='\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}',nj["\\Eqcolon"]='\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}',nj["\\colonapprox"]='\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}',nj["\\Colonapprox"]='\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}',nj["\\colonsim"]='\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}',nj["\\Colonsim"]='\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}',nj["â·"]="\\dblcolon",nj["â¹"]="\\eqcolon",nj["â"]="\\coloneqq",nj["â"]="\\eqqcolon",nj["â©´"]="\\Coloneqq",nj["\\ratio"]="\\vcentcolon",nj["\\coloncolon"]="\\dblcolon",nj["\\colonequals"]="\\coloneqq",nj["\\coloncolonequals"]="\\Coloneqq",nj["\\equalscolon"]="\\eqqcolon",nj["\\equalscoloncolon"]="\\Eqqcolon",nj["\\colonminus"]="\\coloneq",nj["\\coloncolonminus"]="\\Coloneq",nj["\\minuscolon"]="\\eqcolon",nj["\\minuscoloncolon"]="\\Eqcolon",nj["\\coloncolonapprox"]="\\Colonapprox",nj["\\coloncolonsim"]="\\Colonsim",nj["\\simcolon"]="\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",nj["\\simcoloncolon"]="\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",nj["\\approxcolon"]="\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",nj["\\approxcoloncolon"]="\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",nj["\\notni"]="\\html@mathml{\\not\\ni}{\\mathrel{\\char`â}}",nj["\\limsup"]="\\DOTSB\\operatorname*{lim\\,sup}",nj["\\liminf"]="\\DOTSB\\operatorname*{lim\\,inf}",nj["\\injlim"]="\\DOTSB\\operatorname*{inj\\,lim}",nj["\\projlim"]="\\DOTSB\\operatorname*{proj\\,lim}",nj["\\varlimsup"]="\\DOTSB\\operatorname*{\\overline{lim}}",nj["\\varliminf"]="\\DOTSB\\operatorname*{\\underline{lim}}",nj["\\varinjlim"]="\\DOTSB\\operatorname*{\\underrightarrow{lim}}",nj["\\varprojlim"]="\\DOTSB\\operatorname*{\\underleftarrow{lim}}",nj["\\gvertneqq"]="\\html@mathml{\\@gvertneqq}{â©}",nj["\\lvertneqq"]="\\html@mathml{\\@lvertneqq}{â¨}",nj["\\ngeqq"]="\\html@mathml{\\@ngeqq}{â±}",nj["\\ngeqslant"]="\\html@mathml{\\@ngeqslant}{â±}",nj["\\nleqq"]="\\html@mathml{\\@nleqq}{â°}",nj["\\nleqslant"]="\\html@mathml{\\@nleqslant}{â°}",nj["\\nshortmid"]="\\html@mathml{\\@nshortmid}{â¤}",nj["\\nshortparallel"]="\\html@mathml{\\@nshortparallel}{â¦}",nj["\\nsubseteqq"]="\\html@mathml{\\@nsubseteqq}{â}",nj["\\nsupseteqq"]="\\html@mathml{\\@nsupseteqq}{â}",nj["\\varsubsetneq"]="\\html@mathml{\\@varsubsetneq}{â}",nj["\\varsubsetneqq"]="\\html@mathml{\\@varsubsetneqq}{â«}",nj["\\varsupsetneq"]="\\html@mathml{\\@varsupsetneq}{â}",nj["\\varsupsetneqq"]="\\html@mathml{\\@varsupsetneqq}{â«}",nj["\\imath"]="\\html@mathml{\\@imath}{ı}",nj["\\jmath"]="\\html@mathml{\\@jmath}{È·}",nj["\\llbracket"]="\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}
173{\\mathopen{\\char`â¦}}",nj["\\rrbracket"]="\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`â§}}",nj["â¦"]="\\llbracket",nj["â§"]="\\rrbracket",nj["\\lBrace"]="\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`â¦}}",nj["\\rBrace"]="\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`â¦}}",nj["â¦"]="\\lBrace",nj["â¦"]="\\rBrace",nj["\\minuso"]="\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}",nj["⦵"]="\\minuso",nj["\\darr"]="\\downarrow",nj["\\dArr"]="\\Downarrow",nj["\\Darr"]="\\Downarrow",nj["\\lang"]="\\langle",nj["\\rang"]="\\rangle",nj["\\uarr"]="\\uparrow",nj["\\uArr"]="\\Uparrow",nj["\\Uarr"]="\\Uparrow",nj["\\N"]="\\mathbb{N}",nj["\\R"]="\\mathbb{R}",nj["\\Z"]="\\mathbb{Z}",nj["\\alef"]="\\aleph",nj["\\alefsym"]="\\aleph",nj["\\Alpha"]="\\mathrm{A}",nj["\\Beta"]="\\mathrm{B}",nj["\\bull"]="\\bullet",nj["\\Chi"]="\\mathrm{X}",nj["\\clubs"]="\\clubsuit",nj["\\cnums"]="\\mathbb{C}",nj["\\Complex"]="\\mathbb{C}",nj["\\Dagger"]="\\ddagger",nj["\\diamonds"]="\\diamondsuit",nj["\\empty"]="\\emptyset",nj["\\Epsilon"]="\\mathrm{E}",nj["\\Eta"]="\\mathrm{H}",nj["\\exist"]="\\exists",nj["\\harr"]="\\leftrightarrow",nj["\\hArr"]="\\Leftrightarrow",nj["\\Harr"]="\\Leftrightarrow",nj["\\hearts"]="\\heartsuit",nj["\\image"]="\\Im",nj["\\infin"]="\\infty",nj["\\Iota"]="\\mathrm{I}",nj["\\isin"]="\\in",nj["\\Kappa"]="\\mathrm{K}",nj["\\larr"]="\\leftarrow",nj["\\lArr"]="\\Leftarrow",nj["\\Larr"]="\\Leftarrow",nj["\\lrarr"]="\\leftrightarrow",nj["\\lrArr"]="\\Leftrightarrow",nj["\\Lrarr"]="\\Leftrightarrow",nj["\\Mu"]="\\mathrm{M}",nj["\\natnums"]="\\mathbb{N}",nj["\\Nu"]="\\mathrm{N}",nj["\\Omicron"]="\\mathrm{O}",nj["\\plusmn"]="\\pm",nj["\\rarr"]="\\rightarrow",nj["\\rArr"]="\\Rightarrow",nj["\\Rarr"]="\\Rightarrow",nj["\\real"]="\\Re",nj["\\reals"]="\\mathbb{R}",nj["\\Reals"]="\\mathbb{R}",nj["\\Rho"]="\\mathrm{P}",nj["\\sdot"]="\\cdot",nj["\\sect"]="\\S",nj["\\spades"]="\\spadesuit",nj["\\sub"]="\\subset",nj["\\sube"]="\\subseteq",nj["\\supe"]="\\supseteq",nj["\\Tau"]="\\mathrm{T}",nj["\\thetasym"]="\\vartheta",nj["\\weierp"]="\\wp",nj["\\Zeta"]="\\mathrm{Z}",nj["\\argmin"]="\\DOTSB\\operatorname*{arg\\,min}",nj["\\argmax"]="\\DOTSB\\operatorname*{arg\\,max}",nj["\\plim"]="\\DOTSB\\mathop{\\operatorname{plim}}\\limits",nj["\\bra"]="\\mathinner{\\langle{#1}|}",nj["\\ket"]="\\mathinner{|{#1}\\rangle}",nj["\\braket"]="\\mathinner{\\langle{#1}\\rangle}",nj["\\Bra"]="\\left\\langle#1\\right|",nj["\\Ket"]="\\left|#1\\right\\rangle";var rS=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",o),i.length&&n.macros.set("\\|",s));var a=t;return!t&&i.length&&"|"===n.future().text&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...a,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};i=rS(!1),nj["\\bra@ket"]=i,a=rS(!0),nj["\\bra@set"]=a,nj["\\Braket"]="\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}",nj["\\Set"]="\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}",nj["\\set"]="\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}",nj["\\angln"]="{\\angl n}",nj["\\blue"]="\\textcolor{##6495ed}{#1}",nj["\\orange"]="\\textcolor{##ffa500}{#1}",nj["\\pink"]="\\textcolor{##ff00af}{#1}",nj["\\red"]="\\textcolor{##df0030}{#1}",nj["\\green"]="\\textcolor{##28ae7b}{#1}",nj["\\gray"]="\\textcolor{gray}{#1}",nj["\\purple"]="\\textcolor{##9d38bd}{#1}",nj["\\blueA"]="\\textcolor{##ccfaff}{#1}",nj["\\blueB"]="\\textcolor{##80f6ff}{#1}",nj["\\blueC"]="\\textcolor{##63d9ea}{#1}",nj["\\blueD"]="\\textcolor{##11accd}{#1}",nj["\\blueE"]="\\textcolor{##0c7f99}{#1}",nj["\\tealA"]="\\textcolor{##94fff5}{#1}",nj["\\tealB"]="\\textcolor{##26edd5}{#1}",nj["\\tealC"]="\\textcolor{##01d1c1}{#1}",nj["\\tealD"]="\\textcolor{##01a995}{#1}",nj["\\tealE"]="\\textcolor{##208170}{#1}",nj["\\greenA"]="\\textcolor{##b6ffb0}{#1}",nj["\\greenB"]="\\textcolor{##8af281}{#1}",nj["\\greenC"]="\\textcolor{##74cf70}{#1}",nj["\\greenD"]="\\textcolor{##1fab54}{#1}",nj["\\greenE"]="\\textcolor{##0d923f}{#1}",nj["\\goldA"]="\\textcolor{##ffd0a9}{#1}",nj["\\goldB"]="\\textcolor{##ffbb71}{#1}",nj["\\goldC"]="\\textcolor{##ff9c39}{#1}",nj["\\goldD"]="\\textcolor{##e07d10}{#1}",nj["\\goldE"]="\\textcolor{##a75a05}{#1}",nj["\\redA"]="\\textcolor{##fca9a9}{#1}",nj["\\redB"]="\\textcolor{##ff8482}{#1}",nj["\\redC"]="\\textcolor{##f9685d}{#1}",nj["\\redD"]="\\textcolor{##e84d39}{#1}
173",nj["\\redE"]="\\textcolor{##bc2612}{#1}",nj["\\maroonA"]="\\textcolor{##ffbde0}{#1}",nj["\\maroonB"]="\\textcolor{##ff92c6}{#1}",nj["\\maroonC"]="\\textcolor{##ed5fa6}{#1}",nj["\\maroonD"]="\\textcolor{##ca337c}{#1}",nj["\\maroonE"]="\\textcolor{##9e034e}{#1}",nj["\\purpleA"]="\\textcolor{##ddd7ff}{#1}",nj["\\purpleB"]="\\textcolor{##c6b9fc}{#1}",nj["\\purpleC"]="\\textcolor{##aa87ff}{#1}",nj["\\purpleD"]="\\textcolor{##7854ab}{#1}",nj["\\purpleE"]="\\textcolor{##543b78}{#1}",nj["\\mintA"]="\\textcolor{##f5f9e8}{#1}",nj["\\mintB"]="\\textcolor{##edf2df}{#1}",nj["\\mintC"]="\\textcolor{##e0e5cc}{#1}",nj["\\grayA"]="\\textcolor{##f6f7f7}{#1}",nj["\\grayB"]="\\textcolor{##f0f1f2}{#1}",nj["\\grayC"]="\\textcolor{##e3e5e6}{#1}",nj["\\grayD"]="\\textcolor{##d6d8da}{#1}",nj["\\grayE"]="\\textcolor{##babec2}{#1}",nj["\\grayF"]="\\textcolor{##888d93}{#1}",nj["\\grayG"]="\\textcolor{##626569}{#1}",nj["\\grayH"]="\\textcolor{##3b3e40}{#1}",nj["\\grayI"]="\\textcolor{##21242c}{#1}",nj["\\kaBlue"]="\\textcolor{##314453}{#1}",nj["\\kaGreen"]="\\textcolor{##71B307}{#1}";var rE={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class rT{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new rb(nj,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new ry(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,i;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:t,end:r}=this.consumeArg());return this.pushToken(new n("EOF",r.loc)),this.pushTokens(i),t.range(r,"")}consumeSpaces(){for(;;)if(" "===this.future().text)this.stack.pop();else break}consumeArg(e){var t,n=[],i=e&&e.length>0;i||this.consumeSpaces();var a=this.future(),o=0,s=0;do{if(t=this.popToken(),n.push(t),"{"===t.text)++o;else if("}"===t.text){if(-1==--o)throw new r("Extra }",t)}else if("EOF"===t.text)throw new r("Unexpected end of input in a macro argument, expected '"+(e&&i?e[s]:"}")+"'",t);
173if(e&&i)if((0===o||1===o&&"{"===e[s])&&t.text===e[s]){if(++s===e.length){n.splice(-s,s);break}}else s=0}while(0!==o||i)return"{"===a.text&&"}"===n[n.length-1].text&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:a,end:t}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new r("The length of delimiters doesn't match the number of args!");for(var n=t[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new r("Use of the macro doesn't match its definition",a)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(t&&t[s+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new r("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,i=t.noexpand?null:this._getExpansion(n);if(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===n[0]&&!this.isDefined(n))throw new r("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var l=a[s];if("#"===l.text){if(0===s)throw new r("Incomplete placeholder at end of macro body",l);if("#"===(l=a[--s]).text)a.splice(s+1,1);else if(/^[1-9]$/.test(l.text))a.splice(s,2,...o[l.text-1]);else throw new r("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw Error()}expandMacro(e){return this.macros.has(e)?this.expandTokens([new n(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var i=0;if(-1!==r.indexOf("#"))for(var a=r.replace(/##/g,"");-1!==a.indexOf("#"+(i+1));)++i;for(var o=new ry(r,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||tl.hasOwnProperty(e)||eh.math.hasOwnProperty(e)||eh.text.hasOwnProperty(e)||rE.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:tl.hasOwnProperty(e)&&!tl[e].primitive}}var rI=/^[âââââââââââ
âââââââᵢⱼââââââáµ£ââᵤᵥâᵦᵧᵨᵩᵪ]/,rD=Object.freeze({"â":"+","â":"-","â":"=","â":"(","â":")","â":"0","â":"1","â":"2","â":"3","â":"4","â
":"5","â":"6","â":"7","â":"8","â":"9",â:"a",â:"e",â:"h",áµ¢:"i",â±¼:"j",â:"k",â:"l",â:"m",â:"n",â:"o",â:"p",áµ£:"r",â:"s",â:"t",ᵤ:"u",áµ¥:"v",â:"x",ᵦ:"β",áµ§:"γ",ᵨ:"Ï",ᵩ:"Ï",ᵪ:"Ï","âº":"+","â»":"-","â¼":"=","â½":"(","â¾":")","â°":"0","¹":"1","²":"2","³":"3","â´":"4","âµ":"5","â¶":"6","â·":"7","â¸":"8","â¹":"9",á´¬:"A",á´®:"B",á´°:"D",á´±:"E",á´³:"G",á´´:"H",á´µ:"I",á´¶:"J",á´·:"K",á´¸:"L",á´¹:"M",á´º:"N",á´¼:"O",á´¾:"P",á´¿:"R",áµ:"T",áµ:"U",â±½:"V",áµ:"W",áµ:"a",áµ:"b",á¶:"c",áµ:"d",áµ:"e",á¶ :"f",áµ:"g",ʰ:"h",â±:"i",ʲ:"j",áµ:"k",Ë¡:"l",áµ:"m",â¿:"n",áµ:"o",áµ:"p",ʳ:"r",Ë¢:"s",áµ:"t",áµ:"u",áµ:"v",Ê·:"w",Ë£:"x",ʸ:"y",á¶»:"z",áµ:"β",áµ:"γ",áµ:"δ",áµ :"Ï",ᵡ:"Ï",á¶¿:"θ"}),rN={"Ì":{text:"\\'",math:"\\acute"},"Ì":{text:"\\`",math:"\\grave"},"Ì":{text:'\\"',math:"\\ddot"},"Ì":{text:"\\~",math:"\\tilde"},"Ì":{text:"\\=",math:"\\bar"},"Ì":{text:"\\u",math:"\\breve"},"Ì":{text:"\\v",math:"\\check"},"Ì":{text:"\\^",math:"\\hat"},"Ì":{text:"\\.",math:"\\dot"},"Ì":{text:"\\r",math:"\\mathring"},"Ì":{text:"\\H"},"̧":{text:"\\c"}},rA={á:"aÌ",à :"aÌ",ä:"aÌ",Ç:"aÌÌ",ã:"aÌ",Ä:"aÌ",Ä:"aÌ",ắ:"aÌÌ",ằ:"aÌÌ",ẵ:"aÌÌ",Ç:"aÌ",â:"aÌ",ấ:"aÌÌ",ầ:"aÌÌ",ẫ:"aÌÌ",ȧ:"aÌ",Ç¡:"aÌÌ",Ã¥:"aÌ",Ç»:"aÌÌ",á¸:"bÌ",Ä:"cÌ",á¸:"çÌ",Ä:"cÌ",Ä:"cÌ",Ä:"cÌ",ç:"ç",Ä:"dÌ",á¸:"dÌ",á¸:"ḑ",é:"eÌ",è:"eÌ",ë:"eÌ",ẽ:"eÌ",Ä:"eÌ",á¸:"eÌÌ",á¸:"eÌÌ",Ä:"eÌ",á¸:"eÌ
173§Ì",Ä:"eÌ",ê:"eÌ",ế:"eÌÌ",á»:"eÌÌ",á»
:"eÌÌ",Ä:"eÌ",È©:"ȩ",á¸:"fÌ",ǵ:"gÌ",ḡ:"gÌ",Ä:"gÌ",ǧ:"gÌ",Ä:"gÌ",Ä¡:"gÌ",Ä£:"ģ",ḧ:"hÌ",È:"hÌ",Ä¥:"hÌ",ḣ:"hÌ",ḩ:"ḩ",Ã:"iÌ",ì:"iÌ",ï:"iÌ",ḯ:"iÌÌ",Ä©:"iÌ",Ä«:"iÌ",Ä:"iÌ",Ç:"iÌ",î:"iÌ",ǰ:"jÌ",ĵ:"jÌ",ḱ:"kÌ",Ç©:"kÌ",Ä·:"ķ",ĺ:"lÌ",ľ:"lÌ",ļ:"ļ",ḿ:"mÌ",á¹:"mÌ",Å:"nÌ",ǹ:"nÌ",ñ:"nÌ",Å:"nÌ",á¹
:"nÌ",Å:"ņ",ó:"oÌ",ò:"oÌ",ö:"oÌ",È«:"oÌÌ",õ:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",È:"oÌÌ",Å:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",Å:"oÌ",Ç:"oÌ",ô:"oÌ",á»:"oÌÌ",á»:"oÌÌ",á»:"oÌÌ",ȯ:"oÌ",ȱ:"oÌÌ",Å:"oÌ",á¹:"pÌ",á¹:"pÌ",Å:"rÌ",Å:"rÌ",á¹:"rÌ",Å:"ŗ",Å:"sÌ",á¹¥:"sÌÌ",Å¡:"sÌ",á¹§:"sÌÌ",Å:"sÌ",ṡ:"sÌ",Å:"ş",áº:"tÌ",Å¥:"tÌ",ṫ:"tÌ",Å£:"ţ",ú:"uÌ",ù:"uÌ",ü:"uÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Å©:"uÌ",á¹¹:"uÌÌ",Å«:"uÌ",á¹»:"uÌÌ",Å:"uÌ",Ç:"uÌ",û:"uÌ",ů:"uÌ",ű:"uÌ",á¹½:"vÌ",áº:"wÌ",áº:"wÌ",áº
:"wÌ",ŵ:"wÌ",áº:"wÌ",áº:"wÌ",áº:"xÌ",áº:"xÌ",ý:"yÌ",ỳ:"yÌ",ÿ:"yÌ",ỹ:"yÌ",ȳ:"yÌ",Å·:"yÌ",áº:"yÌ",áº:"yÌ",ź:"zÌ",ž:"zÌ",áº:"zÌ",ż:"zÌ",Ã:"AÌ",Ã:"AÌ",Ã:"AÌ",Ç:"AÌÌ",Ã:"AÌ",Ä:"AÌ",Ä:"AÌ",Ắ:"AÌÌ",Ằ:"AÌÌ",Ẵ:"AÌÌ",Ç:"AÌ",Ã:"AÌ",Ấ:"AÌÌ",Ầ:"AÌÌ",Ẫ:"AÌÌ",Ȧ:"AÌ",Ç :"AÌÌ",Ã
:"AÌ",Ǻ:"AÌÌ",á¸:"BÌ",Ä:"CÌ",á¸:"ÇÌ",Ä:"CÌ",Ä:"CÌ",Ä:"CÌ",Ã:"Ç",Ä:"DÌ",á¸:"DÌ",á¸:"Ḑ",Ã:"EÌ",Ã:"EÌ",Ã:"EÌ",Ẽ:"EÌ",Ä:"EÌ",á¸:"EÌÌ",á¸:"EÌÌ",Ä:"EÌ",á¸:"ȨÌ",Ä:"EÌ",Ã:"EÌ",Ế:"EÌÌ",á»:"EÌÌ",á»:"EÌÌ",Ä:"EÌ",Ȩ:"Ȩ",á¸:"FÌ",Ç´:"GÌ",Ḡ:"GÌ",Ä:"GÌ",Ǧ:"GÌ",Ä:"GÌ",Ä :"GÌ",Ä¢:"Ģ",Ḧ:"HÌ",È:"HÌ",Ĥ:"HÌ",Ḣ:"HÌ",Ḩ:"Ḩ",Ã:"IÌ",Ã:"IÌ",Ã:"IÌ",Ḯ:"IÌÌ",Ĩ:"IÌ",Ī:"IÌ",Ĭ:"IÌ",Ç:"IÌ",Ã:"IÌ",İ:"IÌ",Ä´:"JÌ",Ḱ:"KÌ",Ǩ:"KÌ",Ķ:"Ķ",Ĺ:"LÌ",Ľ:"LÌ",Ä»:"Ļ",Ḿ:"MÌ",á¹:"MÌ",Å:"NÌ",Ǹ:"NÌ",Ã:"NÌ",Å:"NÌ",á¹:"NÌ",Å
:"Ņ",Ã:"OÌ",Ã:"OÌ",Ã:"OÌ",Ȫ:"OÌÌ",Ã:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Ȭ:"OÌÌ",Å:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Å:"OÌ",Ç:"OÌ",Ã:"OÌ",á»:"OÌÌ",á»:"OÌÌ",á»:"OÌÌ",È®:"OÌ",Ȱ:"OÌÌ",Å:"OÌ",á¹:"PÌ",á¹:"PÌ",Å:"RÌ",Å:"RÌ",á¹:"RÌ",Å:"Ŗ",Å:"SÌ",Ṥ:"SÌÌ",Å :"SÌ",Ṧ:"SÌÌ",Å:"SÌ",á¹ :"SÌ",Å:"Ş",Ť:"TÌ",Ṫ:"TÌ",Å¢:"Ţ",Ã:"UÌ",Ã:"UÌ",Ã:"UÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ũ:"UÌ",Ṹ:"UÌÌ",Ū:"UÌ",Ṻ:"UÌÌ",Ŭ:"UÌ",Ç:"UÌ",Ã:"UÌ",Å®:"UÌ",Ű:"UÌ",á¹¼:"VÌ",áº:"WÌ",áº:"WÌ",áº:"WÌ",Å´:"WÌ",áº:"WÌ",áº:"XÌ",áº:"XÌ",Ã:"YÌ",Ỳ:"YÌ",Ÿ:"YÌ",Ỹ:"YÌ",Ȳ:"YÌ",Ŷ:"YÌ",áº:"YÌ",Ź:"ZÌ",Ž:"ZÌ",áº:"ZÌ",Å»:"ZÌ",ά:"αÌ",á½°:"αÌ",á¾±:"αÌ",á¾°:"αÌ",Î:"εÌ",á½²:"εÌ",ή:"ηÌ",á½´:"ηÌ",ί:"ιÌ",á½¶:"ιÌ",Ï:"ιÌ",Î:"ιÌÌ",á¿:"ιÌÌ",á¿:"ιÌ",á¿:"ιÌ",Ï:"οÌ",ὸ:"οÌ",Ï:"Ï
Ì",ὺ:"Ï
Ì",Ï:"Ï
Ì",ΰ:"Ï
ÌÌ",á¿¢:"Ï
ÌÌ",á¿¡:"Ï
Ì",á¿ :"Ï
Ì",Ï:"ÏÌ",á½¼:"ÏÌ",Î:"Î¥Ì",Ὺ:"Î¥Ì",Ϋ:"Î¥Ì",á¿©:"Î¥Ì",Ῠ:"Î¥Ì",Î:"ΩÌ",Ὼ:"ΩÌ"};class r_{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new rT(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new r("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new n("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==r_.endOfExpression.indexOf(r.text)||t&&r.text===t||e&&tl[r.text]&&tl[r.text].infix)break;var i=this.parseAtom(t);if(i){if("internal"===i.type)continue}else break;n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t=-1,n=0;n<e.length;n++)if("infix"===e[n].type){if(-1!==t)throw new r("only one infix operator per group",e[n].token);t=n,i=e[n].replaceWith}if(-1===t||!i)return e;var i,a,o,s=e.slice(0,t),l=e.slice(t+1);return a=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===i?this.callFunction(i,[a,e[t],o],[]):this.callFunction(i,[a,o],[])]}handleSupSubscript(e){var t,n=this.fetch(),i=n.text;this.consume(),this.consumeSpaces();do t=this.parseGroup(e);while((null==t?void 0:t.type)==="internal")if(!t)throw new r("Expected group after '"+i+"'",n);return t}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,i,a=this.parseGroup("atom",e);if((null==a?void 0:a.type)==="internal"||"text"===this.mode)return a;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(a&&"op"===a.type)a.limits="\\limits"===o.text,a.alwaysHandleSupSub=!0;else if(a&&"operatorname"===a.type)a.alwaysHandleSupSub&&(a.limits="\\limits"===o.text);else throw new r("Limit controls must follow a math operator",o);this.consume()}else if("^"===o.text){if(t)throw new r("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(i)throw new r("Double subscript",o);i=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new r("Double superscript",o);var s={type:"textord",mode:this.mode,text:"\\prime"},l=[s];for(this.consume();"'"===this.fetch().text;)l.push(s),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}else if(rD[o.text]){var c=rI.test(o.text),u=[];for(u.push(new n(rD[o.text])),this.consume();;){var d=this.fetch().text;if(!rD[d]||rI.test(d)!==c)break;u.unshift(new n(rD[d])),this.consume()}var h=this.subparse(u);c?i={type:"ordgroup",mode:"math",body:h}:t={type:"ordgroup",mode:"math",body:h}}else break}return t||i?{type:"supsub",mode:this.mode,base:a,sup:t,sub:i}:a}parseFunction(e,t){var n=this.fetch(),i=n.text,a=tl[i];if(!a)return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new r("Got function '"+i+"' with no arguments"+(t?" as "+t:""),n);if("text"!==this.mode||a.allowedInText){if("math"===this.mode&&!1===a.allowedInMath)throw new r("Can't use function '"+i+"' in math mode",n)}else throw new r("Can't use function '"+i+"' in text mode",n);var{args:o,optArgs:s}=this.parseArguments(i,a);return this.callFunction(i,o,s,n,e)}callFunction(e,t,n,i,a){var o=tl[e];if(o&&o.handler)return o.handler({funcName:e,parser:this,token:i,breakOnTokenText:a},t,n);throw new r("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<n;o++){var s=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===o&&null==a[0])&&(s="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)a.push(c);else if(null!=c)i.push(c);else throw new r("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var i=this.parseArgumentGroup(n,"text");return null!=i?{type:"styling",mode:i.mode,body:[i],style:"text"}:null;case"raw":var a=this.parseStringGroup("raw",n);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(n)throw new r("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new r("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new r("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var n,r=this.gullet.scanArgument(t);if(null==r)return null;for(var i="";"EOF"!==(n=this.fetch()).text;)i+=n.text,this.consume();return this.consume(),r.text=i,r}parseRegexGroup(e,t){for(var n,i=this.fetch(),a=i,o="";"EOF"!==(n=this.fetch()).text&&e.test(o+n.text);)o+=(a=n).text,this.consume();if(""===o)throw new r("Invalid "+t+": '"+i.text+"'",i);return i.range(a,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new r("Invalid color: '"+t.text+"'",t);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!i)throw new r("Invalid size: '"+t.text+"'",t);var a={number:+(i[1]+i[2]),unit:i[3]};if(!W(a))throw new r("Invalid unit: '"+a.unit+"'",t);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);
173if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var a={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,n){var i,a=this.fetch(),o=a.text;if("{"===o||"\\begingroup"===o){this.consume();var s="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,s),c=this.fetch();this.expect(s),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:t.range(a,c),body:l,semisimple:"\\begingroup"===o||void 0}}else if(null==(i=this.parseFunction(n,e)||this.parseSymbol())&&"\\"===o[0]&&!rE.hasOwnProperty(o)){if(this.settings.throwOnError)throw new r("Undefined control sequence: "+o,a);i=this.formatUnsupportedCmd(o),this.consume()}return i}formLigatures(e){for(var n=e.length-1,r=0;r<n;++r){var i=e[r],a=i.text;"-"===a&&"-"===e[r+1].text&&(r+1<n&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:t.range(i,e[r+2]),text:"---"}),n-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:t.range(i,e[r+1]),text:"--"}),n-=1)),("'"===a||"`"===a)&&e[r+1].text===a&&(e.splice(r,2,{type:"textord",mode:"text",loc:t.range(i,e[r+1]),text:a+a}),n-=1)}}parseSymbol(){var e=this.fetch(),n=e.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var i=n.slice(5),a="*"===i.charAt(0);if(a&&(i=i.slice(1)),i.length<2||i.charAt(0)!==i.slice(-1))throw new r("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:a}}rA.hasOwnProperty(n[0])&&!eh[this.mode][n[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',e),n=rA[n[0]]+n.slice(1));var o=rf.exec(n);if(o&&("i"===(n=n.substring(0,o.index))?n="ı":"j"===n&&(n="ȷ")),eh[this.mode][n]){this.settings.strict&&"math"===this.mode&&eU.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var s,l=eh[this.mode][n].group,c=t.range(e);s=eu.hasOwnProperty(l)?{type:"atom",mode:this.mode,family:l,loc:c,text:n}:{type:l,mode:this.mode,loc:c,text:n}}else{if(!(n.charCodeAt(0)>=128))return null;this.settings.strict&&(A(n.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'" ('+n.charCodeAt(0)+")",e)),s={type:"textord",mode:"text",loc:t.range(e),text:n}}if(this.consume(),o)for(var u=0;u<o[0].length;u++){var d=o[0][u];if(!rN[d])throw new r("Unknown accent ' "+d+"'",e);var h=rN[d][this.mode]||rN[d].text;if(!h)throw new r("Accent "+d+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:t.range(e),label:h,isStretchy:!1,isShifty:!0,base:s}}return s}}r_.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var rP=function(e,t){if(!("string"==typeof e||e instanceof String))throw TypeError("KaTeX can only parse string typed expression");var i=new r_(e,t);delete i.gullet.macros.current["\\df@tag"];var a=i.parse();if(delete i.gullet.macros.current["\\current@color"],delete i.gullet.macros.current["\\color"],i.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new r("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:i.subparse([new n("\\df@tag")])}]}return a},rM=function(e,t,n){t.textContent="";var r=rL(e,n).toNode();t.appendChild(r)};"u">typeof document&&"CSS1Compat"!==document.compatMode&&("u">typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),rM=function(){throw new r("KaTeX doesn't work in quirks mode.")});var rR=function(e,t,n){if(n.throwOnError||!(e instanceof r))throw e;var i=eX(["katex-error"],[new ea(t)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},rL=function(e,t){var n=new b(t);try{var r=rP(e,n);return tz(r,e,n)}catch(t){return rR(t,e,n)}},rj={version:"0.16.22",render:rM,renderToString:function(e,t){return rL(e,t).toMarkup()},ParseError:r,SETTINGS_SCHEMA:y,__parse:function(e,t){return rP(e,new b(t))},__renderToDomTree:rL,__renderToHTMLTree:function(e,t){var n,r,i=new b(t);try{return n=rP(e,i),r=i,tU(eX(["katex"],[tI(n,tH(r))]),r)}catch(t){return rR(t,e,i)}},__setFontMetrics:function(e,t){j[e]=t}
173,__defineSymbol:ep,__defineFunction:td,__defineMacro:function(e,t){nj[e]=t},__domTree:{Span:et,Anchor:en,SymbolNode:ea,SvgNode:eo,PathNode:es,LineNode:el}};e.s(["default",0,rj])},605500,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return k}});let r=e.r(555682),i=e.r(190809),a=e.r(843476),o=i._(e.r(271645)),s=r._(e.r(174080)),l=r._(e.r(325633)),c=e.r(908927),u=e.r(987690),d=e.r(918556),h=e.r(65856),p=r._(e.r(896635)),m=e.r(818581),f={deviceSizes:[360,800,1200,2e3],imageSizes:[],qualities:[75],path:"/_next/image/",loader:"custom",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,n,r,i,a,o){let s=e?.src;e&&e["data-loaded-src"]!==s&&(e["data-loaded-src"]=s,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function y(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b="u"<typeof window?o.useEffect:o.useLayoutEffect,v=(0,o.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:i,decoding:s,className:l,style:c,fetchPriority:u,placeholder:d,loading:h,unoptimized:p,fill:f,onLoadRef:v,onLoadingCompleteRef:x,setBlurComplete:k,setShowAltText:w,sizesInput:C,onLoad:S,onError:E,...T},I)=>{let D=(0,o.useRef)(!1),N=(0,o.useRef)(null);b(()=>{let{current:e}=D,{current:t}=N;e||null===t||(E&&(t.src=t.src),t.complete&&g(t,d,v,x,k,p,C),D.current=!0)},[e,d,v,x,E,p,C]);let A=(0,m.useMergedRef)(I,N);return(0,a.jsx)("img",{...T,...y(u),loading:h,width:i,height:r,decoding:s,"data-nimg":f?"fill":"1",className:l,style:c,sizes:n,srcSet:t,src:e,ref:A,onLoad:e=>{g(e.currentTarget,d,v,x,k,p,C)},onError:e=>{w(!0),"empty"!==d&&k(!0),E&&E(e)}})});function x({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&s.default.preload?(s.default.preload(t.src,n),null):(0,a.jsx)(l.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let k=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(h.RouterContext),r=(0,o.useContext)(d.ImageConfigContext),i=(0,o.useMemo)(()=>{let e=f||r||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t),i=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n,qualities:i,localPatterns:"u"<typeof window?r?.localPatterns:e.localPatterns}},[r]),{onLoad:s,onLoadingComplete:l}=e,m=(0,o.useRef)(s);(0,o.useEffect)(()=>{m.current=s},[s]);let g=(0,o.useRef)(l);(0,o.useEffect)(()=>{g.current=l},[l]);let[y,b]=(0,o.useState)(!1),[k,w]=(0,o.useState)(!1),{props:C,meta:S}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:y,showAltText:k});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{...C,unoptimized:S.unoptimized,placeholder:S.placeholder,fill:S.fill,onLoadRef:m,onLoadingCompleteRef:g,setBlurComplete:b,setShowAltText:w,sizesInput:e.sizes,ref:t}),S.preload?(0,a.jsx)(x,{isAppRouter:!n,imgAttributes:C}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},794909,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return u},getImageProps:function(){return c}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(555682),o=e.r(908927),s=e.r(605500),l=a._(e.r(896635));function c(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[360,800,1200,2e3],imageSizes:[],qualities:[75],path:"/_next/image/",loader:"custom",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let u=s.Image},657688,(e,t,n)=>{t.exports=e.r(794909)},469957,(e,t,n)=>{"use strict";var r=e.r(271645),i=e.r(174080);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.scope"),v=Symbol.for("react.activity"),x=Symbol.for("react.legacy_hidden"),k=Symbol.for("react.memo_cache_sentinel"),w=Symbol.for("react.view_transition"),C=Symbol.for("react.recoverable"),S=Symbol.iterator;function E(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=S&&e[S]||e["@@iterator"])?e:null}var T=Symbol.for("react.optimistic_key"),I=Array.isArray;function D(e,t){var n=3&e.length,r=e.length-n,i=t;for(t=0;t<r;){var a=255&e.charCodeAt(t)|(255&e.charCodeAt(++t))<<8|(255&e.charCodeAt(++t))<<16|(255&e.charCodeAt(++t))<<24;++t,i^=a=0x1b873593*(65535&(a=(a=0xcc9e2d51*(65535&a)+((0xcc9e2d51*(a>>>16)&65535)<<16)|0)<<15|a>>>17))+((0x1b873593*(a>>>16)&65535)<<16)|0,i=(65535&(i=5*(65535&(i=i<<13|i>>>19))+((5*(i>>>16)&65535)<<16)|0))+27492+(((i>>>16)+58964&65535)<<16)}switch(a=0,n){case 3:a^=(255&e.charCodeAt(t+2))<<16;case 2:a^=(255&e.charCodeAt(t+1))<<8;case 1:a^=255&e.charCodeAt(t),i^=0x1b873593*(65535&(a=(a=0xcc9e2d51*(65535&a)+((0xcc9e2d51*(a>>>16)&65535)<<16)|0)<<15|a>>>17))+((0x1b873593*(a>>>16)&65535)<<16)}return i^=e.length,i^=i>>>16,i=0x85ebca6b*(65535&i)+((0x85ebca6b*(i>>>16)&65535)<<16)|0,i^=i>>>13,((i=0xc2b2ae35*(65535&i)+((0xc2b2ae35*(i>>>16)&65535)<<16)|0)^i>>>16)>>>0}var N=Object.assign,A=Object.prototype.hasOwnProperty,_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
173037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),P={},M={};function R(e){return!!A.call(M,e)||!A.call(P,e)&&(_.test(e)?M[e]=!0:(P[e]=!0,!1))}var L=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),j=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),O=/["'&<>]/;function B(e){if("boolean"==typeof e||"number"==typeof e||"bigint"==typeof e)return""+e;e=""+e;var t=O.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.slice(i,n)),i=n+1,r+=t}e=i!==n?r+e.slice(i,n):r}return e}var F=/([A-Z])/g,H=/^ms-/,U=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function z(e){return U.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var $=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},G=V.d;V.d={f:G.f,r:G.r,D:function(e){var t=t3||null;
173if(t){var n,r,i=t.resumableState,a=t.renderState;"string"==typeof e&&e&&(i.dnsResources.hasOwnProperty(e)||(i.dnsResources[e]=null,(r=(i=a.headers)&&0<i.remainingCapacity)&&(n="<"+(""+e).replace(eZ,eX)+">; rel=dns-prefetch",r=0<=(i.remainingCapacity-=n.length+2)),r?(a.resets.dns[e]=null,i.preconnects&&(i.preconnects+=", "),i.preconnects+=n):(eg(n=[],{href:e,rel:"dns-prefetch"}),a.preconnects.add(n))),nV(t))}else G.D(e)},C:function(e,t){var n=t3||null;if(n){var r=n.resumableState,i=n.renderState;if("string"==typeof e&&e){var a,o,s="use-credentials"===t?"credentials":"string"==typeof t?"anonymous":"default";r.connectResources[s].hasOwnProperty(e)||(r.connectResources[s][e]=null,(o=(r=i.headers)&&0<r.remainingCapacity)&&(o="<"+(""+e).replace(eZ,eX)+">; rel=preconnect","string"==typeof t&&(o+='; crossorigin="'+(""+t).replace(eQ,eJ)+'"'),a=o,o=0<=(r.remainingCapacity-=a.length+2)),o?(i.resets.connect[s][e]=null,r.preconnects&&(r.preconnects+=", "),r.preconnects+=a):(eg(s=[],{rel:"preconnect",href:e,crossOrigin:t}),i.preconnects.add(s))),nV(n)}}else G.C(e,t)},L:function(e,t,n){var r=t3||null;if(r){var i=r.resumableState,a=r.renderState;if(t&&e){switch(t){case"image":if(n)var o,s=n.imageSrcSet,l=n.imageSizes,c=n.fetchPriority;var u=s?s+"\n"+(l||""):e;if(i.imageResources.hasOwnProperty(u))return;i.imageResources[u]=W,(i=a.headers)&&0<i.remainingCapacity&&"string"!=typeof s&&"high"===c&&(o=eY(e,t,n),0<=(i.remainingCapacity-=o.length+2))?(a.resets.image[u]=W,i.highImagePreloads&&(i.highImagePreloads+=", "),i.highImagePreloads+=o):(eg(i=[],N({rel:"preload",href:s?void 0:e,as:t},n)),"high"===c?a.highImagePreloads.add(i):(a.bulkPreloads.add(i),a.preloads.images.set(u,i)));break;case"style":if(i.styleResources.hasOwnProperty(e))return;eg(s=[],N({rel:"preload",href:e,as:t},n)),i.styleResources[e]=n&&("string"==typeof n.crossOrigin||"string"==typeof n.integrity)?[n.crossOrigin,n.integrity]:W,a.preloads.stylesheets.set(e,s),a.bulkPreloads.add(s);break;case"script":if(i.scriptResources.hasOwnProperty(e))return;s=[],a.preloads.scripts.set(e,s),a.bulkPreloads.add(s),eg(s,N({rel:"preload",href:e,as:t},n)),i.scriptResources[e]=n&&("string"==typeof n.crossOrigin||"string"==typeof n.integrity)?[n.crossOrigin,n.integrity]:W;break;default:if(i.unknownResources.hasOwnProperty(t)){if((s=i.unknownResources[t]).hasOwnProperty(e))return}else s={},i.unknownResources[t]=s;s[e]=W,(i=a.headers)&&0<i.remainingCapacity&&"font"===t&&(u=eY(e,t,n),0<=(i.remainingCapacity-=u.length+2))?(a.resets.font[e]=W,i.fontPreloads&&(i.fontPreloads+=", "),i.fontPreloads+=u):(eg(i=[],e=N({rel:"preload",href:e,as:t},n)),"font"===t)?a.fontPreloads.add(i):a.bulkPreloads.add(i)}nV(r)}}else G.L(e,t,n)},m:function(e,t){var n=t3||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=t&&"string"==typeof t.as?t.as:"script";if("script"===a){if(r.moduleScriptResources.hasOwnProperty(e))return;a=[],r.moduleScriptResources[e]=t&&("string"==typeof t.crossOrigin||"string"==typeof t.integrity)?[t.crossOrigin,t.integrity]:W,i.preloads.moduleScripts.set(e,a)}else{if(r.moduleUnknownResources.hasOwnProperty(a)){var o=r.moduleUnknownResources[a];if(o.hasOwnProperty(e))return}else o={},r.moduleUnknownResources[a]=o;a=[],o[e]=W}eg(a,N({rel:"modulepreload",href:e},t)),i.bulkPreloads.add(a),nV(n)}}else G.m(e,t)},X:function(e,t){var n=t3||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.scriptResources.hasOwnProperty(e)?r.scriptResources[e]:void 0;null!==a&&(r.scriptResources[e]=null,t=N({src:e,async:!0},t),a&&(2===a.length&&eK(t,a),e=i.preloads.scripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),ek(e,t),nV(n))}}else G.X(e,t)},S:function(e,t,n){var r=t3||null;if(r){var i=r.resumableState,a=r.renderState;if(e){t=t||"default";var o=a.styles.get(t),s=i.styleResources.hasOwnProperty(e)?i.styleResources[e]:void 0;null!==s&&(i.styleResources[e]=null,o||(o={precedence:B(t),rules:[],hrefs:[],sheets:new Map},a.styles.set(t,o)),t={state:0,props:N({rel:"stylesheet",href:e,"data-precedence":t},n)},s&&(2===s.length&&eK(t.props,s),(a=a.preloads.stylesheets.get(e))&&0<a.length?a.length=0:t.state=1),o.sheets.set(e,t),nV(r))}}else G.S(e,t,n)},M:function(e,t){var n=t3||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.moduleScriptResources.hasOwnProperty(e)?r.moduleScriptResources[e]:void 0;null!==a&&(r.moduleScriptResources[e]=null,t=N({src:e,type:"module",async:!0},t),a&&(2===a.length&&eK(t,a),e=i.preloads.moduleScripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),ek(e,t),nV(n))}}else G.M(e,t)}};var W=[],K=null,Y=/(<\/|<)(s)(cript)/gi;function Z(e,t,n,r){return""+t+("s"===n?"\\u0073":"\\u0053")+r}function X(e,t,n,r){return{insertionMode:e,selectedValue:t,tagScope:n,viewTransition:r}}function Q(e,t,n){var r=-25&e.tagScope;switch(t){case"noscript":return X(2,null,1|r,null);case"select":return X(2,null!=n.value?n.value:n.defaultValue,r,null);case"svg":return X(4,null,r,null);case"picture":return X(2,null,2|r,null);case"math":return X(5,null,r,null);case"foreignObject":return X(2,null,r,null);case"table":return X(6,null,r,null);case"thead":case"tbody":case"tfoot":return X(7,null,r,null);case"colgroup":return X(9,null,r,null);case"tr":return X(8,null,r,null);case"head":if(2>e.insertionMode)return X(3,null,r,null);break;case"html":if(0===e.insertionMode)return X(1,null,r,null)}return 6<=e.insertionMode||2>e.insertionMode?X(2,null,r,null):null!==e.viewTransition||e.tagScope!==r?X(e.insertionMode,e.selectedValue,r,null):e}function J(e){return null===e?null:{update:e.update,enter:"none",exit:"none",share:e.update,parentEnter:"none",parentExit:"none",name:e.autoName,autoName:e.autoName,nameIdx:0}}function ee(e,t){return 32&t.tagScope&&(e.instructions|=128),X(t.insertionMode,t.selectedValue,12|t.tagScope,J(t.viewTransition))}function et(e,t){e=J(t.viewTransition);var n=16|t.tagScope;
vendor: 15,751 bytes, line 173
173return null!==e&&"none"!==e.share&&(n|=64),X(t.insertionMode,t.selectedValue,n,e)}function en(e,t,n){return e="_"+e.idPrefix+"R_"+t,0<n&&(e+="H"+n.toString(32)),e+"_"}function er(e,t){null!==(t=t.viewTransition)&&("auto"!==t.name&&(es(e,"vt-name",0===t.nameIdx?t.name:t.name+"_"+t.nameIdx),t.nameIdx++),es(e,"vt-update",t.update),"none"!==t.enter&&es(e,"vt-enter",t.enter),"none"!==t.exit&&es(e,"vt-exit",t.exit),"none"!==t.share&&es(e,"vt-share",t.share))}var ei=new Map;function ea(e,t){if("object"!=typeof t)throw Error(a(62));var n,r=!0;for(n in t)if(A.call(t,n)){var i=t[n];if(null!=i&&"boolean"!=typeof i&&""!==i){if(0===n.indexOf("--")){var o=B(n);i=B((""+i).trim())}else void 0===(o=ei.get(n))&&(o=B(n.replace(F,"-$1").toLowerCase().replace(H,"-ms-")),ei.set(n,o)),i="number"==typeof i?0===i||L.has(n)?""+i:i+"px":B((""+i).trim());r?(r=!1,e.push(' style="',o,":",i)):e.push(";",o,":",i)}}r||e.push('"')}function eo(e,t,n){n&&"function"!=typeof n&&"symbol"!=typeof n&&e.push(" ",t,'=""')}function es(e,t,n){"function"!=typeof n&&"symbol"!=typeof n&&"boolean"!=typeof n&&e.push(" ",t,'="',B(n),'"')}var el=B("javascript:throw new Error('React form unexpectedly submitted.')");function ec(e,t){this.push('<input type="hidden"'),eu(e),es(this,"name",t),es(this,"value",e),this.push("/>")}function eu(e){if("string"!=typeof e)throw Error(a(480))}function ed(e,t){if("function"==typeof t.$$FORM_ACTION){var n=e.nextFormID++;e=e.idPrefix+n;try{var r=t.$$FORM_ACTION(e);if(r){var i=r.data;null!=i&&i.forEach(eu)}return r}catch(e){if("object"==typeof e&&null!==e&&"function"==typeof e.then)throw e}}return null}function eh(e,t,n,r,i,a,o,s){var l=null;if("function"==typeof r){var c=ed(t,r);null!==c?(s=c.name,r=c.action||"",i=c.encType,a=c.method,o=c.target,l=c.data):(e.push(" ","formAction",'="',el,'"'),o=a=i=r=s=null,ef(t,n))}return null!=s&&ep(e,"name",s),null!=r&&ep(e,"formAction",r),null!=i&&ep(e,"formEncType",i),null!=a&&ep(e,"formMethod",a),null!=o&&ep(e,"formTarget",o),l}function ep(e,t,n){switch(t){case"className":es(e,"class",n);break;case"tabIndex":es(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":es(e,t,n);break;case"style":ea(e,n);break;case"src":case"href":if(""===n)break;case"action":case"formAction":if(null==n||"function"==typeof n||"symbol"==typeof n||"boolean"==typeof n)break;n=z(""+n),e.push(" ",t,'="',B(n),'"');break;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"autoFocus":case"multiple":case"muted":eo(e,t.toLowerCase(),n);break;case"xlinkHref":if("function"==typeof n||"symbol"==typeof n||"boolean"==typeof n)break;n=z(""+n),e.push(" ","xlink:href",'="',B(n),'"');break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":"function"!=typeof n&&"symbol"!=typeof n&&e.push(" ",t,'="',B(n),'"');break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&"function"!=typeof n&&"symbol"!=typeof n&&e.push(" ",t,'=""');break;case"capture":case"download":!0===n?e.push(" ",t,'=""'):!1!==n&&"function"!=typeof n&&"symbol"!=typeof n&&e.push(" ",t,'="',B(n),'"');break;case"cols":case"rows":case"size":case"span":"function"!=typeof n&&"symbol"!=typeof n&&!isNaN(n)&&1<=n&&e.push(" ",t,'="',B(n),'"');break;case"rowSpan":case"start":"function"==typeof n||"symbol"==typeof n||isNaN(n)||e.push(" ",t,'="',B(n),'"');break;case"xlinkActuate":es(e,"xlink:actuate",n);break;case"xlinkArcrole":es(e,"xlink:arcrole",n);break;case"xlinkRole":es(e,"xlink:role",n);break;case"xlinkShow":es(e,"xlink:show",n);break;case"xlinkTitle":es(e,"xlink:title",n);break;case"xlinkType":es(e,"xlink:type",n);break;case"xmlBase":es(e,"xml:base",n);break;case"xmlLang":es(e,"xml:lang",n);break;case"xmlSpace":es(e,"xml:space",n);break;default:if((!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&R(t=j.get(t)||t)){switch(typeof n){case"function":case"symbol":return;case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return}e.push(" ",t,'="',B(n),'"')}}}function em(e,t,n){if(null!=t){if(null!=n)throw Error(a(60));if("object"!=typeof t||!("__html"in t))throw Error(a(61));null!=(t=t.__html)&&e.push(""+t)}}function ef(e,t){if(0==(16&e.instructions)){e.instructions|=16;var n=t.preamble,r=t.bootstrapChunks;(n.htmlChunks||n.headChunks)&&0===r.length?(r.push(t.startInlineScript),eG(r,e),r.push(">",'addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});',"</script>")):r.unshift(t.startInlineScript,">",'addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});',"</script>")}}function eg(e,t){for(var n in e.push(eT("link")),t)if(A.call(t,n)){var r=t[n];if(null!=r)switch(n){case"children":case"dangerouslySetInnerHTML":throw Error(a(399,"link"));default:ep(e,n,r)}}return e.push("/>"),null}var ey=/(<\/|<)(s)(tyle)/gi;function eb(e,t,n,r){return""+t+("s"===n?"\\73 ":"\\53 ")+r}function ev(e,t,n,r){for(var i in e.push(eT(n)),t)if(A.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":case"dangerouslySetInnerHTML":throw Error(a(399,n));default:ep(e,i,o)}}return er(e,r),e.push("/>"),null}function ex(e,t){e.push(eT("title"));var n,r=null,i=null;for(n in t)if(A.call(t,n)){var a=t[n];if(null!=a)switch(n){case"children":r=a;break;case"dangerouslySetInnerHTML":i=a;break;default:ep(e,n,a)}}return e.push(">"),"function"!=typeof(t=Array.isArray(r)?2>r.length?r[0]:null:r)&&"symbol"!=typeof t&&null!=t&&e.push(B(""+t)),em(e,i,r),e.push(eD("title")),null}function ek(e,t){e.push(eT("script"));var n,r=null,i=null;for(n in t)if(A.call(t,n)){var a=t[n];if(null!=a)switch(n){case"children":r=a;break;case"dangerouslySetInnerHTML":i=a;break;default:ep(e,n,a)}}return e.push(">"),em(e,i,r),"string"==typeof r&&e.push((""+r).replace(Y,Z)),e.push(eD("script")),null}function ew(e,t,n,r){e.push(eT(n));var i,a=n=null;for(i in t)if(A.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":n=o;break;case"dangerouslySetInnerHTML":a=o;break;default:ep(e,i,o)}}return er(e,r),e.push(">"),em(e,a,n),n}function eC(e,t,n,r){e.push(eT(n));var i,a=n=null;for(i in t)if(A.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":n=o;break;case"dangerouslySetInnerHTML":a=o;break;default:ep(e,i,o)}}return er(e,r),e.push(">"),em(e,a,n),"string"==typeof n?(e.push(B(n)),null):n}var eS=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,eE=new Map;function eT(e){var t=eE.get(e);if(void 0===t){if(!eS.test(e))throw Error(a(65,e));t="<"+e,eE.set(e,t)}return t}var eI=new Map;function eD(e){var t=eI.get(e);return void 0===t&&(t="</"+e+">",eI.set(e,t)),t}function eN(e,t){null===(e=e.preamble).htmlChunks&&t.htmlChunks&&(e.htmlChunks=t.htmlChunks),null===e.headChunks&&t.headChunks&&(e.headChunks=t.headChunks),null===e.bodyChunks&&t.bodyChunks&&(e.bodyChunks=t.bodyChunks)}function eA(e,t){t=t.bootstrapChunks;for(var n=0;n<t.length-1;n++)e.push(t[n]);return!(n<t.length)||(n=t[n],t.length=0,e.push(n))}function e_(e,t,n){if(e.push('<!--$?--><template id="'),null===n)throw Error(a(395));return e.push(t.boundaryPrefix),t=n.toString(16),e.push(t),e.push('"></template>')}var eP=/[<\u2028\u2029]/g,eM=/[&><\u2028\u2029]/g;function eR(e){return JSON.stringify(e).replace(eM,function(e){switch(e){case"&":return"\\u0026";case">":return"\\u003e";case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var eL=!1,ej=!0;function eO(e){var t=e.rules,n=e.hrefs,r=0;if(n.length){for(this.push(K.startInlineStyle),this.push(' media="not all" data-precedence="'),this.push(e.precedence),this.push('" data-href="');r<n.length-1;r++)this.push(n[r]),this.push(" ");for(this.push(n[r]),this.push('">'),r=0;r<t.length;r++)this.push(t[r]);ej=this.push("</style>"),eL=!0,t.length=0,n.length=0}}function eB(e){return 2!==e.state&&(eL=!0)}function eF(e,t,n){return eL=!1,ej=!0,K=n,t.styles.forEach(eO,e),K=null,t.stylesheets.forEach(eB),eL&&(n.stylesToHoist=!0),ej}function eH(e){for(var t=0;t<e.length;t++)this.push(e[t]);e.length=0}var eU=[];function ez(e){eg(eU,e.props);for(var t=0;t<eU.length;t++)this.push(eU[t]);eU.length=0,e.state=2}function e$(e){var t=0<e.sheets.size;e.sheets.forEach(ez,this),e.sheets.clear();var n=e.rules,r=e.hrefs;if(!t||r.length){if(this.push(K.startInlineStyle),this.push(' data-precedence="'),this.push(e.precedence),e=0,r.length){for(this.push('" data-href="');e<r.length-1;e++)this.push(r[e]),this.push(" ");this.push(r[e])}for(this.push('">'),e=0;e<n.length;e++)this.push(n[e]);this.push("</style>"),n.length=0,r.length=0}}function eV(e){if(0===e.state){e.state=1;var t=e.props;for(eg(eU,{rel:"preload",as:"style",href:e.props.href,crossOrigin:t.crossOrigin,fetchPriority:t.fetchPriority,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy}),e=0;e<eU.length;e++)this.push(eU[e]);eU.length=0}}function eq(e){e.sheets.forEach(eV,this),e.sheets.clear()}function eG(e,t){0==(32&t.instructions)&&(t.instructions|=32,e.push(' id="',B("_"+t.idPrefix+"R_"),'"'))}function eW(){return{styles:new Set,stylesheets:new Set,suspenseyImages:!1}}function eK(e,t){null==e.crossOrigin&&(e.crossOrigin=t[0]),null==e.integrity&&(e.integrity=t[1])}function eY(e,t,n){for(var r in t="<"+(e=(""+e).replace(eZ,eX))+'>; rel=preload; as="'+(t=(""+t).replace(eQ,eJ))+'"',n)A.call(n,r)&&"string"==typeof(e=n[r])&&(t+="; "+r.toLowerCase()+'="'+(""+e).replace(eQ,eJ)+'"');return t}var eZ=/[<>\r\n]/g;function eX(e){switch(e){case"<":return"%3C";case">":return"%3E";case"\n":return"%0A";case"\r":return"%0D";default:throw Error("escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}var eQ=/["';,\r\n]/g;function eJ(e){switch(e){case'"':return"%22";case"'":return"%27";case";":return"%3B";case",":return"%2C";case"\n":return"%0A";case"\r":return"%0D";default:throw Error("escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}function e1(e){this.styles.add(e)}function e0(e){this.stylesheets.add(e)}function e2(e,t){t.styles.forEach(e1,e),t.stylesheets.forEach(e0,e),t.suspenseyImages&&(e.suspenseyImages=!0)}function e4(e,t,n,r){return n.generateStaticMarkup?(e.push(B(t)),!1):(""===t?e=r:(r&&e.push("<!-- -->"),e.push(B(t)),e=!0),e)}function e3(e,t,n,r){t.generateStaticMarkup||n&&r&&e.push("<!-- -->")}var e5=Function.prototype.bind,e6=Symbol.for("react.client.reference");function e7(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===e6?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case l:return"Fragment";case u:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case f:return"SuspenseList";case v:return"Activity";case w:return"ViewTransition"}if("object"==typeof e)switch(e.$$typeof){case s:return"Portal";case h:return e.displayName||"Context";case d:return(e._context.displayName||"Context")+".Consumer";case p:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case g:return null!==(t=e.displayName||null)?t:e7(e.type)||"Memo";case y:t=e._payload,e=e._init;try{return e7(e(t))}catch(e){}}return null}var e8={},e9=null;function te(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(a(401))}else{if(null===n)throw Error(a(401));te(e,n)}t.context._currentValue2=t.value}}function tt(e){var t=e9;t!==e&&(null===t?function e(t){var n=t.parent;null!==n&&e(n),t.context._currentValue2=t.value}(e):null===e?function e(t){t.context._currentValue2=t.parentValue,null!==(t=t.parent)&&e(t)}(t):t.depth===e.depth?te(t,e):t.depth>e.depth?function e(t,n){if(t.context._currentValue2=t.parentValue,null===(t=t.parent))throw Error(a(402));t.depth===n.depth?te(t,n):e(t,n)}(t,e):function e(t,n){var r=n.parent;if(null===r)throw Error(a(402));t.depth===r.depth?te(t,r):e(t,r),n.context._currentValue2=n.value}(t,e),e9=e)}var tn={enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}},tr={id:1,overflow:""};function ti(e){var t=e.overflow;return((e=e.id)&~(1<<32-to(e)-1)).toString(32)+t}function ta(e,t,n){var r=e.id;e=e.overflow;var i=32-to(r)-1;r&=~(1<<i),n+=1;var a=32-to(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-to(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var to=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(ts(e)/tl|0)|0},ts=Math.log,tl=Math.LN2;function tc(){}var tu=Error(a(460)),td=null;function th(){if(null===td)throw Error(a(459));var e=td;return td=null,e}var tp="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},tm=null,tf=null,tg=null,ty=null,tb=null,tv=null,tx=!1,tk=!1,tw=0,tC=0,tS=-1,tE=0,tT=null,tI=Error(a(605)),tD=null;function tN(e){return Error(a(604),{cause:e})}var tA=null,t_=0;function tP(){if(null===tm)throw Error(a(321));return tm}function tM(){if(0<t_)throw Error(a(312));return{memoizedState:null,queue:null,next:null}}function tR(){return null===tv?null===tb?(tx=!1,tb=tv=tM()):(tx=!0,tv=tb):null===tv.next?(tx=!1,tv=tv.next=tM()):(tx=!0,tv=tv.next),tv}function tL(){var e=tT;return tT=null,e}function tj(){ty=tg=tf=tm=null,tk=!1,tb=null,t_=0,tv=tA=null}function tO(e,t){return"function"==typeof t?t(e):t}function tB(e,t,n){if(tm=tP(),tv=tR(),tx){var r=tv.queue;if(t=r.dispatch,null!==tA&&void 0!==(n=tA.get(r))){tA.delete(r),r=tv.memoizedState;do r=e(r,n.action),n=n.next;while(null!==n)return tv.memoizedState=r,[r,t]}return[tv.memoizedState,t]}return e=e===tO?"function"==typeof t?t():t:void 0!==n?n(t):t,tv.memoizedState=e,e=(e=tv.queue={last:null,dispatch:null}).dispatch=tH.bind(null,tm,e),[tv.memoizedState,e]}function tF(e,t){if(tm=tP(),tv=tR(),t=void 0===t?null:t,null!==tv){var n=tv.memoizedState;if(null!==n&&null!==t){var r=n[1];t:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!tp(t[i],r[i])){r=!1;break t}r=!0}if(r)return n[0]}}return e=e(),tv.memoizedState=[e,t],e}function tH(e,t,n){if(25<=t_)throw Error(a(301));if(e===tm)if(tk=!0,e={action:n,next:null},null===tA&&(tA=new Map),void 0===(n=tA.get(t)))tA.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function tU(){throw Error(a(440))}function tz(){throw Error(a(394))}function t$(){throw Error(a(479))}
173function tV(e,t,n){tP();var r=tC++,i=tg;if("function"==typeof e.$$FORM_ACTION){var a=null,o=ty;i=i.formState;var s=e.$$IS_SIGNATURE_EQUAL;if(null!==i&&"function"==typeof s){var l=i[1];s.call(e,i[2],i[3])&&l===(a=void 0!==n?"p"+n:"k"+D(JSON.stringify([o,null,r]),0))&&(tS=r,t=i[0])}var c=e.bind(null,t);return e=function(e){c(e)},"function"==typeof c.$$FORM_ACTION&&(e.$$FORM_ACTION=function(e){e=c.$$FORM_ACTION(e),void 0!==n&&(n+="",e.action=n);var t=e.data;return t&&(null===a&&(a=void 0!==n?"p"+n:"k"+D(JSON.stringify([o,null,r]),0)),t.append("$ACTION_KEY",a)),e}),[t,e,!1]}var u=e.bind(null,t);return[t,function(e){u(e)},!1]}function tq(e){var t=tE;tE+=1,null===tT&&(tT=[]);var n=tT,r=e,i=t;switch(void 0===(i=n[i])?n.push(r):i!==r&&(r.then(tc,tc),r=i),r.status){case"fulfilled":return r.value;case"rejected":if(void 0===(n=r.reason)&&!("reason"in r))throw Error(a(600));throw n;default:switch("string"==typeof r.status?r.then(tc,tc):((n=r).status="pending",n.then(function(e){if("pending"===r.status){var t=r;t.status="fulfilled",t.value=e}},function(e){if("pending"===r.status){var t=r;t.status="rejected",t.reason=e}})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}throw td=r,tu}}function tG(){throw Error(a(393))}var tW,tK,tY={readContext:function(e){return e._currentValue2},use:function(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return tq(e);if(e.$$typeof===C)throw tD=tN(e),tI;if(e.$$typeof===h)return e._currentValue2}throw Error(a(438,String(e)))},useContext:function(e){return tP(),e._currentValue2},useMemo:tF,useReducer:tB,useRef:function(e){tm=tP();var t=(tv=tR()).memoizedState;return null===t?(e={current:e},tv.memoizedState=e):t},useState:function(e){return tB(tO,e)},useInsertionEffect:tc,useLayoutEffect:tc,useCallback:function(e,t){return tF(function(){return e},t)},useImperativeHandle:tc,useEffect:tc,useDebugValue:tc,useDeferredValue:function(e,t){return tP(),void 0!==t?t:e},useTransition:function(){return tP(),[!1,tz]},useId:function(){var e=ti(tf.treeContext),t=tZ;if(null===t)throw Error(a(404));return en(t,e,tw++)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(a(407));return n()},useOptimistic:function(e){return tP(),[e,t$]},useActionState:tV,useFormState:tV,useHostTransitionStatus:function(){return tP(),q},useMemoCache:function(e){for(var t=Array(e),n=0;n<e;n++)t[n]=k;return t},useCacheRefresh:function(){return tG},useEffectEvent:function(){return tU}},tZ=null,tX={getCacheForType:function(){throw Error(a(248))},cacheSignal:function(){throw Error(a(248))}};function tQ(e){if(void 0===tW)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);tW=t&&t[1]||"",tK=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+tW+e+tK}var tJ=!1;function t1(e,t){if(!e||tJ)return"";tJ=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}
173else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(void 0!==i?Object.defineProperty(e.prototype,"props",i):delete e.prototype.props)}}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var l=o.split("\n"),c=s.split("\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(1!==r||1!==i)do if(r--,i--,0>i||l[r]!==c[i]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=r&&0<=i)break}}}finally{tJ=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?tQ(n):""}function t0(e,t){return(500<t.byteSize||t.defer)&&null===t.preamble}function t2(e){if("object"==typeof e&&null!==e&&"string"==typeof e.environmentName){var t=e.environmentName;"string"==typeof(e=[e])[0]?e.splice(0,1,"[%s] "+e[0]," "+t+" "):e.splice(0,0,"[%s]"," "+t+" "),e.unshift(console),(t=e5.apply(console.error,e))()}else console.error(e);return null}function t4(e,t,n,r,i,a,o,s,l,c){var u=new Set;this.destination=null,this.flushScheduled=!1,this.resumableState=e,this.renderState=t,this.rootFormatContext=n,this.progressiveChunkSize=void 0===r?12800:r,this.status=10,this.fatalError=null,this.aborted=!1,this.pendingRootTasks=this.allPendingTasks=this.nextSegmentId=0,this.completedPreambleSegments=this.completedRootSegment=null,this.byteSize=0,this.abortableTasks=u,this.pingedTasks=[],this.currentTask=null,this.clientRenderedBoundaries=[],this.completedBoundaries=[],this.partialBoundaries=[],this.postponedState=this.trackedPostpones=null,this.onError=void 0===i?t2:i,this.onAllReady=void 0===a?tc:a,this.onShellReady=void 0===o?tc:o,this.onShellError=void 0===s?tc:s,this.onFatalError=void 0===l?tc:l,this.formState=void 0===c?null:c}var t3=null;function t5(e,t){e.pingedTasks.push(t),1===e.pingedTasks.length&&(e.flushScheduled=null!==e.destination,nP(e))}function t6(e,t,n,r,i){return n={status:0,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,row:t,completedSegments:[],byteSize:0,defer:i,fallbackAbortableTasks:n,errorDigest:null,contentState:eW(),fallbackState:eW(),preamble:r,tracked:null},null!==t&&(t.pendingTasks++,null!==(r=t.boundaries)&&(e.allPendingTasks++,n.pendingTasks++,r.push(n)),null!==(e=t.inheritedHoistables)&&e2(n.contentState,e)),n}function t7(e,t,n,r,i,a,o,s,l,c,u,d,h,p,m){e.allPendingTasks++,null===i?e.pendingRootTasks++:i.pendingTasks++,null!==p&&p.pendingTasks++;var f={replay:null,node:n,childIndex:r,ping:{resolve:function(){return t5(e,f)},reject:function(t){e.aborted?f.abortSet.delete(f)&&nT(f,e,t):t5(e,f)}},blockedBoundary:i,blockedSegment:a,blockedPreamble:o,hoistableState:s,abortSet:l,keyPath:c,formatContext:u,context:d,treeContext:h,row:p,componentStack:m,thenableState:t};return l.add(f),f}function t8(e,t,n,r,i,a,o,s,l,c,u,d,h,p){e.allPendingTasks++,null===a?e.pendingRootTasks++:a.pendingTasks++,null!==h&&h.pendingTasks++,n.pendingTasks++;var m={replay:n,node:r,childIndex:i,ping:{resolve:function(){return t5(e,m)},reject:function(t){e.aborted?m.abortSet.delete(m)&&nT(m,e,t):t5(e,m)}},blockedBoundary:a,blockedSegment:null,blockedPreamble:null,hoistableState:o,abortSet:s,keyPath:l,formatContext:c,context:u,treeContext:d,row:h,componentStack:p,thenableState:t};return s.add(m),m}function t9(e,t,n,r,i,a){return{status:0,parentFlushed:!1,id:-1,index:t,chunks:[],children:[],preambleChildren:[],parentFormatContext:r,boun
173dary:n,lastPushedText:i,textEmbedded:a}}function ne(e){var t=e.node;"object"==typeof t&&null!==t&&t.$$typeof===o&&(e.componentStack={parent:e.componentStack,type:t.type})}function nt(e){return null===e?null:{parent:e.parent,type:"Suspense Fallback"}}function nn(e){var t={};return e&&Object.defineProperty(t,"componentStack",{configurable:!0,enumerable:!0,get:function(){try{var n="",r=e;do n+=function e(t){if("string"==typeof t)return tQ(t);if("function"==typeof t)return t.prototype&&t.prototype.isReactComponent?t1(t,!0):t1(t,!1);if("object"==typeof t&&null!==t){switch(t.$$typeof){case p:return t1(t.render,!1);case g:return t1(t.type,!1);case y:var n=t,r=n._payload;n=n._init;try{t=n(r)}catch(e){return tQ("Lazy")}return e(t)}if("string"==typeof t.name){t:{r=t.name,n=t.env;var i=t.debugLocation;if(null!=i&&(t=Error.prepareStackTrace,Error.prepareStackTrace=void 0,i=i.stack,Error.prepareStackTrace=t,i.startsWith("Error: react-stack-top-frame\n")&&(i=i.slice(29)),-1!==(t=i.indexOf("\n"))&&(i=i.slice(t+1)),-1!==(t=i.indexOf("react_stack_bottom_frame"))&&(t=i.lastIndexOf("\n",t)),-1!==(t=-1===(i=(t=-1!==t?i=i.slice(0,t):"").lastIndexOf("\n"))?t:t.slice(i+1)).indexOf(r))){r="\n"+t;break t}r=tQ(r+(n?" ["+n+"]":""))}return r}}switch(t){case f:return tQ("SuspenseList");case m:return tQ("Suspense");case w:return tQ("ViewTransition")}return""}(r.type),r=r.parent;while(r)var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return Object.defineProperty(t,"componentStack",{value:i}),i}}),t}function nr(e,t,n){return t===tI?(tD=null,""):null==(t=(e=e.onError)(t,n))||"string"==typeof t?""===t?void 0:t:void 0}function ni(e,t){var n=e.onShellError,r=e.onFatalError;0!==e.pendingRootTasks&&n(t),r(t),null!==e.destination?(e.status=13,e.destination.destroy(t)):(e.status=12,e.fatalError=t)}function na(e,t){no(e,t.next,t.hoistables)}function no(e,t,n){for(;null!==t;){null!==n&&(e2(t.hoistables,n),t.inheritedHoistables=n);var r=t.boundaries;if(null!==r){t.boundaries=null;for(var i=0;i<r.length;i++){var a=r[i];null!==n&&e2(a.contentState,n),n_(e,a,null,null)}}if(t.pendingTasks--,0<t.pendingTasks)break;n=t.hoistables,t=t.next}}function ns(e,t){var n=t.boundaries;if(null!==n&&t.pendingTasks===n.length){for(var r=!0,i=0;i<n.length;i++){var a=n[i];if(1!==a.pendingTasks||a.parentFlushed||t0(e,a)){r=!1;break}}r&&no(e,t,t.hoistables)}}function nl(e){var t={pendingTasks:1,boundaries:null,hoistables:eW(),inheritedHoistables:null,together:!1,next:null};return null!==e&&0<e.pendingTasks&&(t.pendingTasks++,t.boundaries=[],e.next=t),t}function nc(e,t,n,r,i){var a=t.keyPath,o=t.treeContext,s=t.row;t.keyPath=n,n=r.length;var l=null;if(null!==t.replay){var c=t.replay.slots;if(null!==c&&"object"==typeof c)for(var u=0;u<n;u++){var d="backwards"!==i&&"unstable_legacy-backwards"!==i?u:n-1-u,h=r[d];t.row=l=nl(l),t.treeContext=ta(o,n,d);var p=c[d];"number"==typeof p?(np(e,t,p,h,d),delete c[d]):nw(e,t,h,d),0==--l.pendingTasks&&na(e,l)}else for(c=0;c<n;c++)d=r[u="backwards"!==i&&"unstable_legacy-backwards"!==i?c:n-1-c],t.row=l=nl(l),t.treeContext=ta(o,n,u),nw(e,t,d,u),0==--l.pendingTasks&&na(e,l)}else if("backwards"!==i&&"unstable_legacy-backwards"!==i)for(i=0;i<n;i++)c=r[i],t.row=l=nl(l),t.treeContext=ta(o,n,i),nw(e,t,c,i),0==--l.pendingTasks&&na(e,l);else{for(u=(c=t.blockedSegment).children.length,d=c.chunks.length,h=0;h<n;h++){var m=r[p="unstable_legacy-backwards"===i?n-1-h:h];t.row=l=nl(l),t.treeContext=ta(o,n,p);var f=t9(e,d,null,t.formatContext,0!==p||c.lastPushedText,!0);c.children.splice(u,0,f),t.blockedSegment=f;try{nw(e,t,m,p),e3(f.chunks,e.renderState,f.lastPushedText,f.textEmbedded),f.status=1,0==--l.pendingTasks&&na(e,l)}catch(t){throw f.status=e.aborted?3:4,t}}t.blockedSegment=c,c.lastPushedText=!1}null!==s&&null!==l&&0<l.pendingTasks&&(s.pendingTasks++,l.next=s),t.treeContext=o,t.row=s,t.keyPath=a}function nu(e,t,n,r,i,a){var o=t.thenableState;for(t.thenableState=null,tm={},tf=t,tg=e,ty=n,tC=tw=0,tS=-1,tE=0,tT=o,e=r(i,a);tk;)tk=!1,tC=tw=0,tS=-1,tE=0,t_+=1,tv=null,e=r(i,a);return tj(),e}function nd(e,t,n,r,i,a,o){var s=!1;if(0!==a&&null!==e.formState){var l=t.blockedSegment;if(null!==l){s=!0,l=l.chunks;for(var c=0;c<a;c++)c===o?l.push("<!--F!-->"):l.push("<!--F-->")}}
vendor: 5,785 bytes, line 173
173a=t.keyPath,t.keyPath=n,i?(n=t.treeContext,t.treeContext=ta(n,1,0),nw(e,t,r,-1),t.treeContext=n):s?nw(e,t,r,-1):nm(e,t,r,-1),t.keyPath=a}function nh(e,t,n,i,o,s){if("function"==typeof i)if(i.prototype&&i.prototype.isReactComponent){var k=o;if("ref"in o)for(var C in k={},o)"ref"!==C&&(k[C]=o[C]);var S=i.defaultProps;if(S)for(var T in k===o&&(k=N({},k,o)),S)void 0===k[T]&&(k[T]=S[T]);var D=k,_=e8,P=i.contextType;"object"==typeof P&&null!==P&&(_=P._currentValue2);var M=new i(D,_),L=void 0!==M.state?M.state:null;M.updater=tn,M.props=D,M.state=L;var j={queue:[],replace:!1};M._reactInternals=j;var O=i.contextType;M.context="object"==typeof O&&null!==O?O._currentValue2:e8;var F=i.getDerivedStateFromProps;if("function"==typeof F){var H=F(D,L);M.state=null==H?L:N({},L,H)}if("function"!=typeof i.getDerivedStateFromProps&&"function"!=typeof M.getSnapshotBeforeUpdate&&("function"==typeof M.UNSAFE_componentWillMount||"function"==typeof M.componentWillMount)){var U=M.state;if("function"==typeof M.componentWillMount&&M.componentWillMount(),"function"==typeof M.UNSAFE_componentWillMount&&M.UNSAFE_componentWillMount(),U!==M.state&&tn.enqueueReplaceState(M,M.state,null),null!==j.queue&&0<j.queue.length){var $=j.queue,V=j.replace;if(j.queue=null,j.replace=!1,V&&1===$.length)M.state=$[0];else{for(var q=V?$[0]:M.state,G=!0,K=+!!V;K<$.length;K++){var Y=$[K],Z="function"==typeof Y?Y.call(M,q,D,void 0):Y;null!=Z&&(G?(G=!1,q=N({},q,Z)):N(q,Z))}M.state=q}}else j.queue=null}var X=M.render();if(e.aborted)throw null;var J=t.keyPath;t.keyPath=n,nm(e,t,X,-1),t.keyPath=J}else{var ei=nu(e,t,n,i,o,void 0);if(e.aborted)throw null;nd(e,t,n,ei,0!==tw,tC,tS)}else if("string"==typeof i){var eu=t.blockedSegment;if(null===eu){var eS=o.children,eE=t.formatContext,eI=t.keyPath;t.formatContext=Q(eE,i,o),t.keyPath=n,nw(e,t,eS,-1),t.formatContext=eE,t.keyPath=eI}else{var eN=function(e,t,n,i,o,s,l,c,u){switch(t){case"div":case"span":case"svg":case"path":case"g":case"p":case"li":case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":break;case"a":e.push(eT("a"));var d,h=null,p=null;for(d in n)if(A.call(n,d)){var m=n[d];if(null!=m)switch(d){case"children":h=m;break;case"dangerouslySetInnerHTML":p=m;break;case"href":""===m?es(e,"href",""):ep(e,d,m);break;default:ep(e,d,m)}}if(er(e,c),e.push(">"),em(e,p,h),"string"==typeof h){e.push(B(h));var f=null}else f=h;return f;case"select":e.push(eT("select"));var g,y=null,b=null;for(g in n)if(A.call(n,g)){var v=n[g];if(null!=v)switch(g){case"children":y=v;break;case"dangerouslySetInnerHTML":b=v;break;case"defaultValue":case"value":break;default:ep(e,g,v)}}return er(e,c),e.push(">"),em(e,b,y),y;case"option":var x=c.selectedValue;e.push(eT("option"));var k,w=null,C=null,S=null,E=null;for(k in n)if(A.call(n,k)){var T=n[k];if(null!=T)switch(k){case"children":w=T;break;case"selected":S=T;break;case"dangerouslySetInnerHTML":E=T;break;case"value":C=T;default:ep(e,k,T)}}if(null!=x){var D,_,P=null!==C?""+C:(D=w,_="",r.Children.forEach(D,function(e){null!=e&&(_+=e)}),_);if(I(x)){for(var M=0;M<x.length;M++)if(""+x[M]===P){e.push(' selected=""');break}}else""+x===P&&e.push(' selected=""')}else S&&e.push(' selected=""');return e.push(">"),em(e,E,w),w;case"textarea":e.push(eT("textarea"));var L,j=null,O=null,F=null;for(L in n)if(A.call(n,L)){var H=n[L];if(null!=H)switch(L){case"children":F=H;break;case"value":j=H;break;case"defaultValue":O=H;break;case"dangerouslySetInnerHTML":throw Error(a(91));default:ep(e,L,H)}}if(null===j&&null!==O&&(j=O),er(e,c),e.push(">"),null!=F){if(null!=j)throw Error(a(92));if(I(F)){if(1<F.length)throw Error(a(93));j=""+F[0]}j=""+F}return"string"==typeof j&&"\n"===j[0]&&e.push("\n"),null!==j&&e.push(B(""+j)),null;case"input":e.push(eT("input"));var U,$=null,V=null,q=null,G=null,K=null,Y=null,Z=null,X=null,Q=null;for(U in n)if(A.call(n,U)){var J=n[U];if(null!=J)switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(a(399,"input"));case"name":$=J;break;case"formAction":V=J;break;case"formEncType":q=J;break;case"formMethod":G=J;break;case"formTarget":K=J;break;case"defaultChecked":Q=J;break;case"defaultValue":Z=J;break;case"checked":X=J;break;case"value":Y=J;break;default:ep(e,U,J)}}var ee=eh(e,i,o,V,q,G,K,$);return null!==X?eo(e,"checked",X):null!==Q&&eo(e,"checked",Q),null!==Y?ep(e,"value",Y):null!==Z&&ep(e,"value",Z),er(e,c),e.push("/>"),null!=ee&&ee.forEach(ec,e),null;case"button":e.push(eT("button"));var et,en=null,ei=null,eu=null,eS=null,eE=null,eI=null,eN=null;for(et in n)if(A.call(n,et)){var eA=n[et];if(null!=eA)switch(et){case"children":en=eA;break;case"dangerouslySetInnerHTML":ei=eA;break;case"name":eu=eA;break;case"formAction":eS=eA;break;case"formEncType":eE=eA;break;case"formMethod":eI=eA;break;case"formTarget":eN=eA;break;default:ep(e,et,eA)}}var e_=eh(e,i,o,eS,eE,eI,eN,eu);if(er(e,c),e.push(">"),null!=e_&&e_.forEach(ec,e),em(e,ei,en),"string"==typeof en){e.push(B(en));var eP=null}else eP=en;return eP;case"form":e.push(eT("form"));var eM,eR=null,eL=null,ej=null,eO=null,eB=null,eF=null;for(eM in n)if(A.call(n,eM)){var eH=n[eM];if(null!=eH)switch(eM){case"children":eR=eH;break;case"dangerouslySetInnerHTML":eL=eH;break;case"action":ej=eH;break;case"encType":eO=eH;break;case"method":eB=eH;break;case"target":eF=eH;break;default:ep(e,eM,eH)}}var eU=null,ez=null;if("function"==typeof ej){var e$=ed(i,ej);null!==e$?(ej=e$.action||"",eO=e$.encType,eB=e$.method,eF=e$.target,eU=e$.data,ez=e$.name):(e.push(" ","action",'="',el,'"'),eF=eB=eO=ej=null,ef(i,o))}if(null!=ej&&ep(e,"action",ej),null!=eO&&ep(e,"encType",eO),null!=eB&&ep(e,"method",eB),null!=eF&&ep(e,"target",eF),er(e,c),e.push(">"),null!==ez&&(e.push('<input type="hidden"'),es(e,"name",ez),e.push("/>
173"),null!=eU&&eU.forEach(ec,e)),em(e,eL,eR),"string"==typeof eR){e.push(B(eR));var eV=null}else eV=eR;return eV;case"menuitem":for(var eq in e.push(eT("menuitem")),n)if(A.call(n,eq)){var eG=n[eq];if(null!=eG)switch(eq){case"children":case"dangerouslySetInnerHTML":throw Error(a(400));default:ep(e,eq,eG)}}return er(e,c),e.push(">"),null;case"object":e.push(eT("object"));var eW,eZ=null,eX=null;for(eW in n)if(A.call(n,eW)){var eQ=n[eW];if(null!=eQ)switch(eW){case"children":eZ=eQ;break;case"dangerouslySetInnerHTML":eX=eQ;break;case"data":var eJ=z(""+eQ);if(""===eJ)break;e.push(" ","data",'="',B(eJ),'"');break;default:ep(e,eW,eQ)}}if(er(e,c),e.push(">"),em(e,eX,eZ),"string"==typeof eZ){e.push(B(eZ));var e1=null}else e1=eZ;return e1;case"title":var e0=1&c.tagScope,e2=4&c.tagScope;if(4===c.insertionMode||e0||null!=n.itemProp)var e4=ex(e,n);else e2?e4=null:(ex(o.hoistableChunks,n),e4=void 0);return e4;case"link":var e3=1&c.tagScope,e5=4&c.tagScope,e6=n.rel,e7=n.href,e8=n.precedence;if(4===c.insertionMode||e3||null!=n.itemProp||"string"!=typeof e6||"string"!=typeof e7||""===e7){eg(e,n);var e9=null}else if("stylesheet"===n.rel)if("string"!=typeof e8||null!=n.disabled||n.onLoad||n.onError)e9=eg(e,n);else{var te=o.styles.get(e8),tt=i.styleResources.hasOwnProperty(e7)?i.styleResources[e7]:void 0;if(null!==tt){i.styleResources[e7]=null,te||(te={precedence:B(e8),rules:[],hrefs:[],sheets:new Map},o.styles.set(e8,te));var tn={state:0,props:N({},n,{"data-precedence":n.precedence,precedence:null})};if(tt){2===tt.length&&eK(tn.props,tt);var tr=o.preloads.stylesheets.get(e7);tr&&0<tr.length?tr.length=0:tn.state=1}te.sheets.set(e7,tn),l&&l.stylesheets.add(tn)}else if(te){var ti=te.sheets.get(e7);ti&&l&&l.stylesheets.add(ti)}u&&e.push("<!-- -->"),e9=null}else n.onLoad||n.onError?e9=eg(e,n):(u&&e.push("<!-- -->"),e9=e5?null:eg(o.hoistableChunks,n));return e9;case"script":var ta=1&c.tagScope,to=n.async;if("string"!=typeof n.src||!n.src||!to||"function"==typeof to||"symbol"==typeof to||n.onLoad||n.onError||4===c.insertionMode||ta||null!=n.itemProp)var ts=ek(e,n);else{var tl=n.src;if("module"===n.type)var tc=i.moduleScriptResources,tu=o.preloads.moduleScripts;else tc=i.scriptResources,tu=o.preloads.scripts;var td=tc.hasOwnProperty(tl)?tc[tl]:void 0;if(null!==td){tc[tl]=null;var th=n;if(td){2===td.length&&eK(th=N({},n),td);var tp=tu.get(tl);tp&&(tp.length=0)}var tm=[];o.scripts.add(tm),ek(tm,th)}u&&e.push("<!-- -->"),ts=null}return ts;case"style":var tf=1&c.tagScope,tg=n.precedence,ty=n.href,tb=n.nonce;if(4===c.insertionMode||tf||null!=n.itemProp||"string"!=typeof tg||"string"!=typeof ty||""===ty){e.push(eT("style"));var tv,tx=null,tk=null;for(tv in n)if(A.call(n,tv)){var tw=n[tv];if(null!=tw)switch(tv){case"children":tx=tw;break;case"dangerouslySetInnerHTML":tk=tw;break;default:ep(e,tv,tw)}}e.push(">");var tC=Array.isArray(tx)?2>tx.length?tx[0]:null:tx;"function"!=typeof tC&&"symbol"!=typeof tC&&null!=tC&&e.push((""+tC).replace(ey,eb)),em(e,tk,tx),e.push(eD("style"));var tS=null}else{var tE=o.styles.get(tg);if(null!==(i.styleResources.hasOwnProperty(ty)?i.styleResources[ty]:void 0)){i.styleResources[ty]=null,tE||(tE={precedence:B(tg),rules:[],hrefs:[],sheets:new Map},o.styles.set(tg,tE));var tT=o.nonce.style;if(!tT||tT===tb){tE.hrefs.push(B(ty));var tI,tD=tE.rules,tN=null,tA=null;for(tI in n)if(A.call(n,tI)){var t_=n[tI];if(null!=t_)switch(tI){case"children":tN=t_;break;case"dangerouslySetInnerHTML":tA=t_}}var tP=Array.isArray(tN)?2>tN.length?tN[0]:null:tN;"function"!=typeof tP&&"symbol"!=typeof tP&&null!=tP&&tD.push((""+tP).replace(ey,eb)),em(tD,tA,tN)}}tE&&l&&l.styles.add(tE),u&&e.push("<!-- -->"),tS=void 0}return tS;case"meta":var tM=1&c.tagScope,tR=4&c.tagScope;if(4===c.insertionMode||tM||null!=n.itemProp)var tL=ev(e,n,"meta",c);else u&&e.push("<!-- -->"),tL=tR?null:"string"==typeof n.charSet?ev(o.charsetChunks,n,"meta",c):"viewport"===n.name?ev(o.viewportChunks,n,"meta",c):ev(o.hoistableChunks,n,"meta",c);return tL;case"listing":case"pre":e.push(eT(t));var tj,tO=null,tB=null;for(tj in n)if(A.call(n,tj)){var tF=n[tj];if(null!=tF)switch(tj){case"children":tO=tF;break;case"dangerouslySetInnerHTML":tB=tF;break;default:ep(e,tj,tF)}}if(er(e,c),e.push(">"),null!=tB){if(null!=tO)throw Error(a(60));if("object"!=typeof tB||!("__html"in tB))throw Error(a(61));var tH=tB.__html;null!=tH&&("string"==typeof tH&&0<tH.length&&"\n"===tH[0]?e.push("\n",tH):e.push(""+tH))}return"string"==typeof tO&&"\n"===tO[0]&&e.push("\n"),tO;case"img":var tU=3&c.tagScope,tz=n.src,t$=n.srcSet;if(!("lazy"===n.loading||!tz&&!t$||"string"!=typeof tz&&null!=tz||"string"!=typeof t$&&null!=t$||"low"===n.fetchPriority||tU)&&("string"!=typeof tz||":"!==tz[4]||"d"!==tz[0]&&"D"!==tz[0]||"a"!==tz[1]&&"A"!==tz[1]||"t"!==tz[2]&&"T"!==tz[2]||"a"!==tz[3]&&"A"!==tz[3])&&("string"!=typeof t$||":"!==t$[4]||"d"!==t$[0]&&"D"!==t$[0]||"a"!==t$[1]&&"A"!==t$[1]||"t"!==t$[2]&&"T"!==t$[2]||"a"!==t$[3]&&"A"!==t$[3])){null!==l&&64&c.tagScope&&(l.suspenseyImages=!0);var tV="string"==typeof n.sizes?n.sizes:void 0,tq=t$?t$+"\n"+(tV||""):tz,tG=o.preloads.images,tW=tG.get(tq);if(tW)("high"===n.fetchPriority||10>o.highImagePreloads.size)&&(tG.delete(tq),o.highImagePreloads.add(tW));else if(!i.imageResources.hasOwnProperty(tq)){i.imageResources[tq]=W;var tK,tY=n.crossOrigin,tZ="string"==typeof tY?"use-credentials"===tY?tY:"":void 0,tX=o.headers;tX&&0<tX.remainingCapacity&&"string"!=typeof n.srcSet&&("high"===n.fetchPriority||500>
vendor: 4,178 bytes, line 173
173tX.highImagePreloads.length)&&(tK=eY(tz,"image",{imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:tZ,integrity:n.integrity,nonce:n.nonce,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy}),0<=(tX.remainingCapacity-=tK.length+2))?(o.resets.image[tq]=W,tX.highImagePreloads&&(tX.highImagePreloads+=", "),tX.highImagePreloads+=tK):(eg(tW=[],{rel:"preload",as:"image",href:t$?void 0:tz,imageSrcSet:t$,imageSizes:tV,crossOrigin:tZ,integrity:n.integrity,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy}),"high"===n.fetchPriority||10>o.highImagePreloads.size?o.highImagePreloads.add(tW):(o.bulkPreloads.add(tW),tG.set(tq,tW)))}}return ev(e,n,"img",c);case"base":case"area":case"br":case"col":case"embed":case"hr":case"keygen":case"param":case"source":case"track":case"wbr":return ev(e,n,t,c);case"head":if(2>c.insertionMode){var tQ=s||o.preamble;if(tQ.headChunks)throw Error(a(545,"`<head>`"));null!==s&&e.push("<!--head-->"),tQ.headChunks=[];var tJ=ew(tQ.headChunks,n,"head",c)}else tJ=eC(e,n,"head",c);return tJ;case"body":if(2>c.insertionMode){var t1=s||o.preamble;if(t1.bodyChunks)throw Error(a(545,"`<body>`"));null!==s&&e.push("<!--body-->"),t1.bodyChunks=[];var t0=ew(t1.bodyChunks,n,"body",c)}else t0=eC(e,n,"body",c);return t0;case"html":if(0===c.insertionMode){var t2=s||o.preamble;if(t2.htmlChunks)throw Error(a(545,"`<html>`"));null!==s&&e.push("<!--html-->"),t2.htmlChunks=[""];var t4=ew(t2.htmlChunks,n,"html",c)}else t4=eC(e,n,"html",c);return t4;default:if(-1!==t.indexOf("-")){e.push(eT(t));var t3,t5=null,t6=null;for(t3 in n)if(A.call(n,t3)){var t7=n[t3];if(null!=t7){var t8=t3;switch(t3){case"children":t5=t7;break;case"dangerouslySetInnerHTML":t6=t7;break;case"style":ea(e,t7);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"className":t8="class";default:if(R(t3)&&"function"!=typeof t7&&"symbol"!=typeof t7&&!1!==t7){if(!0===t7)t7="";else if("object"==typeof t7)continue;e.push(" ",t8,'="',B(t7),'"')}}}}return er(e,c),e.push(">"),em(e,t6,t5),t5}}return eC(e,n,t,c)}(eu.chunks,i,o,e.resumableState,e.renderState,t.blockedPreamble,t.hoistableState,t.formatContext,eu.lastPushedText);eu.lastPushedText=!1;var eA=t.formatContext,e_=t.keyPath;if(t.keyPath=n,3===(t.formatContext=Q(eA,i,o)).insertionMode){var eP=t9(e,0,null,t.formatContext,!1,!1);eu.preambleChildren.push(eP),t.blockedSegment=eP;try{nw(e,t,eN,-1),e3(eP.chunks,e.renderState,eP.lastPushedText,eP.textEmbedded),eP.status=1}finally{t.blockedSegment=eu}}else nw(e,t,eN,-1);t.formatContext=eA,t.keyPath=e_;t:{var eM=eu.chunks,eR=e.resumableState;switch(i){case"title":case"style":case"script":case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break t;case"body":if(1>=eA.insertionMode){eR.hasBody=!0;break t}break;case"html":if(0===eA.insertionMode){eR.hasHtml=!0;break t}break;case"head":if(1>=eA.insertionMode)break t}eM.push(eD(i))}eu.lastPushedText=!1}}else{switch(i){case x:case c:case u:case l:var eL=t.keyPath;t.keyPath=n,nm(e,t,o.children,-1),t.keyPath=eL;return;case v:var ej=t.blockedSegment;if(null===ej){if("hidden"!==o.mode){var eO=t.keyPath;t.keyPath=n,nw(e,t,o.children,-1),t.keyPath=eO}}else if("hidden"!==o.mode){e.renderState.generateStaticMarkup||ej.chunks.push("<!--&-->"),ej.lastPushedText=!1;var eB=t.keyPath;t.keyPath=n,nw(e,t,o.children,-1),t.keyPath=eB,e.renderState.generateStaticMarkup||ej.chunks.push("<!--/&-->"),ej.lastPushedText=!1}return;case f:t:{var eF=o.children,eH=o.revealOrder;if("independent"!==eH&&"together"!==eH){if(I(eF)){nc(e,t,n,eF,eH);break t}var eU=E(eF);if(eU){var ez=eU.call(eF);if(ez){var e$=ez.next();if(!e$.done){do e$=ez.next();while(!e$.done)nc(e,t,n,eF,eH)}break t}}}if("together"===eH){var eV=t.keyPath,eq=t.row,eG=t.row=nl(null);eG.boundaries=[],eG.together=!0,t.keyPath=n,nm(e,t,eF,-1),0==--eG.pendingTasks&&na(e,eG),t.keyPath=eV,t.row=eq,null!==eq&&0<eG.pendingTasks&&(eq.pendingTasks++,eG.next=eq)}else{var eW=t.keyPath;t.keyPath=n,nm(e,t,eF,-1),t.keyPath=eW}}return;case w:var eZ=t.formatContext,eX=t.keyPath,eQ=e.resumableState;
173if((null==o.name||"auto"===o.name)&&en(eQ,ti(t.treeContext),0),t.formatContext=eZ,t.keyPath=n,null!=o.name&&"auto"!==o.name)nm(e,t,o.children,-1);else{var eJ=t.treeContext;t.treeContext=ta(eJ,1,0),nw(e,t,o.children,-1),t.treeContext=eJ}t.formatContext=eZ,t.keyPath=eX;return;case b:throw Error(a(343));case m:t:if(null!==t.replay){var e1=t.keyPath,e0=t.formatContext,e2=t.row;t.keyPath=n,t.formatContext=et(e.resumableState,e0),t.row=null;var e4=o.children;try{nw(e,t,e4,-1)}finally{t.keyPath=e1,t.formatContext=e0,t.row=e2}}else{var e5=t.keyPath,e6=t.formatContext,e7=t.row,te=t.blockedBoundary,tt=t.blockedPreamble,tr=t.hoistableState,to=t.blockedSegment,ts=o.fallback,tl=o.children,tc=new Set,tu=t6(e,t.row,tc,null,!1),td=t9(e,to.chunks.length,tu,t.formatContext,!1,!1);to.children.push(td),to.lastPushedText=!1;var th=t9(e,0,null,t.formatContext,!1,!1);th.parentFlushed=!0;var tp=e.trackedPostpones;if(null!==tp){var tm=t.componentStack,tf=[n[0],"Suspense Fallback",n[2]];if(null!==tp){var tg=[tf[1],tf[2],[],null];tp.workingMap.set(tf,tg),tu.tracked={contentKeyPath:n,fallbackNode:tg}}t.blockedSegment=td,t.blockedPreamble=null===tu.preamble?null:tu.preamble.fallback,t.keyPath=tf,t.formatContext=ee(e.resumableState,e6),t.componentStack=nt(tm);try{nw(e,t,ts,-1),e3(td.chunks,e.renderState,td.lastPushedText,td.textEmbedded),td.status=1}catch(t){throw td.status=e.aborted?3:4,t}finally{t.blockedSegment=to,t.blockedPreamble=tt,t.keyPath=e5,t.formatContext=e6}var ty=t7(e,null,tl,-1,tu,th,null===tu.preamble?null:tu.preamble.content,tu.contentState,t.abortSet,n,et(e.resumableState,t.formatContext),t.context,t.treeContext,null,tm);ne(ty),e.pingedTasks.push(ty)}else{t.blockedBoundary=tu,t.blockedPreamble=null===tu.preamble?null:tu.preamble.content,t.hoistableState=tu.contentState,t.blockedSegment=th,t.keyPath=n,t.formatContext=et(e.resumableState,e6),t.row=null;try{if(nw(e,t,tl,-1),e3(th.chunks,e.renderState,th.lastPushedText,th.textEmbedded),th.status=1,nA(tu,th),0===tu.pendingTasks&&0===tu.status){if(tu.status=1,!t0(e,tu)){null!==e7&&0==--e7.pendingTasks&&na(e,e7),0===e.pendingRootTasks&&t.blockedPreamble&&nL(e);break t}}else null!==e7&&e7.together&&ns(e,e7)}catch(n){if(tu.status=4,e.aborted){th.status=3;var tb=e.fatalError}else th.status=4,tb=n;tu.errorDigest=nr(e,tb,nn(t.componentStack)),nv(e,tu)}finally{t.blockedBoundary=te,t.blockedPreamble=tt,t.hoistableState=tr,t.blockedSegment=to,t.keyPath=e5,t.formatContext=e6,t.row=e7}var tv=t7(e,null,ts,-1,te,td,null===tu.preamble?null:tu.preamble.fallback,tu.fallbackState,tc,[n[0],"Suspense Fallback",n[2]],ee(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,nt(t.componentStack));ne(tv),e.pingedTasks.push(tv)}}return}if("object"==typeof i&&null!==i)switch(i.$$typeof){case p:if("ref"in o){var tx={};for(var tk in o)"ref"!==tk&&(tx[tk]=o[tk])}else tx=o;var tE=nu(e,t,n,i.render,tx,s);nd(e,t,n,tE,0!==tw,tC,tS);return;case g:nh(e,t,n,i.type,o,s);return;case h:var tT=o.children,tI=t.keyPath,tD=o.value,tN=i._currentValue2;i._currentValue2=tD;var tA=e9,t_={parent:tA,depth:null===tA?0:tA.depth+1,context:i,parentValue:tN,value:tD};e9=t_,t.context=t_,t.keyPath=n,nm(e,t,tT,-1);var tP=e9;if(null===tP)throw Error(a(403));tP.context._currentValue2=tP.parentValue,t.context=e9=tP.parent,t.keyPath=tI;return;case d:var tM=(0,o.children)(i._context._currentValue2),tR=t.keyPath;t.keyPath=n,nm(e,t,tM,-1),t.keyPath=tR;return;case y:var tL=(0,i._init)(i._payload);if(e.aborted)throw null;nh(e,t,n,tL,o,s);return}throw Error(a(130,null==i?i:typeof i,""))}}function np(e,t,n,r,i){var a=t.replay,o=t.blockedBoundary,s=t9(e,0,null,t.formatContext,!1,!1);s.id=n,s.parentFlushed=!0;try{t.replay=null,t.blockedSegment=s,nw(e,t,r,i),s.status=1,null===o?e.completedRootSegment=s:(nA(o,s),o.parentFlushed&&e.partialBoundaries.push(o))}finally{t.replay=a,t.blockedSegment=null}}function nm(e,t,n,r){null!==t.replay&&"number"==typeof t.replay.slots?np(e,t,t.replay.slots,n,r):(t.node=n,t.childIndex=r,n=t.componentStack,ne(t),nf(e,t),t.componentStack=n)}function nf(e,t){var n=t.node,r=t.childIndex;if(null!==n){if("object"==typeof n){switch(n.$$typeof){case o:var i=n.type,l=n.key,c=n.props,u=void 0!==(n=c.ref)?n:null,d=e7(i),p=null==l||l===T?-1===r?0:r:l;if(l=[t.keyPath,d,p],null!==t.replay)t:{var f=t.replay;for(r=f.nodes,n=0;n<r.length;n++){var g=r[n];if(p===g[1]){if(4===g.length){if(null!==d&&d!==g[0])throw Error(a(490,g[0],d));var b=g[2],v=g[3],x=t.node;
173t.replay={nodes:b,slots:v,pendingTasks:1};try{if(nh(e,t,l,i,c,u),1===t.replay.pendingTasks&&0<t.replay.nodes.length)throw Error(a(488));t.replay.pendingTasks--}catch(i){if("object"==typeof i&&null!==i&&(i===tu||"function"==typeof i.then||"Maximum call stack size exceeded"===i.message))throw t.node===x?t.replay=f:r.splice(n,1),i;t.replay.pendingTasks--,l=nn(t.componentStack),x=e,c=t.blockedBoundary,l=nr(x,e=e.aborted?e.fatalError:i,l),nS(x,c,b,v,e,l)}t.replay=f}else{if(i!==m)throw Error(a(490,"Suspense",e7(i)||"Unknown"));n:{f=g[5],i=g[2],u=g[3],d=null===g[4]?[]:g[4][2],g=null===g[4]?null:g[4][3],p=t.keyPath;var k=t.formatContext,w=t.row,C=t.replay,S=t.blockedBoundary,D=t.hoistableState,N=c.children;c=c.fallback;var A=new Set,_=t6(e,t.row,A,null,!1);_.parentFlushed=!0,_.rootSegmentID=f,t.blockedBoundary=_,t.hoistableState=_.contentState,t.keyPath=l,t.formatContext=et(e.resumableState,k),t.row=null,t.replay={nodes:i,slots:u,pendingTasks:1};try{if(nw(e,t,N,-1),1===t.replay.pendingTasks&&0<t.replay.nodes.length)throw Error(a(488));if(t.replay.pendingTasks--,0===_.pendingTasks&&0===_.status){_.status=1,e.completedBoundaries.push(_);break n}}catch(n){_.status=4,b=e.aborted?e.fatalError:n,_.errorDigest=x=nr(e,b,v=nn(t.componentStack)),t.replay.pendingTasks--,e.clientRenderedBoundaries.push(_)}finally{t.blockedBoundary=S,t.hoistableState=D,t.replay=C,t.keyPath=p,t.formatContext=k,t.row=w}ne(b=t8(e,null,{nodes:d,slots:g,pendingTasks:0},c,-1,S,_.fallbackState,A,[l[0],"Suspense Fallback",l[2]],ee(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,nt(t.componentStack))),e.pingedTasks.push(b)}}r.splice(n,1);break t}}}else nh(e,t,l,i,c,u);return;case s:throw Error(a(257));case y:if(n=(b=n._init)(n._payload),e.aborted)throw null;nm(e,t,n,r);return}if(I(n))return void ng(e,t,n,r);if((b=E(n))&&(b=b.call(n))){if(!(n=b.next()).done){v=[];do v.push(n.value),n=b.next();while(!n.done)ng(e,t,v,r)}return}if("function"==typeof n.then)return t.thenableState=null,nm(e,t,tq(n),r);if(n.$$typeof===h)return nm(e,t,n._currentValue2,r);throw Error(a(31,"[object Object]"===(r=Object.prototype.toString.call(n))?"object with keys {"+Object.keys(n).join(", ")+"}":r))}"string"==typeof n?null!==(r=t.blockedSegment)&&(r.lastPushedText=e4(r.chunks,n,e.renderState,r.lastPushedText)):("number"==typeof n||"bigint"==typeof n)&&null!==(r=t.blockedSegment)&&(r.lastPushedText=e4(r.chunks,""+n,e.render
173State,r.lastPushedText))}}function ng(e,t,n,r){var i=t.keyPath;if(-1!==r&&(t.keyPath=[t.keyPath,"Fragment",r],null!==t.replay)){for(var o=t.replay,s=o.nodes,l=0;l<s.length;l++){var c=s[l];if(c[1]===r){t.replay={nodes:r=c[2],slots:c=c[3],pendingTasks:1};try{if(ng(e,t,n,-1),1===t.replay.pendingTasks&&0<t.replay.nodes.length)throw Error(a(488));t.replay.pendingTasks--}catch(i){if("object"==typeof i&&null!==i&&(i===tu||"function"==typeof i.then))throw i;t.replay.pendingTasks--;var u=nn(t.componentStack);n=e;var d=t.blockedBoundary;u=nr(n,e=e.aborted?e.fatalError:i,u),nS(n,d,r,c,e,u)}t.replay=o,s.splice(l,1);break}}t.keyPath=i;return}if(o=t.treeContext,s=n.length,null!==t.replay&&null!==(l=t.replay.slots)&&"object"==typeof l){for(r=0;r<s;r++)c=n[r],t.treeContext=ta(o,s,r),"number"==typeof(d=l[r])?(np(e,t,d,c,r),delete l[r]):nw(e,t,c,r);t.treeContext=o,t.keyPath=i;return}for(l=0;l<s;l++)r=n[l],t.treeContext=ta(o,s,l),nw(e,t,r,l);t.treeContext=o,t.keyPath=i}function ny(e,t,n){n.status=5,n.rootSegmentID=e.nextSegmentId++;var r=n.tracked;if(null===r||null===(e=r.contentKeyPath))throw Error(a(486));r=r.fallbackNode;var i=t.workingMap.get(e);return void 0===i?(n=[e[1],e[2],[],null,r,n.rootSegmentID],t.workingMap.set(e,n),nq(n,e[0],t),n):(i[4]=r,i[5]=n.rootSegmentID,i)}function nb(e,t,n,r){r.status=5;var i=n.keyPath,o=n.blockedBoundary;if(null===o)r.id=e.nextSegmentId++,t.rootSlots=r.id,null!==e.completedRootSegment&&(e.completedRootSegment.status=5);else{if(null!==o&&0===o.status){var s=ny(e,t,o);if(null!==o.tracked&&o.tracked.contentKeyPath===i&&-1===n.childIndex){-1===r.id&&(r.id=r.parentFlushed?o.rootSegmentID:e.nextSegmentId++),s[3]=r.id;return}}if(-1===r.id&&(r.id=r.parentFlushed&&null!==o?o.rootSegmentID:e.nextSegmentId++),-1===n.childIndex)null===i?t.rootSlots=r.id:void 0===(n=t.workingMap.get(i))?nq(n=[i[1],i[2],[],r.id],i[0],t):n[3]=r.id;else{if(null===i){if(null===(e=t.rootSlots))e=t.rootSlots={};else if("number"==typeof e)throw Error(a(491))}else if(void 0===(s=(o=t.workingMap).get(i)))e={},s=[i[1],i[2],[],e],o.set(i,s),nq(s,i[0],t);else if(null===(e=s[3]))e=s[3]={};else if("number"==typeof e)throw Error(a(491));e[n.childIndex]=r.id}}}function nv(e,t){null!==(e=e.trackedPostpones)&&null!==(t=t.tracked)&&null!==(t=t.contentKeyPath)&&void 0!==(e=e.workingMap.get(t))&&(e.length=4,e[2]=[],e[3]=null)}function nx(e,t,n){return t8(e,n,t.replay,t.node,t.childIndex,t.blockedBoundary,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function nk(e,t,n){var r=t.blockedSegment,i=t9(e,r.chunks.length,null,t.formatContext,r.lastPushedText,!0);return r.children.push(i),r.lastPushedText=!1,t7(e,n,t.node,t.childIndex,t.blockedBoundary,i,t.blockedPreamble,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function nw(e,t,n,r){var i=t.formatContext,a=t.context,o=t.keyPath,s=t.treeContext,l=t.componentStack,c=t.blockedSegment;if(null===c){c=t.replay;try{return nm(e,t,n,r)}catch(u){if(tj(),n=u===tu?th():u,!e.aborted&&"object"==typeof n&&null!==n){if("function"==typeof n.then){e=nx(e,t,r=u===tu?tL():null).ping,n.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,t.replay=c,tt(a);return}if("Maximum call stack size exceeded"===n.message){n=nx(e,t,n=u===tu?tL():null),e.pingedTasks.push(n),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,t.replay=c,tt(a);return}}}}else{var u=c.children.length,d=c.chunks.length;try{return nm(e,t,n,r)}catch(r){if(tj(),c.children.length=u,c.chunks.length=d,n=r===tu?th():r,!e.aborted&&"object"==typeof n&&null!==n){if("function"==typeof n.then){c=n,e=nk(e,t,n=r===tu?tL():null).ping,c.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,tt(a);return}if("Maximum call stack size exceeded"===n.message){c=nk(e,t,c=r===tu?tL():null),e.pingedTasks.push(c),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,tt(a);return}}}}throw t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,tt(a),n}function nC(e){var t=e.blockedBoundary,n=e.blockedSegment;null!==n&&(n.status=3,n_(this,t,e.row,n))}function nS(e,t,n,r,i,o){for(var s=0;s<n.length;s++){var l=n[s];if(4===l.length)nS(e,t,l[2],l[3],i,o);else{l=l[5];var c=t6(e,null,new Set,null,!1);c.parentFlushed=!0,c.rootSegmentID=l,c.status=4,c.errorDigest=o,c.parentFlushed&&e.clientRenderedBoundaries.push(c)}}if(n.length=0,null!==r){if(null===t)throw Error(a(487));if(4!==t.status&&(t.status=4,t.errorDigest=o,t.parentFlushed&&e.clientRenderedBoundaries.push(t)),"object"==typeof r)for(var u in r)delete r[u]}}function nE(e,t){if(e!==t.currentTask){var n=e.blockedBoundary;null!==(e=e.blockedSegment)&&(e.status=3),null!==n&&n.fallbackAbortableTasks.forEach(function(e){return nE(e,t)})}}function nT(e,t,n){if(e!==t.currentTask){var r=e.blockedBoundary,i=e.blockedSegment;if(null===i||3===i.status){var a=nn(e.componentStack),o="object"==typeof n&&null!==n&&n.$$typeof===C;if(null===r){if(null===(r=e.replay))return void(o||null===t.trackedPostpones||null===i?o?(nr(t,e=tN(n),a),12!==t.status&&13!==t.status&&ni(t,e)):(nr(t,n,a),12!==t.status&&13!==t.status&&ni(t,n)):(r=t.trackedPostpones,nr(t,n,a),nb(t,r,e,i),n_(t,null,e.row,i)));12!==t.status&&13!==t.status&&(r.pendingTasks--,0===r.pendingTasks&&0<r.nodes.length&&(o?(a="",i=tI):(a=nr(t,n,a),i=n),nS(t,null,r.nodes,r.slots,i,a)),t.pendingRootTasks--,0===t.pendingRootTasks&&nD(t))}else{var s=t.trackedPostpones;if(4!==r.status){if(!o&&null!==s&&null!==i)return nr(t,n,a),nb(t,s,e,i),r.fallbackAbortableTasks.forEach(function(e){return nT(e,t,n)}),r.fallbackAbortableTasks.clear(),n_(t,r,e.row,i);r.status=4,a=o?"":nr(t,n,a),r.errorDigest=a,nv(t,r),r.parentFlushed&&t.clientRenderedBoundaries.push(r)}r.pendingTasks--,null!==(a=r.row)&&0==--a.pendingTasks&&na(t,a),r.fallbackAbortableTasks.forEach(function(e){return nT(e,t,n)}),r.fallbackAbortableTasks.clear()}null!==(e=e.row)&&0==--e.pendingTasks&&na(t,e),t.allPendingTasks--,0===t.allPendingTasks&&nN(t)}}}function nI(e,t){try{var n=e.renderState,r=n.onHeaders;if(r){var i=n.headers;if(i){n.headers=null;
173var a=i.preconnects;if(i.fontPreloads&&(a&&(a+=", "),a+=i.fontPreloads),i.highImagePreloads&&(a&&(a+=", "),a+=i.highImagePreloads),!t){var o=n.styles.values(),s=o.next();n:for(;0<i.remainingCapacity&&!s.done;s=o.next())for(var l=s.value.sheets.values(),c=l.next();0<i.remainingCapacity&&!c.done;c=l.next()){var u=c.value,d=u.props,h=d.href,p=u.props,m=eY(p.href,"style",{crossOrigin:p.crossOrigin,integrity:p.integrity,nonce:p.nonce,type:p.type,fetchPriority:p.fetchPriority,referrerPolicy:p.referrerPolicy,media:p.media});if(0<=(i.remainingCapacity-=m.length+2))n.resets.style[h]=W,a&&(a+=", "),a+=m,n.resets.style[h]="string"==typeof d.crossOrigin||"string"==typeof d.integrity?[d.crossOrigin,d.integrity]:W;else break n}}r(a?{Link:a}:{})}}}catch(t){nr(e,t,{})}}function nD(e){null===e.trackedPostpones&&nI(e,!0),null===e.trackedPostpones&&nL(e),(e=e.onShellReady)()}function nN(e){nI(e,null===e.trackedPostpones||null===e.completedRootSegment||5!==e.completedRootSegment.status),nL(e),(e=e.onAllReady)()}function nA(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary&&-1===t.children[0].id){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1!==n.status&&3!==n.status&&4!==n.status||nA(e,n)}else e.completedSegments.push(t)}function n_(e,t,n,r){if(null!==n&&(0==--n.pendingTasks?na(e,n):n.together&&ns(e,n)),e.allPendingTasks--,null===t){if(null!==r&&r.parentFlushed){if(null!==e.completedRootSegment)throw Error(a(389));e.completedRootSegment=r}e.pendingRootTasks--,0===e.pendingRootTasks&&nD(e)}else if(t.pendingTasks--,4!==t.status)if(0===t.pendingTasks){if(0===t.status&&(t.status=1),null!==r&&r.parentFlushed&&(1===r.status||3===r.status)&&nA(t,r),t.parentFlushed&&e.completedBoundaries.push(t),1===t.status)null!==(n=t.row)&&e2(n.hoistables,t.contentState),t0(e,t)||(e.allPendingTasks++,t.fallbackAbortableTasks.forEach(nC,e),t.fallbackAbortableTasks.clear(),null!==n&&0==--n.pendingTasks&&na(e,n),e.allPendingTasks--),0===e.pendingRootTasks&&null===e.trackedPostpones&&null!==t.preamble&&nL(e);else if(5===t.status&&null!==(t=t.row)){if(null!==e.trackedPostpones){n=e.trackedPostpones;var i=t.next;if(null!==i&&null!==(r=i.boundaries))for(i.boundaries=null,i=0;i<r.length;i++){var o=r[i];ny(e,n,o),n_(e,o,null,null)}}e.allPendingTasks++,0==--t.pendingTasks&&na(e,t),e.allPendingTasks--}}else null===r||!r.parentFlushed||1!==r.status&&3!==r.status||(nA(t,r),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)),null!==(t=t.row)&&t.together&&ns(e,t);0===e.allPendingTasks&&nN(e)}function nP(e){if(!(e.aborted||11<e.status)){var t=e9,n=$.H;$.H=tY;var r=$.A;$.A=tX;var i=t3;t3=e;var o=tZ;tZ=e.resumableState;try{var s,l=e.pingedTasks;for(s=0;s<l.length;s++){var c=l[s],u=c.blockedSegment;if(null===u){t:if(0!==c.replay.pendingTasks){var d=e.currentTask;e.currentTask=c,tt(c.context);var h=c.node;try{if("number"==typeof c.replay.slots?np(e,c,c.replay.slots,c.node,c.childIndex):nf(e,c),1===c.replay.pendingTasks&&0<c.replay.nodes.length)throw Error(a(488));c.replay.pendingTasks--,c.abortSet.delete(c),n_(e,c.blockedBoundary,c.row,null)}catch(t){tj();var p=t===tu?th():t;if(e.aborted){t===tu&&(c.thenableState=tL()),e.currentTask=d;var m=e;nE(c,m),c.abortSet.delete(c),nT(c,m,m.fatalError)}else{if("object"==typeof p&&null!==p){if("function"==typeof p.then){var f=c.ping;p.then(f.resolve,f.reject),c.thenableState=t===tu?tL():null;break t}if("Maximum call stack size exceeded"===p.message&&c.node!==h){c.thenableState=null,e.pingedTasks.push(c);break t}}c.replay.pendingTasks--,c.abortSet.delete(c);var g=nn(c.componentStack);m=e;var y=c.blockedBoundary,b=e.aborted?e.fatalError:p,v=c.replay.nodes,x=c.replay.slots,k=nr(m,b,g);nS(m,y,v,x,b,k),e.pendingRootTasks--,0===e.pendingRootTasks&&nD(e),e.allPendingTasks--,0===e.allPendingTasks&&nN(e)}}finally{e.currentTask=d}}}else t:if(m=u,0===m.status){var w=e.currentTask;e.currentTask=c,tt(c.context);var C=m.children.length,S=m.chunks.length,E=c.node;try{nf(e,c),e3(m.chunks,e.renderState,m.lastPushedText,m.textEmbedded),c.abortSet.delete(c),m.status=1,n_(e,c.blockedBoundary,c.row,m)}catch(t){tj(),m.children.length=C,m.chunks.length=S;var T=t===tu?th():t;if(e.aborted)t===tu&&(c.thenableState=tL()),e.currentTask=w,m=e,nE(c,m),c.abortSet.delete(c),nT(c,m,m.fatalError);else{if("object"==typeof T&&null!==T){if("function"==typeof T.then){m.status=0,c.thenableState=t===tu?tL():null;var I=c.ping;T.then(I.resolve,I.reject);break t}if("Maximum call stack size exceeded"===T.message&&c.node!==E){m.status=0,c.thenableState=null,e.pingedTasks.push(c);break t}}var D=nn(c.componentStack);c.abortSet.delete(c),m.status=4;var N=c.blockedBoundary,A=c.row;if(null!==A&&0==--A.pendingTasks&&na(e,A),e.allPendingTasks--,null===N)if(T===tI){if(null===tD)throw Error(a(606));m=tD,tD=null;var _=m;nr(e,_,D),ni(e,_)}else nr(e,T,D),ni(e,T);else{var P=nr(e,T,D);if(N.pendingTasks--,4!==N.status){N.status=4,N.errorDigest=P,nv(e,N);var M=N.row;null!==M&&(e.allPendingTasks++,0==--M.pendingTasks&&na(e,M),e.allPendingTasks--),N.parentFlushed&&e.clientRenderedBoundaries.push(N),0===e.pendingRootTasks&&null===e.trackedPostpones&&null!==N.preamble&&nL(e)}0===e.allPendingTasks&&nN(e)}}}finally{e.currentTask=w}}}l.splice(0,s),null!==e.destination&&n$(e,e.destination)}catch(t){nr(e,t,{}),ni(e,t)}finally{tZ=o,$.H=n,$.A=r,n===tY&&tt(t),t3=i}}}function nM(e,t,n){t.preambleChildren.length&&n.push(t.preambleChildren);for(var r=!1,i=0;i<t.children.length;i++)r=nR(e,t.children[i],n)||r;return r}
173function nR(e,t,n){var r=t.boundary;if(null===r)return nM(e,t,n);var i=r.preamble;if(null===i)return!1;switch(r.status){case 1:if(eN(e.renderState,i.content),e.byteSize+=r.byteSize,!(t=r.completedSegments[0]))throw Error(a(391));return nM(e,t,n);case 5:if(null!==e.trackedPostpones)return!0;case 4:if(1===t.status)return eN(e.renderState,i.fallback),nM(e,t,n);default:return!0}}function nL(e){if(e.completedRootSegment&&null===e.completedPreambleSegments){var t=[],n=e.byteSize,r=nR(e,e.completedRootSegment,t),i=e.renderState.preamble;!1===r||i.headChunks&&i.bodyChunks?e.completedPreambleSegments=t:e.byteSize=n}}function nj(e,t,n,r){switch(n.parentFlushed=!0,n.status){case 0:n.id=e.nextSegmentId++;case 5:return r=n.id,n.lastPushedText=!1,n.textEmbedded=!1,e=e.renderState,t.push('<template id="'),t.push(e.placeholderPrefix),e=r.toString(16),t.push(e),t.push('"></template>');case 1:n.status=2;var i=!0,o=n.chunks,s=0;n=n.children;for(var l=0;l<n.length;l++){for(i=n[l];s<i.index;s++)t.push(o[s]);i=nB(e,t,i,r)}for(;s<o.length-1;s++)t.push(o[s]);return s<o.length&&(i=t.push(o[s])),i;case 3:return!0;default:throw Error(a(390))}}var nO=0;function nB(e,t,n,r){var i=n.boundary;if(null===i)return nj(e,t,n,r);if(n.boundary=null,i.parentFlushed=!0,4===i.status){var o=i.row;return null!==o&&0==--o.pendingTasks&&na(e,o),e.renderState.generateStaticMarkup||(i=i.errorDigest,t.push("<!--$!-->"),t.push("<template"),null!=i&&(t.push(' data-dgst="'),i=B(i),t.push(i),t.push('"')),t.push("></template>")),nj(e,t,n,r),e=!!e.renderState.generateStaticMarkup||t.push("<!--/$-->")}if(1!==i.status)return 0===i.status&&(i.rootSegmentID=e.nextSegmentId++),0<i.completedSegments.length&&e.partialBoundaries.push(i),e_(t,e.renderState,i.rootSegmentID),r&&e2(r,i.fallbackState),nj(e,t,n,r),t.push("<!--/$-->");if(!nz&&t0(e,i)&&(nO+i.byteSize>e.progressiveChunkSize||i.defer))return i.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(i),e_(t,e.renderState,i.rootSegmentID),nj(e,t,n,r),t.push("<!--/$-->");if(nO+=i.byteSize,r&&e2(r,i.contentState),null!==(n=i.row)&&t0(e,i)&&0==--n.pendingTasks&&na(e,n),e.renderState.generateStaticMarkup||t.push("<!--$-->"),1!==(n=i.completedSegments).length)throw Error(a(391));return nB(e,t,n[0],r),e=!!e.renderState.generateStaticMarkup||t.push("<!--/$-->")}function nF(e,t,n,r){switch(!function(e,t,n,r){switch(n.insertionMode){case 0:case 1:case 3:case 2:return e.push('<div hidden id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 4:return e.push('<svg aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 5:return e.push('<math aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 6:return e.push('<table hidden id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 7:return e.push('<table hidden><tbody id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 8:return e.push('<table hidden><tr id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 9:return e.push('<table hidden><colgroup id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');default:throw Error(a(397))}}(t,e.renderState,n.parentFormatContext,n.id),nB(e,t,n,r),n.parentFormatContext.insertionMode){case 0:case 1:case 3:case 2:return t.push("</div>");case 4:return t.push("</svg>");case 5:return t.push("</math>");case 6:return t.push("</table>");case 7:return t.push("</tbody></table>");case 8:return t.push("</tr></table>");case 9:return t.push("</colgroup></table>");default:throw Error(a(397))}}function nH(e,t,n){nO=n.byteSize;for(var r,i,o=n.completedSegments,s=0;s<o.length;s++)nU(e,t,n,o[s]);o.length=0,null!==(o=n.row)&&t0(e,n)&&0==--o.pendingTasks&&na(e,o),eF(t,n.contentState,e.renderState),o=e.resumableState,e=e.renderState,s=n.rootSegmentID,n=n.contentState;var l=e.stylesToHoist,c=0!=(128&o.instructions);return e.stylesToHoist=!1,t.push(e.startInlineScript),t.push(">"),l?(0==(4&o.instructions)&&(o.instructions|=4,t.push('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};')),0==(2&o.instructions)&&(o.instructions|=2,t.push('$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};')),c&&0==(256&o.instructions)&&(o.instructions|=256,t.push('$RV=function(B,g){function h(a,c){var e=a.getAttribute(c);e&&(c=a.style,l.push(a,c.viewTransitionName,c.viewTransitionClass),"auto"!==e&&(c.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+N++ +"_"),a=CSS.escape(a)!==a?"r-"+btoa(a).replace(/=/g,""):a,c.viewTransitionName=a,C=!0)}var C=!1,N=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var k=g[f].querySelectorAll("[vt-share]"),d=0;d<k.length;d++){var b=k[d];m.set(b.getAttribute("vt-name"),b)}var u=[];for(k=0;k<g.length;k+=2){var D=g[k],x=D.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){b=D;for(f=0;b;){if(8===b.nodeType){var t=b.data;if("/$"===t)if(0===f)break;else f--;else"$"!==t&&"$?"!==t&&"$~"!==t&&"$!"!==t||f++}else if(1===b.nodeType){d=b;var E=d.getAttribute("vt-name"),y=m.get(E);h(d,y?"vt-share":"vt-exit");y&&(h(y,"vt-share"),m.set(E,null));for(var F=d.querySelectorAll("[vt-share]"),\nz=0;z<F.length;z++){var G=F[z],H=G.getAttribute("vt-name"),I=m.get(H);I&&(h(G,"vt-share"),h(I,"vt-share"),m.set(H,null))}var J=d.querySelectorAll("[vt-parent-exit]");for(d=0;d<J.length;d++)h(J[d],"vt-parent-exit")}b=b.nextSibling}for(var K=g[k+1],n=K.firstElementChild;n;){null!==m.get(n.getAttribute("vt-name"))&&h(n,"vt-enter");var L=n.querySelectorAll("[vt-parent-enter]");for(b=0;b<L.length;b++)h(L[b],"vt-parent-enter");n=n.nextElementSibling}b=x;do for(var p=b.firstElementChild;p;){var M=p.getAttribute("vt-update");\nM&&"none"!==M&&!l.includes(p)&&h(p,"vt-update");p=p.nextElementSibling}while((b=b.parentNode)&&1===b.nodeType&&"none"!==b.getAttribute("vt-update"));u.push.apply(u,K.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(C){var A=document.__reactViewTransition=document.startViewTransition({update:function(){B(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],c={},e=0;e<u.length;c={g:c.g},e++)if(c.g=u[e],!c.g.complete){var q=c.g.getBoundingClientRect();0<q.bottom&&0<q.right&&\nq.top<window.innerHeight&&q.left<window.innerWidth&&(q=new Promise(function(w){return function(r){w.g.addEventListener("load",r);w.g.addEventListener("error",r)}}(c)),a.push(q))}return Promise.race([Promise.all(a),new Promise(function(w){var r=performance.now();setTimeout(w,2300>r&&2E3<r?2300-r:500)})])},types:[]});A.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var c=l[a],e=c.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===c.getAttribute("style")&&c.removeAttribute("style")}});\nA.finished.finally(function(){document.__reactViewTransition===A&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}B(g)}.bind(null,$RV);')),0==(8&o.instructions)?(o.instructions|=8,t.push('$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=\n"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);
173if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\n"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("')):t.push('$RR("')):(0==(2&o.instructions)&&(o.instructions|=2,t.push('$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};')),c&&0==(256&o.instructions)&&(o.instructions|=256,t.push('$RV=function(B,g){function h(a,c){var e=a.getAttribute(c);e&&(c=a.style,l.push(a,c.viewTransitionName,c.viewTransitionClass),"auto"!==e&&(c.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+N++ +"_"),a=CSS.escape(a)!==a?"r-"+btoa(a).replace(/=/g,""):a,c.viewTransitionName=a,C=!0)}var C=!1,N=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var k=g[f].querySelectorAll("[vt-share]"),d=0;d<k.length;d++){var b=k[d];m.set(b.getAttribute("vt-name"),b)}var u=[];for(k=0;k<g.length;k+=2){var D=g[k],x=D.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){b=D;for(f=0;b;){if(8===b.nodeType){var t=b.data;if("/$"===t)if(0===f)break;else f--;else"$"!==t&&"$?"!==t&&"$~"!==t&&"$!"!==t||f++}else if(1===b.nodeType){d=b;var E=d.getAttribute("vt-name"),y=m.get(E);h(d,y?"vt-share":"vt-exit");y&&(h(y,"vt-share"),m.set(E,null));for(var F=d.querySelectorAll("[vt-share]"),\nz=0;z<F.length;z++){var G=F[z],H=G.getAttribute("vt-name"),I=m.get(H);I&&(h(G,"vt-share"),h(I,"vt-share"),m.set(H,null))}var J=d.querySelectorAll("[vt-parent-exit]");for(d=0;d<J.length;d++)h(J[d],"vt-parent-exit")}b=b.nextSibling}for(var K=g[k+1],n=K.firstElementChild;n;){null!==m.get(n.getAttribute("vt-name"))&&h(n,"vt-enter");var L=n.querySelectorAll("[vt-parent-enter]");for(b=0;b<L.length;b++)h(L[b],"vt-parent-enter");n=n.nextElementSibling}b=x;do for(var p=b.firstElementChild;p;){var M=p.getAttribute("vt-update");\nM&&"none"!==M&&!l.includes(p)&&h(p,"vt-update");p=p.nextElementSibling}while((b=b.parentNode)&&1===b.nodeType&&"none"!==b.getAttribute("vt-update"));u.push.apply(u,K.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(C){var A=document.__reactViewTransition=document.startViewTransition({update:function(){B(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],c={},e=0;e<u.length;c={g:c.g},e++)if(c.g=u[e],!c.g.complete){var q=c.g.getBoundingClientRect();0<q.bottom&&0<q.right&&\nq.top<window.innerHeight&&q.left<window.innerWidth&&(q=new Promise(function(w){return function(r){w.g.addEventListener("load",r);w.g.addEventListener("error",r)}}(c)),a.push(q))}return Promise.race([Promise.all(a),new Promise(function(w){var r=performance.now();setTimeout(w,2300>r&&2E3<r?2300-r:500)})])},types:[]});A.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var c=l[a],e=c.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===c.getAttribute("style")&&c.removeAttribute("style")}});\nA.finished.finally(function(){document.__reactViewTransition===A&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}B(g)}.bind(null,$RV);')),t.push('$RC("')),o=s.toString(16),t.push(e.boundaryPrefix),t.push(o),t.push('","'),t.push(e.segmentPrefix),t.push(o),l?(t.push('",'),r=n,t.push("["),i="[",r.stylesheets.forEac
173h(function(e){if(2!==e.state)if(3===e.state)t.push(i),e=eR(""+e.props.href),t.push(e),t.push("]"),i=",[";else{t.push(i);var n=e.props["data-precedence"],r=e.props,o=z(""+e.props.href);for(var s in o=eR(o),t.push(o),n=""+n,t.push(","),n=eR(n),t.push(n),r)if(A.call(r,s)&&null!=(n=r[s]))switch(s){case"href":case"rel":case"precedence":case"data-precedence":break;case"children":case"dangerouslySetInnerHTML":throw Error(a(399,"link"));default:!function(e,t,n){var r=t.toLowerCase();switch(typeof n){case"function":case"symbol":return}switch(t){case"innerHTML":case"dangerouslySetInnerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"style":case"ref":return;case"className":r="class",t=""+n;break;case"hidden":if(!1===n)return;t="";break;case"src":case"href":t=""+(n=z(n));break;default:if(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])||!R(t))return;t=""+n}e.push(","),r=eR(r),e.push(r),e.push(","),r=eR(t),e.push(r)}(t,s,n)}t.push("]"),i=",[",e.state=3}}),t.push("]")):t.push('"'),n=t.push(")</script>"),eA(t,e)&&n}function nU(e,t,n,r){if(2===r.status)return!0;var i=n.contentState,o=r.id;if(-1===o){if(-1===(r.id=n.rootSegmentID))throw Error(a(392));return nF(e,t,r,i)}return o===n.rootSegmentID?nF(e,t,r,i):(nF(e,t,r,i),n=e.resumableState,e=e.renderState,t.push(e.startInlineScript),t.push(">"),0==(1&n.instructions)?(n.instructions|=1,t.push('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')):t.push('$RS("'),t.push(e.segmentPrefix),o=o.toString(16),t.push(o),t.push('","'),t.push(e.placeholderPrefix),t.push(o),t=t.push('")</script>'))}var nz=!1;function n$(e,t){try{if(!(0<e.pendingRootTasks)){var n,r=e.completedRootSegment;if(null!==r){if(5===r.status)return;var i=e.completedPreambleSegments;if(null===i)return;nO=e.byteSize;var a,o=e.resumableState,s=e.renderState,l=s.preamble,c=l.htmlChunks,u=l.headChunks;if(c){for(a=0;a<c.length;a++)t.push(c[a]);if(u)for(a=0;a<u.length;a++)t.push(u[a]);else{var d=eT("head");t.push(d),t.push(">")}}else if(u)for(a=0;a<u.length;a++)t.push(u[a]);var h=s.charsetChunks;for(a=0;a<h.length;a++)t.push(h[a]);h.length=0,s.preconnects.forEach(eH,t),s.preconnects.clear();var p=s.viewportChunks;for(a=0;a<p.length;a++)t.push(p[a]);p.length=0,s.fontPreloads.forEach(eH,t),s.fontPreloads.clear(),s.highImagePreloads.forEach(eH,t),s.highImagePreloads.clear(),K=s,s.styles.forEach(e$,t),K=null;var m=s.importMapChunks;for(a=0;a<m.length;a++)t.push(m[a]);m.length=0,s.bootstrapScripts.forEach(eH,t),s.scripts.forEach(eH,t),s.scripts.clear(),s.bulkPreloads.forEach(eH,t),s.bulkPreloads.clear(),o.instructions|=32;var f=s.hoistableChunks;for(a=0;a<f.length;a++)t.push(f[a]);for(o=f.length=0;o<i.length;o++){var g=i[o];for(s=0;s<g.length;s++)nB(e,t,g[s],null)}var y=e.renderState.preamble,b=y.headChunks;if(y.htmlChunks||b){var v=eD("head");t.push(v)}var x=y.bodyChunks;if(x)for(i=0;i<x.length;i++)t.push(x[i]);nB(e,t,r,null),e.completedRootSegment=null;var k=e.renderState;if(0!==e.allPendingTasks||0!==e.clientRenderedBoundaries.length||0!==e.completedBoundaries.length||null!==e.trackedPostpones&&(0!==e.trackedPostpones.rootNodes.length||null!==e.trackedPostpones.rootSlots)){var w=e.resumableState;if(0==(64&w.instructions)){if(w.instructions|=64,t.push(k.startInlineScript),0==(32&w.instructions)){w.instructions|=32;var C="_"+w.idPrefix+"R_";t.push(' id="');var S=B(C);t.push(S),t.push('"')}t.push(">"),t.push("requestAnimationFrame(function(){$RT=performance.now()});"),t.push("</script>")}}eA(t,k)}var E=e.renderState;r=0;var T=E.viewportChunks;for(r=0;r<T.length;r++)t.push(T[r]);T.length=0,E.preconnects.forEach(eH,t),E.preconnects.clear(),E.fontPreloads.forEach(eH,t),E.fontPreloads.clear(),E.highImagePreloads.forEach(eH,t),E.highImagePreloads.clear(),E.styles.forEach(eq,t),E.scripts.forEach(eH,t),E.scripts.clear(),E.bulkPreloads.forEach(eH,t),E.bulkPreloads.clear();var I=E.hoistableChunks;for(r=0;r<I.length;r++)t.push(I[r]);I.length=0;var D=e.clientRenderedBoundaries;for(n=0;n<D.length;n++){var N=D[n];E=t;var A=e.resumableState,_=e.renderState,P=N.rootSegmentID,M=N.errorDigest;E.push(_.startInlineScript),E.push(">"),0==(4&A.instructions)?(A.instructions|=4,E.push('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("')):E.push('$RX("'),E.push(_.boundaryPrefix);var R=P.toString(16);if(E.push(R),E.push('"'),null!=M)if(E.push(","),null==M)E.push("null");else{var L=JSON.stringify(M).replace(eP,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}});E.push(L)}var j=E.push(")</script>");if(!j){e.destination=null,n++,D.splice(0,n);return}}D.splice(0,n);var O=e.completedBoundaries;for(n=0;n<O.length;n++)if(!nH(e,t,O[n])){e.destination=null,n++,O.splice(0,n);return}O.splice(0,n),nz=!0;var F=e.partialBoundaries;for(n=0;n<F.length;n++){var H=F[n];t:{D=e,N=t,nO=H.byteSize;var U=H.completedSegments;for(j=0;j<U.length;
173j++)if(!nU(D,N,H,U[j])){j++,U.splice(0,j);var z=!1;break t}U.splice(0,j);var $=H.row;null!==$&&$.together&&1===H.pendingTasks&&(1===$.pendingTasks?no(D,$,$.hoistables):$.pendingTasks--),z=eF(N,H.contentState,D.renderState)}if(!z){e.destination=null,n++,F.splice(0,n);return}}F.splice(0,n),nz=!1;var V=e.completedBoundaries;for(n=0;n<V.length;n++)if(!nH(e,t,V[n])){e.destination=null,n++,V.splice(0,n);return}V.splice(0,n)}}finally{nz=!1,null!==(n=e.postponedState)&&(n.nextSegmentId=e.nextSegmentId),0===e.allPendingTasks&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&(e.flushScheduled=!1,(n=e.resumableState).hasBody&&(F=eD("body"),t.push(F)),n.hasHtml&&(n=eD("html"),t.push(n)),e.status=13,t.push(null),e.destination=null)}}function nV(e){if(!1===e.flushScheduled&&0===e.pingedTasks.length&&null!==e.destination){e.flushScheduled=!0;var t=e.destination;t?n$(e,t):e.flushScheduled=!1}}function nq(e,t,n){if(null===t)n.rootNodes.push(e);else{var r=n.workingMap,i=r.get(t);void 0===i&&(i=[t[1],t[2],[],null],r.set(t,i),nq(i,t[0],n)),i[2].push(e)}}function nG(){}function nW(e,t,n,r){var i,o,s,l,c,u,d,h=!1,p=null,m="",f=!1;t={idPrefix:void 0===(i=t?t.identifierPrefix:void 0)?"":i,nextFormID:0,streamingFormat:0,bootstrapScriptContent:void 0,bootstrapScripts:void 0,bootstrapModules:void 0,instructions:0,hasBody:!1,hasHtml:!1,unknownResources:{},dnsResources:{},connectResources:{default:{},anonymous:{},credentials:{}},imageResources:{},styleResources:{},scriptResources:{},moduleUnknownResources:{},moduleScriptResources:{}},o=e,s=t,l=function(e,t){var n=e.idPrefix,r=[],i=e.bootstrapScriptContent,a=e.bootstrapScripts,o=e.bootstrapModules;void 0!==i&&(r.push("<script"),eG(r,e),r.push(">",(""+i).replace(Y,Z),"</script>")),i=n+"P:";var s=n+"S:";n+="B:";var l=new Set,c=new Set,u=new Set,d=new Map,h=new Set,p=new Set,m=new Set,f={images:new Map,stylesheets:new Map,scripts:new Map,moduleScripts:new Map};if(void 0!==a)for(var g=0;g<a.length;g++){var y,b=a[g],v=void 0,x=void 0,k={rel:"preload",as:"script",fetchPriority:"low",nonce:void 0};"string"==typeof b?k.href=y=b:(k.href=y=b.src,k.integrity=x="string"==typeof b.integrity?b.integrity:void 0,k.crossOrigin=v="string"==typeof b||null==b.crossOrigin?void 0:"use-credentials"===b.crossOrigin?"use-credentials":"");var w=y;(b=e).scriptResources[w]=null,b.moduleScriptResources[w]=null,eg(b=[],k),h.add(b),r.push('<script src="',B(y),'"'),"string"==typeof x&&r.push(' integrity="',B(x),'"'),"string"==typeof v&&r.push(' crossorigin="',B(v),'"'),eG(r,e),r.push(' async=""></script>')}if(void 0!==o)for(a=0;a<o.length;a++)k=o[a],v=y=void 0,x={rel:"modulepreload",fetchPriority:"low",nonce:void 0},"string"==typeof k?x.href=g=k:(x.href=g=k.src,x.integrity=v="string"==typeof k.integrity?k.integrity:void 0,x.crossOrigin=y="string"==typeof k||null==k.crossOrigin?void 0:"use-credentials"===k.crossOrigin?"use-credentials":""),k=e,b=g,k.scriptResources[b]=null,k.moduleScriptResources[b]=null,eg(k=[],x),h.add(k),r.push('<script type="module" src="',B(g),'"'),"string"==typeof v&&r.push(' integrity="',B(v),'"'),"string"==typeof y&&r.push(' crossorigin="',B(y),'"'),eG(r,e),r.push(' async=""></script>');return{placeholderPrefix:i,segmentPrefix:s,boundaryPrefix:n,startInlineScript:"<script",startInlineStyle:"<style",preamble:{htmlChunks:null,headChunks:null,bodyChunks:null},externalRuntimeScript:null,bootstrapChunks:r,importMapChunks:[],onHeaders:void 0,headers:null,resets:{font:{},dns:{},connect:{default:{},anonymous:{},credentials:{}},image:{},style:{}},charsetChunks:[],viewportChunks:[],hoistableChunks:[],preconnects:l,fontPreloads:c,highImagePreloads:u,styles:d,bootstrapScripts:h,scripts:p,bulkPreloads:m,preloads:f,nonce:{script:void 0,style:void 0},stylesToHoist:!1,generateStaticMarkup:t}}(t,n),(l=t9(s=new t4(s,l,c=X(0,null,0,null),1/0,nG,void 0,function(){f=!0},void 0,void 0,void 0),0,null,c,!1,!1)).parentFlushed=!0,ne(o=t7(s,null,o,-1,null,l,null,null,s.abortableTasks,null,c,null,tr,null,null)),s.pingedTasks.push(o),(e=s).flushScheduled=null!==e.destination,nP(e),10===e.status&&(e.status=11),null===e.trackedPostpones&&nI(e,0===e.pendingRootTasks),u=e,d=r,u.aborted||11!==u.status&&10!==u.status||(u.aborted=!0,u.fatalError=d=void 0===d?Error(a(432)):"object"==typeof d&&null!==d&&"function"==typeof d.then?Error(a(530)):d,(d=u.abortableTasks).forEac
173h(function(e){return nE(e,u)}),function(e,t){try{if(0<t.size){var n=e.fatalError;t.forEach(function(t){return nT(t,e,n)}),t.clear()}null!==e.destination&&n$(e,e.destination)}catch(t){nr(e,t,{}),ni(e,t)}}(u,d));var g=e,y={push:function(e){return null!==e&&(m+=e),!0},destroy:function(e){h=!0,p=e}};if(12===g.status)g.status=13,y.destroy(g.fatalError);else if(13!==g.status&&null===g.destination){g.destination=y;try{n$(g,y)}catch(e){nr(g,e,{}),ni(g,e)}}if(h&&p!==r)throw p;if(!f)throw Error(a(426));return m}n.renderToStaticMarkup=function(e,t){return nW(e,t,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},n.renderToString=function(e,t){return nW(e,t,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},n.version="19.3.0-canary-cbb046ab-20260731"},149340,(e,t,n)=>{"use strict";var r=e.r(271645),i=e.r(174080);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.scope"),v=Symbol.for("react.activity"),x=Symbol.for("react.legacy_hidden"),k=Symbol.for("react.memo_cache_sentinel"),w=Symbol.for("react.view_transition"),C=Symbol.for("react.recoverable"),S=Symbol.iterator;function E(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=S&&e[S]||e["@@iterator"])?e:null}var T=Symbol.for("react.optimistic_key"),I=Array.isArray;function D(e,t){var n=3&e.length,r=e.length-n,i=t;for(t=0;t<r;){var a=255&e.charCodeAt(t)|(255&e.charCodeAt(++t))<<8|(255&e.charCodeAt(++t))<<16|(255&e.charCodeAt(++t))<<24;++t,i^=a=0x1b873593*(65535&(a=(a=0xcc9e2d51*(65535&a)+((0xcc9e2d51*(a>>>16)&65535)<<16)|0)<<15|a>>>17))+((0x1b873593*(a>>>16)&65535)<<16)|0,i=(65535&(i=5*(65535&(i=i<<13|i>>>19))+((5*(i>>>16)&65535)<<16)|0))+27492+(((i>>>16)+58964&65535)<<16)}switch(a=0,n){case 3:a^=(255&e.charCodeAt(t+2))<<16;case 2:a^=(255&e.charCodeAt(t+1))<<8;case 1:a^=255&e.charCodeAt(t),i^=0x1b873593*(65535&(a=(a=0xcc9e2d51*(65535&a)+((0xcc9e2d51*(a>>>16)&65535)<<16)|0)<<15|a>>>17))+((0x1b873593*(a>>>16)&65535)<<16)}return i^=e.length,i^=i>>>16,i=0x85ebca6b*(65535&i)+((0x85ebca6b*(i>>>16)&65535)<<16)|0,i^=i>>>13,((i=0xc2b2ae35*(65535&i)+((0xc2b2ae35*(i>>>16)&65535)<<16)|0)^i>>>16)>>>0}var N=new MessageChannel,A=[];function _(e){A.push(e),N.port2.postMessage(null)}function P(e){setTimeout(function(){throw e})}N.port1.onmessage=function(){var e=A.shift();e&&e()};var M=Promise,R="function"==typeof queueMicrotask?queueMicrotask:function(e){M.resolve(null).then(e).catch(P)},L=null,j=0;function O(e,t){if(0!==t.byteLength)if(2048<t.byteLength)0<j&&(e.enqueue(new Uint8Array(L.buffer,0,j)),L=new Uint8Array(2048),j=0),e.enqueue(t);else{var n=L.length-j;n<t.byteLength&&(0===n?e.enqueue(L):(L.set(t.subarray(0,n),j),e.enqueue(L),t=t.subarray(n)),L=new Uint8Array(2048),j=0),L.set(t,j),j+=t.byteLength}}function B(e,t){return O(e,t),!0}function F(e){L&&0<j&&(e.enqueue(new Uint8Array(L.buffer,0,j)),L=null,j=0)}var H=new TextEncoder;function U(e){return H.encode(e)}function z(e){return H.encode(e)}function $(e){return e.byteLength}function V(e,t){"function"==typeof e.error?e.error(t):e.close()}var q=Object.assign,G=Object.prototype.hasOwnProperty,W=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
173037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K={},Y={};function Z(e){return!!G.call(Y,e)||!G.call(K,e)&&(W.test(e)?Y[e]=!0:(K[e]=!0,!1))}var X=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Q=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),J=/["'&<>]/;function ee(e){if("boolean"==typeof e||"number"==typeof e||"bigint"==typeof e)return""+e;e=""+e;var t=J.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.slice(i,n)),i=n+1,r+=t}e=i!==n?r+e.slice(i,n):r}return e}var et=/([A-Z])/g,en=/^ms-/,er=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ei(e){return er.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ea=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,eo=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,es={pending:!1,data:null,method:null,action:null},el=eo.d;eo.d={f:el.f,r:el.r,D:function(e){var t=rJ||null;
173if(t){var n,r,i=t.resumableState,a=t.renderState;"string"==typeof e&&e&&(i.dnsResources.hasOwnProperty(e)||(i.dnsResources[e]=null,(r=(i=a.headers)&&0<i.remainingCapacity)&&(n="<"+(""+e).replace(n$,nV)+">; rel=dns-prefetch",r=0<=(i.remainingCapacity-=n.length+2)),r?(a.resets.dns[e]=null,i.preconnects&&(i.preconnects+=", "),i.preconnects+=n):(e9(n=[],{href:e,rel:"dns-prefetch"}),a.preconnects.add(n))),iV(t))}else el.D(e)},C:function(e,t){var n=rJ||null;if(n){var r=n.resumableState,i=n.renderState;if("string"==typeof e&&e){var a,o,s="use-credentials"===t?"credentials":"string"==typeof t?"anonymous":"default";r.connectResources[s].hasOwnProperty(e)||(r.connectResources[s][e]=null,(o=(r=i.headers)&&0<r.remainingCapacity)&&(o="<"+(""+e).replace(n$,nV)+">; rel=preconnect","string"==typeof t&&(o+='; crossorigin="'+(""+t).replace(nq,nG)+'"'),a=o,o=0<=(r.remainingCapacity-=a.length+2)),o?(i.resets.connect[s][e]=null,r.preconnects&&(r.preconnects+=", "),r.preconnects+=a):(e9(s=[],{rel:"preconnect",href:e,crossOrigin:t}),i.preconnects.add(s))),iV(n)}}else el.C(e,t)},L:function(e,t,n){var r=rJ||null;if(r){var i=r.resumableState,a=r.renderState;if(t&&e){switch(t){case"image":if(n)var o,s=n.imageSrcSet,l=n.imageSizes,c=n.fetchPriority;var u=s?s+"\n"+(l||""):e;if(i.imageResources.hasOwnProperty(u))return;i.imageResources[u]=ec,(i=a.headers)&&0<i.remainingCapacity&&"string"!=typeof s&&"high"===c&&(o=nz(e,t,n),0<=(i.remainingCapacity-=o.length+2))?(a.resets.image[u]=ec,i.highImagePreloads&&(i.highImagePreloads+=", "),i.highImagePreloads+=o):(e9(i=[],q({rel:"preload",href:s?void 0:e,as:t},n)),"high"===c?a.highImagePreloads.add(i):(a.bulkPreloads.add(i),a.preloads.images.set(u,i)));break;case"style":if(i.styleResources.hasOwnProperty(e))return;e9(s=[],q({rel:"preload",href:e,as:t},n)),i.styleResources[e]=n&&("string"==typeof n.crossOrigin||"string"==typeof n.integrity)?[n.crossOrigin,n.integrity]:ec,a.preloads.stylesheets.set(e,s),a.bulkPreloads.add(s);break;case"script":if(i.scriptResources.hasOwnProperty(e))return;s=[],a.preloads.scripts.set(e,s),a.bulkPreloads.add(s),e9(s,q({rel:"preload",href:e,as:t},n)),i.scriptResources[e]=n&&("string"==typeof n.crossOrigin||"string"==typeof n.integrity)?[n.crossOrigin,n.integrity]:ec;break;default:if(i.unknownResources.hasOwnProperty(t)){if((s=i.unknownResources[t]).hasOwnProperty(e))return}else s={},i.unknownResources[t]=s;s[e]=ec,(i=a.headers)&&0<i.remainingCapacity&&"font"===t&&(u=nz(e,t,n),0<=(i.remainingCapacity-=u.length+2))?(a.resets.font[e]=ec,i.fontPreloads&&(i.fontPreloads+=", "),i.fontPreloads+=u):(e9(i=[],e=q({rel:"preload",href:e,as:t},n)),"font"===t)?a.fontPreloads.add(i):a.bulkPreloads.add(i)}iV(r)}}else el.L(e,t,n)},m:function(e,t){var n=rJ||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=t&&"string"==typeof t.as?t.as:"script";if("script"===a){if(r.moduleScriptResources.hasOwnProperty(e))return;a=[],r.moduleScriptResources[e]=t&&("string"==typeof t.crossOrigin||"string"==typeof t.integrity)?[t.crossOrigin,t.integrity]:ec,i.preloads.moduleScripts.set(e,a)}else{if(r.moduleUnknownResources.hasOwnProperty(a)){var o=r.moduleUnknownResources[a];if(o.hasOwnProperty(e))return}else o={},r.moduleUnknownResources[a]=o;a=[],o[e]=ec}e9(a,q({rel:"modulepreload",href:e},t)),i.bulkPreloads.add(a),iV(n)}}else el.m(e,t)},X:function(e,t){var n=rJ||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.scriptResources.hasOwnProperty(e)?r.scriptResources[e]:void 0;null!==a&&(r.scriptResources[e]=null,t=q({src:e,async:!0},t),a&&(2===a.length&&nU(t,a),e=i.preloads.scripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),ts(e,t),iV(n))}}else el.X(e,t)},S:function(e,t,n){var r=rJ||null;if(r){var i=r.resumableState,a=r.renderState;if(e){t=t||"default";var o=a.styles.get(t),s=i.styleResources.hasOwnProperty(e)?i.styleResources[e]:void 0;null!==s&&(i.styleResources[e]=null,o||(o={precedence:U(ee(t)),rules:[],hrefs:[],sheets:new Map},a.styles.set(t,o)),t={state:0,props:q({rel:"stylesheet",href:e,"data-precedence":t},n)},s&&(2===s.length&&nU(t.props,s),(a=a.preloads.stylesheets.get(e))&&0<a.length?a.length=0:t.state=1),o.sheets.set(e,t),iV(r))}}else el.S(e,t,n)},M:function(e,t){var n=rJ||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.moduleScriptResources.hasOwnProperty(e)?r.moduleScriptResources[e]:void 0;null!==a&&(r.moduleScriptResources[e]=null,t=q({src:e,type:"module",async:!0},t),a&&(2===a.length&&nU(t,a),e=i.preloads.moduleScripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),ts(e,t),iV(n))}}else el.M(e,t)}};var ec=[],eu=null;z('"></template>');var ed=z("<script"),eh=z("</script>"),ep=z('<script src="'),em=z('<script type="module" src="'),ef=z(' nonce="'),eg=z(' integrity="'),ey=z(' crossorigin="'),eb=z(' async=""></script>'),ev=z("<style"),ex=/(<\/|<)(s)(cript)/gi;function ek(e,t,n,r){return""+t+("s"===n?"\\u0073":"\\u0053")+r}var ew=z('<script type="importmap">'),eC=z("</script>");
vendor: 9,141 bytes, line 173
173function eS(e,t,n,r,i,a){var o=void 0===(n="string"==typeof t?t:t&&t.script)?ed:z('<script nonce="'+ee(n)+'"'),s="string"==typeof t?void 0:t&&t.style,l=void 0===s?ev:z('<style nonce="'+ee(s)+'"'),c=e.idPrefix,u=[],d=e.bootstrapScriptContent,h=e.bootstrapScripts,p=e.bootstrapModules;if(void 0!==d&&(u.push(o),nL(u,e),u.push(e0,U((""+d).replace(ex,ek)),eh)),d=[],void 0!==r&&(d.push(ew),d.push(U((""+JSON.stringify(r)).replace(ex,ek))),d.push(eC)),r=i?{preconnects:"",fontPreloads:"",highImagePreloads:"",remainingCapacity:2+("number"==typeof a?a:2e3)}:null,i={placeholderPrefix:z(c+"P:"),segmentPrefix:z(c+"S:"),boundaryPrefix:z(c+"B:"),startInlineScript:o,startInlineStyle:l,preamble:eT(),externalRuntimeScript:null,bootstrapChunks:u,importMapChunks:d,onHeaders:i,headers:r,resets:{font:{},dns:{},connect:{default:{},anonymous:{},credentials:{}},image:{},style:{}},charsetChunks:[],viewportChunks:[],hoistableChunks:[],preconnects:new Set,fontPreloads:new Set,highImagePreloads:new Set,styles:new Map,bootstrapScripts:new Set,scripts:new Set,bulkPreloads:new Set,preloads:{images:new Map,stylesheets:new Map,scripts:new Map,moduleScripts:new Map},nonce:{script:n,style:s},hoistableState:null,stylesToHoist:!1},void 0!==h)for(r=0;r<h.length;r++)c=h[r],s=o=void 0,l={rel:"preload",as:"script",fetchPriority:"low",nonce:t},"string"==typeof c?l.href=a=c:(l.href=a=c.src,l.integrity=s="string"==typeof c.integrity?c.integrity:void 0,l.crossOrigin=o="string"==typeof c||null==c.crossOrigin?void 0:"use-credentials"===c.crossOrigin?"use-credentials":""),c=e,d=a,c.scriptResources[d]=null,c.moduleScriptResources[d]=null,e9(c=[],l),i.bootstrapScripts.add(c),u.push(ep,U(ee(a)),eV),n&&u.push(ef,U(ee(n)),eV),"string"==typeof s&&u.push(eg,U(ee(s)),eV),"string"==typeof o&&u.push(ey,U(ee(o)),eV),nL(u,e),u.push(eb);if(void 0!==p)for(t=0;t<p.length;t++)s=p[t],a=r=void 0,o={rel:"modulepreload",fetchPriority:"low",nonce:n},"string"==typeof s?o.href=h=s:(o.href=h=s.src,o.integrity=a="string"==typeof s.integrity?s.integrity:void 0,o.crossOrigin=r="string"==typeof s||null==s.crossOrigin?void 0:"use-credentials"===s.crossOrigin?"use-credentials":""),s=e,l=h,s.scriptResources[l]=null,s.moduleScriptResources[l]=null,e9(s=[],o),i.bootstrapScripts.add(s),u.push(em,U(ee(h)),eV),n&&u.push(ef,U(ee(n)),eV),"string"==typeof a&&u.push(eg,U(ee(a)),eV),"string"==typeof r&&u.push(ey,U(ee(r)),eV),nL(u,e),u.push(eb);return i}function eE(e,t,n,r,i){return{idPrefix:void 0===e?"":e,nextFormID:0,streamingFormat:0,bootstrapScriptContent:n,bootstrapScripts:r,bootstrapModules:i,instructions:0,hasBody:!1,hasHtml:!1,unknownResources:{},dnsResources:{},connectResources:{default:{},anonymous:{},credentials:{}},imageResources:{},styleResources:{},scriptResources:{},moduleUnknownResources:{},moduleScriptResources:{}}}function eT(){return{htmlChunks:null,headChunks:null,bodyChunks:null}}function eI(e,t,n,r){return{insertionMode:e,selectedValue:t,tagScope:n,viewTransition:r}}function eD(e){return eI("http://www.w3.org/2000/svg"===e?4:5*("http://www.w3.org/1998/Math/MathML"===e),null,0,null)}function eN(e,t,n){var r=-25&e.tagScope;switch(t){case"noscript":return eI(2,null,1|r,null);case"select":return eI(2,null!=n.value?n.value:n.defaultValue,r,null);case"svg":return eI(4,null,r,null);case"picture":return eI(2,null,2|r,null);case"math":return eI(5,null,r,null);case"foreignObject":return eI(2,null,r,null);case"table":return eI(6,null,r,null);case"thead":case"tbody":case"tfoot":return eI(7,null,r,null);case"colgroup":return eI(9,null,r,null);case"tr":return eI(8,null,r,null);case"head":if(2>e.insertionMode)return eI(3,null,r,null);break;case"html":if(0===e.insertionMode)return eI(1,null,r,null)}return 6<=e.insertionMode||2>e.insertionMode?eI(2,null,r,null):null!==e.viewTransition||e.tagScope!==r?eI(e.insertionMode,e.selectedValue,r,null):e}function eA(e){return null===e?null:{update:e.update,enter:"none",exit:"none",share:e.update,parentEnter:"none",parentExit:"none",name:e.autoName,autoName:e.autoName,nameIdx:0}}function e_(e,t){return 32&t.tagScope&&(e.instructions|=128),eI(t.insertionMode,t.selectedValue,12|t.tagScope,eA(t.viewTransition))}function eP(e,t){e=eA(t.viewTransition);var n=16|t.tagScope;return null!==e&&"none"!==e.share&&(n|=64),eI(t.insertionMode,t.selectedValue,n,e)}function eM(e,t,n){return e="_"+e.idPrefix+"R_"+t,0<n&&(e+="H"+n.toString(32)),e+"_"}var eR=z("<!-- -->");function eL(e,t,n,r){return""===t?r:(r&&e.push(eR),e.push(U(ee(t))),!0)}function ej(e,t){null!==(t=t.viewTransition)&&("auto"!==t.name&&(eW(e,"vt-name",0===t.nameIdx?t.name:t.name+"_"+t.nameIdx),t.nameIdx++),eW(e,"vt-update",t.update),"none"!==t.enter&&eW(e,"vt-enter",t.enter),"none"!==t.exit&&eW(e,"vt-exit",t.exit),"none"!==t.share&&eW(e,"vt-share",t.share))}var eO=new Map,eB=z(' style="'),eF=z(":"),eH=z(";");function eU(e,t){if("object"!=typeof t)throw Error(a(62));var n,r=!0;for(n in t)if(G.call(t,n)){var i=t[n];if(null!=i&&"boolean"!=typeof i&&""!==i){if(0===n.indexOf("--")){var o=U(ee(n));i=U(ee((""+i).trim()))}else void 0===(o=eO.get(n))&&(o=z(ee(n.replace(et,"-$1").toLowerCase().replace(en,"-ms-"))),eO.set(n,o)),i="number"==typeof i?0===i||X.has(n)?U(""+i):U(i+"px"):U(ee((""+i).trim()));r?(r=!1,e.push(eB,o,eF,i)):e.push(eH,o,eF,i)}}r||e.push(eV)}var ez=z(" "),e$=z('="'),eV=z('"'),eq=z('=""');function eG(e,t,n){n&&"function"!=typeof n&&"symbol"!=typeof n&&e.push(ez,U(t),eq)}function eW(e,t,n){"function"!=typeof n&&"symbol"!=typeof n&&"boolean"!=typeof n&&e.push(ez,U(t),e$,U(ee(n)),eV)}var eK=z(ee("javascript:throw new Error('React form unexpectedly submitted.')")),eY=z('<input type="hidden"');function eZ(e,t){this.push(eY),eX(e),eW(this,"name",t),eW(this,"value",e),this.push(e2)}function eX(e){if("string"!=typeof e)throw Error(a(480))}function eQ(e,t){if("function"==typeof t.$$FORM_ACTION){var n=e.nextFormID++;e=e.idPrefix+n;try{var r=t.$$FORM_ACTION(e);if(r){var i=r.data;null!=i&&i.forEach(eX)}return r}catch(e){if("object"==typeof e&&null!==e&&"function"==typeof e.then)throw e}}return null}function eJ(e,t,n,r,i,a,o,s){var l=null;if("function"==typeof r){var c=eQ(t,r);null!==c?(s=c.name,r=c.action||"",i=c.encType,a=c.method,o=c.target,l=c.data):(e.push(ez,U("formAction"),e$,eK,eV),o=a=i=r=s=null,e6(t,n))}return null!=s&&e1(e,"name",s),null!=r&&e1(e,"formAction",r),null!=i&&e1(e,"formEncType",i),null!=a&&e1(e,"formMethod",a),null!=o&&e1(e,"formTarget",o),l}function e1(e,t,n){switch(t){case"className":eW(e,"class",n);break;case"tabIndex":eW(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":eW(e,t,n);break;case"style":eU(e,n);break;case"src":case"href":if(""===n)break;case"action":case"formAction":if(null==n||"function"==typeof n||"symbol"==typeof n||"boolean"==typeof n)break;n=ei(""+n),e.push(ez,U(t),e$,U(ee(n)),eV);break;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"autoFocus":case"multiple":case"muted":eG(e,t.toLowerCase(),n);break;case"xlinkHref":if("function"==typeof n||"symbol"==typeof n||"boolean"==typeof n)break;n=ei(""+n),e.push(ez,U("xlink:href"),e$,U(ee(n)),eV);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":"function"!=typeof n&&"symbol"!=typeof n&&e.push(ez,U(t),e$,U(ee(n)),eV);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&"function"!=typeof n&&"symbol"!=typeof n&&e.push(ez,U(t),eq);break;case"capture":case"download":!0===n?e.push(ez,U(t),eq):!1!==n&&"function"!=typeof n&&"symbol"!=typeof n&&e.push(ez,U(t),e$,U(ee(n)),eV);break;case"cols":case"rows":case"size":case"span":"function"!=typeof n&&"symbol"!=typeof n&&!isNaN(n)&&1<=n&&e.push(ez,U(t),e$,U(ee(n)),eV);break;case"rowSpan":case"start":"function"==typeof n||"symbol"==typeof n||isNaN(n)||e.push(ez,U(t),e$,U(ee(n)),eV);break;case"xlinkActuate":eW(e,"xlink:actuate",n);break;case"xlinkArcrole":eW(e,"xlink:arcrole",n);break;case"xlinkRole":eW(e,"xlink:role",n);break;case"xlinkShow":eW(e,"xlink:show",n);break;case"xlinkTitle":eW(e,"xlink:title",n);break;case"xlinkType":eW(e,"xlink:type",n);break;case"xmlBase":eW(e,"xml:base",n);break;case"xmlLang":eW(e,"xml:lang",n);break;case"xmlSpace":eW(e,"xml:space",n);break;default:if((!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&Z(t=Q.get(t)||t)){switch(typeof n){case"function":case"symbol":return;case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return}e.push(ez,U(t),e$,U(ee(n)),eV)}}}var e0=z(">"),e2=z("/>");function e4(e,t,n){if(null!=t){if(null!=n)throw Error(a(60));if("object"!=typeof t||!("__html"in t))throw Error(a(61));null!=(t=t.__html)&&e.push(U(""+t))}}var e3=z(' selected=""'),e5=z('addEventListener("submit",function(a){if
173(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});');function e6(e,t){if(0==(16&e.instructions)){e.instructions|=16;var n=t.preamble,r=t.bootstrapChunks;(n.htmlChunks||n.headChunks)&&0===r.length?(r.push(t.startInlineScript),nL(r,e),r.push(e0,e5,eh)):r.unshift(t.startInlineScript,e0,e5,eh)}}var e7=z("<!--F!-->"),e8=z("<!--F-->");function e9(e,t){for(var n in e.push(tp("link")),t)if(G.call(t,n)){var r=t[n];if(null!=r)switch(n){case"children":case"dangerouslySetInnerHTML":throw Error(a(399,"link"));default:e1(e,n,r)}}return e.push(e2),null}var te=/(<\/|<)(s)(tyle)/gi;function tt(e,t,n,r){return""+t+("s"===n?"\\73 ":"\\53 ")+r}function tn(e,t,n,r){for(var i in e.push(tp(n)),t)if(G.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":case"dangerouslySetInnerHTML":throw Error(a(399,n));default:e1(e,i,o)}}return ej(e,r),e.push(e2),null}function tr(e,t){e.push(tp("title"));var n,r=null,i=null;for(n in t)if(G.call(t,n)){var a=t[n];if(null!=a)switch(n){case"children":r=a;break;case"dangerouslySetInnerHTML":i=a;break;default:e1(e,n,a)}}return e.push(e0),"function"!=typeof(t=Array.isArray(r)?2>r.length?r[0]:null:r)&&"symbol"!=typeof t&&null!=t&&e.push(U(ee(""+t))),e4(e,i,r),e.push(tg("title")),null}var ti=z("<!--head-->"),ta=z("<!--body-->"),to=z("<!--html-->");function ts(e,t){e.push(tp("script"));var n,r=null,i=null;for(n in t)if(G.call(t,n)){var a=t[n];if(null!=a)switch(n){case"children":r=a;break;case"dangerouslySetInnerHTML":i=a;break;default:e1(e,n,a)}}return e.push(e0),e4(e,i,r),"string"==typeof r&&e.push(U((""+r).replace(ex,ek))),e.push(tg("script")),null}function tl(e,t,n,r){e.push(tp(n));var i,a=n=null;for(i in t)if(G.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":n=o;break;case"dangerouslySetInnerHTML":a=o;break;default:e1(e,i,o)}}return ej(e,r),e.push(e0),e4(e,a,n),n}function tc(e,t,n,r){e.push(tp(n));var i,a=n=null;for(i in t)if(G.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":n=o;break;case"dangerouslySetInnerHTML":a=o;break;default:e1(e,i,o)}}return ej(e,r),e.push(e0),e4(e,a,n),"string"==typeof n?(e.push(U(ee(n))),null):n}var tu=z("\n"),td=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,th=new Map;function tp(e){var t=th.get(e);if(void 0===t){if(!td.test(e))throw Error(a(65,e));t=z("<"+e),th.set(e,t)}return t}var tm=z("<!DOCTYPE html>"),tf=new Map;function tg(e){var t=tf.get(e);return void 0===t&&(t=z("</"+e+">"),tf.set(e,t)),t}function ty(e,t){null===(e=e.preamble).htmlChunks&&t.htmlChunks&&(e.htmlChunks=t.htmlChunks),null===e.headChunks&&t.headChunks&&(e.headChunks=t.headChunks),null===e.bodyChunks&&t.bodyChunks&&(e.bodyChunks=t.bodyChunks)}function tb(e,t){t=t.bootstrapChunks;for(var n=0;n<t.length-1;n++)O(e,t[n]);return!(n<t.length)||(n=t[n],t.length=0,B(e,n))}var tv=z("requestAnimationFrame(function(){$RT=performance.now()});"),tx=z('<template id="'),tk=z('"></template>'),tw=z("<!--&-->"),tC=z("<!--/&-->"),tS=z("<!--$-->"),tE=z('<!--$?--><template id="'),tT=z('"></template>'),tI=z("<!--$!-->"),tD=z("<!--/$-->"),tN=z("<template"),tA=z('"'),t_=z(' data-dgst="');z(' data-msg="'),z(' data-stck="'),z(' data-cstck="');var tP=z("></template>");function tM(e,t,n){if(O(e,tE),null===n)throw Error(a(395));return O(e,t.boundaryPrefix),O(e,U(n.toString(16))),B(e,tT)}var tR=z('<div hidden id="'),tL=z('">'),tj=z("</div>"),tO=z('<svg aria-hidden="true" style="display:none" id="'),tB=z('">'),tF=z("</svg>"),tH=z('<math aria-hidden="true" style="display:none" id="'),tU=z('">'),tz=z("</math>"),t$=z('<table hidden id="'),tV=z('">'),tq=z("</table>"),tG=z('<table hidden><tbody id="'),tW=z('">'),tK=z("</tbody></table>"),tY=z('<table hidden><tr id="'),tZ=z('">'),tX=z("</tr></table>"),tQ=z('<table hidden><colgroup id="'),tJ=z('">'),t1=z("</colgroup></table>"),t0=z('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),t2=z('$RS("'),t4=z('","'),t3=z('")</script>');z('<template data-rsi="" data-sid="'),z('" data-pid="');var t5=z('$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};'),t6=U('$RV=function(B,g){function h(a,c){var e=a.getAttribute(c);e&&(c=a.style,l.push(a,c.viewTransitionName,c.viewTransitionClass),"auto"!==e&&(c.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+N++ +"_"),a=CSS.escape(a)!==a?"r-"+btoa(a).replace(/=/g,""):a,c.viewTransitionName=a,C=!0)}var C=!1,N=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var k=g[f].querySelectorAll("[vt-share]"),d=0;d<k.length;d++){var b=k[d];m.set(b.getAttribute("vt-name"),b)}var u=[];for(k=0;k<g.length;k+=2){var D=g[k],x=D.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){b=D;for(f=0;b;){if(8===b.nodeType){var t=b.data;if("/$"===t)if(0===f)break;else f--;else"$"!==t&&"$?"!==t&&"$~"!==t&&"$!"!==t||f++}else if(1===b.nodeType){d=b;var E=d.getAttribute("vt-name"),y=m.get(E);h(d,y?"vt-share":"vt-exit");y&&(h(y,"vt-share"),m.set(E,null));for(var F=d.querySelectorAll("[vt-share]"),\nz=0;z<F.length;z++){var G=F[z],H=G.getAttribute("vt-name"),I=m.get(H);I&&(h(G,"vt-share"),h(I,"vt-share"),m.set(H,null))}var J=d.querySelectorAll("[vt-parent-exit]");for(d=0;d<J.length;d++)h(J[d],"vt-parent-exit")}b=b.nextSibling}for(var K=g[k+1],n=K.firstElementChild;n;){null!==m.get(n.getAttribute("vt-name"))&&h(n,"vt-enter");var L=n.querySelectorAll("[vt-parent-enter]");for(b=0;b<L.length;b++)h(L[b],"vt-parent-enter");n=n.nextElementSibling}b=x;do for(var p=b.firstElementChild;p;){var M=p.getAttribute("vt-update");\nM&&"none"!==M&&!l.includes(p)&&h(p,"vt-update");p=p.nextElementSibling}while((b=b.parentNode)&&1===b.nodeType&&"none"!==b.getAttribute("vt-update"));u.push.apply(u,K.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(C){var A=document.__reactViewTransition=document.startViewTransition({update:function(){B(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],c={},e=0;e<u.length;c={g:c.g},e++)if(c.g=u[e],!c.g.complete){var q=c.g.getBoundingClientRect();0<q.bottom&&0<q.right&&\nq.top<window.innerHeight&&q.left<window.innerWidth&&(q=new Promise(function(w){return function(r){w.g.addEventListener("load",r);w.g.addEventListener("error",r)}}(c)),a.push(q))}return Promise.race([Promise.all(a),new Promise(function(w){var r=performance.now();setTimeout(w,2300>r&&2E3<r?2300-r:500)})])},types:[]});A.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var c=l[a],e=c.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===c.getAttribute("style")&&c.removeAttribute("style")}});\nA.finished.finally(function(){document.__reactViewTransition===A&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}B(g)}.bind(null,$RV);'),t7=z('$RC("'),t8=z('$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=\n"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);
173if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\n"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("'),t9=z('$RR("'),ne=z('","'),nt=z('",'),nn=z('"'),nr=z(")</script>");z('<template data-rci="" data-bid="'),z('<template data-rri="" data-bid="'),z('" data-sid="'),z('" data-sty="');var ni=z('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'),na=z('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'),no=z('$RX("'),ns=z('"'),nl=z(","),nc=z("null"),nu=z(")</script>");z('<template data-rxi="" data-bid="'),z('" data-dgst="'),z('" data-msg="'),z('" data-stck="'),z('" data-cstck="');var nd=/[<\u2028\u2029]/g,nh=/[&><\u2028\u2029]/g;function np(e){return JSON.stringify(e).replace(nh,function(e){switch(e){case"&":return"\\u0026";case">":return"\\u003e";case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var nm=z(' media="not all" data-precedence="'),nf=z('" data-href="'),ng=z('">'),ny=z("</style>"),nb=!1,nv=!0;function nx(e){var t=e.rules,n=e.hrefs,r=0;if(n.length){for(O(this,eu.startInlineStyle),O(this,nm),O(this,e.precedence),O(this,nf);r<n.length-1;r++)O(this,n[r]),O(this,nD);for(O(this,n[r]),O(this,ng),r=0;r<t.length;r++)O(this,t[r]);nv=B(this,ny),nb=!0,t.length=0,n.length=0}}function nk(e){return 2!==e.state&&(nb=!0)}function nw(e,t,n){return nb=!1,nv=!0,eu=n,t.styles.forEach(nx,e),eu=null,t.stylesheets.forEach(nk),nb&&(n.stylesToHoist=!0),nv}function nC(e){for(var t=0;t<e.length;t++)O(this,e[t]);e.length=0}var nS=[];function nE(e){e9(nS,e.props);for(var t=0;t<nS.length;t++)O(this,nS[t]);nS.length=0,e.state=2}var nT=z(' data-precedence="'),nI=z('" data-href="'),nD=z(" "),nN=z('">'),nA=z("</style>");function n_(e){var t=0<e.sheets.size;e.sheets.forEach(nE,this),e.sheets.clear();var n=e.rules,r=e.hrefs;if(!t||r.length){if(O(this,eu.startInlineStyle),O(this,nT),O(this,e.precedence),e=0,r.length){for(O(this,nI);e<r.length-1;e++)O(this,r[e]),O(this,nD);O(this,r[e])}for(O(this,nN),e=0;e<n.length;e++)O(this,n[e]);O(this,nA),n.length=0,r.length=0}}function nP(e){if(0===e.state){e.state=1;var t=e.props;for(e9(nS,{rel:"preload",as:"style",href:e.props.href,crossOrigin:t.crossOrigin,fetchPriority:t.fetchPriority,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy}),e=0;e<nS.length;e++)O(this,nS[e]);nS.length=0}}function nM(e){e.sheets.forEach(nP,this),e.sheets.clear()}z('<link rel="expect" href="#'),z('" blocking="render"/>');var nR=z(' id="');function nL(e,t){0==(32&t.instructions)&&(t.instructions|=32,e.push(nR,U(ee("_"+t.idPrefix+"R_")),eV))}var nj=z("["),nO=z(",["),nB=z(","),nF=z("]");function nH(){return{styles:new Set,stylesheets:new Set,suspenseyImages:!1}}function nU(e,t){null==e.crossOrigin&&(e.crossOrigin=t[0]),null==e.integrity&&(e.integrity=t[1])}function nz(e,t,n){for(var r in t="<"+(e=(""+e).replace(n$,nV))+'>; rel=preload; as="'+(t=(""+t).replace(nq,nG))+'"',n)G.call(n,r)&&"string"==typeof(e=n[r])&&(t+="; "+r.toLowerCase()+'="'+(""+e).replace(nq,nG)+'"');return t}var n$=/[<>\r\n]/g;function nV(e){switch(e){case"<":return"%3C";case">":return"%3E";case"\n":return"%0A";case"\r":return"%0D";default:throw Error("escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}var nq=/["';,\r\n]/g;function nG(e){switch(e){case'"':return"%22";case"'":return"%27";case";":return"%3B";case",":return"%2C";case"\n":return"%0A";case"\r":return"%0D";default:throw Error("escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}function nW(e){this.styles.add(e)}function nK(e){this.stylesheets.add(e)}
173function nY(e,t){t.styles.forEach(nW,e),t.stylesheets.forEach(nK,e),t.suspenseyImages&&(e.suspenseyImages=!0)}function nZ(e,t){return t?e.suspenseyImages:0<e.stylesheets.size||e.suspenseyImages}var nX=Function.prototype.bind,nQ=Symbol.for("react.client.reference");function nJ(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===nQ?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case l:return"Fragment";case u:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case f:return"SuspenseList";case v:return"Activity";case w:return"ViewTransition"}if("object"==typeof e)switch(e.$$typeof){case s:return"Portal";case h:return e.displayName||"Context";case d:return(e._context.displayName||"Context")+".Consumer";case p:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case g:return null!==(t=e.displayName||null)?t:nJ(e.type)||"Memo";case y:t=e._payload,e=e._init;try{return nJ(e(t))}catch(e){}}return null}var n1={},n0=null;function n2(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(a(401))}else{if(null===n)throw Error(a(401));n2(e,n)}t.context._currentValue=t.value}}function n4(e){var t=n0;t!==e&&(null===t?function e(t){var n=t.parent;null!==n&&e(n),t.context._currentValue=t.value}(e):null===e?function e(t){t.context._currentValue=t.parentValue,null!==(t=t.parent)&&e(t)}(t):t.depth===e.depth?n2(t,e):t.depth>e.depth?function e(t,n){if(t.context._currentValue=t.parentValue,null===(t=t.parent))throw Error(a(402));t.depth===n.depth?n2(t,n):e(t,n)}(t,e):function e(t,n){var r=n.parent;if(null===r)throw Error(a(402));t.depth===r.depth?n2(t,r):e(t,r),n.context._currentValue=n.value}(t,e),n0=e)}var n3={enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}},n5={id:1,overflow:""};function n6(e){var t=e.overflow;return((e=e.id)&~(1<<32-n8(e)-1)).toString(32)+t}
173function n7(e,t,n){var r=e.id;e=e.overflow;var i=32-n8(r)-1;r&=~(1<<i),n+=1;var a=32-n8(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-n8(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var n8=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(n9(e)/re|0)|0},n9=Math.log,re=Math.LN2;function rt(){}var rn=Error(a(460)),rr=null;function ri(){if(null===rr)throw Error(a(459));var e=rr;return rr=null,e}var ra="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ro=null,rs=null,rl=null,rc=null,ru=null,rd=null,rh=!1,rp=!1,rm=0,rf=0,rg=-1,ry=0,rb=null,rv=Error(a(605)),rx=null;function rk(e){return Error(a(604),{cause:e})}var rw=null,rC=0;function rS(){if(null===ro)throw Error(a(321));return ro}function rE(){if(0<rC)throw Error(a(312));return{memoizedState:null,queue:null,next:null}}function rT(){return null===rd?null===ru?(rh=!1,ru=rd=rE()):(rh=!0,rd=ru):null===rd.next?(rh=!1,rd=rd.next=rE()):(rh=!0,rd=rd.next),rd}function rI(){var e=rb;return rb=null,e}function rD(){rc=rl=rs=ro=null,rp=!1,ru=null,rC=0,rd=rw=null}function rN(e,t){return"function"==typeof t?t(e):t}function rA(e,t,n){if(ro=rS(),rd=rT(),rh){var r=rd.queue;if(t=r.dispatch,null!==rw&&void 0!==(n=rw.get(r))){rw.delete(r),r=rd.memoizedState;do r=e(r,n.action),n=n.next;while(null!==n)return rd.memoizedState=r,[r,t]}return[rd.memoizedState,t]}return e=e===rN?"function"==typeof t?t():t:void 0!==n?n(t):t,rd.memoizedState=e,e=(e=rd.queue={last:null,dispatch:null}).dispatch=rP.bind(null,ro,e),[rd.memoizedState,e]}function r_(e,t){if(ro=rS(),rd=rT(),t=void 0===t?null:t,null!==rd){var n=rd.memoizedState;if(null!==n&&null!==t){var r=n[1];t:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!ra(t[i],r[i])){r=!1;break t}r=!0}if(r)return n[0]}}return e=e(),rd.memoizedState=[e,t],e}function rP(e,t,n){if(25<=rC)throw Error(a(301));if(e===ro)if(rp=!0,e={action:n,next:null},null===rw&&(rw=new Map),void 0===(n=rw.get(t)))rw.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function rM(){throw Error(a(440))}function rR(){throw Error(a(394))}function rL(){throw Error(a(479))}function rj(e,t,n){rS();var r=rf++,i=rl;if("function"==typeof e.$$FORM_ACTION){var a=null,o=rc;i=i.formState;var s=e.$$IS_SIGNATURE_EQUAL;if(null!==i&&"function"==typeof s){var l=i[1];s.call(e,i[2],i[3])&&l===(a=void 0!==n?"p"+n:"k"+D(JSON.stringify([o,null,r]),0))&&(rg=r,t=i[0])}var c=e.bind(null,t);return e=function(e){c(e)},"function"==typeof c.$$FORM_ACTION&&(e.$$FORM_ACTION=function(e){e=c.$$FORM_ACTION(e),void 0!==n&&(n+="",e.action=n);var t=e.data;return t&&(null===a&&(a=void 0!==n?"p"+n:"k"+D(JSON.stringify([o,null,r]),0)),t.append("$ACTION_KEY",a)),e}),[t,e,!1]}var u=e.bind(null,t);return[t,function(e){u(e)},!1]}function rO(e){var t=ry;ry+=1,null===rb&&(rb=[]);var n=rb,r=e,i=t;switch(void 0===(i=n[i])?n.push(r):i!==r&&(r.then(rt,rt),r=i),r.status){case"fulfilled":return r.value;case"rejected":if(void 0===(n=r.reason)&&!("reason"in r))throw Error(a(600));throw n;default:switch("string"==typeof r.status?r.then(rt,rt):((n=r).status="pending",n.then(function(e){if("pending"===r.status){var t=r;t.status="fulfilled",t.value=e}},function(e){if("pending"===r.status){var t=r;t.status="rejected",t.reason=e}})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}throw rr=r,rn}}function rB(){throw Error(a(393))}var rF,rH,rU={readContext:function(e){return e._currentValue},use:function(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return rO(e);if(e.$$typeof===C)throw rx=rk(e),rv;if(e.$$typeof===h)return e._currentValue}throw Error(a(438,String(e)))},useContext:function(e){return rS(),e._currentValue},useMemo:r_,useReducer:rA,useRef:function(e){ro=rS();var t=(rd=rT()).memoizedState;return null===t?(e={current:e},rd.memoizedState=e):t},useState:function(e){return rA(rN,e)},useInsertionEffect:rt,useLayoutEffect:rt,useCallback:function(e,t){return r_(function(){return e},t)},useImperativeHandle:rt,useEffect:rt,useDebugValue:rt,useDeferredValue:function(e,t){return rS(),void 0!==t?t:e},useTransition:function(){return rS(),[!1,rR]},useId:function(){var e=n6(rs.treeContext),t=rz;if(null===t)throw Error(a(404));return eM(t,e,rm++)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(a(407));return n()},useOptimistic:function(e){return rS(),[e,rL]},useActionState:rj,useFormState:rj,useHostTransitionStatus:function(){return rS(),es},useMemoCache:function(e){for(var t=Array(e),n=0;n<e;n++)t[n]=k;return t},useCacheRefresh:function(){return rB},useEffectEvent:function(){return rM}},rz=null,r$={getCacheForType:function(){throw Error(a(248))}
173,cacheSignal:function(){throw Error(a(248))}};function rV(e){if(void 0===rF)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);rF=t&&t[1]||"",rH=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+rF+e+rH}var rq=!1;function rG(e,t){if(!e||rq)return"";rq=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(void 0!==i?Object.defineProperty(e.prototype,"props",i):delete e.prototype.props)}}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var l=o.split("\n"),c=s.split("\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(1!==r||1!==i)do if(r--,i--,0>i||l[r]!==c[i]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=r&&0<=i)break}}}finally{rq=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?rV(n):""}function rW(e,t){return e=null==e||"string"==typeof e?e:e.default,null==(t=null==t||"string"==typeof t?t:t.default)?"auto"===e?null:e:"auto"===t?null:t}function rK(e,t){return(500<t.byteSize||nZ(t.contentState,!1)||t.defer)&&null===t.preamble}function rY(e){if("object"==typeof e&&null!==e&&"string"==typeof e.environmentName){var t=e.environmentName;"string"==typeof(e=[e])[0]?e.splice(0,1,"%c%s%c "+e[0],"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px"," "+t+" ",""):e.splice(0,0,"%c%s%c","background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px"," "+t+" ",""),e.unshift(console),(t=nX.apply(console.error,e))()}else console.error(e);return null}function rZ(e,t,n,r,i,a,o,s,l,c){var u=new Set;this.destination=null,this.flushScheduled=!1,this.resumableState=e,this.renderState=t,this.rootFormatContext=n,this.progressiveChunkSize=void 0===r?12800:r,this.status=10,this.fatalError=null,this.aborted=!1,this.pendingRootTasks=this.allPendingTasks=this.nextSegmentId=0,this.completedPreambleSegments=this.completedRootSegment=null,this.byteSize=0,this.abortableTasks=u,this.pingedTasks=[],this.currentTask=null,this.clientRenderedBoundaries=[],this.completedBoundaries=[],this.partialBoundaries=[],this.postponedState=this.trackedPostpones=null,this.onError=void 0===i?rY:i,this.onAllReady=void 0===a?rt:a,this.onShellReady=void 0===o?rt:o,this.onShellError=void 0===s?rt:s,this.onFatalError=void 0===l?rt:l,this.formState=void 0===c?null:c}function rX(e,t,n,r,i,a,o,s,l,c,u){return(n=r3(t=new rZ(t,n,r,i,a,o,s,l,c,u),0,null,r,!1,!1)).parentFlushed=!0,r5(e=r2(t,null,e,-1,null,n,null,null,t.abortableTasks,null,r,null,n5,null,null)),t.pingedTasks.push(e),t}function rQ(e,t,n,r,i,a,o,s){return((n=new rZ(t.resumableState,n,t.rootFormatContext,t.progressiveChunkSize,r,i,a,o,s,null)).nextSegmentId=t.nextSegmentId,"number"==typeof t.replaySlots)?((r=r3(n,0,null,t.rootFormatContext,!1,!1)).parentFlushed=!0,r5(e=r2(n,null,e,-1,null,r,null,null,n.abortableTasks,null,t.rootFormatContext,null,n5,null,null))):r5(e=r4(n,null,{nodes:t.replayNodes,slots:t.replaySlots,pendingTasks:0},e,-1,null,null,n.abortableTasks,null,t.rootFormatContext,null,n5,null,null)),n.pingedTasks.push(e),n}var rJ=null;function r1(e,t){e.pingedTasks.push(t),1===e.pingedTasks.length&&(e.flushScheduled=null!==e.destination,null!==e.trackedPostpones||10===e.status?R(function(){return iA(e)}):_(function(){return iA(e)}))}function r0(e,t,n,r,i){return n={status:0,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,row:t,completedSegments:[],byteSize:0,defer:i,fallbackAbortableTasks:n,errorDigest:null,contentState:nH(),fallbackState:nH(),preamble:r,tracked:null}
173,null!==t&&(t.pendingTasks++,null!==(r=t.boundaries)&&(e.allPendingTasks++,n.pendingTasks++,r.push(n)),null!==(e=t.inheritedHoistables)&&nY(n.contentState,e)),n}function r2(e,t,n,r,i,a,o,s,l,c,u,d,h,p,m){e.allPendingTasks++,null===i?e.pendingRootTasks++:i.pendingTasks++,null!==p&&p.pendingTasks++;var f={replay:null,node:n,childIndex:r,ping:{resolve:function(){return r1(e,f)},reject:function(t){e.aborted?f.abortSet.delete(f)&&iC(f,e,t):r1(e,f)}},blockedBoundary:i,blockedSegment:a,blockedPreamble:o,hoistableState:s,abortSet:l,keyPath:c,formatContext:u,context:d,treeContext:h,row:p,componentStack:m,thenableState:t};return l.add(f),f}function r4(e,t,n,r,i,a,o,s,l,c,u,d,h,p){e.allPendingTasks++,null===a?e.pendingRootTasks++:a.pendingTasks++,null!==h&&h.pendingTasks++,n.pendingTasks++;var m={replay:n,node:r,childIndex:i,ping:{resolve:function(){return r1(e,m)},reject:function(t){e.aborted?m.abortSet.delete(m)&&iC(m,e,t):r1(e,m)}},blockedBoundary:a,blockedSegment:null,blockedPreamble:null,hoistableState:o,abortSet:s,keyPath:l,formatContext:c,context:u,treeContext:d,row:h,componentStack:p,thenableState:t};return s.add(m),m}function r3(e,t,n,r,i,a){return{status:0,parentFlushed:!1,id:-1,index:t,chunks:[],children:[],preambleChildren:[],parentFormatContext:r,boundary:n,lastPushedText:i,textEmbedded:a}}function r5(e){var t=e.node;"object"==typeof t&&null!==t&&t.$$typeof===o&&(e.componentStack={parent:e.componentStack,type:t.type})}function r6(e){return null===e?null:{parent:e.parent,type:"Suspense Fallback"}}function r7(e){var t={};return e&&Object.defineProperty(t,"componentStack",{configurable:!0,enumerable:!0,get:function(){try{var n="",r=e;do n+=function e(t){if("string"==typeof t)return rV(t);if("function"==typeof t)return t.prototype&&t.prototype.isReactComponent?rG(t,!0):rG(t,!1);if("object"==typeof t&&null!==t){switch(t.$$typeof){case p:return rG(t.render,!1);case g:return rG(t.type,!1);case y:var n=t,r=n._payload;n=n._init;try{t=n(r)}catch(e){return rV("Lazy")}return e(t)}if("string"==typeof t.name){t:{r=t.name,n=t.env;var i=t.debugLocation;if(null!=i&&(t=Error.prepareStackTrace,Error.prepareStackTrace=void 0,i=i.stack,Error.prepareStackTrace=t,i.startsWith("Error: react-stack-top-frame\n")&&(i=i.slice(29)),-1!==(t=i.indexOf("\n"))&&(i=i.slice(t+1)),-1!==(t=i.indexOf("react_stack_bottom_frame"))&&(t=i.lastIndexOf("\n",t)),-1!==(t=-1===(i=(t=-1!==t?i=i.slice(0,t):"").lastIndexOf("\n"))?t:t.slice(i+1)).indexOf(r))){r="\n"+t;break t}r=rV(r+(n?" ["+n+"]":""))}return r}}switch(t){case f:return rV("SuspenseList");case m:return rV("Suspense");case w:return rV("ViewTransition")}return""}(r.type),r=r.parent;while(r)var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return Object.defineProperty(t,"componentStack",{value:i}),i}}),t}function r8(e,t,n){return t===rv?(rx=null,""):null==(t=(e=e.onError)(t,n))||"string"==typeof t?""===t?void 0:t:void 0}function r9(e,t){var n=e.onShellError,r=e.onFatalError;0!==e.pendingRootTasks&&n(t),r(t),null!==e.destination?(e.status=13,V(e.destination,t)):(e.status=12,e.fatalError=t)}function ie(e,t){it(e,t.next,t.hoistables)}function it(e,t,n){for(;null!==t;){null!==n&&(nY(t.hoistables,n),t.inheritedHoistables=n);var r=t.boundaries;if(null!==r){t.boundaries=null;for(var i=0;i<r.length;i++){var a=r[i];null!==n&&nY(a.contentState,n),iN(e,a,null,null)}}if(t.pendingTasks--,0<t.pendingTasks)break;n=t.hoistables,t=t.next}}function ir(e,t){var n=t.boundaries;if(null!==n&&t.pendingTasks===n.length){for(var r=!0,i=0;i<n.length;i++){var a=n[i];if(1!==a.pendingTasks||a.parentFlushed||rK(e,a)){r=!1;break}}r&&it(e,t,t.hoistables)}}function ii(e){var t={pendingTasks:1,boundaries:null,hoistables:nH(),inheritedHoistables:null,together:!1,next:null};return null!==e&&0<e.pendingTasks&&(t.pendingTasks++,t.boundaries=[],e.next=t),t}function ia(e,t,n,r,i){var a=t.keyPath,o=t.treeContext,s=t.row;t.keyPath=n,n=r.length;var l=null;if(null!==t.replay){var c=t.replay.slots;if(null!==c&&"object"==typeof c)for(var u=0;u<n;u++){var d="backwards"!==i&&"unstable_legacy-backwards"!==i?u:n-1-u,h=r[d];t.row=l=ii(l),t.treeContext=n7(o,n,d);var p=c[d];"number"==typeof p?(ic(e,t,p,h,d),delete c[d]):iv(e,t,h,d),0==--l.pendingTasks&&ie(e,l)}else for(c=0;c<n;c++)d=r[u="backwards"!==i&&"unstable_legacy-backwards"!==i?c:n-1-c],t.row=l=ii(l),t.treeContext=n7(o,n,u),iv(e,t,d,u),0==--l.pendingTasks&&ie(e,l)}else if("backwards"!==i&&"unstable_legacy-backwards"!==i)for(i=0;i<n;i++)c=r[i],t.row=l=ii(l),t.treeContext=n7(o,n,i),iv(e,t,c,i),0==--l.pendingTasks&&ie(e,l);else{for(u=(c=t.blockedSegment).children.length,d=c.chunks.length,h=0;h<n;h++){var m=r[p="unstable_legacy-backwards"===i?n-1-h:h];t.row=l=ii(l),t.treeContext=n7(o,n,p);var f=r3(e,d,null,t.formatContext,0!==p||c.lastPushedText,!0);c.children.splice(u,0,f),t.blockedSegment=f;try{iv(e,t,m,p),f.lastPushedText&&f.textEmbedded&&f.chunks.push(eR),f.status=1,iD(e,t.blockedBoundary,f),0==--l.pendingTasks&&ie(e,l)}catch(t){throw f.status=e.aborted?3:4,t}}t.blockedSegment=c,c.lastPushedText=!1}null!==s&&null!==l&&0<l.pendingTasks&&(s.pendingTasks++,l.next=s),t.treeContext=o,t.row=s,t.keyPath=a}function io(e,t,n,r,i,a){var o=t.thenableState;for(t.thenableState=null,ro={},rs=t,rl=e,rc=n,rf=rm=0,rg=-1,ry=0,rb=o,e=r(i,a);rp;)rp=!1,rf=rm=0,rg=-1,ry=0,rC+=1,rd=null,e=r(i,a);return rD(),e}function is(e,t,n,r,i,a,o){var s=!1;if(0!==a&&null!==e.formState){var l=t.blockedSegment;if(null!==l){s=!0,l=l.chunks;for(var c=0;c<a;c++)c===o?l.push(e7):l.push(e8)}}
vendor: 13,191 bytes, line 173
173a=t.keyPath,t.keyPath=n,i?(n=t.treeContext,t.treeContext=n7(n,1,0),iv(e,t,r,-1),t.treeContext=n):s?iv(e,t,r,-1):iu(e,t,r,-1),t.keyPath=a}function il(e,t,n,i,o,s){if("function"==typeof i)if(i.prototype&&i.prototype.isReactComponent){var k=o;if("ref"in o)for(var C in k={},o)"ref"!==C&&(k[C]=o[C]);var S=i.defaultProps;if(S)for(var T in k===o&&(k=q({},k,o)),S)void 0===k[T]&&(k[T]=S[T]);var D=k,N=n1,A=i.contextType;"object"==typeof A&&null!==A&&(N=A._currentValue);var _=new i(D,N),P=void 0!==_.state?_.state:null;_.updater=n3,_.props=D,_.state=P;var M={queue:[],replace:!1};_._reactInternals=M;var R=i.contextType;_.context="object"==typeof R&&null!==R?R._currentValue:n1;var L=i.getDerivedStateFromProps;if("function"==typeof L){var j=L(D,P);_.state=null==j?P:q({},P,j)}if("function"!=typeof i.getDerivedStateFromProps&&"function"!=typeof _.getSnapshotBeforeUpdate&&("function"==typeof _.UNSAFE_componentWillMount||"function"==typeof _.componentWillMount)){var O=_.state;if("function"==typeof _.componentWillMount&&_.componentWillMount(),"function"==typeof _.UNSAFE_componentWillMount&&_.UNSAFE_componentWillMount(),O!==_.state&&n3.enqueueReplaceState(_,_.state,null),null!==M.queue&&0<M.queue.length){var B=M.queue,F=M.replace;if(M.queue=null,M.replace=!1,F&&1===B.length)_.state=B[0];else{for(var H=F?B[0]:_.state,z=!0,$=+!!F;$<B.length;$++){var V=B[$],W="function"==typeof V?V.call(_,H,D,void 0):V;null!=W&&(z?(z=!1,H=q({},H,W)):q(H,W))}_.state=H}}else M.queue=null}var K=_.render();if(e.aborted)throw null;var Y=t.keyPath;t.keyPath=n,iu(e,t,K,-1),t.keyPath=Y}else{var X=io(e,t,n,i,o,void 0);if(e.aborted)throw null;is(e,t,n,X,0!==rm,rf,rg)}else if("string"==typeof i){var Q=t.blockedSegment;if(null===Q){var J=o.children,et=t.formatContext,en=t.keyPath;t.formatContext=eN(et,i,o),t.keyPath=n,iv(e,t,J,-1),t.formatContext=et,t.keyPath=en}else{var er=function(e,t,n,i,o,s,l,c,u){switch(t){case"div":case"span":case"svg":case"path":case"g":case"p":case"li":case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":break;case"a":e.push(tp("a"));var d,h=null,p=null;for(d in n)if(G.call(n,d)){var m=n[d];if(null!=m)switch(d){case"children":h=m;break;case"dangerouslySetInnerHTML":p=m;break;case"href":""===m?eW(e,"href",""):e1(e,d,m);break;default:e1(e,d,m)}}if(ej(e,c),e.push(e0),e4(e,p,h),"string"==typeof h){e.push(U(ee(h)));var f=null}else f=h;return f;case"select":e.push(tp("select"));var g,y=null,b=null;for(g in n)if(G.call(n,g)){var v=n[g];if(null!=v)switch(g){case"children":y=v;break;case"dangerouslySetInnerHTML":b=v;break;case"defaultValue":case"value":break;default:e1(e,g,v)}}return ej(e,c),e.push(e0),e4(e,b,y),y;case"option":var x=c.selectedValue;e.push(tp("option"));var k,w=null,C=null,S=null,E=null;for(k in n)if(G.call(n,k)){var T=n[k];if(null!=T)switch(k){case"children":w=T;break;case"selected":S=T;break;case"dangerouslySetInnerHTML":E=T;break;case"value":C=T;default:e1(e,k,T)}}if(null!=x){var D,N,A=null!==C?""+C:(D=w,N="",r.Children.forEach(D,function(e){null!=e&&(N+=e)}),N);if(I(x)){for(var _=0;_<x.length;_++)if(""+x[_]===A){e.push(e3);break}}else""+x===A&&e.push(e3)}else S&&e.push(e3);return e.push(e0),e4(e,E,w),w;case"textarea":e.push(tp("textarea"));var P,M=null,R=null,L=null;for(P in n)if(G.call(n,P)){var j=n[P];if(null!=j)switch(P){case"children":L=j;break;case"value":M=j;break;case"defaultValue":R=j;break;case"dangerouslySetInnerHTML":throw Error(a(91));default:e1(e,P,j)}}if(null===M&&null!==R&&(M=R),ej(e,c),e.push(e0),null!=L){if(null!=M)throw Error(a(92));if(I(L)){if(1<L.length)throw Error(a(93));M=""+L[0]}M=""+L}return"string"==typeof M&&"\n"===M[0]&&e.push(tu),null!==M&&e.push(U(ee(""+M))),null;case"input":e.push(tp("input"));var O,B=null,F=null,H=null,z=null,$=null,V=null,W=null,K=null,Y=null;for(O in n)if(G.call(n,O)){var X=n[O];if(null!=X)switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(a(399,"input"));case"name":B=X;break;case"formAction":F=X;break;case"formEncType":H=X;break;case"formMethod":z=X;break;case"formTarget":$=X;break;case"defaultChecked":Y=X;break;case"defaultValue":W=X;break;case"checked":K=X;break;case"value":V=X;break;default:e1(e,O,X)}}var Q=eJ(e,i,o,F,H,z,$,B);return null!==K?eG(e,"checked",K):null!==Y&&eG(e,"checked",Y),null!==V?e1(e,"value",V):null!==W&&e1(e,"value",W),ej(e,c),e.push(e2),null!=Q&&Q.forEach(eZ,e),null;case"button":e.push(tp("button"));var J,et=null,en=null,er=null,ea=null,eo=null,es=null,el=null;for(J in n)if(G.call(n,J)){var eu=n[J];if(null!=eu)switch(J){case"children":et=eu;break;case"dangerouslySetInnerHTML":en=eu;break;case"name":er=eu;break;case"formAction":ea=eu;break;case"formEncType":eo=eu;break;case"formMethod":es=eu;break;case"formTarget":el=eu;break;default:e1(e,J,eu)}}var ed=eJ(e,i,o,ea,eo,es,el,er);if(ej(e,c),e.push(e0),null!=ed&&ed.forEach(eZ,e),e4(e,en,et),"string"==typeof et){e.push(U(ee(et)));var eh=null}else eh=et;return eh;case"form":e.push(tp("form"));var ep,em=null,ef=null,eg=null,ey=null,eb=null,ev=null;for(ep in n)if(G.call(n,ep)){var ex=n[ep];if(null!=ex)switch(ep){case"children":em=ex;break;case"dangerouslySetInnerHTML":ef=ex;break;case"action":eg=ex;break;case"encType":ey=ex;break;case"method":eb=ex;break;case"target":ev=ex;break;default:e1(e,ep,ex)}}var ek=null,ew=null;if("function"==typeof eg){var eC=eQ(i,eg);null!==eC?(eg=eC.action||"",ey=eC.encType,eb=eC.method,ev=eC.target,ek=eC.data,ew=eC.name):(e.push(ez,U("action"),e$,eK,eV),ev=eb=ey=eg=null,e6(i,o))}if(null!=eg&&e1(e,"action",eg),null!=ey&&e1(e,"encType",ey),null!=eb&&e1(e,"method",eb),null!=ev&&e1(e,"target",ev),ej(e,c),e.push(e0),null!==ew&&(e.push(eY),eW(e,"name",ew),e.push(e2),null!=ek&&ek.forEach(eZ,e)),e4(e,ef,em),"string"==typeof em){e.push(U(ee(em)));var eS=null}else eS=em;return eS;case"menuitem":for(var eE in e.push(tp("menuitem")),n)if(G.call(n,eE)){var eT=n[eE];if(null!=eT)switch(eE){case"children":case"dangerouslySetInnerHTML":throw Error(a(400));default:e1(e,eE,eT)}}return ej(e,c),e.push(e0),null;case"object":e.push(tp("object"));var eI,eD=null,eN=null;for(eI in n)if(G.call(n,eI)){var eA=n[eI];if(null!=eA)switch(eI){case"children":eD=eA;break;case"dangerouslySetInnerHTML":eN=eA;break;case"data":var e_=ei(""+eA);if(""===e_)break;e.push(ez,U("data"),e$,U(ee(e_)),eV);break;default:e1(e,eI,eA)}}if(ej(e,c),e.push(e0),e4(e,eN,eD),"string"==typeof eD){e.push(U(ee(eD)));var eP=null}else eP=eD;return eP;case"title":var eM=1&c.tagScope,eL=4&c.tagScope;if(4===c.insertionMode||eM||null!=n.itemProp)var eO=tr(e,n);else eL?eO=null:(tr(o.hoistableChunks,n),eO=void 0);return eO;case"link":var eB=1&c.tagScope,eF=4&c.tagScope,eH=n.rel,eq=n.href,eX=n.precedence;if(4===c.insertionMode||eB||null!=n.itemProp||"string"!=typeof eH||"string"!=typeof eq||""===eq){e9(e,n);var e5=null}else if("stylesheet"===n.rel)if("string"!=typeof eX||null!=n.disabled||n.onLoad||n.onError)e5=e9(e,n);else{var e7=o.styles.get(eX),e8=i.styleResources.hasOwnProperty(eq)?i.styleResources[eq]:void 0;if(null!==e8){i.styleResources[eq]=null,e7||(e7={precedence:U(ee(eX)),rules:[],hrefs:[],sheets:new Map},o.styles.set(eX,e7));var td={state:0,props:q({},n,{"data-precedence":n.precedence,precedence:null})};if(e8){2===e8.length&&nU(td.props,e8);var th=o.preloads.stylesheets.get(eq);th&&0<th.length?th.length=0:td.state=1}e7.sheets.set(eq,td),l&&l.stylesheets.add(td)}else if(e7){var tf=e7.sheets.get(eq);tf&&l&&l.stylesheets.add(tf)}u&&e.push(eR),e5=null}else n.onLoad||n.onError?e5=e9(e,n):(u&&e.push(eR),e5=eF?null:e9(o.hoistableChunks,n));return e5;case"script":var ty=1&c.tagScope,tb=n.async;if("string"!=typeof n.src||!n.src||!tb||"function"==typeof tb||"symbol"==typeof tb||n.onLoad||n.onError||4===c.insertionMode||ty||null!=n.itemProp)var tv=ts(e,n);else{var tx=n.src;if("module"===n.type)var tk=i.moduleScriptResources,tw=o.preloads.moduleScripts;else tk=i.scriptResources,tw=o.preloads.scripts;var tC=tk.hasOwnProperty(tx)?tk[tx]:void 0;if(null!==tC){tk[tx]=null;var tS=n;if(tC){2===tC.length&&nU(tS=q({},n),tC);var tE=tw.get(tx);tE&&(tE.length=0)}var tT=[];o.scripts.add(tT),ts(tT,tS)}u&&e.push(eR),tv=null}return tv;case"style":var tI=1&c.tagScope,tD=n.precedence,tN=n.href,tA=n.nonce;if(4===c.insertionMode||tI||null!=n.itemProp||"string"!=typeof tD||"string"!=typeof tN||""===tN){e.push(tp("style"));var t_,tP=null,tM=null;for(t_ in n)if(G.call(n,t_)){var tR=n[t_];if(null!=tR)switch(t_){case"children":tP=tR;break;case"dangerouslySetInnerHTML":tM=tR;break;default:e1(e,t_,tR)}}e.push(e0);var tL=Array.isArray(tP)?2>tP.length?tP[0]:null:tP;"function"!=typeof tL&&"symbol"!=typeof tL&&null!=tL&&e.push(U((""+tL).replace(te,tt))),e4(e,tM,tP),e.push(tg("style"));var tj=null}else{var tO=o.styles.get(tD);if(null!==(i.styleResources.hasOwnProperty(tN)?i.styleResources[tN]:void 0)){i.styleResources[tN]=null,tO||(tO={precedence:U(ee(tD)),rules:[],hrefs:[],sheets:new Map},o.styles.set(tD,tO));var tB=o.nonce.style;if(!tB||tB===tA){tO.hrefs.push(U(ee(tN)));var tF,tH=tO.rules,tU=null,tz=null;for(tF in n)if(G.call(n,tF)){var t$=n[tF];if(null!=t$)switch(tF){case"children":tU=t$;break;case"dangerouslySetInnerHTML":tz=t$}}var tV=Array.isArray(tU)?2>tU.length?tU[0]:null:tU;"function"!=typeof tV&&"symbol"!=typeof tV&&null!=tV&&tH.push(U((""+tV).replace(te,tt))),e4(tH,tz,tU)}}tO&&l&&l.styles.add(tO),u&&e.push(eR),tj=void 0}return tj;case"meta":var tq=1&c.tagScope,tG=4&c.tagScope;if(4===c.insertionMode||tq||null!=n.itemProp)var tW=tn(e,n,"meta",c);else u&&e.push(eR),tW=tG?null:"string"==typeof n.charSet?tn(o.charsetChunks,n,"meta",c):"viewport"===n.name?tn(o.viewportChunks,n,"meta",c):tn(o.hoistableChunks,n,"meta",c);return tW;case"listing":case"pre":e.push(tp(t));var tK,tY=null,tZ=null;for(tK in n)if(G.call(n,tK)){var tX=n[tK];if(null!=tX)switch(tK){case"children":tY=tX;break;case"dangerouslySetInnerHTML":tZ=tX;break;default:e1(e,tK,tX)}}if(ej(e,c),e.push(e0),null!=tZ){if(null!=tY)throw Error(a(60));if("object"!=typeof tZ||!("__html"in tZ))throw Error(a(61));var tQ=tZ.__html;null!=tQ&&("string"==typeof tQ&&0<tQ.length&&"\n"===tQ[0]?e.push(tu,U(tQ)):e.push(U(""+tQ)))}return"string"==typeof tY&&"\n"===tY[0]&&e.push(tu),tY;case"img":var tJ=3&c.tagScope,t1=n.src,t0=n.srcSet;if(!("lazy"===n.loading||!t1&&!t0||"string"!=typeof t1&&null!=t1||"string"!=typeof t0&&null!=t0||"low"===n.fetchPriority||tJ)&&("string"!=typeof t1||":"!==t1[4]||"d"!==t1[0]&&"D"!==t1[0]||"a"!==t1[1]&&"A"!==t1[1]||"t"!==t1[2]&&"T"!==t1[2]||"a"!==t1[3]&&"A"!==t1[3])&&("string"!=typeof t0||":"!==t0[4]||"d"!==t0[0]&&"D"!==t0[0]||"a"!==t0[1]&&"A"!==t0[1]||"t"!==t0[2]&&"T"!==t0[2]||"a"!==t0[3]&&"A"!==t0[3])){null!==l&&64&c.tagScope&&(l.suspenseyImages=!0);var t2="string"==typeof n.sizes?n.sizes:void 0,t4=t0?t0+"\n"+(t2||""):t1,t3=o.preloads.images,t5=t3.get(t4);if(t5)("high"===n.fetchPriority||10>o.highImagePreloads.size)&&(t3.delete(t4),o.highImagePreloads.add(t5));else if(!i.imageResources.hasOwnProperty(t4)){i.imageResources[t4]=ec;var t6,t7=n.crossOrigin,t8="string"==typeof t7?"use-credentials"===t7?t7:"":void 0,t9=o.headers;t9&&0<t9.remainingCapacity&&"string"!=typeof n.srcSet&&("high"===n.fetchPriority||500>t9.highImagePreloads.length)&&(t6=nz(t1,"image",{imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:t8,integrity:n.integrity,nonce:n.nonce,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy}),0<=(t9.remainingCapacity-=t6.length+2))?(o.resets.image[t4]=ec,t9.highImagePreloads&&(t9.highImagePreloads+=", "),t9.highImagePreloads+=t6):(e9(t5=[],{rel:"preload",as:"image",href:t0?void 0:t1,imageSrcSet:t0,imageSizes:t2,crossOrigin:t8,integrity:n.integrity,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy}),"high"===n.fetchPriority||10>o.highImagePreloads.size?o.highImagePreloads.add(t5):(o.bulkPreloads.add(t5),t3.set(t4,t5)))}}return tn(e,n,"img",c);case"base":case"area":case"br":case"col":case"embed":case"hr":case"keygen":case"param":case"source":case"track":case"wbr":return tn(e,n,t,c);case"head":if(2>c.insertionMode){var ne=s||o.preamble;if(ne.headChunks)throw Error(a(545,"`<head>`"));null!==s&&e.push(ti),ne.headChunks=[];var nt=tl(ne.headChunks,n,"head",c)}else nt=tc(e,n,"head",c);return nt;case"body":if(2>c.insertionMode){var nn=s||o.preamble;if(nn.bodyChunks)throw Error(a(545,"`<body>`"));null!==s&&e.push(ta),nn.bodyChunks=[];var nr=tl(nn.bodyChunks,n,"body",c)}else nr=tc(e,n,"body",c);return nr;case"html":if(0===c.insertionMode){var ni=s||o.preamble;if(ni.htmlChunks)throw Error(a(545,"`<html>`"));null!==s&&e.push(to),ni.htmlChunks=[tm];var na=tl(ni.htmlChunks,n,"html",c)}else na=tc(e,n,"html",c);return na;default:if(-1!==t.indexOf("-")){e.push(tp(t));var no,ns=null,nl=null;for(no in n)if(G.call(n,no)){var nc=n[no];if(null!=nc){var nu=no;switch(no){case"children":ns=nc;break;case"dangerouslySetInnerHTML":nl=nc;break;case"style":eU(e,nc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"className":nu="class";default:if(Z(no)&&"function"!=typeof nc&&"symbol"!=typeof nc&&!1!==nc){if(!0===nc)nc="";else if("object"==typeof nc)continue;e.push(ez,U(nu),e$,U(ee(nc)),eV)}}}}return ej(e,c),e.push(e0),e4(e,nl,ns),ns}}return tc(e,n,t,c)}
173(Q.chunks,i,o,e.resumableState,e.renderState,t.blockedPreamble,t.hoistableState,t.formatContext,Q.lastPushedText);Q.lastPushedText=!1;var ea=t.formatContext,eo=t.keyPath;if(t.keyPath=n,3===(t.formatContext=eN(ea,i,o)).insertionMode){var es=r3(e,0,null,t.formatContext,!1,!1);Q.preambleChildren.push(es),t.blockedSegment=es;try{iv(e,t,er,-1),es.lastPushedText&&es.textEmbedded&&es.chunks.push(eR),es.status=1,iD(e,t.blockedBoundary,es)}finally{t.blockedSegment=Q}}else iv(e,t,er,-1);t.formatContext=ea,t.keyPath=eo;t:{var el=Q.chunks,eu=e.resumableState;switch(i){case"title":case"style":case"script":case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break t;case"body":if(1>=ea.insertionMode){eu.hasBody=!0;break t}break;case"html":if(0===ea.insertionMode){eu.hasHtml=!0;break t}break;case"head":if(1>=ea.insertionMode)break t}el.push(tg(i))}Q.lastPushedText=!1}}else{switch(i){case x:case c:case u:case l:var ed=t.keyPath;t.keyPath=n,iu(e,t,o.children,-1),t.keyPath=ed;return;case v:var eh=t.blockedSegment;if(null===eh){if("hidden"!==o.mode){var ep=t.keyPath;t.keyPath=n,iv(e,t,o.children,-1),t.keyPath=ep}}else if("hidden"!==o.mode){eh.chunks.push(tw),eh.lastPushedText=!1;var em=t.keyPath;t.keyPath=n,iv(e,t,o.children,-1),t.keyPath=em,eh.chunks.push(tC),eh.lastPushedText=!1}return;case f:t:{var ef=o.children,eg=o.revealOrder;if("independent"!==eg&&"together"!==eg){if(I(ef)){ia(e,t,n,ef,eg);break t}var ey=E(ef);if(ey){var eb=ey.call(ef);if(eb){var ev=eb.next();if(!ev.done){do ev=eb.next();while(!ev.done)ia(e,t,n,ef,eg)}break t}}}if("together"===eg){var ex=t.keyPath,ek=t.row,ew=t.row=ii(null);ew.boundaries=[],ew.together=!0,t.keyPath=n,iu(e,t,ef,-1),0==--ew.pendingTasks&&ie(e,ew),t.keyPath=ex,t.row=ek,null!==ek&&0<ew.pendingTasks&&(ek.pe
173ndingTasks++,ew.next=ek)}else{var eC=t.keyPath;t.keyPath=n,iu(e,t,ef,-1),t.keyPath=eC}}return;case w:var eS=t.formatContext,eE=t.keyPath,eD=e.resumableState;if(null!=o.name&&"auto"!==o.name)var eA=o.name;else eA=eM(eD,n6(t.treeContext),0);var eL=eA,eO=e.resumableState,eB=rW(o.default,o.update),eF=rW(o.default,o.enter),eH=rW(o.default,o.exit),eq=rW(o.default,o.share),eX=o.name;if(null==eB&&(eB="auto"),null==eF&&(eF="auto"),null==eH&&(eH="auto"),null==eX){var e5=eS.viewTransition;null!==e5?(eX=e5.name,eq=e5.share):(eX="auto",eq="none")}else null==eq&&(eq="auto"),4&eS.tagScope&&(eO.instructions|=128);8&eS.tagScope?eO.instructions|=128:eH="none",16&eS.tagScope?eO.instructions|=128:eF="none";var e7={update:eB,enter:eF,exit:eH,share:eq,parentEnter:"none",parentExit:"none",name:eX,autoName:eL,nameIdx:0},e8=-25&eS.tagScope;if(e8="none"!==eB?32|e8:-33&e8,"none"!==eF&&(e8|=64),t.formatContext=eI(eS.insertionMode,eS.selectedValue,e8,e7),t.keyPath=n,null!=o.name&&"auto"!==o.name)iu(e,t,o.children,-1);else{var td=t.treeContext;t.treeContext=n7(td,1,0),iv(e,t,o.children,-1),t.treeContext=td}t.formatContext=eS,t.keyPath=eE;return;case b:throw Error(a(343));case m:t:if(null!==t.replay){var th=t.keyPath,tf=t.formatContext,ty=t.row;t.keyPath=n,t.formatContext=eP(e.resumableState,tf),t.row=null;var tb=o.children;try{iv(e,t,tb,-1)}finally{t.keyPath=th,t.formatContext=tf,t.row=ty}}else{var tv=t.keyPath,tx=t.formatContext,tk=t.row,tS=t.blockedBoundary,tE=t.blockedPreamble,tT=t.hoistableState,tI=t.blockedSegment,tD=o.fallback,tN=o.children,tA=new Set,t_=r0(e,t.row,tA,2>t.formatContext.insertionMode?{content:eT(),fallback:eT()}:null,!1),tP=r3(e,tI.chunks.length,t_,t.formatContext,!1,!1);tI.children.push(tP),tI.lastPushedText=!1;var tM=r3(e,0,null,t.formatContext,!1,!1);tM.parentFlushed=!0;var tR=e.trackedPostpones;if(null!==tR){var tL=t.componentStack,tj=[n[0],"Suspense Fallback",n[2]];if(null!==tR){var tO=[tj[1],tj[2],[],null];tR.workingMap.set(tj,tO),t_.tracked={contentKeyPath:n,fallbackNode:tO}}t.blockedSegment=tP,t.blockedPreamble=null===t_.preamble?null:t_.preamble.fallback,t.keyPath=tj,t.formatContext=e_(e.resumableState,tx),t.componentStack=r6(tL);try{iv(e,t,tD,-1),tP.lastPushedText&&tP.textEmbedded&&tP.chunks.push(eR),tP.status=1,iD(e,tS,tP)}catch(t){throw tP.status=e.aborted?3:4,t}finally{t.blockedSegment=tI,t.blockedPreamble=tE,t.keyPath=tv,t.formatContext=tx}var tB=r2(e,null,tN,-1,t_,tM,null===t_.preamble?null:t_.preamble.content,t_.contentState,t.abortSet,n,eP(e.resumableState,t.formatContext),t.context,t.treeContext,null,tL);r5(tB),e.pingedTasks.push(tB)}else{t.blockedBoundary=t_,t.blockedPreamble=null===t_.preamble?null:t_.preamble.content,t.hoistableState=t_.contentState,t.blockedSegment=tM,t.keyPath=n,t.formatContext=eP(e.resumableState,tx),t.row=null;try{if(iv(e,t,tN,-1),tM.lastPushedText&&tM.textEmbedded&&tM.chunks.push(eR),tM.status=1,iD(e,t_,tM),iI(t_,tM),0===t_.pendingTasks&&0===t_.status){if(t_.status=1,!rK(e,t_)){null!==tk&&0==--tk.pendingTasks&&ie(e,tk),0===e.pendingRootTasks&&t.blockedPreamble&&iM(e);break t}}else null!==tk&&tk.together&&ir(e,tk)}catch(n){if(t_.status=4,e.aborted){tM.status=3;var tF=e.fatalError}else tM.status=4,tF=n;t_.errorDigest=r8(e,tF,r7(t.componentStack)),ig(e,t_)}finally{t.blockedBoundary=tS,t.blockedPreamble=tE,t.hoistableState=tT,t.blockedSegment=tI,t.keyPath=tv,t.formatContext=tx,t.row=tk}var tH=r2(e,null,tD,-1,tS,tP,null===t_.preamble?null:t_.preamble.fallback,t_.fallbackState,tA,[n[0],"Suspense Fallback",n[2]],e_(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,r6(t.componentStack));r5(tH),e.pingedTasks.push(tH)}}return}if("object"==typeof i&&null!==i)switch(i.$$typeof){case p:if("ref"in o){var tU={};for(var tz in o)"ref"!==tz&&(tU[tz]=o[tz])}else tU=o;var t$=io(e,t,n,i.render,tU,s);is(e,t,n,t$,0!==rm,rf,rg);return;case g:il(e,t,n,i.type,o,s);return;case h:var tV=o.children,tq=t.keyPath,tG=o.value,tW=i._currentValue;i._currentValue=tG;var tK=n0,tY={parent:tK,depth:null===tK?0:tK.depth+1,context:i,parentValue:tW,value:tG};n0=tY,t.context=tY,t.keyPath=n,iu(e,t,tV,-1);var tZ=n0;if(null===tZ)throw Error(a(403));tZ.context._currentValue=tZ.parentValue,t.context=n0=tZ.parent,t.keyPath=tq;return;case d:var tX=(0,o.children)(i._context._currentValue),tQ=t.keyPath;t.keyPath=n,iu(e,t,tX,-1),t.keyPath=tQ;return;case y:var tJ=(0,i._init)(i._payload);if(e.aborted)throw null;il(e,t,n,tJ,o,s);return}throw Error(a(130,null==i?i:typeof i,""))}}function ic(e,t,n,r,i){var a=t.replay,o=t.blockedBoundary,s=r3(e,0,null,t.formatContext,!1,!1);s.id=n,s.parentFlushed=!0;
173try{t.replay=null,t.blockedSegment=s,iv(e,t,r,i),s.status=1,iD(e,o,s),null===o?e.completedRootSegment=s:(iI(o,s),o.parentFlushed&&e.partialBoundaries.push(o))}finally{t.replay=a,t.blockedSegment=null}}function iu(e,t,n,r){null!==t.replay&&"number"==typeof t.replay.slots?ic(e,t,t.replay.slots,n,r):(t.node=n,t.childIndex=r,n=t.componentStack,r5(t),id(e,t),t.componentStack=n)}function id(e,t){var n=t.node,r=t.childIndex;if(null!==n){if("object"==typeof n){switch(n.$$typeof){case o:var i=n.type,l=n.key,c=n.props,u=void 0!==(n=c.ref)?n:null,d=nJ(i),p=null==l||l===T?-1===r?0:r:l;if(l=[t.keyPath,d,p],null!==t.replay)t:{var f=t.replay;for(r=f.nodes,n=0;n<r.length;n++){var g=r[n];if(p===g[1]){if(4===g.length){if(null!==d&&d!==g[0])throw Error(a(490,g[0],d));var b=g[2],v=g[3],x=t.node;t.replay={nodes:b,slots:v,pendingTasks:1};try{if(il(e,t,l,i,c,u),1===t.replay.pendingTasks&&0<t.replay.nodes.length)throw Error(a(488));t.replay.pendingTasks--}catch(i){if("object"==typeof i&&null!==i&&(i===rn||"function"==typeof i.then||"Maximum call stack size exceeded"===i.message))throw t.node===x?t.replay=f:r.splice(n,1),i;t.replay.pendingTasks--,l=r7(t.componentStack),x=e,c=t.blockedBoundary,l=r8(x,e=e.aborted?e.fatalError:i,l),ik(x,c,b,v,e,l)}t.replay=f}else{if(i!==m)throw Error(a(490,"Suspense",nJ(i)||"Unknown"));n:{f=g[5],i=g[2],u=g[3],d=null===g[4]?[]:g[4][2],g=null===g[4]?null:g[4][3],p=t.keyPath;var k=t.formatContext,w=t.row,C=t.replay,S=t.blockedBoundary,D=t.hoistableState,N=c.children;c=c.fallback;var A=new Set,_=r0(e,t.row,A,2>t.formatContext.insertionMode?{content:eT(),fallback:eT()}:null,!1);_.parentFlushed=!0,_.rootSegmentID=f,t.blockedBoundary=_,t.hoistableState=_.contentState,t.keyPath=l,t.formatContext=eP(e.resumableState,k),t.row=null,t.replay={nodes:i,slots:u,pendingTasks:1};try{if(iv(e,t,N,-1),1===t.replay.pendingTasks&&0<t.replay.nodes.length)throw Error(a(488));if(t.replay.pendingTasks--,0===_.pendingTasks&&0===_.status){_.status=1,e.completedBoundaries.push(_);break n}}catch(n){_.status=4,b=e.aborted?e.fatalError:n,_.errorDigest=x=r8(e,b,v=r7(t.componentStack)),t.replay.pendingTasks--,e.clientRenderedBoundaries.push(_)}finally{t.blockedBoundary=S,t.hoistableState=D,t.replay=C,t.keyPath=p,t.formatContext=k,t.row=w}r5(b=r4(e,null,{nodes:d,slots:g,pendingTasks:0},c,-1,S,_.fallbackState,A,[l[0],"Suspense Fallback",l[2]],e_(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,r6(t.componentStack))),e.pingedTasks.push(b)}}r.splice(n,1);break t}}}else il(e,t,l,i,c,u);return;case s:throw Error(a(257));case y:if(n=(b=n._init)(n._payload),e.aborted)throw null;iu(e,t,n,r);return}if(I(n))return void ih(e,t,n,r);if((b=E(n))&&(b=b.call(n))){if(!(n=b.next()).done){v=[];do v.push(n.value),n=b.next();while(!n.done)ih(e,t,v,r)}return}if("function"==typeof n.then)return t.thenableState=null,iu(e,t,rO(n),r);if(n.$$typeof===h)return iu(e,t,n._currentValue,r);throw Error(a(31,"[object Object]"===(r=Object.prototype.toString.call(n))?"object with keys {"+Object.keys(n).join(", ")+"}":r))}"string"==typeof n?null!==(r=t.blockedSegment)&&(r.lastPushedText=eL(r.chunks,n,e.renderState,r.lastPushedText)):("number"==typeof n||"bigint"==typeof n)&&null!==(r=t.blockedSegment)&&(r.lastPushedText=eL(r.chunks,""+n,e.render
173State,r.lastPushedText))}}function ih(e,t,n,r){var i=t.keyPath;if(-1!==r&&(t.keyPath=[t.keyPath,"Fragment",r],null!==t.replay)){for(var o=t.replay,s=o.nodes,l=0;l<s.length;l++){var c=s[l];if(c[1]===r){t.replay={nodes:r=c[2],slots:c=c[3],pendingTasks:1};try{if(ih(e,t,n,-1),1===t.replay.pendingTasks&&0<t.replay.nodes.length)throw Error(a(488));t.replay.pendingTasks--}catch(i){if("object"==typeof i&&null!==i&&(i===rn||"function"==typeof i.then))throw i;t.replay.pendingTasks--;var u=r7(t.componentStack);n=e;var d=t.blockedBoundary;u=r8(n,e=e.aborted?e.fatalError:i,u),ik(n,d,r,c,e,u)}t.replay=o,s.splice(l,1);break}}t.keyPath=i;return}if(o=t.treeContext,s=n.length,null!==t.replay&&null!==(l=t.replay.slots)&&"object"==typeof l){for(r=0;r<s;r++)c=n[r],t.treeContext=n7(o,s,r),"number"==typeof(d=l[r])?(ic(e,t,d,c,r),delete l[r]):iv(e,t,c,r);t.treeContext=o,t.keyPath=i;return}for(l=0;l<s;l++)r=n[l],t.treeContext=n7(o,s,l),iv(e,t,r,l);t.treeContext=o,t.keyPath=i}function ip(e,t,n){n.status=5,n.rootSegmentID=e.nextSegmentId++;var r=n.tracked;if(null===r||null===(e=r.contentKeyPath))throw Error(a(486));r=r.fallbackNode;var i=t.workingMap.get(e);return void 0===i?(n=[e[1],e[2],[],null,r,n.rootSegmentID],t.workingMap.set(e,n),iW(n,e[0],t),n):(i[4]=r,i[5]=n.rootSegmentID,i)}function im(e,t,n,r){r.status=5;var i=n.keyPath,o=n.blockedBoundary;if(null===o)r.id=e.nextSegmentId++,t.rootSlots=r.id,null!==e.completedRootSegment&&(e.completedRootSegment.status=5);else{if(null!==o&&0===o.status){var s=ip(e,t,o);if(null!==o.tracked&&o.tracked.contentKeyPath===i&&-1===n.childIndex){-1===r.id&&(r.id=r.parentFlushed?o.rootSegmentID:e.nextSegmentId++),s[3]=r.id;return}}if(-1===r.id&&(r.id=r.parentFlushed&&null!==o?o.rootSegmentID:e.nextSegmentId++),-1===n.childIndex)null===i?t.rootSlots=r.id:void 0===(n=t.workingMap.get(i))?iW(n=[i[1],i[2],[],r.id],i[0],t):n[3]=r.id;else{if(null===i){if(null===(e=t.rootSlots))e=t.rootSlots={};else if("number"==typeof e)throw Error(a(491))}else if(void 0===(s=(o=t.workingMap).get(i)))e={},s=[i[1],i[2],[],e],o.set(i,s),iW(s,i[0],t);else if(null===(e=s[3]))e=s[3]={};else if("number"==typeof e)throw Error(a(491));e[n.childIndex]=r.id}}}function ig(e,t){null!==(e=e.trackedPostpones)&&null!==(t=t.tracked)&&null!==(t=t.contentKeyPath)&&void 0!==(e=e.workingMap.get(t))&&(e.length=4,e[2]=[],e[3]=null)}function iy(e,t,n){return r4(e,n,t.replay,t.node,t.childIndex,t.blockedBoundary,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function ib(e,t,n){var r=t.blockedSegment,i=r3(e,r.chunks.length,null,t.formatContext,r.lastPushedText,!0);return r.children.push(i),r.lastPushedText=!1,r2(e,n,t.node,t.childIndex,t.blockedBoundary,i,t.blockedPreamble,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function iv(e,t,n,r){var i=t.formatContext,a=t.context,o=t.keyPath,s=t.treeContext,l=t.componentStack,c=t.blockedSegment;if(null===c){c=t.replay;try{return iu(e,t,n,r)}catch(u){if(rD(),n=u===rn?ri():u,!e.aborted&&"object"==typeof n&&null!==n){if("function"==typeof n.then){e=iy(e,t,r=u===rn?rI():null).ping,n.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,t.replay=c,n4(a);return}if("Maximum call stack size exceeded"===n.message){n=iy(e,t,n=u===rn?rI():null),e.pingedTasks.push(n),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,t.replay=c,n4(a);return}}}}else{var u=c.children.length,d=c.chunks.length;try{return iu(e,t,n,r)}catch(r){if(rD(),c.children.length=u,c.chunks.length=d,n=r===rn?ri():r,!e.aborted&&"object"==typeof n&&null!==n){if("function"==typeof n.then){c=n,e=ib(e,t,n=r===rn?rI():null).ping,c.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,n4(a);return}if("Maximum call stack size exceeded"===n.message){c=ib(e,t,c=r===rn?rI():null),e.pingedTasks.push(c),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=l,n4(a);return}}}}throw t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,n4(a),n}function ix(e){var t=e.blockedBoundary,n=e.blockedSegment;null!==n&&(n.status=3,iN(this,t,e.row,n))}function ik(e,t,n,r,i,o){for(var s=0;s<n.length;s++){var l=n[s];if(4===l.length)ik(e,t,l[2],l[3],i,o);else{l=l[5];var c=r0(e,null,new Set,null,!1);c.parentFlushed=!0,c.rootSegmentID=l,c.status=4,c.errorDigest=o,c.parentFlushed&&e.clientRenderedBoundaries.push(c)}}if(n.length=0,null!==r){if(null===t)throw Error(a(487));if(4!==t.status&&(t.status=4,t.errorDigest=o,t.parentFlushed&&e.clientRenderedBoundaries.push(t)),"object"==typeof r)for(var u in r)delete r[u]}}function iw(e,t){if(e!==t.currentTask){var n=e.blockedBoundary;null!==(e=e.blockedSegment)&&(e.status=3),null!==n&&n.fallbackAbortableTasks.forEach(function(e){return iw(e,t)})}}function iC(e,t,n){if(e!==t.currentTask){var r=e.blockedBoundary,i=e.blockedSegment;if(null===i||3===i.status){var a=r7(e.componentStack),o="object"==typeof n&&null!==n&&n.$$typeof===C;if(null===r){if(null===(r=e.replay))return void(o||null===t.trackedPostpones||null===i?o?(r8(t,e=rk(n),a),12!==t.status&&13!==t.status&&r9(t,e)):(r8(t,n,a),12!==t.status&&13!==t.status&&r9(t,n)):(r=t.trackedPostpones,r8(t,n,a),im(t,r,e,i),iN(t,null,e.row,i)));12!==t.status&&13!==t.status&&(r.pendingTasks--,0===r.pendingTasks&&0<r.nodes.length&&(o?(a="",i=rv):(a=r8(t,n,a),i=n),ik(t,null,r.nodes,r.slots,i,a)),t.pendingRootTasks--,0===t.pendingRootTasks&&iE(t))}else{var s=t.trackedPostpones;if(4!==r.status){if(!o&&null!==s&&null!==i)return r8(t,n,a),im(t,s,e,i),r.fallbackAbortableTasks.forEach(function(e){return iC(e,t,n)}),r.fallbackAbortableTasks.clear(),iN(t,r,e.row,i);r.status=4,a=o?"":r8(t,n,a),r.errorDigest=a,ig(t,r),r.parentFlushed&&t.clientRenderedBoundaries.push(r)}r.pendingTasks--,null!==(a=r.row)&&0==--a.pendingTasks&&ie(t,a),r.fallbackAbortableTasks.forEach(function(e){return iC(e,t,n)}),r.fallbackAbortableTasks.clear()}null!==(e=e.row)&&0==--e.pendingTasks&&ie(t,e),t.allPendingTasks--,0===t.allPendingTasks&&iT(t)}}}function iS(e,t){try{var n=e.renderState,r=n.onHeaders;if(r){var i=n.headers;if(i){n.headers=null;
173var a=i.preconnects;if(i.fontPreloads&&(a&&(a+=", "),a+=i.fontPreloads),i.highImagePreloads&&(a&&(a+=", "),a+=i.highImagePreloads),!t){var o=n.styles.values(),s=o.next();n:for(;0<i.remainingCapacity&&!s.done;s=o.next())for(var l=s.value.sheets.values(),c=l.next();0<i.remainingCapacity&&!c.done;c=l.next()){var u=c.value,d=u.props,h=d.href,p=u.props,m=nz(p.href,"style",{crossOrigin:p.crossOrigin,integrity:p.integrity,nonce:p.nonce,type:p.type,fetchPriority:p.fetchPriority,referrerPolicy:p.referrerPolicy,media:p.media});if(0<=(i.remainingCapacity-=m.length+2))n.resets.style[h]=ec,a&&(a+=", "),a+=m,n.resets.style[h]="string"==typeof d.crossOrigin||"string"==typeof d.integrity?[d.crossOrigin,d.integrity]:ec;else break n}}r(a?{Link:a}:{})}}}catch(t){r8(e,t,{})}}function iE(e){null===e.trackedPostpones&&iS(e,!0),null===e.trackedPostpones&&iM(e),(e=e.onShellReady)()}function iT(e){iS(e,null===e.trackedPostpones||null===e.completedRootSegment||5!==e.completedRootSegment.status),iM(e),(e=e.onAllReady)()}function iI(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary&&-1===t.children[0].id){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1!==n.status&&3!==n.status&&4!==n.status||iI(e,n)}else e.completedSegments.push(t)}function iD(e,t,n){if(null!==$){n=n.chunks;for(var r=0,i=0;i<n.length;i++)r+=n[i].byteLength;null===t?e.byteSize+=r:t.byteSize+=r}}function iN(e,t,n,r){if(null!==n&&(0==--n.pendingTasks?ie(e,n):n.together&&ir(e,n)),e.allPendingTasks--,null===t){if(null!==r&&r.parentFlushed){if(null!==e.completedRootSegment)throw Error(a(389));e.completedRootSegment=r}e.pendingRootTasks--,0===e.pendingRootTasks&&iE(e)}else if(t.pendingTasks--,4!==t.status)if(0===t.pendingTasks){if(0===t.status&&(t.status=1),null!==r&&r.parentFlushed&&(1===r.status||3===r.status)&&iI(t,r),t.parentFlushed&&e.completedBoundaries.push(t),1===t.status)null!==(n=t.row)&&nY(n.hoistables,t.contentState),rK(e,t)||(e.allPendingTasks++,t.fallbackAbortableTasks.forEach(ix,e),t.fallbackAbortableTasks.clear(),null!==n&&0==--n.pendingTasks&&ie(e,n),e.allPendingTasks--),0===e.pendingRootTasks&&null===e.trackedPostpones&&null!==t.preamble&&iM(e);else if(5===t.status&&null!==(t=t.row)){if(null!==e.trackedPostpones){n=e.trackedPostpones;var i=t.next;if(null!==i&&null!==(r=i.boundaries))for(i.boundaries=null,i=0;i<r.length;i++){var o=r[i];ip(e,n,o),iN(e,o,null,null)}}e.allPendingTasks++,0==--t.pendingTasks&&ie(e,t),e.allPendingTasks--}}else null===r||!r.parentFlushed||1!==r.status&&3!==r.status||(iI(t,r),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)),null!==(t=t.row)&&t.together&&ir(e,t);0===e.allPendingTasks&&iT(e)}function iA(e){if(!(e.aborted||11<e.status)){var t=n0,n=ea.H;ea.H=rU;var r=ea.A;ea.A=r$;var i=rJ;rJ=e;var o=rz;rz=e.resumableState;try{var s,l=e.pingedTasks;for(s=0;s<l.length;s++){var c=l[s],u=c.blockedSegment;if(null===u){t:if(0!==c.replay.pendingTasks){var d=e.currentTask;e.currentTask=c,n4(c.context);var h=c.node;try{if("number"==typeof c.replay.slots?ic(e,c,c.replay.slots,c.node,c.childIndex):id(e,c),1===c.replay.pendingTasks&&0<c.replay.nodes.length)throw Error(a(488));c.replay.pendingTasks--,c.abortSet.delete(c),iN(e,c.blockedBoundary,c.row,null)}catch(t){rD();var p=t===rn?ri():t;if(e.aborted){t===rn&&(c.thenableState=rI()),e.currentTask=d;var m=e;iw(c,m),c.abortSet.delete(c),iC(c,m,m.fatalError)}else{if("object"==typeof p&&null!==p){if("function"==typeof p.then){var f=c.ping;p.then(f.resolve,f.reject),c.thenableState=t===rn?rI():null;break t}if("Maximum call stack size exceeded"===p.message&&c.node!==h){c.thenableState=null,e.pingedTasks.push(c);break t}}c.replay.pendingTasks--,c.abortSet.delete(c);var g=r7(c.componentStack);m=e;var y=c.blockedBoundary,b=e.aborted?e.fatalError:p,v=c.replay.nodes,x=c.replay.slots,k=r8(m,b,g);ik(m,y,v,x,b,k),e.pendingRootTasks--,0===e.pendingRootTasks&&iE(e),e.allPendingTasks--,0===e.allPendingTasks&&iT(e)}}finally{e.currentTask=d}}}else t:if(m=u,0===m.status){var w=e.currentTask;e.currentTask=c,n4(c.context);var C=m.children.length,S=m.chunks.length,E=c.node;
173try{id(e,c),m.lastPushedText&&m.textEmbedded&&m.chunks.push(eR),c.abortSet.delete(c),m.status=1,iD(e,c.blockedBoundary,m),iN(e,c.blockedBoundary,c.row,m)}catch(t){rD(),m.children.length=C,m.chunks.length=S;var T=t===rn?ri():t;if(e.aborted)t===rn&&(c.thenableState=rI()),e.currentTask=w,m=e,iw(c,m),c.abortSet.delete(c),iC(c,m,m.fatalError);else{if("object"==typeof T&&null!==T){if("function"==typeof T.then){m.status=0,c.thenableState=t===rn?rI():null;var I=c.ping;T.then(I.resolve,I.reject);break t}if("Maximum call stack size exceeded"===T.message&&c.node!==E){m.status=0,c.thenableState=null,e.pingedTasks.push(c);break t}}var D=r7(c.componentStack);c.abortSet.delete(c),m.status=4;var N=c.blockedBoundary,A=c.row;if(null!==A&&0==--A.pendingTasks&&ie(e,A),e.allPendingTasks--,null===N)if(T===rv){if(null===rx)throw Error(a(606));m=rx,rx=null;var _=m;r8(e,_,D),r9(e,_)}else r8(e,T,D),r9(e,T);else{var P=r8(e,T,D);if(N.pendingTasks--,4!==N.status){N.status=4,N.errorDigest=P,ig(e,N);var M=N.row;null!==M&&(e.allPendingTasks++,0==--M.pendingTasks&&ie(e,M),e.allPendingTasks--),N.parentFlushed&&e.clientRenderedBoundaries.push(N),0===e.pendingRootTasks&&null===e.trackedPostpones&&null!==N.preamble&&iM(e)}0===e.allPendingTasks&&iT(e)}}}finally{e.currentTask=w}}}l.splice(0,s),null!==e.destination&&iz(e,e.destination)}catch(t){r8(e,t,{}),r9(e,t)}finally{rz=o,ea.H=n,ea.A=r,n===rU&&n4(t),rJ=i}}}function i_(e,t,n){t.preambleChildren.length&&n.push(t.preambleChildren);for(var r=!1,i=0;i<t.children.length;i++)r=iP(e,t.children[i],n)||r;return r}function iP(e,t,n){var r=t.boundary;if(null===r)return i_(e,t,n);var i=r.preamble;if(null===i)return!1;switch(r.status){case 1:if(ty(e.renderState,i.content),e.byteSize+=r.byteSize,!(t=r.completedSegments[0]))throw Error(a(391));return i_(e,t,n);case 5:if(null!==e.trackedPostpones)return!0;case 4:if(1===t.status)return ty(e.renderState,i.fallback),i_(e,t,n);default:return!0}}function iM(e){if(e.completedRootSegment&&null===e.completedPreambleSegments){var t=[],n=e.byteSize,r=iP(e,e.completedRootSegment,t),i=e.renderState.preamble;!1===r||i.headChunks&&i.bodyChunks?e.completedPreambleSegments=t:e.byteSize=n}}function iR(e,t,n,r){switch(n.parentFlushed=!0,n.status){case 0:n.id=e.nextSegmentId++;case 5:return r=n.id,n.lastPushedText=!1,n.textEmbedded=!1,e=e.renderState,O(t,tx),O(t,e.placeholderPrefix),O(t,e=U(r.toString(16))),B(t,tk);case 1:n.status=2;var i=!0,o=n.chunks,s=0;n=n.children;for(var l=0;l<n.length;l++){for(i=n[l];s<i.index;s++)O(t,o[s]);i=ij(e,t,i,r)}for(;s<o.length-1;s++)O(t,o[s]);return s<o.length&&(i=B(t,o[s])),i;case 3:return!0;default:throw Error(a(390))}}var iL=0;function ij(e,t,n,r){var i=n.boundary;if(null===i)return iR(e,t,n,r);if(n.boundary=null,i.parentFlushed=!0,4===i.status){var o=i.row;null!==o&&0==--o.pendingTasks&&ie(e,o),i=i.errorDigest,B(t,tI),O(t,tN),null!=i&&(O(t,t_),O(t,U(ee(i))),O(t,tA)),B(t,tP),iR(e,t,n,r)}else if(1!==i.status)0===i.status&&(i.rootSegmentID=e.nextSegmentId++),0<i.completedSegments.length&&e.partialBoundaries.push(i),tM(t,e.renderState,i.rootSegmentID),r&&nY(r,i.fallbackState),iR(e,t,n,r);else if(!iH&&rK(e,i)&&(iL+i.byteSize>e.progressiveChunkSize||nZ(i.contentState,iU)||i.defer))i.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(i),tM(t,e.renderState,i.rootSegmentID),iR(e,t,n,r);else{if(iL+=i.byteSize,r&&nY(r,i.contentState),null!==(n=i.row)&&rK(e,i)&&0==--n.pendingTasks&&ie(e,n),B(t,tS),1!==(n=i.completedSegments).length)throw Error(a(391));ij(e,t,n[0],r)}return B(t,tD)}function iO(e,t,n,r){switch(!function(e,t,n,r){switch(n.insertionMode){case 0:case 1:case 3:case 2:return O(e,tR),O(e,t.segmentPrefix),O(e,U(r.toString(16))),B(e,tL);case 4:return O(e,tO),O(e,t.segmentPrefix),O(e,U(r.toString(16))),B(e,tB);case 5:return O(e,tH),O(e,t.segmentPrefix),O(e,U(r.toString(16))),B(e,tU);case 6:return O(e,t$),O(e,t.segmentPrefix),O(e,U(r.toString(16))),B(e,tV);case 7:return O(e,tG),O(e,t.segmentPrefix),O(e,U(r.toString(16))),B(e,tW);case 8:return O(e,tY),O(e,t.segmentPrefix),O(e,U(r.toString(16))),B(e,tZ);case 9:return O(e,tQ),O(e,t.segmentPrefix),O(e,U(r.toString(16))),B(e,tJ);default:throw Error(a(397))}}
173(t,e.renderState,n.parentFormatContext,n.id),ij(e,t,n,r),n.parentFormatContext.insertionMode){case 0:case 1:case 3:case 2:return B(t,tj);case 4:return B(t,tF);case 5:return B(t,tz);case 6:return B(t,tq);case 7:return B(t,tK);case 8:return B(t,tX);case 9:return B(t,t1);default:throw Error(a(397))}}function iB(e,t,n){iL=n.byteSize;for(var r,i,o=n.completedSegments,s=0;s<o.length;s++)iF(e,t,n,o[s]);o.length=0,null!==(o=n.row)&&rK(e,n)&&0==--o.pendingTasks&&ie(e,o),nw(t,n.contentState,e.renderState),o=e.resumableState,e=e.renderState,s=n.rootSegmentID,n=n.contentState;var l=e.stylesToHoist,c=0!=(128&o.instructions);return e.stylesToHoist=!1,O(t,e.startInlineScript),O(t,e0),l?(0==(4&o.instructions)&&(o.instructions|=4,O(t,ni)),0==(2&o.instructions)&&(o.instructions|=2,O(t,t5)),c&&0==(256&o.instructions)&&(o.instructions|=256,O(t,t6)),0==(8&o.instructions)?(o.instructions|=8,O(t,t8)):O(t,t9)):(0==(2&o.instructions)&&(o.instructions|=2,O(t,t5)),c&&0==(256&o.instructions)&&(o.instructions|=256,O(t,t6)),O(t,t7)),o=U(s.toString(16)),O(t,e.boundaryPrefix),O(t,o),O(t,ne),O(t,e.segmentPrefix),O(t,o),l?(O(t,nt),r=n,O(t,nj),i=nj,r.stylesheets.forEach(function(e){if(2!==e.state)if(3===e.state)O(t,i),O(t,U(np(""+e.props.href))),O(t,nF),i=nO;else{O(t,i);var n=e.props["data-precedence"],r=e.props;for(var o in O(t,U(np(ei(""+e.props.href)))),n=""+n,O(t,nB),O(t,U(np(n))),r)if(G.call(r,o)&&null!=(n=r[o]))switch(o){case"href":case"rel":case"precedence":case"data-precedence":break;case"children":case"dangerouslySetInnerHTML":throw Error(a(399,"link"));default:!function(e,t,n){var r=t.toLowerCase();switch(typeof n){case"function":case"symbol":return}switch(t){case"innerHTML":case"dangerouslySetInnerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"style":case"ref":return;case"className":r="class",t=""+n;break;case"hidden":if(!1===n)return;t="";break;case"src":case"href":t=""+(n=ei(n));break;default:if(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])||!Z(t))return;t=""+n}O(e,nB),O(e,U(np(r))),O(e,nB),O(e,U(np(t)))}(t,o,n)}O(t,nF),i=nO,e.state=3}}),O(t,nF)):O(t,nn),n=B(t,nr),tb(t,e)&&n}function iF(e,t,n,r){if(2===r.status)return!0;var i=n.contentState,o=r.id;if(-1===o){if(-1===(r.id=n.rootSegmentID))throw Error(a(392));return iO(e,t,r,i)}return o===n.rootSegmentID?iO(e,t,r,i):(iO(e,t,r,i),n=e.resumableState,O(t,(e=e.renderState).startInlineScript),O(t,e0),0==(1&n.instructions)?(n.instructions|=1,O(t,t0)):O(t,t2),O(t,e.segmentPrefix),O(t,o=U(o.toString(16))),O(t,t4),O(t,e.placeholderPrefix),O(t,o),t=B(t,t3))}var iH=!1,iU=!1;function iz(e,t){L=new Uint8Array(2048),j=0;try{if(!(0<e.pendingRootTasks)){var n,r=e.completedRootSegment;if(null!==r){if(5===r.status)return;var i=e.completedPreambleSegments;if(null===i)return;iL=e.byteSize;var a,o=e.resumableState,s=e.renderState,l=s.preamble,c=l.htmlChunks,u=l.headChunks;if(c){for(a=0;a<c.length;a++)O(t,c[a]);if(u)for(a=0;a<u.length;a++)O(t,u[a]);else O(t,tp("head")),O(t,e0)}else if(u)for(a=0;a<u.length;a++)O(t,u[a]);var d=s.charsetChunks;for(a=0;a<d.length;a++)O(t,d[a]);d.length=0,s.preconnects.forEach(nC,t),s.preconnects.clear();var h=s.viewportChunks;for(a=0;a<h.length;a++)O(t,h[a]);h.length=0,s.fontPreloads.forEach(nC,t),s.fontPreloads.clear(),s.highImagePreloads.forEach(nC,t),s.highImagePreloads.clear(),eu=s,s.styles.forEach(n_,t),eu=null;var p=s.importMapChunks;for(a=0;a<p.length;a++)O(t,p[a]);p.length=0,s.bootstrapScripts.forEach(nC,t),s.scripts.forEach(nC,t),s.scripts.clear(),s.bulkPreloads.forEach(nC,t),s.bulkPreloads.clear(),c||u||(o.instructions|=32);var m=s.hoistableChunks;for(a=0;a<m.length;a++)O(t,m[a]);for(o=m.length=0;o<i.length;o++){var f=i[o];for(s=0;s<f.length;s++)ij(e,t,f[s],null)}var g=e.renderState.preamble,y=g.headChunks;(g.htmlChunks||y)&&O(t,tg("head"));var b=g.bodyChunks;if(b)for(i=0;i<b.length;i++)O(t,b[i]);iU=!0,ij(e,t,r,null),iU=!1,e.completedRootSegment=null;var v=e.renderState;if(0!==e.allPendingTasks||0!==e.clientRenderedBoundaries.length||0!==e.completedBoundaries.length||null!==e.trackedPostpones&&(0!==e.trackedPostpones.rootNodes.length||null!==e.trackedPostpones.rootSlots)){var x=e.resumableState;if(0==(64&x.instructions)){if(x.instructions|=64,O(t,v.startInlineScript),0==(32&x.instructions)){x.instructions|=32;var k="_"+x.idPrefix+"R_";
173O(t,nR),O(t,U(ee(k))),O(t,eV)}O(t,e0),O(t,tv),B(t,eh)}}tb(t,v)}var w=e.renderState;r=0;var C=w.viewportChunks;for(r=0;r<C.length;r++)O(t,C[r]);C.length=0,w.preconnects.forEach(nC,t),w.preconnects.clear(),w.fontPreloads.forEach(nC,t),w.fontPreloads.clear(),w.highImagePreloads.forEach(nC,t),w.highImagePreloads.clear(),w.styles.forEach(nM,t),w.scripts.forEach(nC,t),w.scripts.clear(),w.bulkPreloads.forEach(nC,t),w.bulkPreloads.clear();var S=w.hoistableChunks;for(r=0;r<S.length;r++)O(t,S[r]);S.length=0;var E=e.clientRenderedBoundaries;for(n=0;n<E.length;n++){var T=E[n];w=t;var I=e.resumableState,D=e.renderState,N=T.rootSegmentID,A=T.errorDigest;O(w,D.startInlineScript),O(w,e0),0==(4&I.instructions)?(I.instructions|=4,O(w,na)):O(w,no),O(w,D.boundaryPrefix),O(w,U(N.toString(16))),O(w,ns),null!=A&&(O(w,nl),null==A?O(w,nc):O(w,U(JSON.stringify(A).replace(nd,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}))));var _=B(w,nu);if(!_){e.destination=null,n++,E.splice(0,n);return}}E.splice(0,n);var P=e.completedBoundaries;for(n=0;n<P.length;n++)if(!iB(e,t,P[n])){e.destination=null,n++,P.splice(0,n);return}P.splice(0,n),F(t),L=new Uint8Array(2048),j=0,iH=!0;var M=e.partialBoundaries;for(n=0;n<M.length;n++){var R=M[n];t:{E=e,T=t,iL=R.byteSize;var H=R.completedSegments;for(_=0;_<H.length;_++)if(!iF(E,T,R,H[_])){_++,H.splice(0,_);var z=!1;break t}H.splice(0,_);var $=R.row;null!==$&&$.together&&1===R.pendingTasks&&(1===$.pendingTasks?it(E,$,$.hoistables):$.pendingTasks--),z=nw(T,R.contentState,E.renderState)}if(!z){e.destination=null,n++,M.splice(0,n);return}}M.splice(0,n),iH=!1;var V=e.completedBoundaries;for(n=0;n<V.length;n++)if(!iB(e,t,V[n])){e.destination=null,n++,V.splice(0,n);return}V.splice(0,n)}}finally{iH=!1,null!==(n=e.postponedState)&&(n.nextSegmentId=e.nextSegmentId),0===e.allPendingTasks&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length?(e.flushScheduled=!1,(n=e.resumableState).hasBody&&O(t,tg("body")),n.hasHtml&&O(t,tg("html")),F(t),e.status=13,t.close(),e.destination=null):F(t)}}function i$(e){e.flushScheduled=null!==e.destination,R(function(){return iA(e)}),_(function(){10===e.status&&(e.status=11),null===e.trackedPostpones&&iS(e,0===e.pendingRootTasks)})}function iV(e){!1===e.flushScheduled&&0===e.pingedTasks.length&&null!==e.destination&&(e.flushScheduled=!0,_(function(){var t=e.destination;t?iz(e,t):e.flushScheduled=!1}))}function iq(e,t){if(12===e.status)e.status=13,V(t,e.fatalError);else if(13!==e.status&&null===e.destination){e.destination=t;try{iz(e,t)}catch(t){r8(e,t,{}),r9(e,t)}}}function iG(e,t){if(!(e.aborted||11!==e.status&&10!==e.status)){e.aborted=!0,e.fatalError=t=void 0===t?Error(a(432)):"object"==typeof t&&null!==t&&"function"==typeof t.then?Error(a(530)):t;var n=e.abortableTasks;n.forEach(function(t){return iw(t,e)}),_(function(){try{if(0<n.size){var t=e.fatalError;n.forEach(function(n){return iC(n,e,t)}),n.clear()}null!==e.destination&&iz(e,e.destination)}catch(t){r8(e,t,{}),r9(e,t)}})}}function iW(e,t,n){if(null===t)n.rootNodes.push(e);else{var r=n.workingMap,i=r.get(t);void 0===i&&(i=[t[1],t[2],[],null],r.set(t,i),iW(i,t[0],n)),i[2].push(e)}}function iK(e){var t=e.trackedPostpones;if(null===t||0===t.rootNodes.length&&null===t.rootSlots)return e.trackedPostpones=null;var n=null===e.completedRootSegment||5!==e.completedRootSegment.status&&null!==e.completedPreambleSegments;if(n){var r=e.nextSegmentId,i=t.rootSlots,a=e.resumableState;a.bootstrapScriptContent=void 0,a.bootstrapScripts=void 0,a.bootstrapModules=void 0}else{r=0,i=-1,a=e.resumableState;var o=e.renderState;a.nextFormID=0,a.hasBody=!1,a.hasHtml=!1,a.unknownResources={font:o.resets.font},a.dnsResources=o.resets.dns,a.connectResources=o.resets.connect,a.imageResources=o.resets.image,a.styleResources=o.resets.style,a.scriptResources={},a.moduleUnknownResources={},a.moduleScriptResources={},a.instructions=0}return t={nextSegmentId:r,rootFormatContext:e.rootFormatContext,progressiveChunkSize:e.progressiveChunkSize,resumableState:e.resumableState,replayNodes:t.rootNodes,replaySlots:i},n&&(e.postponedState=t),t}function iY(){var e=r.version;if("19.3.0-canary-cbb046ab-20260731"!==e)throw Error(a(527,e,"19.3.0-canary-cbb046ab-20260731"))}iY(),iY(),n.prerender=function(e,t){return new Promise(function(n,r){var i,a,o,s,l,c=t?t.onHeaders:void 0;c&&(l=function(e){c(new Headers(e))});var u=eE(t?t.identifierPrefix:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),d=(i=e,a=eS(u,void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.importMap:void 0,l,t?t.maxHeadersLength:void 0),o=eD(t?t.namespaceURI:void 0),s=t?t.progressiveChunkSize:void 0,(i=rX(i,u,a,o,s,t?t.onError:void 0,function(){var e=new ReadableStream({type:"bytes",pull:function(e){iq(d,e)}
173,cancel:function(e){d.destination=null,iG(d,e)}},{highWaterMark:0});n(e={postponed:iK(d),prelude:e})},void 0,void 0,r,void 0)).trackedPostpones={workingMap:new Map,rootNodes:[],rootSlots:null},i);if(t&&t.signal){var h=t.signal;if(h.aborted)iG(d,h.reason);else{var p=function(){iG(d,h.reason),h.removeEventListener("abort",p)};h.addEventListener("abort",p)}}i$(d)})},n.renderToReadableStream=function(e,t){return new Promise(function(n,r){var i,a,o,s=new Promise(function(e,t){a=e,i=t}),l=t?t.onHeaders:void 0;l&&(o=function(e){l(new Headers(e))});var c=eE(t?t.identifierPrefix:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),u=rX(e,c,eS(c,t?t.nonce:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.importMap:void 0,o,t?t.maxHeadersLength:void 0),eD(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,a,function(){var e=new ReadableStream({type:"bytes",pull:function(e){iq(u,e)},cancel:function(e){u.destination=null,iG(u,e)}},{highWaterMark:0});e.allReady=s,n(e)},function(e){s.catch(function(){}),r(e)},i,t?t.formState:void 0);if(t&&t.signal){var d=t.signal;if(d.aborted)iG(u,d.reason);else{var h=function(){iG(u,d.reason),d.removeEventListener("abort",h)};d.addEventListener("abort",h)}}i$(u)})},n.resume=function(e,t,n){return new Promise(function(r,i){var a,o,s=new Promise(function(e,t){o=e,a=t}),l=rQ(e,t,eS(t.resumableState,n?n.nonce:void 0,void 0,void 0,void 0,void 0),n?n.onError:void 0,o,function(){var e=new ReadableStream({type:"bytes",pull:function(e){iq(l,e)},cancel:function(e){l.destination=null,iG(l,e)}},{highWaterMark:0});e.allReady=s,r(e)},function(e){s.catch(function(){}),i(e)},a);if(n&&n.signal){var c=n.signal;if(c.aborted)iG(l,c.reason);else{var u=function(){iG(l,c.reason),c.removeEventListener("abort",u)};c.addEventListener("abort",u)}}i$(l)})},n.resumeAndPrerender=function(e,t,n){return new Promise(function(r,i){var a,o,s=(a=e,o=eS(t.resumableState,void 0,void 0,void 0,void 0,void 0),(a=rQ(a,t,o,n?n.onError:void 0,function(){var e=new ReadableStream({type:"bytes",pull:function(e){iq(s,e)},cancel:function(e){s.destination=null,iG(s,e)}},{highWaterMark:0});r(e={postponed:iK(s),prelude:e})},void 0,void 0,i)).trackedPostpones={workingMap:new Map,rootNodes:[],rootSlots:null},a);if(n&&n.signal){var l=n.signal;if(l.aborted)iG(s,l.reason);else{var c=function(){iG(s,l.reason),l.removeEventListener("abort",c)};l.addEventListener("abort",c)}}i$(s)})},n.version="19.3.0-canary-cbb046ab-20260731"},68428,(e,t,n)=>{"use strict";var r,i;e.i(247167),r=e.r(469957),i=e.r(149340),n.version=r.version,n.renderToString=r.renderToString,n.renderToStaticMarkup=r.renderToStaticMarkup,n.renderToReadableStream=i.renderToReadableStream,n.resume=i.resume},325633,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return f},defaultHead:function(){return d}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(555682),o=e.r(190809),s=e.r(843476),l=o._(e.r(271645)),c=a._(e.r(898879)),u=e.r(742732);function d(){return[(0,s.jsx)("meta",{charSet:"utf-8"},"charset"),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function h(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let p=["name","httpEquiv","charSet","itemProp"];function m(e){let t,n,r,i;return e.reduce(h,[]).reverse().concat(d().reverse()).filter((t=new Set,n=new Set,r=new Set,i={},e=>{let a=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?a=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?a=!1:n.add(e.type);break;case"meta":for(let t=0,n=p.length;t<n;t++){let n=p[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?a=!1:r.add(n);else{let t=e.props[n],r=i[n]||new Set;("name"!==n||!o)&&r.has(t)?a=!1:(r.add(t),i[n]=r)}}}return a})).reverse().map((e,t)=>{let n=e.key||t;return l.default.cloneElement(e,{key:n})})}let f=function({children:e}){let t=(0,l.useContext)(u.HeadManagerContext);return(0,s.jsx)(c.default,{reduceComponentsToState:m,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esMo
173dule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},918556,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let r=e.r(555682)._(e.r(271645)),i=e.r(987690),a=r.default.createContext(i.imageConfigDefault)},65856,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(555682)._(e.r(271645)).default.createContext(null)},488143,(e,t,n)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:i,blurDataURL:a,objectFit:o}){let s=n?40*n:e,l=i?40*i:t,c=s&&l?`viewBox='0 0 ${s} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},987690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return a},imageConfigDefault:function(){return o}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},908927,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return c}});let r=e.r(543369),i=e.r(488143),a=e.r(987690),o=["-moz-initial","fill","none","scale-down",void 0];function s(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:n=!1,priority:u=!1,preload:d=!1,loading:h,className:p,quality:m,width:f,height:g,fill:y=!1,style:b,overrideSrc:v,onLoad:x,onLoadingComplete:k,placeholder:w="empty",blurDataURL:C,fetchPriority:S,decoding:E="async",layout:T,objectFit:I,objectPosition:D,lazyBoundary:N,lazyRoot:A,..._},P){var M;let R,L,j,{imgConf:O,showAltText:B,blurComplete:F,defaultLoader:H}=P,U=O||a.imageConfigDefault;if("allSizes"in U)R=U;else{let e=[...U.deviceSizes,...U.imageSizes].sort((e,t)=>e-t),t=U.deviceSizes.sort((e,t)=>e-t),n=U.qualities?.sort((e,t)=>e-t);R={...U,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===H)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let z=_.loader||H;delete _.loader,delete _.srcSet;let $="__next_img_default"in z;if($){if("custom"===R.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop. 174Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=z;z=t=>{let{config:n,...r}=t;return e(r)}}if(T){"fill"===T&&(y=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[T];e&&(b={...b,...e});let n={responsive:"100vw",fill:"100vw"}[T];n&&!t&&(t=n)}let V="",q=l(f),G=l(g);if((M=e)&&"object"==typeof M&&(s(M)||void 0!==M.src)){let t=s(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}
174`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(L=t.blurWidth,j=t.blurHeight,C=C||t.blurDataURL,V=t.src,!y)if(q||G){if(q&&!G){let e=q/t.width;G=Math.round(t.height*e)}else if(!q&&G){let e=G/t.height;q=Math.round(t.width*e)}}else q=t.width,G=t.height}let W=!u&&!d&&("lazy"===h||void 0===h);(!(e="string"==typeof e?e:V)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,W=!1),R.unoptimized&&(n=!0),$&&!R.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let K=l(m),Y=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:I,objectPosition:D}:{},B?{}:{color:"transparent"},b),Z=F||"empty"===w?null:"blur"===w?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:q,heightInt:G,blurWidth:L,blurHeight:j,blurDataURL:C||"",objectFit:Y.objectFit})}")`:`url("${w}")`,X=o.includes(Y.objectFit)?"fill"===Y.objectFit?"100% 100%":"cover":Y.objectFit,Q=Z?{backgroundSize:X,backgroundPosition:Y.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Z}:{},J=function({config:e,src:t,unoptimized:n,width:i,quality:a,sizes:o,loader:s}){if(n){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,r.getAssetToken)())e=void 0;else if(e){let n=t.indexOf("?");if(-1!==n){let r=new URLSearchParams(t.slice(n+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,n)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:c}=function({deviceSizes:e,allSizes:t},n,r){if(r){let n=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=n.exec(r);)i.push(parseInt(e[2]));if(i.length){let n=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,o),u=l.length-1;return{sizes:o||"w"!==c?o:"100vw",srcSet:l.map((n,r)=>`${s({config:e,src:t,quality:a,width:n})} ${"w"===c?n:r+1}${c}`).join(", "),src:s({config:e,src:t,quality:a,width:l[u]})}}({config:R,src:e,unoptimized:n,width:q,quality:K,sizes:t,loader:z}),ee=W?"lazy":h;return{props:{..._,loading:ee,fetchPriority:S,width:q,height:G,decoding:E,className:p,style:{...Y,...Q},sizes:J.sizes,srcSet:J.srcSet,src:v||J.src},meta:{unoptimized:n,preload:d||u,placeholder:w,fill:y}}}},898879,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let r=e.r(271645),i="u"<typeof window,a=i?()=>{}:r.useLayoutEffect,o=i?()=>{}:r.useEffect;function s(e){let{headManager:t,reduceComponentsToState:n}=e;function s(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return i&&(t?.mountedInstances?.add(e.children),s()),a(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),a(()=>(t&&(t._pendingUpdate=s),()=>{t&&(t._pendingUpdate=s)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},172604,e=>{"use strict";var t=e.i(674729),n=e.i(428762),r=e.i(827121);let i=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let o=(e,i,o)=>{let s=a(e,o);if(!s)return!1;let c=u(s);if(!c){let n=s.blockRange(),r=n&&(0,t.liftTarget)(n);return null!=r&&(i&&i(e.tr.lift(n,r).scrollIntoView()),!0)}let d=c.nodeBefore;if(x(e,c,i,-1))return!0;if(0==s.parent.content.size&&(l(d,"end")||r.NodeSelection.isSelectable(d)))for(let a=s.depth;;a--){let o=(0,t.replaceStep)(e.doc,s.before(a),s.after(a),n.Slice.empty);if(o&&o.slice.size<o.to-o.from){if(i){let t=e.tr.step(o);t.setSelection(l(d,"end")?r.Selection.findFrom(t.doc.resolve(t.mapping.map(c.pos,-1)),-1):r.NodeSelection.create(t.doc,c.pos-d.nodeSize)),i(t.scrollIntoView())}return!0}if(1==a||s.node(a-1).childCount>1)break}return!!d.isAtom&&c.depth==s.depth-1&&(i&&i(e.tr.delete(c.pos-d.nodeSize,c.pos).scrollIntoView()),!0)};function s(e,i,a){let o=i.nodeBefore,s=i.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let l=i.nodeAfter,c=i.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let u=(0,t.replaceStep)(e.doc,s,c,n.Slice.empty);if(!u||u.from!=s||u instanceof t.ReplaceStep&&u.slice.size>=c-s)return!1;if(a){let t=e.tr.step(u);t.setSelection(r.TextSelection.create(t.doc,s)),a(t.scrollIntoView())}return!0}function l(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;
174if(n&&1!=r.childCount)break}return!1}let c=(e,t,n)=>{let{$head:i,empty:a}=e.selection,o=i;if(!a)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):i.parentOffset>0)return!1;o=u(i)}let s=o&&o.nodeBefore;return!!s&&!!r.NodeSelection.isSelectable(s)&&(t&&t(e.tr.setSelection(r.NodeSelection.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function u(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function d(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let h=(e,i,a)=>{let o=d(e,a);if(!o)return!1;let s=m(o);if(!s)return!1;let c=s.nodeAfter;if(x(e,s,i,1))return!0;if(0==o.parent.content.size&&(l(c,"start")||r.NodeSelection.isSelectable(c))){let a=(0,t.replaceStep)(e.doc,o.before(),o.after(),n.Slice.empty);if(a&&a.slice.size<a.to-a.from){if(i){let t=e.tr.step(a);t.setSelection(l(c,"start")?r.Selection.findFrom(t.doc.resolve(t.mapping.map(s.pos)),1):r.NodeSelection.create(t.doc,t.mapping.map(s.pos))),i(t.scrollIntoView())}return!0}}return!!c.isAtom&&s.depth==o.depth-1&&(i&&i(e.tr.delete(s.pos,s.pos+c.nodeSize).scrollIntoView()),!0)},p=(e,t,n)=>{let{$head:i,empty:a}=e.selection,o=i;if(!a)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)return!1;o=m(i)}let s=o&&o.nodeAfter;return!!s&&!!r.NodeSelection.isSelectable(s)&&(t&&t(e.tr.setSelection(r.NodeSelection.create(e.doc,o.pos)).scrollIntoView()),!0)};function m(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let f=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function g(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let y=(e,t)=>{let{$head:n,$anchor:i}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let a=n.node(-1),o=n.indexAfter(-1),s=g(a.contentMatchAt(o));if(!s||!a.canReplaceWith(o,o,s))return!1;if(t){let i=n.after(),a=e.tr.replaceWith(i,i,s.createAndFill());a.setSelection(r.Selection.near(a.doc.resolve(i),1)),t(a.scrollIntoView())}return!0},b=(e,t)=>{let n=e.selection,{$from:i,$to:a}=n;if(n instanceof r.AllSelection||i.parent.inlineContent||a.parent.inlineContent)return!1;let o=g(a.parent.contentMatchAt(a.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!i.parentOffset&&a.index()<a.parent.childCount?i:a).pos,s=e.tr.insert(n,o.createAndFill());s.setSelection(r.TextSelection.create(s.doc,n+1)),t(s.scrollIntoView())}return!0},v=(e,n)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if((0,t.canSplit)(e.doc,i))return n&&n(e.tr.split(i).scrollIntoView()),!0}let i=r.blockRange(),a=i&&(0,t.liftTarget)(i);return null!=a&&(n&&n(e.tr.lift(i,a).scrollIntoView()),!0)};function x(e,i,a,o){let s,c,u,d=i.nodeBefore,h=i.nodeAfter,p,m,f=d.type.spec.isolating||h.type.spec.isolating;if(!f&&(s=i.nodeBefore,c=i.nodeAfter,u=i.index(),s&&c&&s.type.compatibleContent(c.type)&&(!s.content.size&&i.parent.canReplace(u-1,u)?(a&&a(e.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!!i.parent.canReplace(u,u+1)&&!!(c.isTextblock||(0,t.canJoin)(e.doc,i.pos))&&(a&&a(e.tr.join(i.pos).scrollIntoView()),!0))))return!0;let g=!f&&i.parent.canReplace(i.index(),i.index()+1);if(g&&(p=(m=d.contentMatchAt(d.childCount)).findWrapping(h.type))&&m.matchType(p[0]||h.type).validEnd){if(a){let r=i.pos+h.nodeSize,o=n.Fragment.empty;for(let e=p.length-1;e>=0;e--)o=n.Fragment.from(p[e].create(null,o));o=n.Fragment.from(d.copy(o));let s=e.tr.step(new t.ReplaceAroundStep(i.pos-1,r,i.pos,r,new n.Slice(o,1,0),p.length,!0)),l=s.doc.resolve(r+2*p.length);l.nodeAfter&&l.nodeAfter.type==d.type&&(0,t.canJoin)(s.doc,l.pos)&&s.join(l.pos),a(s.scrollIntoView())}return!0}let y=h.type.spec.isolating||o>0&&f?null:r.Selection.findFrom(i,1),b=y&&y.$from.blockRange(y.$to),v=b&&(0,t.liftTarget)(b);if(null!=v&&v>=i.depth)return a&&a(e.tr.lift(b,v).scrollIntoView()),!0;if(g&&l(h,"start",!0)&&l(d,"end")){let r=d,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=h,l=1;for(;!s.isTextblock;s=s.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(a){let r=n.Fragment.empty;for(let e=o.length-1;e>=0;e--)r=n.Fragment.from(o[e].copy(r));a(e.tr.step(new t.ReplaceAroundStep(i.pos-o.length,i.pos+h.nodeSize,i.pos+l,i.pos+h.nodeSize-l,new n.Slice(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function k(e){return function(t,n){let i=t.selection,a=e<0?i.$from:i.$to,o=a.depth;for(;a.node(o).isInline;){if(!o)return!1;o--}return!!a.node(o).isTextblock&&(n&&n(t.tr.setSelection(r.TextSelection.create(t.doc,e<0?a.start(o):a.end(o)))),!0)}}let w=k(-1),C=k(1);function S(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let E=S(i,o,c),T=S(i,h,p),I={Enter:S(f,b,v,(e,n)=>{let{$from:i,$to:a}=e.selection;if(e.selection instanceof r.NodeSelection&&e.selection.node.isBlock)return!!i.parentOffset&&!!(0,t.canSplit)(e.doc,i.pos)&&(n&&n(e.tr.split(i.pos).scrollIntoView()),!0);if(!i.depth)return!1;let o=[],s,l,c=!1,u=!1;for(let e=i.depth;;e--){if(i.node(e).isBlock){let t;c=i.end(e)==i.pos+(i.depth-e),u=i.start(e)==i.pos-(i.depth-e),l=g(i.node(e-1).contentMatchAt(i.indexAfter(e-1)));o.unshift(t||(c&&l?{type:l}:null)),s=e;break}if(1==e)return!1;o.unshift(null)}let d=e.tr;(e.selection instanceof r.TextSelection||e.selection instanceof r.AllSelection)&&d.deleteSelection();let h=d.mapping.map(i.pos),p=(0,t.canSplit)(d.doc,h,o.length,o);if(p||(o[0]=l?{type:l}:null,p=(0,t.canSplit)(d.doc,h,o.length,o)),d.split(h,o.length,o),!c&&u&&i.node(s).type!=l){let e=d.mapping.map(i.before(s)),t=d.doc.resolve(e);l&&i.node(s-1).canReplaceWith(t.index(),t.index()+1,l)&&d.setNodeMarkup(d.mapping.map(i.before(s)),l)}return n&&n(d.scrollIntoView()),!0}),"Mod-Enter":y,Backspace:E,"Mod-Backspace":E,"Shift-Backspace":E,Delete:T,"Mod-Delete":T,"Mod-a":(e,t)=>
174(t&&t(e.tr.setSelection(new r.AllSelection(e.doc))),!0)},D={"Ctrl-h":I.Backspace,"Alt-Backspace":I["Mod-Backspace"],"Ctrl-d":I.Delete,"Ctrl-Alt-Backspace":I["Mod-Delete"],"Alt-Delete":I["Mod-Delete"],"Alt-d":I["Mod-Delete"],"Ctrl-a":w,"Ctrl-e":C};for(let e in I)D[e]=I[e];let N=("u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&!!os.platform&&"darwin"==os.platform())?D:I;e.s(["baseKeymap",0,N,"createParagraphNear",0,b,"deleteSelection",0,i,"exitCode",0,y,"joinBackward",0,o,"joinDown",0,(e,n)=>{let i=e.selection,a;if(i instanceof r.NodeSelection){if(i.node.isTextblock||!(0,t.canJoin)(e.doc,i.to))return!1;a=i.to}else if(null==(a=(0,t.joinPoint)(e.doc,i.to,1)))return!1;return n&&n(e.tr.join(a).scrollIntoView()),!0},"joinForward",0,h,"joinTextblockBackward",0,(e,t,n)=>{let r=a(e,n);if(!r)return!1;let i=u(r);return!!i&&s(e,i,t)},"joinTextblockForward",0,(e,t,n)=>{let r=d(e,n);if(!r)return!1;let i=m(r);return!!i&&s(e,i,t)},"joinUp",0,(e,n)=>{let i=e.selection,a=i instanceof r.NodeSelection,o;if(a){if(i.node.isTextblock||!(0,t.canJoin)(e.doc,i.from))return!1;o=i.from}else if(null==(o=(0,t.joinPoint)(e.doc,i.from,-1)))return!1;if(n){let t=e.tr.join(o);a&&t.setSelection(r.NodeSelection.create(t.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),n(t.scrollIntoView())}return!0},"lift",0,(e,n)=>{let{$from:r,$to:i}=e.selection,a=r.blockRange(i),o=a&&(0,t.liftTarget)(a);return null!=o&&(n&&n(e.tr.lift(a,o).scrollIntoView()),!0)},"liftEmptyBlock",0,v,"newlineInCode",0,f,"selectNodeBackward",0,c,"selectNodeForward",0,p,"selectParentNode",0,(e,t)=>{let{$from:n,to:i}=e.selection,a,o=n.sharedDepth(i);return 0!=o&&(a=n.before(o),t&&t(e.tr.setSelection(r.NodeSelection.create(e.doc,a))),!0)},"selectTextblockEnd",0,C,"selectTextblockStart",0,w,"setBlockType",0,function(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(a,o,(r,a)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(a,o,e,t)}r(i.scrollIntoView())}return!0}},"toggleMark",0,function(e,t=null,n){let i=!1!==(n&&n.removeWhenPresent),a=!1!==(n&&n.enterInlineAtoms),o=!(n&&n.includeWhitespace);return function(n,s){let{empty:l,$cursor:c,ranges:u}=n.selection;if(l&&!c||!function(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:a,$to:o}=t[i],s=0==a.depth&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(a.pos,o.pos,(e,t)=>{if(s||!r&&e.isAtom&&e.isInline&&t>=a.pos&&t+e.nodeSize<=o.pos)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)}),s)return!0}return!1}(n.doc,u,e,a))return!1;if(s)if(c)s(e.isInSet(n.storedMarks||c.marks())?n.tr.removeStoredMark(e):n.tr.addStoredMark(e.create(t)));else{let l,c=n.tr;a||(u=function(e){let t=[];for(let n=0;n<e.length;n++){let{$from:i,$to:a}=e[n];i.doc.nodesBetween(i.pos,a.pos,(e,n)=>{if(e.isAtom&&e.content.size&&e.isInline&&n>=i.pos&&n+e.nodeSize<=a.pos)return n+1>i.pos&&t.push(new r.SelectionRange(i,i.doc.resolve(n+1))),i=i.doc.resolve(n+1+e.content.size),!1}),i.pos<a.pos&&t.push(new r.SelectionRange(i,a))}return t}(u)),l=i?!u.some(t=>n.doc.rangeHasMark(t.$from.pos,t.$to.pos,e)):!u.every(t=>{let n=!1;return c.doc.nodesBetween(t.$from.pos,t.$to.pos,(r,i,a)=>{if(n)return!1;n=!e.isInSet(r.marks)&&!!a&&a.type.allowsMarkType(e)&&!(r.isText&&/^\s*$/.test(r.textBetween(Math.max(0,t.$from.pos-i),Math.min(r.nodeSize,t.$to.pos-i))))}),!n});for(let n=0;n<u.length;n++){let{$from:r,$to:i}=u[n];if(l){let n=r.pos,a=i.pos,s=r.nodeAfter,l=i.nodeBefore,u=o&&s&&s.isText?/^\s*/.exec(s.text)[0].length:0,d=o&&l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+u<a&&(n+=u,a-=d),c.addMark(n,a,e.create(t))}else c.removeMark(r.pos,i.pos,e)}s(c.scrollIntoView())}return!0}},"wrapIn",0,function(e,n=null){return function(r,i){let{$from:a,$to:o}=r.selection,s=a.blockRange(o),l=s&&(0,t.findWrapping)(s,e,n);return!!l&&(i&&i(r.tr.wrap(s,l).scrollIntoView()),!0)}}])},98640,e=>{"use strict";var t=e.i(827121);e.i(674729);class n{constructor(e,t,n={}){this.match=e,this.match=e,this.handler="string"==typeof t?function(e){return function(t,n,r,i){let a=e;if(n[1]){let e=n[0].lastIndexOf(n[1]);a+=n[0].slice(e+n[1].length);let t=(r+=e)-i;t>0&&(a=n[0].slice(e-t,e)+a,r=i)}return t.tr.insertText(a,r,i)}}(t):t,this.undoable=!1!==n.undoable,this.inCode=n.inCode||!1}}function r(e,t,n,r,i,a){if(e.composing)return!1;let o=e.state,s=o.doc.resolve(t),l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r;for(let c=0;c<i.length;c++){let u=i[c];if(s.parent.type.spec.code){if(!u.inCode)continue}else if("only"===u.inCode)continue;let d=u.match.exec(l),h=d&&u.handler(o,d,t-(d[0].length-r.length),n);if(h)return u.undoable&&h.setMeta(a,{transform:h,from:t,to:n,text:r}),e.dispatch(h),!0}return!1}new n(/--$/,"â"),new n(/\.\.\.$/,"â¦"),new n(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"â"),new n(/"$/,"â
174"),new n(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"â"),new n(/'$/,"â"),e.s(["InputRule",0,n,"inputRules",0,function({rules:e}){let n=new t.Plugin({state:{init:()=>null,apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(t,i,a,o)=>r(t,i,a,o,e,n),handleDOMEvents:{compositionend:t=>{setTimeout(()=>{let{$cursor:i}=t.state.selection;i&&r(t,i.pos,i.pos,"",e,n)})}}},isInputRules:!0});return n}])},929987,e=>{"use strict";for(var t={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},n={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},r="u">typeof navigator&&/Mac/.test(navigator.platform),i="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)t[48+a]=t[96+a]=String(a);for(var a=1;a<=24;a++)t[a+111]="F"+a;for(var a=65;a<=90;a++)t[a]=String.fromCharCode(a+32),n[a]=String.fromCharCode(a);for(var o in t)n.hasOwnProperty(o)||(n[o]=t[o]);var s=e.i(827121);let l="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function c(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}e.s(["keymap",0,function(e){let a;return new s.Plugin({props:{handleKeyDown:(a=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,a=e.split(/-(?!$)/),o=a[a.length-1];"Space"==o&&(o=" ");for(let e=0;e<a.length-1;e++){let o=a[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))l?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return t&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}(n)]=e[n];return t}(e),function(e,o){var s;let l=("Esc"==(s=!(r&&o.metaKey&&o.shiftKey&&!o.ctrlKey&&!o.altKey||i&&o.shiftKey&&o.key&&1==o.key.length||"Unidentified"==o.key)&&o.key||(o.shiftKey?n:t)[o.keyCode]||o.key||"Unidentified")&&(s="Escape"),"Del"==s&&(s="Delete"),"Left"==s&&(s="ArrowLeft"),"Up"==s&&(s="ArrowUp"),"Right"==s&&(s="ArrowRight"),"Down"==s&&(s="ArrowDown"),s),u,d=a[c(l,o)];if(d&&d(e.state,e.dispatch,e))return!0;if(1==l.length&&" "!=l){if(o.shiftKey){let t=a[c(l,o,!1)];if(t&&t(e.state,e.dispatch,e))return!0}if((o.shiftKey||o.altKey||o.metaKey||l.charCodeAt(0)>127)&&(u=t[o.keyCode])&&u!=l){let t=a[c(u,o)];if(t&&t(e.state,e.dispatch,e))return!0}}return!1})}})}],929987)},827121,674729,e=>{"use strict";var t=e.i(428762);class n{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class r{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&r.empty)return r.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[s+a],u=this.ranges[s+o],d=l+c;if(e<=d){let a=c?e==l?-1:e==d?1:t:t,o=l+i+(a<0?0:u);if(r)return o;let h=e==(t<0?l:d)?null:s/3+(e-l)*65536,p=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(p|=8),new n(o,p,h)}i+=u-c}return r?e+i:new n(e+i,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,a=this.inverted?1:2;
174for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==3*r)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),l=this.ranges[r+t],c=this.ranges[r+n];e(o,o+l,s,s+c),i+=c-l}}invert(){return new r(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?r.empty:new r(e<0?[0,-e,0]:[0,0,e])}}r.empty=new r([]);class i{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new i(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new i;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let n=this.from;n<this.to;n++){let r=this._maps[n].mapResult(e,t);if(null!=r.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(r.recover);continue}}i|=r.delInfo,e=r.pos}return r?e:new n(e,i,null)}}let a=Object.create(null);class o{getMap(){return r.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=a[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in a)throw RangeError("Duplicate use of step JSON ID "+e);return a[e]=t,t.prototype.jsonID=e,t}}class s{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new s(e,null)}static fail(e){return new s(null,e)}static fromReplace(e,n,r,i){try{return s.ok(e.replace(n,r,i))}catch(e){if(e instanceof t.ReplaceError)return s.fail(e.message);throw e}}}function l(e,n,r){let i=[];for(let t=0;t<e.childCount;t++){let a=e.child(t);a.content.size&&(a=a.copy(l(a.content,n,a))),a.isInline&&(a=n(a,r,t)),i.push(a)}return t.Fragment.fromArray(i)}class c extends o{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.no
vendor: 15,775 bytes, line 174
174de(r.sharedDepth(this.to)),a=new t.Slice(l(n.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),n.openStart,n.openEnd);return s.fromReplace(e,this.from,this.to,a)}invert(){return new u(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new c(t.pos,n.pos,this.mark)}merge(e){return e instanceof c&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new c(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new c(t.from,t.to,e.markFromJSON(t.mark))}}o.jsonID("addMark",c);class u extends o{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let n=e.slice(this.from,this.to),r=new t.Slice(l(n.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),n.openStart,n.openEnd);return s.fromReplace(e,this.from,this.to,r)}invert(){return new c(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new u(t.pos,n.pos,this.mark)}merge(e){return e instanceof u&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new u(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new u(t.from,t.to,e.markFromJSON(t.mark))}}o.jsonID("removeMark",u);class d extends o{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let n=e.nodeAt(this.pos);if(!n)return s.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return s.fromReplace(e,this.pos,this.pos+1,new t.Slice(t.Fragment.from(r),0,+!n.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new d(this.pos,t.marks[n]);return new d(this.pos,this.mark)}}return new h(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new d(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new d(t.pos,e.markFromJSON(t.mark))}}o.jsonID("addNodeMark",d);class h extends o{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let n=e.nodeAt(this.pos);if(!n)return s.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return s.fromReplace(e,this.pos,this.pos+1,new t.Slice(t.Fragment.from(r),0,+!n.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new d(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new h(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new h(t.pos,e.markFromJSON(t.mark))}}o.jsonID("removeNodeMark",h);class p extends o{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&f(e,this.from,this.to)?s.fail("Structure replace would overwrite content"):s.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new r([this.from,this.to-this.from,this.slice.size])}invert(e){return new p(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new p(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof p)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let n=this.slice.size+e.slice.size==0?t.Slice.empty:new t.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new p(e.from,this.to,n,this.structure)}{let n=this.slice.size+e.slice.size==0?t.Slice.empty:new t.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new p(this.from,this.to+(e.to-e.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new p(n.from,n.to,t.Slice.fromJSON(e,n.slice),!!n.structure)}}o.jsonID("replace",p);class m extends o{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(f(e,this.from,this.gapFrom)||f(e,this.gapTo,this.to)))return s.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return s.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?s.fromReplace(e,this.from,this.to,n):s.fail("Content does not fit in gap")}getMap(){return new r([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new m(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new m(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new m(n.from,n.to,n.gapFrom,n.gapTo,t.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)}}function f(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function g(e,n,r,i=r.contentMatch,a=!0){let o=e.doc.nodeAt(n),s=[],l=n+1;for(let n=0;n<o.childCount;n++){let c=o.child(n),d=l+c.nodeSize,h=i.matchType(c.type);if(h){i=h;for(let t=0;t<c.marks.length;t++)r.allowsMarkType(c.marks[t].type)||e.step(new u(l,d,c.marks[t]));if(a&&c.isText&&"pre"!=r.whitespace){let e,n=/\r?\n|\r/g,i;for(;e=n.exec(c.text);)i||(i=new t.Slice(t.Fragment.from(r.schema.text(" ",r.allowedMarks(c.marks))),0,0)),s.push(new p(l+e.index,l+e.index+e[0].length,i))}}else s.push(new p(l,d,t.Slice.empty));l=d}if(!i.validEnd){let n=i.fillBefore(t.Fragment.empty,!0);e.replace(l,l,new t.Slice(n,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}function y(e){return{type:e,attrs:null}}function b(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function v(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function x(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(!(n=n.matchType(o))||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}(e,t))}function k(e,n,r=n,i=t.Slice.empty){if(n==r&&!i.size)return null;let a=e.resolve(n),o=e.resolve(r);return w(a,o,i)?new p(n,r,i):new C(a,o,i).fit()}function w(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}o.jsonID("replaceAround",m);class C{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=t.Fragment.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let n=e.depth;n>0;n--)this.placed=t.Fragment.from(e.node(n).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let a=this.placed,o=r.depth,s=i.depth;for(;o&&s&&1==a.childCount;)a=a.firstChild.content,o--,s--;let l=new t.Slice(a,o,s);return e>-1?new m(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new p(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let n=1;n<=2;n++)for(let r=1==n?e:this.unplaced.openStart;r>=0;r--){let e=null,i=(r?(e=T(this.unplaced.content,r-1).firstChild).content:this.unplaced.content).firstChild;for(let a=this.depth;a>=0;a--){let{type:o,match:s}=this.frontier[a],l,c=null;if(1==n&&(i?s.matchType(i.type)||(c=s.fillBefore(t.Fragment.from(i),!1)):e&&o.compatibleContent(e.type)))return{sliceDepth:r,frontierDepth:a,parent:e,inject:c};if(2==n&&i&&(l=s.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:a,parent:e,wrap:l};if(e&&s.matchType(e.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=T(e,n);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new t.Slice(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=T(e,n);if(i.childCount<=1&&n>0){let a=e.size-n<=n+i.size;this.unplaced=new t.Slice(S(e,n-1,1),n-1,a?n-1:r)}else this.unplaced=new t.Slice(S(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:a}){for(;this.depth>n;)this.closeFrontierNode();if(a)for(let e=0;e<a.length;e++)this.openFrontierNode(a[e]);let o=this.unplaced,s=r?r.content:o.content,l=o.openStart-e,c=0,u=[],{match:d,type:h}=this.frontier[n];if(i){for(let e=0;e<i.childCount;e++)u.push(i.child(e));d=d.matchFragment(i)}let p=s.size+e-(o.content.size-o.openEnd);for(;c<s.childCount;){let e=s.child(c),n=d.matchType(e.type);if(!n)break;(++c>1||0==l||e.content.size)&&(d=n,u.push(function e(n,r,i){if(r<=0)return n;let a=n.content;return r>1&&(a=a.replaceChild(0,e(a.firstChild,r-1,1==a.childCount?i-1:0))),r>0&&(a=n.type.contentMatch.fillBefore(a).append(a),i<=0&&(a=a.append(n.type.contentMatch.matchFragment(a).fillBefore(t.Fragment.empty,!0)))),n.copy(a)}(e.mark(h.allowedMarks(e.marks)),1==c?l:0,c==s.childCount?p:-1)))}let m=c==s.childCount;m||(p=-1),this.placed=E(this.placed,n,t.Fragment.from(u)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=m?0==e?t.Slice.empty:new t.Slice(S(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new t.Slice(S(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!I(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){r:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=I(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=I(e,n,r,t,!0);if(!i||i.childCount)continue r}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=E(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=E(this.placed,this.depth,t.Fragment.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(t.Fragment.empty,!0);e.childCount&&(this.placed=E(this.placed,this.frontier.length,e))}}function S(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(S(e.firstChild.content,t-1,n)))}function E(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(E(e.lastChild.content,t-1,n)))}function T(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function I(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,a.content,o)?s:null}function D(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class N extends o{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return s.fail("No node at attribute step's position");let r=Object.create(null);for(let e in n.attrs)r[e]=n.attrs[e];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return s.fromReplace(e,this.pos,this.pos+1,new t.Slice(t.Fragment.from(i),0,+!n.isLeaf))}getMap(){return r.empty}invert(e){return new N(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new N(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new N(t.pos,t.attr,t.value)}}o.jsonID("attr",N);class A extends o{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return s.ok(n)}getMap(){return r.empty}invert(e){return new A(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new A(t.attr,t.value)}}o.jsonID("docAttr",A);
174let _=class extends Error{};(_=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),_.prototype.constructor=_,_.prototype.name="TransformError";class P{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new i}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new _(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,n=e,r=t.Slice.empty){let i=k(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new t.Slice(t.Fragment.from(r),0,0))}delete(e,n){return this.replace(e,n,t.Slice.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,n,r){return!function(e,n,r,i){if(!i.size)return e.deleteRange(n,r);let a=e.doc.resolve(n),o=e.doc.resolve(r);if(w(a,o,i))return e.step(new p(n,r,i));let s=D(a,e.doc.resolve(r));0==s[s.length-1]&&s.pop();let l=-(a.depth+1);s.unshift(l);for(let e=a.depth,t=a.pos-1;e>0;e--,t--){let n=a.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?l=e:a.before(e)==t&&s.splice(1,0,-e)}let c=s.indexOf(l),u=[],d=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(u.push(n),t==i.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var h;let t=u[e],n=(h=t.type).spec.defining||h.spec.definingForContent;if(n&&!t.sameMarkup(a.node(Math.abs(l)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let n=i.openStart;n>=0;n--){let l=(n+d+1)%(i.openStart+1),h=u[l];if(h)for(let n=0;n<s.length;n++){let u=s[(n+c)%s.length],d=!0;u<0&&(d=!1,u=-u);let p=a.node(u-1),m=a.index(u-1);if(p.canReplaceWith(m,m,h.type,h.marks))return e.replace(a.before(u),d?o.after(u):r,new t.Slice(function e(n,r,i,a,o){if(r<i){let t=n.firstChild;n=n.replaceChild(0,t.copy(e(t.content,r+1,i,a,t)))}if(r>a){let e=o.contentMatchAt(0),r=e.fillBefore(n).append(n);n=r.append(e.matchFragment(r).fillBefore(t.Fragment.empty,!0))}return n}(i.content,0,i.openStart,l),l,i.openEnd))}}let m=e.steps.length;for(let t=s.length-1;t>=0&&(e.replace(n,r,i),!(e.steps.length>m));t--){let e=s[t];e<0||(n=a.before(e),r=o.after(e))}}(this,e,n,r),this}replaceRangeWith(e,n,r){var i=e,a=n;if(!r.isInline&&i==a&&this.doc.resolve(i).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,i,r.type);null!=e&&(i=a=e)}return this.replaceRange(i,a,new t.Slice(t.Fragment.from(r),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),a=D(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}(this,e,t),this}lift(e,n){return!function(e,n,r){let{$from:i,$to:a,depth:o}=n,s=i.before(o+1),l=a.after(o+1),c=s,u=l,d=t.Fragment.empty,h=0;for(let e=o,n=!1;e>r;e--)n||i.index(e)>0?(n=!0,d=t.Fragment.from(i.node(e).copy(d)),h++):c--;let p=t.Fragment.empty,f=0;for(let e=o,n=!1;e>r;e--)n||a.after(e+1)<a.end(e)?(n=!0,p=t.Fragment.from(a.node(e).copy(p)),f++):u++;e.step(new m(c,u,s,l,new t.Slice(d.append(p),h,f),d.size-h,!0))}(this,e,n),this}join(e,n=1){return!function(e,n,r){let i=null,{linebreakReplacement:a}=e.doc.type.schema,o=e.doc.resolve(n-r),s=o.node().type;if(a&&s.inlineContent){let e="pre"==s.whitespace,t=!!s.contentMatch.matchType(a);e&&!t?i=!1:!e&&t&&(i=!0)}let l=e.steps.length;if(!1===i){let t=e.doc.resolve(n+r);v(e,t.node(),t.before(),l)}s.inlineContent&&g(e,n+r-1,s,o.node().contentMatchAt(o.index()),null==i);let c=e.mapping.slice(l),u=c.map(n-r);if(e.step(new p(u,c.map(n+r,-1),t.Slice.empty,!0)),!0===i){let t=e.doc.resolve(u);b(e,t.node(),t.before(),e.steps.length)}}(this,e,n),this}wrap(e,n){return!function(e,n,r){let i=t.Fragment.empty;for(let e=r.length-1;e>=0;e--){if(i.size){let t=r[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=t.Fragment.from(r[e].type.create(r[e].attrs,i))}let a=n.start,o=n.end;e.step(new m(a,o,a,o,new t.Slice(i,0,0),r.length,!0))}(this,e,n),this}setBlockType(e,n=e,r,i=null){var a=this;if(!r.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=a.steps.length;return a.doc.nodesBetween(e,n,(e,n)=>{var s,l,c;let u,d,h="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(r,h)&&(s=a.doc,l=a.mapping.slice(o).map(n),c=r,d=(u=s.resolve(l)).index(),u.parent.canReplaceWith(d,d+1,c))){let i=null;if(r.schema.linebreakReplacement){let e="pre"==r.whitespace,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&v(a,e,n,o),g(a,a.mapping.slice(o).map(n,1),r,void 0,null===i);let s=a.mapping.slice(o),l=s.map(n,1),c=s.map(n+e.nodeSize,1);return a.step(new m(l,c,l+1,c-1,new t.Slice(t.Fragment.from(r.create(h,null,e.marks)),0,0),1,!0)),!0===i&&b(a,e,n,o),!1}}),this}setNodeMarkup(e,n,r=null,i){return!function(e,n,r,i,a){let o=e.doc.nodeAt(n);if(!o)throw RangeError("No node at given position");r||(r=o.type);let s=r.create(i,null,a||o.marks);if(o.isLeaf)return e.replaceWith(n,n+o.nodeSize,s);if(!r.validContent(o.content))throw RangeError("Invalid content for node type "+r.name);e.step(new m(n,n+o.nodeSize,n+1,n+o.nodeSize-1,new t.Slice(t.Fragment.from(s),0,0),1,!0))}(this,e,n,r,i),this}setNodeAttribute(e,t,n){return this.step(new N(e,t,n)),this}setDocAttribute(e,t){return this.step(new A(e,t)),this}addNodeMark(e,t){return this.step(new d(e,t)),this}
174removeNodeMark(e,n){if(!(n instanceof t.Mark)){let t=this.doc.nodeAt(e);if(!t)throw RangeError("No node at position "+e);if(!(n=n.isInSet(t.marks)))return this}return this.step(new h(e,n)),this}split(e,n=1,r){return!function(e,n,r=1,i){let a=e.doc.resolve(n),o=t.Fragment.empty,s=t.Fragment.empty;for(let e=a.depth,n=a.depth-r,l=r-1;e>n;e--,l--){o=t.Fragment.from(a.node(e).copy(o));let n=i&&i[l];s=t.Fragment.from(n?n.type.create(n.attrs,s):a.node(e).copy(s))}e.step(new p(n,n,new t.Slice(o.append(s),r,r),!0))}(this,e,n,r),this}addMark(e,t,n){var r;let i,a,o,s;return r=this,o=[],s=[],r.doc.nodesBetween(e,t,(r,l,d)=>{if(!r.isInline)return;let h=r.marks;if(!n.isInSet(h)&&d.type.allowsMarkType(n.type)){let d=Math.max(l,e),p=Math.min(l+r.nodeSize,t),m=n.addToSet(h);for(let e=0;e<h.length;e++)h[e].isInSet(m)||(i&&i.to==d&&i.mark.eq(h[e])?i.to=p:o.push(i=new u(d,p,h[e])));a&&a.to==d?a.to=p:s.push(a=new c(d,p,n))}}),o.forEach(e=>r.step(e)),s.forEach(e=>r.step(e)),this}removeMark(e,n,r){var i;let a,o;return i=this,a=[],o=0,i.doc.nodesBetween(e,n,(i,s)=>{if(!i.isInline)return;o++;let l=null;if(r instanceof t.MarkType){let e=i.marks,t;for(;t=r.isInSet(e);)(l||(l=[])).push(t),e=t.removeFromSet(e)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let t=Math.min(s+i.nodeSize,n);for(let n=0;n<l.length;n++){let r=l[n],i;for(let e=0;e<a.length;e++){let t=a[e];t.step==o-1&&r.eq(a[e].style)&&(i=t)}i?(i.to=t,i.step=o):a.push({style:r,from:Math.max(s,e),to:t,step:o})}}}),a.forEach(e=>i.step(new u(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return g(this,e,t,n),this}}e.s(["Mapping",0,i,"ReplaceAroundStep",0,m,"ReplaceStep",0,p,"Transform",0,P,"canJoin",0,function(e,t){let n=e.resolve(t),r=n.index();return x(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},"canSplit",0,function(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let l=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!l.type.validContent(o))return!1}let s=i.indexAfter(a),l=r&&r[0];return i.node(a).canReplaceWith(s,s,l?l.type:i.node(a+1).type)},"dropPoint",0,function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(1==e)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null},"findWrapping",0,function(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}(e,t),a=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return s&&s.validEnd?o:null}(r,t);return a?i.map(y).concat({type:t,attrs:n}).concat(a.map(y)):null},"joinPoint",0,function(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,a,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&x(i,a)&&r.node(e).canReplace(o,o+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}},"liftTarget",0,function(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),a=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,a,t))return n;if(0==n||r.type.spec.isolating||!((0==i||r.canReplace(i,r.childCount))&&(a==r.childCount||r.canReplace(0,a))))break}return null}
174,"replaceStep",0,k],674729);let M=Object.create(null);class R{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new L(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=t.Slice.empty){let r=n.content.lastChild,i=null;for(let e=0;e<n.openEnd;e++)i=r,r=r.lastChild;let a=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:l,$to:c}=o[s],u=e.mapping.slice(a);e.replaceRange(u.map(l.pos),u.map(c.pos),s?t.Slice.empty:n),0==s&&q(e,a,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),l=s.map(a.pos),c=s.map(o.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),q(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new B(e):V(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?V(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):V(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}
174static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new z(e.node(0))}static atStart(e){return V(e,e,0,0,1)||new z(e)}static atEnd(e){return V(e,e,e.content.size,e.childCount,-1)||new z(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=M[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in M)throw RangeError("Duplicate use of selection JSON ID "+e);return M[e]=t,t.prototype.jsonID=e,t}getBookmark(){return B.between(this.$anchor,this.$head).getBookmark()}}R.prototype.visible=!0;class L{constructor(e,t){this.$from=e,this.$to=t}}let j=!1;function O(e){j||e.parent.inlineContent||(j=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class B extends R{constructor(e,t=e){O(e),O(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return R.near(n);let r=e.resolve(t.map(this.anchor));return new B(r.parent.inlineContent?r:n,n)}replace(e,n=t.Slice.empty){if(super.replace(e,n),n==t.Slice.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof B&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new F(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new B(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=R.findFrom(t,n,!0)||R.findFrom(t,-n,!0);if(!e)return R.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(R.findFrom(e,-n,!0)||R.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new B(e,t)}}R.jsonID("text",B);class F{constructor(e,t){this.anchor=e,this.head=t}map(e){return new F(e.map(this.anchor),e.map(this.head))}resolve(e){return B.between(e.resolve(this.anchor),e.resolve(this.head))}}class H extends R{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?R.near(i):new H(i)}content(){return new t.Slice(t.Fragment.from(this.node),0,0)}eq(e){return e instanceof H&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new U(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new H(e.resolve(t.anchor))}static create(e,t){return new H(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}H.prototype.visible=!1,R.jsonID("node",H);class U{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new F(n,n):new U(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&H.isSelectable(n)?new H(t):R.near(t)}}class z extends R{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=t.Slice.empty){if(n==t.Slice.empty){e.delete(0,e.doc.content.size);let t=R.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new z(e)}map(e){return new z(e)}eq(e){return e instanceof z}getBookmark(){return $}}R.jsonID("all",z);let $={map(){return this},resolve:e=>new z(e)};function V(e,t,n,r,i,a=!1){if(t.inlineContent)return B.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!a&&H.isSelectable(r))return H.create(e,n-(i<0?r.nodeSize:0))}else{let t=V(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}n+=r.nodeSize*i}return null}function q(e,t,n){let r,i=e.steps.length-1;if(i<t)return;let a=e.steps[i];(a instanceof p||a instanceof m)&&(e.mapping.maps[i].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(R.near(e.doc.resolve(r),n)))}class G extends P{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return t.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||t.Mark.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(R.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function W(e,t){return t&&e?e.bind(t):e}
174class K{constructor(e,t,n){this.name=e,this.init=W(t.init,n),this.apply=W(t.apply,n)}}let Y=[new K("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new K("selection",{init:(e,t)=>e.selection||R.atStart(t.doc),apply:e=>e.selection}),new K("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new K("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class Z{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Y.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new K(e.key,e.spec.state,e))})}}let X=Object.create(null);function Q(e){return e in X?e+"$"+ ++X[e]:(X[e]=0,e+"$")}e.s(["AllSelection",0,z,"EditorState",0,class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,l=r?r[a].state:this,c=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,l,n);
174if(c&&n.filterTransaction(c,a)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new G(this)}static create(t){let n=new Z(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new Z(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(n,r,i){if(!r)throw RangeError("Invalid input for EditorState.fromJSON");if(!n.schema)throw RangeError("Required config field 'schema' missing");let a=new Z(n.schema,n.plugins),o=new e(a);return a.fields.forEach(e=>{if("doc"==e.name)o.doc=t.Node.fromJSON(n.schema,r.doc);else if("selection"==e.name)o.selection=R.fromJSON(o.doc,r.selection);else if("storedMarks"==e.name)r.storedMarks&&(o.storedMarks=r.storedMarks.map(n.schema.markFromJSON));else{if(i)for(let t in i){let a=i[t],s=a.spec.state;if(a.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(r,t)){o[e.name]=s.fromJSON.call(a,n,r[t],o);return}}o[e.name]=e.init(n,o)}}),o}},"NodeSelection",0,H,"Plugin",0,class{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let a=t[i];a instanceof Function?a=a.bind(n):"handleDOMEvents"==i&&(a=e(a,n,{})),r[i]=a}return r}(e.props,this,this.props),this.key=e.key?e.key.key:Q("plugin")}getState(e){return e[this.key]}},"PluginKey",0,class{constructor(e="key"){this.key=Q(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},"Selection",0,R,"SelectionRange",0,L,"TextSelection",0,B],827121)},571141,e=>{"use strict";var t=e.i(827121),n=e.i(428762),r=e.i(674729);let i=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},a=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},o=null,s=function(e,t,n){let r=o||(o=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},l=function(){o=null},c=function(e,t,n,r){return n&&(d(e,t,n,r,-1)||d(e,t,n,r,1))},u=/^(img|br|input|textarea|hr)$/i;function d(e,t,n,r,a){for(var o;;){if(e==n&&t==r)return!0;if(t==(a<0?0:h(e))){let n=e.parentNode;if(!n||1!=n.nodeType||p(e)||u.test(e.nodeName)||"false"==e.contentEditable)return!1;t=i(e)+(a<0?0:1),e=n}else{if(1!=e.nodeType)return!1;let n=e.childNodes[t+(a<0?-1:0)];if(1==n.nodeType&&"false"==n.contentEditable)if(null==(o=n.pmViewDesc)||!o.ignoreForSelection)return!1;else t+=a;else e=n,t=a<0?h(e):0}}}function h(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function p(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let m=function(e){return e.focusNode&&c(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function f(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let g="u">typeof navigator?navigator:null,y="u">typeof document?document:null,b=g&&g.userAgent||"",v=/Edge\/(\d+)/.exec(b),x=/MSIE \d/.exec(b),k=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),w=!!(x||k||v),C=x?document.documentMode:k?+k[1]:v?+v[1]:0,S=!w&&/gecko\/(\d+)/i.test(b);S&&(/Firefox\/(\d+)/.exec(b)||[0,0])[1];let E=!w&&/Chrome\/(\d+)/.exec(b),T=!!E,I=E?+E[1]:0,D=!w&&!!g&&/Apple Computer/.test(g.vendor),N=D&&(/Mobile\/\w+/.test(b)||!!g&&g.maxTouchPoints>2),A=N||!!g&&/Mac/.test(g.platform),_=!!g&&/Win/.test(g.platform),P=/Android \d/.test(b),M=!!y&&"webkitFontSmoothing"in y.documentElement.style,R=M?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function L(e,t){return"number"==typeof e?e:e[t]}function j(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(1!=s.nodeType){s=a(s);continue}let e=s,n=e==o.body,l=n?function(e){let t=e.defaultView&&e.defaultView.visualVie
174wport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}(o):function(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}(e),c=0,u=0;if(t.top<l.top+L(r,"top")?u=-(l.top-t.top+L(i,"top")):t.bottom>l.bottom-L(r,"bottom")&&(u=t.bottom-t.top>l.bottom-l.top?t.top+L(i,"top")-l.top:t.bottom-l.bottom+L(i,"bottom")),t.left<l.left+L(r,"left")?c=-(l.left-t.left+L(i,"left")):t.right>l.right-L(r,"right")&&(c=t.right-l.right+L(i,"right")),c||u)if(n)o.defaultView.scrollBy(c,u);else{let n=e.scrollLeft,r=e.scrollTop;u&&(e.scrollTop+=u),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let d=n?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s="absolute"==d?s.offsetParent:a(s)}}function O(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=a(r));return t}function B(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}let F=null;function H(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function U(e){return e.top<e.bottom||e.left<e.right}function z(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(U(e))return e}return Array.prototype.find.call(n,U)||e.getBoundingClientRect()}let $=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function V(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=M||S;if(3==r.nodeType)if(o&&($.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=z(s(r,i,i),n);if(S&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=z(s(r,i-1,i-1),-1);if(t.top==e.top){let n=z(s(r,i,i+1),-1);if(n.top!=e.top)return q(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,q(z(s(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(null==a&&i&&(n<0||i==h(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return G(e.getBoundingClientRect(),!1)}if(null==a&&i<h(r)){let e=r.childNodes[i];if(1==e.nodeType)return G(e.getBoundingClientRect(),!0)}return G(r.getBoundingClientRect(),n>=0)}if(null==a&&i&&(n<0||i==h(r))){let e=r.childNodes[i-1],t=3==e.nodeType?s(e,h(e)-!o):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return q(z(t,1),!1)}if(null==a&&i<h(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?s(e,0,+!o):1==e.nodeType?e:null:null;if(t)return q(z(t,-1),!0)}return q(z(3==r.nodeType?s(r):r,-n),n>=0)}function q(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function G(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function W(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}let K=/[\u0590-\u08ac]/,Y=null,Z=null,X=!1;class Q{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){let r;if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}if(e==this.dom&&this.contentDOM)r=t>i(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(!n||!(a=i.nodeDOM)||(1==a.nodeType?a.contains(1==e.nodeType?e:e.parentNode):a==e))return i;else n=!1}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return -1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>
174e||i instanceof ea){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof J&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;(e=n?this.children[n-1]:null)&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?i(e.dom)+1:0}}{let e,r=!0;for(;(e=n<this.children.length?this.children[n]:null)&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?i(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,a=-1;for(let o=n,s=0;;s++){let n=this.children[s],l=o+n.size;if(-1==r&&e<=l){let a=o+n.border;if(e>=a&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,a);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=i(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||s==this.children.length-1)){t=l;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){a=i(n.dom);break}t+=n.size}-1==a&&(a=this.contentDOM.childNodes.length);break}o=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:a}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let a=Math.min(e,t),o=Math.max(e,t);for(let i=0,s=0;i<this.children.length;i++){let l=this.children[i],c=s+l.size;if(a>s&&o<c)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=c}let s=this.domFromPos(e,e?-1:1),l=t==e?s:this.domFromPos(t,t?-1:1),u=n.root.getSelection(),d=n.domSelectionRange(),h=!1;if((S||D)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if((h=!!(t&&"\n"==e.nodeValue[t-1]))&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){"BR"==n.nodeName&&(s=l={node:n.parentNode,offset:i(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];h=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(S&&d.focusNode&&d.focusNode!=l.node&&1==d.focusNode.nodeType){let e=d.focusNode.childNodes[d.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||h&&D)&&c(s.node,s.offset,d.anchorNode,d.anchorOffset)&&c(l.node,l.offset,d.focusNode,d.focusOffset))return;let p=!1;if((u.extend||e==t)&&!(h&&S)){u.collapse(s.node,s.offset);try{e!=t&&u.extend(l.node,l.offset),p=!0}catch(e){}}if(!p){if(e>t){let e=s;s=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(s.node,s.offset),u.removeAllRanges(),u.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?2:1,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=3:i.markDirty(e-r,t-r);return}i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=a}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class J extends Q{constructor(e,t,n,r){let i,a=t.type.toDOM;if("function"==typeof a&&(a=a(n,()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r)),!t.type.spec.raw){if(1!=a.nodeType){let e=document.createElement("span");e.appendChild(a),a=e}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class ee extends Q{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class et extends Q{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}
174static create(e,t,r,i){let a=i.nodeViews[t.type.name],o=a&&a(t,i,r);return o&&o.dom||(o=n.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new et(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=et.create(this.parent,this.mark,!0,n),i=this.children,a=this.size;t<a&&(i=eg(i,t,a,n)),e>0&&(i=eg(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class en extends Q{constructor(e,t,n,r,i,a,o,s,l){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(e,t,r,i,a,o){let s=a.nodeViews[t.type.name],l,c=s&&s(t,a,()=>l?l.parent?l.parent.posBeforeChild(l):void 0:o,r,i),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText)if(u){if(3!=u.nodeType)throw RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(t.text);else if(!u){let e=n.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:u,contentDOM:d}=e)}d||t.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let h=u;return(u=ed(u,r,t),c)?l=new eo(e,t,r,i,u,d||null,h,c,a,o+1):t.isText?new ei(e,t,r,i,u,h,a):new en(e,t,r,i,u,d||null,h,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>n.Fragment.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&eh(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let r=this.node.inlineContent,i=t,a=e.composing?this.localCompositionInfo(e,t):null,o=a&&a.pos>-1?a:null,s=a&&a.pos<0,l=new em(this,o&&o.node,e);(function(e,t,n,r){let i=t.locals(e),a=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],l=null;for(let c=0;;){let u,d,h,p;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||(d=[u])).push(e):u=e)}if(u)if(d){d.sort(ef);for(let e=0;e<d.length;e++)n(d[e],c,!!l)}else n(u,c,!!l);if(l)p=-1,h=l,l=null;else if(c<e.childCount)p=c,h=e.child(c++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+h.nodeSize;if(h.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(l=h.cut(e-a),h=h.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let f=h.isInline&&!h.isLeaf?s.filter(e=>!e.inline):s.slice();r(h,f,t.forChild(a,h),p),a=m}})(this.node,this.innerDeco,(t,a,o)=>{t.spec.marks?l.syncToMarks(t.spec.marks,r,e,a):t.type.side>=0&&!o&&l.syncToMarks(a==this.node.childCount?n.Mark.none:this.node.child(a).marks,r,e,a),l.placeWidget(t,e,i)},(t,n,o,c)=>{let u;l.syncToMarks(t.marks,r,e,c),l.findNodeMatch(t,n,o,c)||s&&e.state.selection.from>i&&e.state.selection.to<i+t.nodeSize&&(u=l.findIndexWithChild(a.node))>-1&&l.updateNodeAt(t,n,o,u,e)||l.updateNextNode(t,n,o,e,c,i)||l.addNode(t,n,o,e,i),i+=t.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(o&&this.protectLocalComposition(e,o),function e(t,n,r){let i=t.firstChild,a=!1;for(let o=0;o<n.length;o++){let s=n[o],l=s.dom;if(l.parentNode==t){for(;l!=i;)i=ep(i),a=!0;i=i.nextSibling}else a=!0,t.insertBefore(l,i);if(s instanceof et){let n=i?i.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),i=n?n.nextSibling:t.firstChild}}for(;i;)i=ep(i),a=!0;a&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),N&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof t.TextSelection)||r<n||i>n+this.node.content.size)return null;let a=e.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(!this.node.inlineContent)return{node:a,pos:-1,text:""};{let e=a.nodeValue,t=function(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let l=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;l+=t.text}if(a>=n){if(a>=r&&l.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?l.lastIndexOf(t,r-s-1):-1;
174if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return -1}(this.node.content,e,r-n,i-n);return t<0?null:{node:a,pos:t,text:e}}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new ee(this,i,t,r);e.input.compositionNodes.push(a),this.children=eg(this.children,n,n+r.length,e,a)}update(e,t,n,r){return 3!=this.dirty&&!!e.sameMarkup(this.node)&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(eh(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=eu(this.dom,this.nodeDOM,ec(this.outerDeco,this.node,t),ec(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function er(e,t,n,r,i){ed(r,t,e);let a=new en(void 0,e,t,n,r,r,r,i,0);return a.contentDOM&&a.updateChildren(i,0),a}class ei extends en{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,null,a,o,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return 3!=this.dirty&&(0==this.dirty||!!this.inParent())&&!!e.sameMarkup(this.node)&&(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new ei(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class ea extends Q{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class eo extends en{constructor(e,t,n,r,i,a,o,s,l,c){super(e,t,n,r,i,a,o,l,c),this.spec=s}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return(!!this.contentDOM||!!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}let es=function(e){e&&(this.nodeName=e)};es.prototype=Object.create(null);let el=[new es];function ec(e,t,n){if(0==e.length)return el;let r=n?el[0]:new es,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o)for(let e in o.nodeName&&i.push(r=new es(o.nodeName)),o){let a=o[e];null!=a&&(n&&1==i.length&&i.push(r=new es(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+a:"style"==e?r.style=(r.style?r.style+";":"")+a:"nodeName"!=e&&(r[e]=a))}}return i}function eu(e,t,n,r){if(n==el&&r==el)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName||((t=document.createElement(a.nodeName)).pmIsDeco=!0,t.appendChild(i),o=el[0]),i=t}!function(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);
174if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}(i,o||el[0],a)}return i}function ed(e,t,n){return eu(e,e,el,ec(t,n,1!=e.nodeType))}function eh(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ep(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class em{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];i:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof et)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break i;else r=n.parent.children.indexOf(n),n=n.parent;let l=s.node;if(l){if(l!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&!1!==e[i].type.spec.spanning;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=et.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return 3==a.dirty&&a.dom==a.contentDOM&&(a.dirty=2),!!a.update(e,t,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return -1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return -1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof en){let l=this.preMatch.matched.get(s);if(null!=l&&l!=i)return!1;let c=s.dom,u,d=this.isLocked(c)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&3!=s.dirty&&eh(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=c&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=2,u.updateChildren(r,a+1),u.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!eh(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=en.create(this.top,t,n,r,i,a);if(o.contentDOM)for(let t of(o.children=e.children,e.children=[],o.children))t.parent=o;return e.destroy(),o}addNode(e,t,n,r,i){let a=en.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new J(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof et;)e=(t=e).children[t.children.length-1];(!e||!(e instanceof ei)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((D||T)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new ea(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}
174isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function ef(e,t){return e.type.side-t.type.side}function eg(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let l=e[o],c=s,u=s+=l.size;c>=n||u<=t?a.push(l):(c<t&&a.push(l.slice(0,t-c,r)),i&&(a.push(i),i=void 0),u>n&&a.push(l.slice(n-c,l.size,r)))}return a}function ey(e,n=null){let r=e.domSelectionRange(),a=e.state.doc;if(!r.focusNode)return null;let o=e.docView.nearestDesc(r.focusNode),s=o&&0==o.size,l=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(l<0)return null;let c=a.resolve(l),u,d;if(m(r)){for(u=l;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&t.NodeSelection.isSelectable(e)&&o.parent&&!(e.isInline&&function(e,t,n){for(let r=0==t,a=t==h(e);r||a;){if(e==n)return!0;let t=i(e);if(!(e=e.parentNode))return!1;r=r&&0==t,a=a&&t==h(e)}}(r.focusNode,r.focusOffset,o.dom))){let e=o.posBefore;d=new t.NodeSelection(l==e?c:a.resolve(e))}}else{if(r instanceof e.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let t=l,n=l;for(let i=0;i<r.rangeCount;i++){let a=r.getRangeAt(i);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),n=Math.max(n,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[u,l]=n==e.state.selection.anchor?[n,t]:[t,n],c=a.resolve(l)}else u=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(u<0)return null}let p=a.resolve(u);if(!d){let t="pointer"==n||e.state.selection.head<c.pos&&!s?1:-1;d=eT(e,p,c,t)}return d}function eb(e){return e.editable?e.hasFocus():eD(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function ev(e,n=!1){let r=e.state.selection;if(eS(e,r),eb(e)){if(!n&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&T){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&c(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r="IMG"==n.nodeName;r?t.collapse(n.parentNode,i(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&w&&C<=11&&(n.disabled=!0,n.disabled=!1)}(e);else{var a;let i,o,s,l,{anchor:c,head:u}=r,d,h;ex&&!(r instanceof t.TextSelection)&&(r.$from.parent.inlineContent||(d=ek(e,r.from)),r.empty||r.$from.parent.inlineContent||(h=ek(e,r.to))),e.docView.setSelection(c,u,e,n),ex&&(d&&eC(d),h&&eC(h)),r.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&((i=(a=e).dom.ownerDocument).removeEventListener("selectionchange",a.input.hideSelectionGuard),s=(o=a.domSelectionRange()).anchorNode,l=o.anchorOffset,i.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{(o.anchorNode!=s||o.anchorOffset!=l)&&(i.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{(!eb(a)||a.state.selection.visible)&&a.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let ex=D||T&&I<63;function ek(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(D&&i&&"false"==i.contentEditable)return ew(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return ew(i);else if(a)return ew(a)}}function ew(e){return e.contentEditable="true",D&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function eC(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function eS(e,n){if(n instanceof t.NodeSelection){let t=e.docView.descAt(n.from);t!=e.lastSelectedViewDesc&&(eE(e),t&&t.selectNode(),e.lastSelectedViewDesc=t)}else eE(e)}function eE(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function eT(e,n,r,i){return e.someProp("createSelectionBetween",t=>t(e,n,r))||t.TextSelection.between(n,r,i)}function eI(e){return(!e.editable||!!e.hasFocus())&&eD(e)}function eD(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focu
174sNode.parentNode:t.focusNode))}catch(e){return!1}}function eN(e,n){let{$anchor:r,$head:i}=e.selection,a=n>0?r.max(i):r.min(i),o=a.parent.inlineContent?a.depth?e.doc.resolve(n>0?a.after():a.before()):null:a;return o&&t.Selection.findFrom(o,n)}function eA(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function e_(e,n,r){let i=e.state.selection;if(i instanceof t.TextSelection){if(r.indexOf("s")>-1){let{$head:r}=i,a=r.textOffset?null:n<0?r.nodeBefore:r.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let o=e.state.doc.resolve(r.pos+a.nodeSize*(n<0?-1:1));return eA(e,new t.TextSelection(i.$anchor,o))}else if(!i.empty)return!1;else if(e.endOfTextblock(n>0?"forward":"backward")){let r=eN(e.state,n);return!!r&&r instanceof t.NodeSelection&&eA(e,r)}else if(!(A&&r.indexOf("m")>-1)){let r=i.$head,a=r.textOffset?null:n<0?r.nodeBefore:r.nodeAfter,o;if(!a||a.isText)return!1;let s=n<0?r.pos-a.nodeSize:r.pos;return!!(a.isAtom||(o=e.docView.descAt(s))&&!o.contentDOM)&&(t.NodeSelection.isSelectable(a)?eA(e,new t.NodeSelection(n<0?e.state.doc.resolve(r.pos-a.nodeSize):r)):!!M&&eA(e,new t.TextSelection(e.state.doc.resolve(n<0?s:s+a.nodeSize))))}}else{if(i instanceof t.NodeSelection&&i.node.isInline)return eA(e,new t.TextSelection(n>0?i.$to:i.$from));let r=eN(e.state,n);return!!r&&eA(e,r)}}function eP(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function eM(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function eR(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let a,o,s=!1;for(S&&1==n.nodeType&&r<eP(n)&&eM(n.childNodes[r],-1)&&(s=!0);;)if(r>0)if(1!=n.nodeType)break;else{let e=n.childNodes[r-1];if(eM(e,-1))a=n,o=--r;else if(3==e.nodeType)r=(n=e).nodeValue.length;else break}else if(eL(n))break;else{let t=n.previousSibling;for(;t&&eM(t,-1);)a=n.parentNode,o=i(t),t=t.previousSibling;if(t)r=eP(n=t);else{if((n=n.parentNode)==e.dom)break;r=0}}s?ej(e,n,r):a&&ej(e,a,o)}(e):function(e){let t,n,r=e.domSelectionRange(),a=r.focusNode,o=r.focusOffset;if(!a)return;let s=eP(a);for(;;)if(o<s){if(1!=a.nodeType)break;if(eM(a.childNodes[o],1))t=a,n=++o;else break}else if(eL(a))break;else{let r=a.nextSibling;for(;r&&eM(r,1);)t=r.parentNode,n=i(r)+1,r=r.nextSibling;if(r)o=0,s=eP(a=r);else{if((a=a.parentNode)==e.dom)break;o=s=0}}t&&ej(e,t,n)}(e)}function eL(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function ej(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!p(e);)t=i(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!p(e);)t=i(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(m(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:a}=e;setTimeout(()=>{e.state==a&&ev(e)},50)}function eO(e,t){let n=e.state.doc.resolve(t);if(!(T||_)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function eB(e,n,r){let i=e.state.selection;if(i instanceof t.TextSelection&&!i.empty||r.indexOf("s")>-1||A&&r.indexOf("m")>-1)return!1;let{$from:a,$to:o}=i;if(!a.parent.inlineContent||e.endOfTextblock(n<0?"up":"down")){let r=eN(e.state,n);if(r&&r instanceof t.NodeSelection)return eA(e,r)}if(!a.parent.inlineContent){let r=n<0?a:o,s=i instanceof t.AllSelection?t.Selection.near(r,n):t.Selection.findFrom(r,n);return!!s&&eA(e,s)}return!1}function eF(e,n){if(!(e.state.selection instanceof t.TextSelection))return!0;let{$head:r,$anchor:i,empty:a}=e.state.selection;if(!r.sameParent(i))return!0;
174if(!a)return!1;if(e.endOfTextblock(n>0?"forward":"backward"))return!0;let o=!r.textOffset&&(n<0?r.nodeBefore:r.nodeAfter);if(o&&!o.isText){let t=e.state.tr;return n<0?t.delete(r.pos-o.nodeSize,r.pos):t.delete(r.pos,r.pos+o.nodeSize),e.dispatch(t),!0}return!1}function eH(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function eU(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let r=[],{content:i,openStart:a,openEnd:o}=t;for(;a>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){a--,o--;let e=i.firstChild;r.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),i=e.content}let s=e.someProp("clipboardSerializer")||n.DOMSerializer.fromSchema(e.state.schema),l=eY(),c=l.createElement("div");c.appendChild(s.serializeFragment(i,{document:l}));let u=c.firstChild,d,h=0;for(;u&&1==u.nodeType&&(d=eW[u.nodeName.toLowerCase()]);){for(let e=d.length-1;e>=0;e--){let t=l.createElement(d[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),h++}u=c.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${a} ${o}${h?` -${h}`:""} ${JSON.stringify(r)}`),{dom:c,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function ez(e,t,r,i,a){let o,s,l=a.parent.type.spec.code;if(!r&&!t)return null;let c=!!t&&(i||l||!r);if(c){if(e.someProp("transformPastedText",n=>{t=n(t,l||i,e)}),l)return s=new n.Slice(n.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0),e.someProp("transformPasted",t=>{s=t(s,e,!0)}),s;let r=e.someProp("clipboardTextParser",n=>n(t,a,i,e));if(r)s=r;else{let r=a.marks(),{schema:i}=e.state,s=n.DOMSerializer.fromSchema(i);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(i.text(e,r)))})}}else e.someProp("transformPastedHTML",t=>{r=t(r,e)}),o=function(e){var t;let n,r=/^(\s*<meta [^>]*>)*/.exec(e);r&&(e=e.slice(r[0].length));let i=eY().createElement("div"),a=/<([a-z][^>\s]+)/i.exec(e),o;if((o=a&&eW[a[1].toLowerCase()])&&(e=o.map(e=>"<"+e+">").join("")+e+o.map(e=>"</"+e+">").reverse().join("")),i.innerHTML=(t=e,(n=window.trustedTypes)?(eZ||(eZ=n.defaultPolicy||n.createPolicy("ProseMirrorClipboard",{createHTML:e=>e})),eZ.createHTML(t)):t),o)for(let e=0;e<o.length;e++)i=i.querySelector(o[e])||i;return i}(r),M&&function(e){let t=e.querySelectorAll(T?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&"Â "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let u=o&&o.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0;e--){let e=o.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;o=e}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||n.DOMParser.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||d),context:a,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||e$.test(e.parentNode.nodeName)?null:{ignore:!0}})),d)s=function(e,t){if(!e.size)return e;let r=e.content.firstChild.type.schema,i;try{i=JSON.parse(t)}catch(t){return e}let{content:a,openStart:o,openEnd:s}=e;for(let e=i.length-2;e>=0;e-=2){let t=r.nodes[i[e]];if(!t||t.hasRequiredAttrs())break;a=n.Fragment.from(t.create(i[e+1],a)),o++,s++}return new n.Slice(a,o,s)}(eG(s,+d[1],+d[2]),d[4]);else if((s=n.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let i=t.node(r).contentMatchAt(t.index(r)),a,o=[];if(e.forEach(e=>{if(!o)return;let t=i.findWrapping(e.type),r;if(!t)return o=null;if(r=o.length&&a.length&&function e(t,r,i,a,o){if(o<t.length&&o<r.length&&t[o]==r[o]){let s=e(t,r,i,a.lastChild,o+1);if(s)return a.copy(a.content.replaceChild(a.childCount-1,s));if(a.contentMatchAt(a.childCount).matchType(o==t.length-1?i.type:t[o+1]))return a.copy(a.content.append(n.Fragment.from(eV(i,t,o+1))))}}(t,a,e,o[o.length-1],0))o[o.length-1]=r;else{o.length&&(o[o.length-1]=function e(t,r){if(0==r)return t;let i=t.content.replaceChild(t.childCount-1,e(t.lastChild,r-1)),a=t.contentMatchAt(t.childCount).fillBefore(n.Fragment.empty,!0);return t.copy(i.append(a))}(o[o.length-1],a.length));let r=eV(e,t);o.push(r),i=i.matchType(r.type),a=t}}),o)return n.Fragment.from(o)}return e}(s.content,a),!0)).openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=eG(s,e,t)}return e.someProp("transformPasted",t=>{s=t(s,e,c)}),s}let e$=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function eV(e,t,r=0){for(let i=t.length-1;i>=r;i--)e=t[i].create(null,n.Fragment.from(e));return e}
174function eq(e,t,r,i,a,o){let s=t<0?e.firstChild:e.lastChild,l=s.content;return e.childCount>1&&(o=0),a<i-1&&(l=eq(l,t,r,i,a+1,o)),a>=r&&(l=t<0?s.contentMatchAt(0).fillBefore(l,o<=a).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(n.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function eG(e,t,r){return t<e.openStart&&(e=new n.Slice(eq(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),r<e.openEnd&&(e=new n.Slice(eq(e.content,1,r,e.openEnd,0,0),e.openStart,r)),e}let eW={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},eK=null;function eY(){return eK||(eK=document.implementation.createHTMLDocument("title"))}let eZ=null,eX={},eQ={},eJ={touchstart:!0,touchmove:!0};class e1{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function e0(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function e2(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>e4(e,t))})}function e4(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function e3(e){return{left:e.clientX,top:e.clientY}}function e5(e,t,n,r,i){if(-1==r)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function e6(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}eQ.keydown=(e,t)=>{if((e.input.shiftKey=16==t.keyCode||t.shiftKey,!e9(e,t))&&(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!P||!T||13!=t.keyCode))if(229!=t.keyCode&&e.domObserver.forceFlush(),!N||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",n=>n(e,t))||function(e,t){let n,r=t.keyCode,i=(n="",t.ctrlKey&&(n+="c"),t.metaKey&&(n+="m"),t.altKey&&(n+="a"),t.shiftKey&&(n+="s"),n);if(8==r||A&&72==r&&"c"==i)return eF(e,-1)||eR(e,-1);if(46==r&&!t.shiftKey||A&&68==r&&"c"==i)return eF(e,1)||eR(e,1);if(13==r||27==r)return!0;if(37==r||A&&66==r&&"c"==i){let t=37==r?"ltr"==eO(e,e.state.selection.from)?-1:1:-1;return e_(e,t,i)||eR(e,t)}if(39==r||A&&70==r&&"c"==i){let t=39==r?"ltr"==eO(e,e.state.selection.from)?1:-1:1;return e_(e,t,i)||eR(e,t)}else if(38==r||A&&80==r&&"c"==i)return eB(e,-1,i)||eR(e,-1);else if(40==r||A&&78==r&&"c"==i)return function(e){if(!D||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;eH(e,n,"true"),setTimeout(()=>eH(e,n,"false"),20)}return!1}(e)||eB(e,1,i)||eR(e,1);else if(i==(A?"m":"c")&&(66==r||73==r||89==r||90==r))return!0;return!1}(e,t)?t.preventDefault():e0(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,f(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},eQ.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},eQ.keypress=(e,n)=>{if(e9(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||A&&n.metaKey)return;if(e.someProp("handleKeyPress",t=>t(e,n)))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof t.TextSelection)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();/[\r\n]/.test(t)||e.someProp("handleTextInput",n=>n(e,r.$from.pos,r.$to.pos,t,i))||e.dispatch(i()),n.preventDefault()}};let e7=A?"metaKey":"ctrlKey";eX.mousedown=(e,n)=>{var r;let i,a;e.input.shiftKey=n.shiftKey;let o=tr(e),s=Date.now(),l="singleClick";
174s-e.input.lastClick.time<500&&(i=(r=e.input.lastClick).x-n.clientX)*i+(a=r.y-n.clientY)*a<100&&!n[e7]&&e.input.lastClick.button==n.button&&("singleClick"==e.input.lastClick.type?l="doubleClick":"doubleClick"==e.input.lastClick.type&&(l="tripleClick")),e.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:l,button:n.button};let c=e.posAtCoords(e3(n));c&&("singleClick"==l?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new e8(e,c,n,!!o)):("doubleClick"==l?function(e,t,n,r){return e5(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}:function(e,n,r,i){return e5(e,"handleTripleClickOn",n,r,i)||e.someProp("handleTripleClick",t=>t(e,n,i))||function(e,n,r){if(0!=r.button)return!1;let i=e.state.doc;if(-1==n)return!!i.inlineContent&&(e6(e,t.TextSelection.create(i,0,i.content.size),"pointer"),!0);let a=i.resolve(n);for(let n=a.depth+1;n>0;n--){let r=n>a.depth?a.nodeAfter:a.node(n),o=a.before(n);if(r.inlineContent)e6(e,t.TextSelection.create(i,o+1,o+1+r.content.size),"pointer");else{if(!t.NodeSelection.isSelectable(r))continue;e6(e,t.NodeSelection.create(i,o),"pointer")}return!0}}(e,r,i)})(e,c.pos,c.inside,n)?n.preventDefault():e0(e,"pointer"))};class e8{constructor(e,n,r,i){let a,o;if(this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[e7],this.allowDefault=r.shiftKey,n.inside>-1)a=e.state.doc.nodeAt(n.inside),o=n.inside;else{let t=e.state.doc.resolve(n.pos);a=t.parent,o=t.depth?t.before():0}const s=i?null:r.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&1==l.nodeDOM.nodeType?l.nodeDOM:null;let{selection:c}=e.state;(0==r.button&&a.type.spec.draggable&&!1!==a.type.spec.selectable||c instanceof t.NodeSelection&&c.from<=o&&c.to>o)&&(this.mightDrag={node:a,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&S&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),e0(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ev(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;if(this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(e3(e))),this.updateAllowDefault(e),this.allowDefault||!n)e0(this.view,"pointer");else{var r,i,a,o;(r=this.view,i=n.pos,a=n.inside,o=this.selectNode,e5(r,"handleClickOn",i,a,e)||r.someProp("handleClick",t=>t(r,i,e))||(o?function(e,n){if(-1==n)return!1;let r=e.state.selection,i,a;r instanceof t.NodeSelection&&(i=r.node);let o=e.state.doc.resolve(n);for(let e=o.depth+1;e>0;e--){let n=e>o.depth?o.nodeAfter:o.node(e);if(t.NodeSelection.isSelectable(n)){a=i&&r.$from.depth>0&&e>=r.$from.depth&&o.before(r.$from.depth+1)==r.$from.pos?o.before(r.$from.depth):o.before(e);break}}return null!=a&&(e6(e,t.NodeSelection.create(e.state.doc,a),"pointer"),!0)}(r,a):function(e,n){if(-1==n)return!1;let r=e.state.doc.resolve(n),i=r.nodeAfter;return!!(i&&i.isAtom&&t.NodeSelection.isSelectable(i))&&(e6(e,new t.NodeSelection(r),"pointer"),!0)}(r,a)))?e.preventDefault():0==e.button&&(this.flushed||D&&this.mightDrag&&!this.mightDrag.node.isAtom||T&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to)))?(e6(this.view,t.Selection.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):e0(this.view,"pointer")}}move(e){this.updateAllowDefault(e),e0(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function e9(e,t){return!!e.composing||!!(D&&500>Math.abs(t.timeStamp-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}eX.touchstart=e=>{e.input.lastTouch=Date.now(),tr(e),e0(e,"pointer")},eX.touchmove=e=>{e.input.lastTouch=Date.now(),e0(e,"pointer")},eX.contextmenu=e=>tr(e);let te=P?5e3:-1;function tt(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>tr(e),t))}function tn(e){let t;for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=((t=document.createEvent("Event")).initEvent("event",!0,!0),t.timeStamp));e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function tr(e,t=!1){if(!P||!(e.domObserver.flushingSoon>
174=0)){if(e.domObserver.forceFlush(),tn(e),t||e.docView&&e.docView.dirty){let n=ey(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}eQ.compositionstart=eQ.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:n}=e,r=n.selection.$to;if(n.selection instanceof t.TextSelection&&(n.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)||T&&_&&function(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||1!=t.nodeType||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return 1==r.nodeType&&"false"==r.contentEditable}(e)))e.markCursor=e.state.storedMarks||r.marks(),tr(e,!0),e.markCursor=null;else if(tr(e,!n.selection.empty),S&&n.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}tt(e,te)},eQ.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,tt(e,20))};let ti=w&&C<15||N&&R<604;function ta(e,t,r,i,a){let o=ez(e,t,r,i,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,a,o||n.Slice.empty)))return!0;if(!o)return!1;let s=0==o.openStart&&0==o.openEnd&&1==o.content.childCount?o.content.firstChild:null,l=s?e.state.tr.replaceSelectionWith(s,i):e.state.tr.replaceSelection(o);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function to(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}eX.copy=eQ.cut=(e,t)=>{let n=e.state.selection,r="cut"==t.type;if(n.empty)return;let i=ti?null:t.clipboardData,{dom:a,text:o}=eU(e,n.content());i?(t.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",o)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},eQ.paste=(e,t)=>{if(e.composing&&!P)return;let n=ti?null:t.clipboardData,r=e.input.shiftKey&&45!=e.input.lastKeyCode;n&&ta(e,to(n),n.getData("text/html"),r,t)?t.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ta(e,r.value,null,i,t):ta(e,r.textContent,r.innerHTML,i,t)},50)}(e,t)};class ts{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}let tl=A?"altKey":"ctrlKey";function tc(e,t){let n=e.someProp("dragCopies",e=>!e(t));return null!=n?n:!t[tl]}for(let e in eX.dragstart=(e,n)=>{let r,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let a=e.state.selection,o=a.empty?null:e.posAtCoords(e3(n));if(o&&o.pos>=a.from&&o.pos<=(a instanceof t.NodeSelection?a.to-1:a.to));else if(i&&i.mightDrag)r=t.NodeSelection.create(e.state.doc,i.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let i=e.docView.nearestDesc(n.target,!0);i&&i.node.type.spec.draggable&&i!=e.docView&&(r=t.NodeSelection.create(e.state.doc,i.posBefore))}let s=(r||e.state.selection).content(),{dom:l,text:c,slice:u}=eU(e,s);n.dataTransfer.files.length&&T&&!(I>120)||n.dataTransfer.clearData(),n.dataTransfer.setData(ti?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ti||n.dataTransfer.setData("text/plain",c),e.dragging=new ts(u,tc(e,n
174),r)},eX.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},eQ.dragover=eQ.dragenter=(e,t)=>t.preventDefault(),eQ.drop=(e,i)=>{try{!function(e,i,a){if(!i.dataTransfer)return;let o=e.posAtCoords(e3(i));if(!o)return;let s=e.state.doc.resolve(o.pos),l=a&&a.slice;l?e.someProp("transformPasted",t=>{l=t(l,e,!1)}):l=ez(e,to(i.dataTransfer),ti?null:i.dataTransfer.getData("text/html"),!1,s);let c=!!(a&&tc(e,i));if(e.someProp("handleDrop",t=>t(e,i,l||n.Slice.empty,c)))return i.preventDefault();if(!l)return;i.preventDefault();let u=l?(0,r.dropPoint)(e.state.doc,s.pos,l):s.pos;null==u&&(u=s.pos);let d=e.state.tr;if(c){let{node:e}=a;e?e.replace(d):d.deleteSelection()}let h=d.mapping.map(u),p=0==l.openStart&&0==l.openEnd&&1==l.content.childCount,m=d.doc;if(p?d.replaceRangeWith(h,h,l.content.firstChild):d.replaceRange(h,h,l),d.doc.eq(m))return;let f=d.doc.resolve(h);if(p&&t.NodeSelection.isSelectable(l.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(l.content.firstChild))d.setSelection(new t.NodeSelection(f));else{let t=d.mapping.map(u);d.mapping.maps[d.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),d.setSelection(eT(e,f,d.doc.resolve(t)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))}(e,i,e.dragging)}finally{e.dragging=null}},eX.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ev(e)},20))},eX.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},eX.beforeinput=(e,t)=>{if(T&&P&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,f(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},eQ)eX[e]=eQ[e];function tu(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class td{constructor(e,t){this.toDOM=e,this.spec=t||tg,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new tm(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof td&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&tu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class th{constructor(e,t){this.attrs=e,this.spec=t||tg}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new tm(i,a,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof th&&tu(this.attrs,e.attrs)&&tu(this.spec,e.spec)}static is(e){return e.type instanceof th}destroy(){}}class tp{constructor(e,t){this.attrs=e,this.spec=t||tg}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new tm(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(e){return this==e||e instanceof tp&&tu(this.attrs,e.attrs)&&tu(this.spec,e.spec)}destroy(){}}class tm{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new tm(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new tm(e,e,new td(t,n))}static inline(e,t,n,r){return new tm(e,t,new th(n,r))}static node(e,t,n,r){return new tm(e,t,new tp(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof th}get widget(){return this.type instanceof td}}let tf=[],tg={};class ty{constructor(e,t){this.local=e.length?e:tf,this.children=t.length?t:tf}static create(e,t){return t.length?tC(t,e,0,tg):tb}
vendor: 1,977 bytes, line 174
174find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==tb||0==e.maps.length?this:this.mapInner(e,t,0,0,n||tg)}mapInner(e,t,n,r,i){let a;for(let o=0;o<this.local.length;o++){let s=this.local[o].map(e,n,r);s&&s.type.valid(t,s)?(a||(a=[])).push(s):i.onRemove&&i.onRemove(this.local[o].spec)}return this.children.length?function(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let l=s[i]+t-r;n>=l?s[i+1]=e<=l?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(-2==s[t+1]){l=!0,s[t+1]=-1;continue}let c=n.map(e[t]+a),u=c-i;if(u<0||u>=r.content.size){l=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:h,offset:p}=r.content.findIndex(u),m=r.maybeChild(h);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,c+1,e[t]+a+1,o);r!=tb?(s[t]=u,s[t+1]=d,s[t+2]=r):(s[t+1]=-2,l=!0)}else l=!0}if(l){let l=tC(function(e,t,n,r,i,a,o){for(let s=0;s<e.length;s+=3)-1==e[s+1]&&function e(t,a){for(let e=0;e<t.local.length;e++){let s=t.local[e].map(r,i,a);s?n.push(s):o.onRemove&&o.onRemove(t.local[e].spec)}for(let n=0;n<t.children.length;n+=3)e(t.children[n+2],t.children[n]+a+1)}(e[s+2],t[s]+a+1);return n}(s,e,t,n,i,a,o),r,0,o);t=l.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<l.children.length;e+=3){let n=l.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,l.children[e],l.children[e+1],l.children[e+2])}}return new ty(t.sort(tS),s)}(this.children,a||[],e,t,n,r,i):a?new ty(a.sort(tS),tf):tb}
vendor: 4,350 bytes, line 174
174add(e,t){return t.length?this==tb?ty.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach((e,a)=>{let o=a+n,s;if(s=tk(t,e,o)){for(r||(r=this.children.slice());i<r.length&&r[i]<a;)i+=3;r[i]==a?r[i+2]=r[i+2].addInner(e,s,o+1):r.splice(i,0,a,a+e.nodeSize,tC(s,e,o+1,tg)),i+=3}});let a=tx(i?tw(t):t,-n);for(let t=0;t<a.length;t++)a[t].type.valid(e,a[t])||a.splice(t--,1);return new ty(a.length?this.local.concat(a).sort(tS):this.local,r||this.children)}remove(e){return 0==e.length||this==tb?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,a=n[r]+t,o=n[r+1]+t;for(let t=0,n;t<e.length;t++)(n=e[t])&&n.from>a&&n.to<o&&(e[t]=null,(i||(i=[])).push(n));if(!i)continue;n==this.children&&(n=this.children.slice());let s=n[r+2].removeInner(i,a+1);s!=tb?n[r+2]=s:(n.splice(r,3),r-=3)}if(r.length){for(let n=0,i;n<e.length;n++)if(i=e[n])for(let e=0;e<r.length;e++)r[e].eq(i,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new ty(r,n):tb}forChild(e,t){let n,r;if(this==tb)return this;if(t.isLeaf)return ty.empty;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,a=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<a&&t.to>i&&t.type instanceof th){let e=Math.max(i,t.from)-i,n=Math.min(a,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new ty(r.sort(tS),tf);return n?new tv([e,n]):e}return n||tb}eq(e){if(this==e)return!0;if(!(e instanceof ty)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return tE(this.localsInner(e))}localsInner(e){if(this==tb)return tf;if(e.inlineContent||!this.local.some(th.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof th||t.push(this.local[e]);return t}forEachSet(e){e(this)}}ty.empty=new ty([],[]),ty.removeOverlap=tE;let tb=ty.empty;class tv{constructor(e){this.members=e}map(e,t){let n=this.members.map(n=>n.map(e,t,tg));return tv.from(n)}forChild(e,t){if(t.isLeaf)return ty.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=tb&&(i instanceof tv?n=n.concat(i.members):n.push(i))}return tv.from(n)}eq(e){if(!(e instanceof tv)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?tE(n?t:t.sort(tS)):tf}static from(e){switch(e.length){case 0:return tb;case 1:return e[0];default:return new tv(e.every(e=>e instanceof ty)?e:e.reduce((e,t)=>e.concat(t instanceof ty?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function tx(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new tm(i.from+t,i.to+t,i.type))}return n}function tk(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),e[t]=null);return i}function tw(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function tC(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=tk(e,t,o+n);if(s){a=!0;let e=tC(s,t,n+o+1,r);e!=tb&&i.push(o,o+t.nodeSize,e)}});let o=tx(a?tw(e):e,-n).sort(tS);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new ty(o,i):tb}function tS(e,t){return e.from-t.from||e.to-t.to}function tE(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),tT(t,i+1,a.copy(r.to,a.to)));continue}a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),tT(t,i,r.copy(a.from,r.to)));break}}return t}function tT(e,t,n){for(;
174t<e.length&&tS(n,e[t])>0;)t++;e.splice(t,0,n)}function tI(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=tb&&t.push(r)}),e.cursorWrapper&&t.push(ty.create(e.state.doc,[e.cursorWrapper.deco])),tv.from(t)}let tD={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},tN=w&&C<=11;class tA{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class t_{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tA,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);w&&C<=11&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():D&&e.composing&&t.some(e=>"childList"==e.type&&"TR"==e.target.nodeName)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),tN&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,tD)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(eI(this.view)){if(this.suppressingSelectionUpdates)return ev(this.view);if(w&&C<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&c(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=a(n))t.add(n);for(let r=e.anchorNode;r;r=a(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:"selection",target:3==n.nodeType?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){var e;let{view:n}=this;if(!n.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let i=n.domSelectionRange(),a=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&eI(n)&&!this.ignoreSelectionChange(i),o=-1,s=-1,l=!1,c=[];if(n.editable)for(let e=0;e<r.length;e++){let t=this.registerMutation(r[e],c);t&&(o=o<0?t.from:Math.min(t.from,o),s=s<0?t.to:Math.max(t.to,s),t.typeOver&&(l=!0))}if(S&&c.length){let e=c.filter(e=>"BR"==e.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:t}=this.currentSelection;for(let r of e){let e=r.parentNode;e&&"LI"==e.nodeName&&(!t||function(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}(n,t)!=e)&&r.remove()}}}else if((T||D)&&c.some(e=>"BR"==e.nodeName)&&(8==n.input.lastKeyCode||46==n.input.lastKeyCode)){for(let e of c)if("BR"==e.nodeName&&e.parentNode){let t=e.nextSibling;t&&1==t.nodeType&&"false"==t.contentEditable&&e.parentNode.removeChild(e)}}let u=null;o<0&&a&&n.input.lastFocus>
174Date.now()-200&&Math.max(n.input.lastTouch,n.input.lastClick.time)<Date.now()-300&&m(i)&&(u=ey(n))&&u.eq(t.Selection.near(n.state.doc.resolve(0),1))?(n.input.lastFocus=0,ev(n),this.currentSelection.set(i),n.scrollToSelection()):(o>-1||a)&&(o>-1&&(n.docView.markDirty(o,s),e=n,!tP.has(e)&&(tP.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))&&(e.requiresGeckoHackNode=S,tM||(console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),tM=!0))),n.input.badSafariComposition&&(n.input.badSafariComposition=!1,function(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let a of t)if((null==(n=a.parentNode)?void 0:n.nodeName)=="TR"){let t=a.nextSibling;for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.nextSibling;if(t){let n=t;for(;;){let e=n.firstChild;if(!e||1!=e.nodeType||"false"==e.contentEditable||/^(BR|IMG)$/.test(e.nodeName))break;n=e}n.insertBefore(a,n.firstChild),r==a&&e.domSelection().collapse(a,i)}else a.parentNode.removeChild(a)}}(n,c)),this.handleDOMChange(o,s,l,c),n.docView&&n.docView.dirty?n.updateState(n.state):this.currentSelection.eq(i)||ev(n),this.currentSelection.set(i))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,a=e.nextSibling;if(w&&C<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||0>Array.prototype.indexOf.call(e.addedNodes,n))&&(r=n),(!i||0>Array.prototype.indexOf.call(e.addedNodes,i))&&(a=i)}let o=r&&r.parentNode==e.target?i(r)+1:0,s=n.localPosFromDOM(e.target,o,-1),l=a&&a.parentNode==e.target?i(a):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let tP=new WeakMap,tM=!1;function tR(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return c(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function tL(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(D&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}else if(e.parentNode.lastChild==e||D&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}let tj=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function tO(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:eT(e,t.resolve(n.anchor),t.resolve(n.head))}function tB(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function tF(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class tH{constructor(e,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new e1,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(tq),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=t$(this),tz(this),this.nodeViews=tV(this),this.docView=er(this.state.doc,tU(this),tI(this),this.dom,this),this.domObserver=new t_(this,(e,r,i,a)=>(function(e,r,i,a,o){let s,l,c,u=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,r<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=ey(e,t);
174if(n&&!e.state.selection.eq(n)){if(T&&P&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",t=>t(e,f(13,"Enter"))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),u&&r.setMeta("composition",u),e.dispatch(r)}return}let d=e.state.doc.resolve(r),h=d.sharedDepth(i);r=d.before(h+1),i=e.state.doc.resolve(i).after(h+1);let p=e.state.selection,g=function(e,t,r){let i,{node:a,fromOffset:o,toOffset:s,from:l,to:c}=e.docView.parseRange(t,r),u=e.domSelectionRange(),d=u.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(i=[{node:d,offset:u.anchorOffset}],m(u)||i.push({node:u.focusNode,offset:u.focusOffset})),T&&8===e.input.lastKeyCode)for(let e=s;e>o;e--){let t=a.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){s=e;break}if(!n||n.size)break}let h=e.state.doc,p=e.someProp("domParser")||n.DOMParser.fromSchema(e.state.schema),f=h.resolve(l),g=null,y=p.parse(a,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:i,ruleFromNode:tL,context:f});if(i&&null!=i[0].pos){let e=i[0].pos,t=i[1]&&i[1].pos;null==t&&(t=e),g={anchor:e+l,head:t+l}}return{doc:y,sel:g,from:l,to:c}}(e,r,i),y=e.state.doc,b=y.slice(g.from,g.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(s=e.state.selection.to,l="end"):(s=e.state.selection.from,l="start"),e.input.lastKeyCode=null;let v=function(e,t,n,r,i){let a=e.findDiffStart(t,n);if(null==a)return null;let{a:o,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==i){let e=Math.max(0,a-Math.min(o,s));r-=o+e-a}if(o<a&&e.size<t.size){let e=r<=a&&r>=o?a-r:0;(a-=e)&&a<t.size&&tF(t.textBetween(a-1,a+1))&&(a+=e?1:-1),s=a+(s-o),o=a}else if(s<a){let t=r<=a&&r>=s?a-r:0;(a-=t)&&a<e.size&&tF(e.textBetween(a-1,a+1))&&(a+=t?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}(b.content,g.doc.content,g.from,s,l);if(v&&e.input.domChangeCount++,(N&&e.input.lastIOSEnter>Date.now()-225||P)&&o.some(e=>1==e.nodeType&&!tj.test(e.nodeName))&&(!v||v.endA>=v.endB)&&e.someProp("handleKeyDown",t=>t(e,f(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!v)if(a&&p instanceof t.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor)&&!e.composing&&!(g.sel&&g.sel.anchor!=g.sel.head))v={start:p.from,endA:p.to,endB:p.to};else{if(g.sel){let t=tO(e,e.state.doc,g.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);u&&n.setMeta("composition",u),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&v.start==v.endB&&e.state.selection instanceof t.TextSelection&&(v.start>e.state.selection.from&&v.start<=e.state.selection.from+2&&e.state.selection.from>=g.from?v.start=e.state.selection.from:v.endA<e.state.selection.to&&v.endA>=e.state.selection.to-2&&e.state.selection.to<=g.to&&(v.endB+=e.state.selection.to-v.endA,v.endA=e.state.selection.to)),w&&C<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>g.from&&" Â "==g.doc.textBetween(v.start-g.from-1,v.start-g.from+1)&&(v.start--,v.endA--,v.endB--);let x=g.doc.resolveNoCache(v.start-g.from),k=g.doc.resolveNoCache(v.endB-g.from),S=y.resolve(v.start),E=x.sameParent(k)&&x.parent.inlineContent&&S.end()>=v.endA;if((N&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!E&&x.pos<g.doc.content.size&&(!x.sameParent(k)||!x.parent.inlineContent)&&x.pos<k.pos&&!/\S/.test(g.doc.textBetween(x.pos,k.pos,"","")))&&e.someProp("handleKeyDown",t=>t(e,f(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>v.start&&function(e,t,n,r,i){if(n-t<=i.pos-r.pos||tB(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return null!=e&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(tB(a,!0,!0));return!(!o.parent.isTextblock||o.pos>n||tB(o,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(o.parent.content)}(y,v.start,v.endA,x,k)&&e.someProp("handleKeyDown",t=>t(e,f(8,"Backspace")))){P&&T&&e.domObserver.suppressSelectionUpdates();return}
vendor: 5,046 bytes, line 174
174T&&v.endB==v.start&&(e.input.lastChromeDelete=Date.now()),P&&!E&&x.start()!=k.start()&&0==k.parentOffset&&x.depth==k.depth&&g.sel&&g.sel.anchor==g.sel.head&&g.sel.head==v.endA&&(v.endB-=2,k=g.doc.resolveNoCache(v.endB-g.from),setTimeout(()=>{e.someProp("handleKeyDown",function(t){return t(e,f(13,"Enter"))})},20));let I=v.start,D=v.endA,A=t=>{let n=t||e.state.tr.replace(I,D,g.doc.slice(v.start-g.from,v.endB-g.from));if(g.sel){let t=tO(e,n.doc,g.sel);t&&!(T&&e.composing&&t.empty&&(v.start!=v.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==I||t.head==n.mapping.map(D)-1)||w&&t.empty&&t.head==I)&&n.setSelection(t)}return u&&n.setMeta("composition",u),n.scrollIntoView()};if(E)if(x.pos==k.pos){w&&C<=11&&0==x.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ev(e),20));let t=A(e.state.tr.delete(I,D)),n=y.resolve(v.start).marksAcross(y.resolve(v.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(v.endA==v.endB&&(c=function(e,t){let r=e.firstChild.marks,i=t.firstChild.marks,a=r,o=i,s,l,c;for(let e=0;e<i.length;e++)a=i[e].removeFromSet(a);for(let e=0;e<r.length;e++)o=r[e].removeFromSet(o);if(1==a.length&&0==o.length)l=a[0],s="add",c=e=>e.mark(l.addToSet(e.marks));else{if(0!=a.length||1!=o.length)return null;l=o[0],s="remove",c=e=>e.mark(l.removeFromSet(e.marks))}let u=[];for(let e=0;e<t.childCount;e++)u.push(c(t.child(e)));if(n.Fragment.from(u).eq(e))return{mark:l,type:s}}(x.parent.content.cut(x.parentOffset,k.parentOffset),S.parent.content.cut(S.parentOffset,v.endA-S.start())))){let t=A(e.state.tr);"add"==c.type?t.addMark(I,D,c.mark):t.removeMark(I,D,c.mark),e.dispatch(t)}else if(x.parent.child(x.index()).isText&&x.index()==k.index()-!k.textOffset){let t=x.parent.textBetween(x.parentOffset,k.parentOffset),n=()=>A(e.state.tr.insertText(t,I,D));e.someProp("handleTextInput",r=>r(e,I,D,t,n))||e.dispatch(n())}else e.dispatch(A());else e.dispatch(A())})(this,e,r,i,a)),this.domObserver.start(),function(e){for(let t in eX){let n=eX[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||e4(e,t)||!e.editable&&t.type in eQ||n(e,t)},eJ[t]?{passive:!0}:void 0)}D&&e.dom.addEventListener("input",()=>null),e2(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&e2(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tq),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let n in t.state=this.state,e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n,r,a;let o=this.state,s=!1,l=!1;e.storedMarks&&this.composing&&(tn(this),l=!0),this.state=e;let u=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(u||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=tV(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,s=!0)}(u||t.handleDOMEvents!=this._props.handleDOMEvents)&&e2(this),this.editable=t$(this),tz(this);let d=tI(this),m=tU(this),f=o.plugins==e.plugins||o.doc.eq(e.doc)?e.scrollToSelection>o.scrollToSelection?"to selection":"preserve":"reset",g=s||!this.docView.matchesNode(e.doc,m,d);(g||!e.selection.eq(o.selection))&&(l=!0);let y="preserve"==f&&l&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let a=(r.left+r.right)/2,o=i+1;o<Math.min(innerHeight,r.bottom);o+=5){let r=e.root.elementFromPoint(a,o);if(!r||r==e.dom||!e.dom.contains(r))continue;let s=r.getBoundingClientRect();if(s.top>=i-20){t=r,n=s.top;break}}return{refDOM:t,refTop:n,stack:O(e.dom)}}(this);if(l){let t,n,l;this.domObserver.stop();let u=g&&(w||T)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(r=o.selection,a=e.selection,l=Math.min(r.$anchor.sharedDepth(r.head),a.$anchor.sharedDepth(a.head)),r.$anchor.start(l)!=a.$anchor.start(l));if(g){let t=T?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=function(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=h(e=e.childNodes[t-1])}else{if(!e.parentNode||p(e))return null;t=i(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),r=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||p(e))return null;t=i(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);
174if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}(this)),(s||!this.docView.update(e.doc,m,d,this))&&(this.docView.updateOuterDeco(m),this.docView.destroy(),this.docView=er(e.doc,m,d,this.dom,this)),!t||this.trackWrites&&this.dom.contains(this.trackWrites)||(u=!0)}u||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(t=this.docView.domFromPos(this.state.selection.anchor,0),n=this.domSelectionRange(),c(t.node,t.offset,n.anchorNode,n.anchorOffset)))?ev(this,u):(eS(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),(null==(n=this.dragging)?void 0:n.node)&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),"reset"==f?this.dom.scrollTop=0:"to selection"==f?this.scrollToSelection():y&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;B(n,0==r?0:r-t)}(y)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(1==e.nodeType?e:e.parentNode))if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof t.NodeSelection){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&j(this,t.getBoundingClientRect(),e)}else j(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,n){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let e=r.from+(this.state.doc.content.size-n.doc.content.size);(e>0&&this.state.doc.nodeAt(e))==r.node&&(i=e)}this.dragging=new ts(e.slice,e.move,i<0?void 0:t.NodeSelection.create(this.state.doc,i))}someProp(e,t){let n=this._props&&this._props[e],r;if(null!=n&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(null!=i&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(null!=a&&(r=t?t(a):a))return r}}hasFocus(){if(w){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(F)return e.focus(F);let t=O(e);e.focus(null==F?{get preventScroll(){return F={preventScroll:!0},!0}}:void 0),F||(F=!1,B(t,0))}(this.dom),ev(this),this.domObserver.start()}get root(){let e=this._root;if(null==e){for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return function(e,t){var n;let r,i,o=e.dom.ownerDocument,l,c=0,u=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(h(r.offsetNode),r.offset)}}catch(e){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(h(r.startContainer),r.startOffset)}}}(o,t.left,t.top);u&&({node:l,offset:c}=u);let d=(e.root.elementFromPoint?e.root:o).elementFromPoint(t.left,t.top);if(!d||!e.dom.contains(1!=d.nodeType?d.parentNode:d)){let n=e.dom.getBoundingClientRect();if(!H(t,n)||!(d=function e(t,n,r){let i=t.childNodes.length;if(i&&r.top<r.bottom)for(let a=Math.max(0,Math.min(i-1,Math.floor(i*(n.top-r.top)/(r.bottom-r.top))-2)),o=a;;){let r=t.childNodes[o];if(1==r.nodeType){let t=r.getClientRects();for(let i=0;i<t.length;i++){let a=t[i];if(H(n,a))return e(r,n,a)}}if((o=(o+1)%i)==a)break}return t}(e.dom,t,n)))return null}if(D)for(let e=d;l&&e;e=a(e))e.draggable&&(l=void 0);if(d=(r=(n=d).parentNode)&&/^li$/i.test(r.nodeName)&&t.left<n.getBoundingClientRect().left?r:n,l){let n;if(S&&1==l.nodeType&&(c=Math.min(c,l.childNodes.length))<l.childNodes.length){let e=l.childNodes[c],n;"IMG"==e.nodeName&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&c++}M&&c&&1==l.nodeType&&1==(n=l.childNodes[c-1]).nodeType&&"false"==n.contentEditable&&n.getBoundingClientRect().top>
174=t.top&&c--,l==e.dom&&c==l.childNodes.length-1&&1==l.lastChild.nodeType&&t.top>l.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:(0==c||1!=l.nodeType||"BR"!=l.childNodes[c-1].nodeName)&&(i=function(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}(e,l,c,t))}null==i&&(i=function(e,t,n){let{node:r,offset:i}=function e(t,n){let r,i,a,o=2e8,l,c=0,u=n.top,d=n.top;for(let e=t.firstChild,h=0;e;e=e.nextSibling,h++){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=s(e).getClientRects()}for(let s=0;s<t.length;s++){let p=t[s];if(p.top<=u&&p.bottom>=d){u=Math.max(p.bottom,u),d=Math.min(p.top,d);let t=p.left>n.left?p.left-n.left:p.right<n.left?n.left-p.right:0;if(t<o){a=e,o=t,l=t&&3==a.nodeType?{left:p.right<n.left?p.right:p.left,top:n.top}:n,1==e.nodeType&&t&&(c=h+ +(n.left>=(p.left+p.right)/2));continue}}else p.top>n.top&&!r&&p.left<=n.left&&p.right>=n.left&&(r=e,i={left:Math.max(p.left,Math.min(p.right,n.left)),top:p.top});!a&&(n.left>=p.right&&n.top>=p.top||n.left>=p.left&&n.top>=p.bottom)&&(c=h+1)}}return(!a&&r&&(a=r,l=i,o=0),a&&3==a.nodeType)?function(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=z(r,1);if(n.top!=n.bottom&&H(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}(a,l):!a||o&&1==a.nodeType?{node:t,offset:c}:e(a,l)}(t,n),a=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}(e,d,t));let p=e.docView.nearestDesc(d,!0);return{pos:i,inside:p?p.posAtStart-p.border:-1}}(this,e)}coordsAtPos(e,t=1){return V(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){let r,i;return Y==t&&Z==n?X:(Y=t,Z=n,X="up"==n||"down"==n?(r=t.selection,i="up"==n?r.$from:r.$to,W(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=V(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=s(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=i==r.parent.content.size,o=e.domSelection();return o?K.test(r.parent.textContent)&&o.modify?W(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:s}=e.domSelectionRange(),l=o.caretBidiLevel;o.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),h=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&i==d;try{o.collapse(a,s),t&&(t!=a||i!=s)&&o.extend&&o.extend(t,i)}catch(e){}return null!=l&&(o.caretBidiLevel=l),h}):"left"==n||"backward"==n?!i:a:r.pos==r.start()||r.pos==r.end()}(e,t,n))}(this,t||this.state,e)}pasteHTML(e,t){return ta(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return ta(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return eU(this,e)}destroy(){if(this.docView){for(let e in this.domObserver.stop(),this.input.eventHandlers)this.dom.removeEventListener(e,this.input.eventHandlers[e]);clearTimeout(this.input.composingTimeout),clearTimeout(this.input.lastIOSEnterFallbackTimeout),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],tI(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,l()}}get isDestroyed(){return null==this.docView}dispatchEvent(e){!e4(this,e)&&eX[e.type]&&(this.editable||!(e.type in eQ))&&eX[e.type](this,e)}domSelectionRange(){let e=this.domSelection();return e?D&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){let n;if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return tR(e,n)}function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?tR(e,n):null}
174(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function tU(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))}),t.translate||(t.translate="no"),[tm.node(0,e.state.doc.content.size,t)]}function tz(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:tm.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function t$(e){return!e.someProp("editable",t=>!1===t(e.state))}function tV(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function tq(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}tH.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},e.s(["Decoration",0,tm,"DecorationSet",0,ty,"EditorView",0,tH])},972228,499997,394145,e=>{"use strict";e.i(936629);var t=e.i(815126),n=e.i(271645);let r=(0,n.createContext)(null);function i(e,r,i){return(0,t.useCachedChildren)({items:r?e.getChildren(r.key):e,dependencies:[i],children(t){var r;let a=t.render(t);if(!i||"item"!==t.type)return a;let o=t.key,s=e.getKeyAfter(o);return n.default.createElement(n.default.Fragment,null,i({type:"item",key:o,dropPosition:"before"}),a,(null==s||(null==(r=e.getItem(s))?void 0:r.type)!=="item")&&i({type:"item",key:o,dropPosition:"after"}))}})}let a=(0,n.createContext)({CollectionRoot:({collection:e,renderDropIndicator:t})=>i(e,null,t),CollectionBranch:({collection:e,parent:t,renderDropIndicator:n})=>i(e,t,n)});e.s(["CollectionRendererContext",0,a,"SectionContext",0,r],972228);let o=(0,n.createContext)({}),s=(0,n.createContext)(null),l=(0,n.forwardRef)(function(e,t){let{render:r}=(0,n.useContext)(s);return n.default.createElement(n.default.Fragment,null,r(e,t))});e.s(["DragAndDropContext",0,o,"DropIndicatorContext",0,s,"useDndPersistedKeys",0,function(e,t,r){var i,a,o;let s=e.focusedKey,l=null;return(null==t||null==(i=t.isVirtualDragging)?void 0:i.call(t))&&(null==r||null==(a=r.target)?void 0:a.type)==="item"&&(l=r.target.key,"after"===r.target.dropPosition&&(l=null!=(o=r.collection.getKeyAfter(l))?o:l)),(0,n.useMemo)(()=>new Set([s,l].filter(e=>null!=e)),[s,l])},"useRenderDropIndicator",0,function(e,t){var r;let i=null==e?void 0:e.renderDropIndicator,a=null==e||null==(r=e.isVirtualDragging)?void 0:r.call(e),o=(0,n.useCallback)(e=>{if(a||(null==t?void 0:t.isDropTarget(e)))return i?i(e):n.default.createElement(l,{target:e})},[null==t?void 0:t.target,a,i]);return(null==e?void 0:e.useDropIndicator)?o:void 0}],499997),e.i(624099);let c=(0,n.createContext)({});e.s(["HeaderContext",0,c],394145)},80762,615079,552933,618431,597849,715295,505206,492185,781543,537712,552401,e=>{"use strict";var t=e.i(364957),n=e.i(17250),r=e.i(624099);e.i(937923);var i=e.i(972228),a=e.i(499997),o=e.i(394145),s=e.i(817016),l=e.i(271645);let c=(0,l.createContext)({}),u=(0,l.forwardRef)(function(e,t){[e,t]=(0,r.useContextProps)(e,t,c);let{elementType:n="span",...i}=e;return l.default.createElement(n,{className:"react-aria-Text",...i,ref:t})});var d=e.i(538299);function h(){let e=(0,l.useRef)(new Map),t=(0,l.useCallback)((t,n,r,i)=>{let a=(null==i?void 0:i.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,l.useCallback)((t,n,r,i)=>{var a;let o=(null==(a=e.current.get(r))?void 0:a.fn)||r;t.removeEventListener(n,o,i),e.current.delete(r)},[]),r=(0,l.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,l.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}var p=e.i(791884),m=e.i(317430);let f=!1,g=0;function y(e){"touch"===e.pointerType&&(f=!0,setTimeout(()=>{f=!1},50))}function b(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",y),g++,()=>{!(--g>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",y)}}function v(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,l.useState)(!1),s=(0,l.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,l.useEffect)(b,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=h(),{hoverProps:d,triggerHoverEnd:g}=(0,l.useMemo)(()=>{let e=(e,t)=>
174{let i=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&i&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),o(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=r=>{f&&"mouse"===r.pointerType||((r,a)=>{if(s.pointerType=a,i||"touch"===a||s.isHovered||!r.currentTarget.contains(r.target))return;s.isHovered=!0;let l=r.currentTarget;s.target=l,c((0,p.getOwnerDocument)(r.target),"pointerover",t=>{s.isHovered&&s.target&&!(0,m.nodeContains)(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:l,pointerType:a}),n&&n(!0),o(!0)})(r,r.pointerType)},a.onPointerLeave=t=>{!i&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,n,r,i,s,c,u]);return(0,l.useEffect)(()=>{i&&g({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:d,isHovered:a}}var x=e.i(346996),k=e.i(682234),w=e.i(424220);function C(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,l.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=h(),c=(0,l.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),u=(0,w.useSyntheticBlurEvent)(c),d=(0,l.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=(0,p.getOwnerDocument)(e.target),n=(0,m.getActiveElement)(t);
174if(!a.current.isFocusWithin&&n===(0,m.getEventTarget)(e.nativeEvent)){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,u(e);let n=e.currentTarget;o(t,"focus",e=>{if(a.current.isFocusWithin&&!(0,m.nodeContains)(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});(0,w.setEventTarget)(r,n),c((0,w.createSyntheticEvent)(r))}},{capture:!0})}},[r,i,u,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function S(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,l.useRef)({isFocused:!1,isFocusVisible:t||(0,x.isFocusVisible)()}),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),u=(0,l.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,l.useCallback)(e=>{i.current.isFocused=e,o(e),u()},[u]);(0,x.useFocusVisibleListener)(e=>{i.current.isFocusVisible=e,u()},[],{isTextInput:n});let{focusProps:h}=(0,k.useFocus)({isDisabled:r,onFocusChange:d}),{focusWithinProps:p}=C({isDisabled:!r,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:s,focusProps:r?p:h}}var E=e.i(750179);let T=(0,l.createContext)({}),I=(0,d.createHideableComponent)(function(e,t){[e,t]=(0,r.useContextProps)(e,t,T);let{hoverProps:n,isHovered:i}=v(e),{isFocused:a,isFocusVisible:o,focusProps:s}=S({isTextInput:!0,autoFocus:e.autoFocus}),c=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],u=(0,r.useRenderProps)({...e,values:{isHovered:i,isFocused:a,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:c},defaultClassName:"react-aria-Input"});return l.default.createElement("input",{...(0,E.mergeProps)((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i})(e),s,n),...u,ref:t,"data-focused":a||void 0,"data-disabled":e.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":o||void 0,"data-invalid":c||void 0})});e.s(["Input",0,I,"InputContext",0,T],615079);let D=(0,l.createContext)({});var N=e.i(569080),A=e.i(368919),_=e.i(720246);function P(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=(0,_.useId)(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),r||i||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function M(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=(0,_.useId)(t);let o=(0,_.useId)(),s={};return n&&(r=r?`${o} ${r}`:o,s={id:o,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:P({id:t,"aria-label":i,"aria-labelledby":r})}}var R=e.i(596102),L=e.i(237598);function j(e={}){let{locale:t}=(0,R.useLocale)();return(0,l.useMemo)(()=>new(0,L.NumberFormatter)(t,e),[t,e])}let O=null;class B{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,i;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(a):null==(i=this.politeLog)||i.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}var F=e.i(111733),H=e.i(717234);let U="default",z="",$=new WeakMap;function V(e){if((0,F.isIOS)()){if("default"===U){let t=(0,p.getOwnerDocument)(e);z=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}U="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";$.set(e,e.style[t]),e.style[t]="none"}}function q(e){if((0,F.isIOS)())"disabled"===U&&(U="restoring",setTimeout(()=>{(0,H.runAfterTransition)(()=>
174{if("restoring"===U){let t=(0,p.getOwnerDocument)(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=z||""),z="",U="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&$.has(e)){let t=$.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),$.delete(e)}}let G=l.default.createContext({register:()=>{}});G.displayName="PressResponderContext";var W=e.i(389979),K=e.i(991247),Y=e.i(174501),Z=e.i(21318);function X(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}=t;(0,F.isFirefox)()&&(null==(i=window.event)||null==(r=i.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&((0,F.isMac)()?a=!0:o=!0);let c=(0,F.isWebKit)()&&(0,F.isMac)()&&!(0,F.isIPad)()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});X.isOpening=n,(0,Z.focusWithoutScrolling)(e),e.dispatchEvent(c),X.isOpening=!1}X.isOpening=!1;e.i(437239),e.i(174080);Symbol("linkClicked");var Q=e.i(849962);let J=(0,l.createContext)(null),ee={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},et={...ee,customError:!0,valid:!1},en={isInvalid:!1,validationDetails:ee,validationErrors:[]},er=(0,l.createContext)({}),ei="__formValidationState"+Date.now();function ea(e){if(e[ei]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[ei];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return function(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:s="aria"}=e;n&&(t||(t="invalid"===n));let c=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:et}:null,u=(0,l.useMemo)(()=>o&&null!=i?es(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return eo(n)}return[]}(o,i)):null,[o,i]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let d=(0,l.useContext)(er),h=(0,l.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>eo(d[e])):eo(d[r]):[],[d,r]),[p,m]=(0,l.useState)(d),[f,g]=(0,l.useState)(!1);d!==p&&(m(d),g(!1));let y=(0,l.useMemo)(()=>es(f?[]:h),[f,h]),b=(0,l.useRef)(en),[v,x]=(0,l.useState)(en),k=(0,l.useRef)(en),[w,C]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(!w)return;C(!1);let e=u||a||b.current;el(e,k.current)||(k.current=e,x(e))}),{realtimeValidation:c||y||u||a||en,displayValidation:"native"===s?c||y||v:c||y||u||a||v,updateValidation(e){"aria"!==s||el(v,e)?b.current=e:x(e)},resetValidation(){el(en,k.current)||(k.current=en,x(en)),"native"===s&&C(!1),g(!0)},commitValidation(){"native"===s&&C(!0),g(!0)}}}(e)}function eo(e){return e?Array.isArray(e)?e:[e]:[]}function es(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:et}:null}function el(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}var ec=e.i(552893);function eu(e,t,n){let r=(0,l.useRef)(t),i=(0,K.useEffectEvent)(()=>{n&&n(r.current)});(0,l.useEffect)(()=>{var t;let n=null==e||null==(t=e.current)?void 0:t.form;return null==n||n.addEventListener("reset",i),()=>{null==n||n.removeEventListener("reset",i)}},[e,i])}function ed(e,t,n){let[r,i]=(0,l.useState)(e||t),a=(0,l.useRef)(void 0!==e),o=void 0!==e;(0,l.useEffect)(()=>{a.current,a.current=o},[o]);let s=o?e:r,c=(0,l.useCallback)((e,...t)=>{let r=(e,...t)=>{n&&!Object.is(s,e)&&n(e,...t),o||(s=e)};"function"==typeof e?i((n,...i)=>{let a=e(o?s:n,...i);return(r(a,...t),o)?n:a}):(o||i(e),r(e,...t))},[o,s,n]);return[s,c]}var eh=e.i(999661);e.i(797547),e.i(882179);new WeakMap;new WeakMap;function ep(e,t,n,r){let i=(0,K.useEffectEvent)(n),a=null==n;(0,l.useEffect)(()=>
174{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}},[e,t,r,a,i])}e.i(700864),e.i(887921),e.i(674750);l.default.createContext(null);function em(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}class ef{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new class e{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(null!=t?t:null);if(!r)return;let i=new ef({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&em(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var t,n;let r=new e;for(let e of this.traverse())r.addTreeNode(e.scopeRef,null!=(n=null==(t=e.parent)?void 0:t.scopeRef)?n:null,e.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new ef({scopeRef:null}),this.fastMap.set(null,this.root)}};new WeakMap;e.i(936629);class eg{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;let n=this.keyMap.get(e);return n&&null!=(t=n.prevKey)?t:null}getKeyAfter(e){var t;let n=this.keyMap.get(e);return n&&null!=(t=n.nextKey)?t:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return null!=(t=this.keyMap.get(e))?t:null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return(null==t?void 0:t.childNodes)||[]}constructor(e){var t;this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&"section"===e.type)for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),"item"===t.type&&(t.index=i++),(r=t).nextKey=void 0;this.lastKey=null!=(t=null==r?void 0:r.key)?t:null}}class ey extends Set{constructor(e,t,n){super(e),e instanceof ey?(this.anchorKey=null!=t?t:e.anchorKey,this.currentKey=null!=n?n:e.currentKey):(this.anchorKey=null!=t?t:null,this.currentKey=null!=n?n:null)}}var eb=e.i(768928);function ev(e){return(0,l.useMemo)(()=>{if("string"==typeof e)try{return(0,eb.parseColor)(e)}catch{return}return e},[e])}let ex=(0,l.createContext)(null),ek=(0,l.createContext)(null),ew=(0,l.createContext)(null);function eC(e){let i=(0,r.useSlottedContext)(ek,e.slot),a=function(e){let[t,n]=ed(ev(e.value)||void 0,ev(e.defaultValue||"#000000"),e.onChange);return{color:t,setColor(e){null!=e&&n(e||(0,eb.parseColor)("#000000"))}}}(e=(0,E.mergeProps)(i,e)),o=(0,r.useRenderProps)({...e,values:{color:a.color}});return l.default.createElement(r.Provider,{values:[[ew,a],[t.ColorSliderContext,{value:a.color,onChange:a.setColor}],[t.ColorAreaContext,{value:a.color,onChange:a.setColor}],[t.ColorWheelContext,{value:a.color,onChange:a.setColor}],[t.ColorFieldContext,{value:a.color,onChange:a.setColor}],[n.ColorSwatchContext,{color:a.color}],[ex,{value:a.color,onChange:a.setColor}]]},o.children)}e.s(["ColorPicker",0,eC],80762);let eS=(0,l.createContext)(null),eE=(0,l.forwardRef)(function(e,t){let{state:n,thumbProps:i,inputXRef:a,inputYRef:o,xInputProps:s,yInputProps:c,isDisabled:u=!1}=(0,l.useContext)(eS),{focusProps:d,isFocused:h,isFocusVisible:p}=S(),{hoverProps:m,isHovered:f}=v(e),g=(0,r.useRenderProps)({...e,defaultClassName:"react-aria-ColorThumb",defaultStyle:{...i.style,backgroundColor:n.getDisplayColor().toString()},values:{color:n.getDisplayColor(),isHovered:f,isDragging:n.isDragging,isFocused:h,isFocusVisible:p,isDisabled:u}}),y=(0,N.filterDOMProps)(e);return delete y.id,l.default.createElement("div",{...(0,E.mergeProps)(i,m,y),...g,ref:t,"data-hovered":f||void 0,"data-dragging":n.isDragging||void 0,"data-focused":h||void 0,"data-focus-visible":p||void 0,"data-disabled":u||void 0},l.default.createElement("input",{ref:a,...s,...d}),c&&l.default.createElement("input",{ref:o,...c,...d}),g.children)});e.s(["ColorThumb",0,eE,"InternalColorThumbContext",0,eS],552933);let eT=new WeakMap;function eI(e,t){let n=eT.get(e);if(!n)throw Error("Unknown slider state");return`${n.id}-${t}`}function eD(e){let{onMoveStart:t,onMove:n,onMoveEnd:r}=e,i=(0,l.useRef)({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:a,removeGlobalListener:o}=h(),s=(0,K.useEffectEvent)((e,r,a,o)=>{(0!==a||0!==o)&&(i.current.didMove||(i.current.didMove=!0,null==t||t({type:"movestart",pointerType:r,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})),null==n||n({type:"move",pointerType:r,deltaX:a,deltaY:o,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey}))}),c=(0,K.useEffectEvent)((e,t)=>{q(),i.current.didMove&&(null==r||r({type:"moveend",pointerType:t,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey}))});return{moveProps:(0,l.useMemo)(()=>{let e={},t=()=>{V(),i.current.didMove=!1};{let n=e=>{if(e.pointerId===i.current.id){var t,n,r,a;let o=e.pointerType||"mouse";s(e,o,e.pageX-(null!=(r=null==(t=i.current.lastPosition)?void 0:t.pageX)?r:0),e.pageY-(null!=(a=null==(n=i.current.lastPosition)?void 0:n.pageY)?a:0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY}}},r=e=>{if(e.pointerId===i.current.id){let t=e.pointerType||"mouse";c(e,t),i.current.id=null,o(window,"pointermove",n,!1),o(window,"pointerup",r,!1),o(window,"pointercancel",r,!1)}};e.onPointerDown=e=>{0===e.button&&null==i.current.id&&(t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY},i.current.id=e.pointerId,a(window,"pointermove",n,!1),a(window,"pointerup",r,!1),a(window,"pointercancel",r,!1))}}let n=(e,n,r)=>{t(),s(e,"keyboard",n,r),c(e,"keyboard")};return e.onKeyDown=e=>{switch(e.key){case"Left":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),n(e,-1,0);break;case"Right":case"ArrowRight":e.preventDefault(),e.stopPropagation(),n(e,1,0);break;case"Up":case"ArrowUp":e.preventDefault(),e.stopPropagation(),n(e,0,-1);break;case"Down":case"ArrowDown":e.preventDefault(),e.stopPropagation(),n(e,0,1)}},e},[i,a,o,s,c])}}var eN=e.i(859530);let eA={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function e_(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,l.useState)(!1),{focusWithinProps:a}=C({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,l.useMemo)(()=>r?t:t?{...eA,...t}:eA,[r]);return{visuallyHiddenProps:{...a,style:o}}}function eP(e,t,n){return e[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)]}function eM(e){if(null!=e)return Array.isArray(e)?e:[e]}function eR(e,t,n){return r=>{"number"==typeof e||"number"==typeof t?null==n||n(r[0]):null==n||n(r)}}let eL=(0,l.createContext)(null),ej=(0,l.createContext)(null),eO=(0,l.createContext)(null),eB=(0,l.forwardRef)(function(e,t){[e,t]=(0,r.useContextProps)(e,t,ej);let n=(0,l.useContext)(eL),{onHoverStart:i,onHoverEnd:a,onHoverChange:o,...s}=e,{hoverProps:c,isHovered:u}=v({onHoverStart:i,onHoverEnd:a,onHoverChange:o}),d=(0,r.useRenderProps)({...e,defaultClassName:"react-aria-SliderTrack",values:{orientation:n.orientation,isDisabled:n.isDisabled,isHovered:u,state:n}});return l.default.createElement("div",{...(0,E.mergeProps)(s,c),...d,ref:t,"data-hovered":u||void 0,"data-orientation":n.orientation||void 0,"data-disabled":n.isDisabled||void 0})});
174e.s(["SliderOutputContext",0,eO,"SliderStateContext",0,eL,"SliderTrack",0,eB,"SliderTrackContext",0,ej],618431);let eF=(0,l.createContext)(null),eH=(0,l.forwardRef)(function(e,n){[e,n]=(0,r.useContextProps)(e,n,t.ColorSliderContext);let{locale:i}=(0,R.useLocale)(),a=function(e){let{channel:t,colorSpace:n,value:r,defaultValue:i,onChange:a,locale:o,...s}=e;if(null==r&&null==i)throw Error("useColorSliderState requires a value or defaultValue");r&&(r=(0,eb.normalizeColor)(r)),i&&(i=(0,eb.normalizeColor)(i));let[c,u]=ed(r,i,a),d=(0,l.useMemo)(()=>n&&c?c.toFormat(n):c,[c,n]),h=function(e){let{isDisabled:t=!1,minValue:n=0,maxValue:r=100,numberFormatter:i,step:a=1,orientation:o="horizontal"}=e,s=(0,l.useMemo)(()=>{let e=(r-n)/10;return Math.max(e=(0,A.snapValueToStep)(e,0,e+a,a),a)},[a,r,n]),c=(0,l.useCallback)(e=>null==e?void 0:e.map((t,i)=>{let o=0===i?n:e[i-1],s=i===e.length-1?r:e[i+1];return(0,A.snapValueToStep)(t,o,s,a)}),[n,r,a]),u=(0,l.useMemo)(()=>c(eM(e.value)),[e.value]),d=(0,l.useMemo)(()=>{var t;return c(null!=(t=eM(e.defaultValue))?t:[n])},[e.defaultValue,n]),h=eR(e.value,e.defaultValue,e.onChange),p=eR(e.value,e.defaultValue,e.onChangeEnd),[m,f]=ed(u,d,h),[g,y]=(0,l.useState)(Array(m.length).fill(!1)),b=(0,l.useRef)(Array(m.length).fill(!0)),[v,x]=(0,l.useState)(void 0),k=(0,l.useRef)(m),w=(0,l.useRef)(g);function C(e){return(e-n)/(r-n)}function S(e){return 0===e?n:m[e-1]}function E(e){return e===m.length-1?r:m[e+1]}function T(e){return b.current[e]}function I(e,n){if(t||!T(e))return;let r=S(e),i=E(e);n=(0,A.snapValueToStep)(n,r,i,a);let o=eP(k.current,e,n);k.current=o,f(o)}function D(e){return i.format(e)}function N(e){let t=e*(r-n)+n;return(0,A.clamp)(Math.round((t-n)/a)*a+n,n,r)}return{values:m,getThumbValue:e=>m[e],setThumbValue:I,setThumbPercent:function(e,t){I(e,N(t))},isThumbDragging:e=>g[e],setThumbDragging:function(e,n){var r;if(t||!T(e))return;n&&(k.current=m);let i=w.current[e];w.current=eP(w.current,e,n),r=w.current,w.current=r,y(r),p&&i&&!w.current.some(Boolean)&&p(k.current)},focusedThumb:v,setFocusedThumb:x,getThumbPercent:e=>C(m[e]),getValuePercent:C,getThumbValueLabel:e=>D(m[e]),getFormattedValue:D,getThumbMinValue:S,getThumbMaxValue:E,getPercentValue:N,isThumbEditable:T,setThumbEditable:function(e,t){b.current[e]=t},incrementThumb:function(e,t=1){let i=Math.max(t,a);I(e,(0,A.snapValueToStep)(m[e]+i,n,r,a))},decrementThumb:function(e,t=1){let i=Math.max(t,a);I(e,(0,A.snapValueToStep)(m[e]-i,n,r,a))},step:a,pageSize:s,orientation:o,isDisabled:t}}({...d.getChannelRange(t),...s,numberFormatter:null,value:d.getChannelValue(t),onChange(e){u(d.withChannelValue(t,e))},onChangeEnd(n){e.onChangeEnd&&e.onChangeEnd(d.withChannelValue(t,n))}}),{step:p,pageSize:m}=d.getChannelRange(t);return{...h,value:d,setValue(e){u((0,eb.normalizeColor)(e))},getDisplayColor(){switch(t){case"hue":return(0,eb.parseColor)(`hsl(${d.getChannelValue("hue")}, 100%, 50%)`);case"lightness":case"brightness":case"saturation":case"red":case"green":case"blue":return d.withChannelValue("alpha",1);case"alpha":return d;default:throw Error("Unknown color channel: "+t)}},getThumbValueLabel:()=>d.formatChannelValue(t,o),step:p,pageSize:m,isDragging:h.isThumbDragging(0)}}({...e,locale:i}),o=l.default.useRef(null),s=l.default.useRef(null),[c,u]=(0,r.useSlot)(!e["aria-label"]&&!e["aria-labelledby"]),{trackProps:d,thumbProps:p,inputProps:m,labelProps:f,outputProps:g}=function(e,t){let{trackRef:n,inputRef:r,orientation:i,channel:a,"aria-label":o,name:s}=e,{locale:c,direction:u}=(0,R.useLocale)();e.label||o||e["aria-labelledby"]||(o=t.value.getChannelName(a,c));let{groupProps:d,trackProps:p,labelProps:m,outputProps:f}=function(e,t,n){var r;let{labelProps:i,fieldProps:a}=M(e),o="vertical"===e.orientation;eT.set(t,{id:null!=(r=i.id)?r:a.id,"aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]});let{direction:s}=(0,R.useLocale)(),{addGlobalListener:c,removeGlobalListener:u}=h(),d=(0,l.useRef)(null),p="rtl"===s,m=(0,l.useRef)(null),{moveProps:f}=eD({onMoveStart(){m.current=null},onMove({deltaX:e,deltaY:r}){if(!n.current)return;let{height:i,width:a}=n.current.getBoundingClientRect(),s=o?i:a;null==m.current&&null!=d.current&&(m.current=t.getThumbPercent(d.current)*s);let l=o?r:e;if((o||p)&&(l=-l),m.current+=l,null!=d.current&&n.current){let e=(0,A.clamp)(m.current/s,0,1);t.setThumbPercent(d.current,e)}},onMoveEnd(){null!=d.current&&(t.setThumbDragging(d.current,!1),d.current=null)}}),g=(0,l.useRef)(void 0),y=(r,i,a,l)=>{if(n.current&&!e.isDisabled&&t.values.every((e,n)=>!t.isThumbDragging(n))){let e,{height:u,width:h,top:p,left:m}=n.current.getBoundingClientRect(),f=((o?l:a)-(o?p:m))/(o?u:h);("rtl"===s||o)&&(f=1-f);let y=t.getPercentValue(f),v=t.values.findIndex(e=>y-e<0);
174(e=0===v?v:-1===v?t.values.length-1:Math.abs(t.values[v-1]-y)<Math.abs(t.values[v]-y)?v-1:v)>=0&&t.isThumbEditable(e)?(r.preventDefault(),d.current=e,t.setFocusedThumb(e),g.current=i,t.setThumbDragging(d.current,!0),t.setThumbValue(e,y),c(window,"mouseup",b,!1),c(window,"touchend",b,!1),c(window,"pointerup",b,!1)):d.current=null}},b=e=>{var n,r;(null!=(r=e.pointerId)?r:null==(n=e.changedTouches)?void 0:n[0].identifier)===g.current&&(null!=d.current&&(t.setThumbDragging(d.current,!1),d.current=null),u(window,"mouseup",b,!1),u(window,"touchend",b,!1),u(window,"pointerup",b,!1))};return"htmlFor"in i&&i.htmlFor&&(delete i.htmlFor,i.onClick=()=>{var e;null==(e=document.getElementById(eI(t,0)))||e.focus(),(0,x.setInteractionModality)("keyboard")}),{labelProps:i,groupProps:{role:"group",...a},trackProps:(0,E.mergeProps)({onMouseDown(e){0!==e.button||e.altKey||e.ctrlKey||e.metaKey||y(e,void 0,e.clientX,e.clientY)},onPointerDown(e){"mouse"===e.pointerType&&(0!==e.button||e.altKey||e.ctrlKey||e.metaKey)||y(e,e.pointerId,e.clientX,e.clientY)},onTouchStart(e){y(e,e.changedTouches[0].identifier,e.changedTouches[0].clientX,e.changedTouches[0].clientY)},style:{position:"relative",touchAction:"none"}},f),outputProps:{htmlFor:t.values.map((e,n)=>eI(t,n)).join(" "),"aria-live":"off"}}}({...e,"aria-label":o},t,n),{inputProps:g,thumbProps:y}=function(e,t){var n;let{index:r=0,isRequired:i,validationState:a,isInvalid:o,trackRef:s,inputRef:c,orientation:u=t.orientation,name:d}=e,p=e.isDisabled||t.isDisabled,m="vertical"===u,{direction:f}=(0,R.useLocale)(),{addGlobalListener:g,removeGlobalListener:y}=h(),b=eT.get(t),{labelProps:v,fieldProps:x}=M({...e,id:eI(t,r),"aria-labelledby":`${b.id} ${null!=(n=e["aria-labelledby"])?n:""}`.trim()}),k=t.values[r],w=(0,l.useCallback)(()=>{c.current&&(0,Z.focusWithoutScrolling)(c.current)},[c]),C=t.focusedThumb===r;(0,l.useEffect)(()=>{C&&w()},[C,w]);let S="rtl"===f,T=(0,l.useRef)(null),{keyboardProps:I}=(0,eN.useKeyboard)({onKeyDown(e){let{getThumbMaxValue:n,getThumbMinValue:i,decrementThumb:a,incrementThumb:o,setThumbValue:s,setThumbDragging:l,pageSize:c}=t;if(!/^(PageUp|PageDown|Home|End)$/.test(e.key))return void e.continuePropagation();switch(e.preventDefault(),l(r,!0),e.key){case"PageUp":o(r,c);break;case"PageDown":a(r,c);break;case"Home":s(r,i(r));break;case"End":s(r,n(r))}l(r,!1)}}),{moveProps:D}=eD({onMoveStart(){T.current=null,t.setThumbDragging(r,!0)},onMove({deltaX:e,deltaY:n,pointerType:i,shiftKey:a}){let{getThumbPercent:o,setThumbPercent:l,decrementThumb:c,incrementThumb:u,step:d,pageSize:h}=t;if(!s.current)return;let{width:p,height:f}=s.current.getBoundingClientRect(),g=m?f:p;if(null==T.current&&(T.current=o(r)*g),"keyboard"===i)e>0&&S||e<0&&!S||n>0?c(r,a?h:d):u(r,a?h:d);else{let t=m?n:e;(m||S)&&(t=-t),T.current+=t,l(r,(0,A.clamp)(T.current/g,0,1))}},onMoveEnd(){t.setThumbDragging(r,!1)}});t.setThumbEditable(r,!p);let{focusableProps:N}=(0,Q.useFocusable)((0,E.mergeProps)(e,{onFocus:()=>t.setFocusedThumb(r),onBlur:()=>t.setFocusedThumb(void 0)}),c),_=(0,l.useRef)(void 0),P=e=>{w(),_.current=e,t.setThumbDragging(r,!0),g(window,"mouseup",L,!1),g(window,"touchend",L,!1),g(window,"pointerup",L,!1)},L=e=>{var n,i;(null!=(i=e.pointerId)?i:null==(n=e.changedTouches)?void 0:n[0].identifier)===_.current&&(w(),t.setThumbDragging(r,!1),y(window,"mouseup",L,!1),y(window,"touchend",L,!1),y(window,"pointerup",L,!1))},j=t.getThumbPercent(r);(m||"rtl"===f)&&(j=1-j);let O=p?{}:(0,E.mergeProps)(I,D,{onMouseDown:e=>{0!==e.button||e.altKey||e.ctrlKey||e.metaKey||P()},onPointerDown:e=>{0!==e.button||e.altKey||e.ctrlKey||e.metaKey||P(e.pointerId)},onTouchStart:e=>{P(e.changedTouches[0].identifier)}});return eu(c,k,e=>{t.setThumbValue(r,e)}),{inputProps:(0,E.mergeProps)(N,x,{type:"range",tabIndex:p?void 0:0,min:t.getThumbMinValue(r),max:t.getThumbMaxValue(r),step:t.step,value:k,name:d,disabled:p,"aria-orientation":u,"aria-valuetext":t.getThumbValueLabel(r),"aria-required":i||void 0,"aria-invalid":o||"invalid"===a||void 0,"aria-errormessage":e["aria-errormessage"],"aria-describedby":[b["aria-describedby"],e["aria-describedby"]].filter(
174Boolean).join(" "),"aria-details":[b["aria-details"],e["aria-details"]].filter(Boolean).join(" "),onChange:e=>{t.setThumbValue(r,parseFloat(e.target.value))}}),thumbProps:{...O,style:{position:"absolute",[m?"top":"left"]:`${100*j}%`,transform:"translate(-50%, -50%)",touchAction:"none"}},labelProps:v,isDragging:t.isThumbDragging(r),isDisabled:p,isFocused:C}}({index:0,orientation:i,isDisabled:e.isDisabled,name:s,trackRef:n,inputRef:r},t),b=t.getDisplayColor(),v={forcedColorAdjust:"none"};"hue"===a?g["aria-valuetext"]+=`, ${b.getHueName(c)}`:"alpha"!==a&&(g["aria-valuetext"]+=`, ${b.getColorName(c)}`);let{visuallyHiddenProps:k}=e_({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return{trackProps:{...(0,E.mergeProps)(d,p),style:{...p.style,...v,background:(()=>{let e;switch(e="vertical"===i?"top":"ltr"===u?"right":"left",a){case"hue":{let t=[0,60,120,180,240,300,360].map(e=>b.withChannelValue("hue",e).toString("css")).join(", ");return`linear-gradient(to ${e}, ${t})`}case"lightness":{let n=t.getThumbMinValue(0),r=t.getThumbMaxValue(0),i=b.withChannelValue(a,n).toString("css"),o=b.withChannelValue(a,(r-n)/2).toString("css"),s=b.withChannelValue(a,r).toString("css");return`linear-gradient(to ${e}, ${i}, ${o}, ${s})`}case"saturation":case"brightness":case"red":case"green":case"blue":case"alpha":{let n=b.withChannelValue(a,t.getThumbMinValue(0)).toString("css"),r=b.withChannelValue(a,t.getThumbMaxValue(0)).toString("css");return`linear-gradient(to ${e}, ${n}, ${r})`}default:throw Error("Unknown color channel: "+a)}})()}},inputProps:{...g,style:{...g.style,...k.style}},thumbProps:{...y,style:{...y.style,...v}},labelProps:m,outputProps:f}}({...e,label:u,trackRef:o,inputRef:s},a),y=(0,r.useRenderProps)({...e,values:{orientation:a.orientation,isDisabled:a.isDisabled,state:a},defaultClassName:"react-aria-ColorSlider"}),b=(0,N.filterDOMProps)(e);return delete b.id,l.default.createElement(r.Provider,{values:[[eF,a],[eL,a],[ej,{...d,ref:o}],[eO,g],[D,{...f,ref:c,children:a.value.getChannelName(e.channel,i)}],[eS,{state:a,thumbProps:p,inputXRef:s,xInputProps:m,isDisabled:e.isDisabled}]]},l.default.createElement("div",{...b,...y,ref:n,slot:e.slot||void 0,"data-orientation":a.orientation,"data-disabled":a.isDisabled||void 0}))});e.s(["ColorSlider",0,eH],597849);var eU={};function ez(e,t){let{onScroll:n,isDisabled:r}=e,i=(0,l.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);ep(t,"wheel",r?void 0:i)}function e$(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function eV(e,t,n){let r=(0,K.useEffectEvent)(e=>{let r=n.current;if(!r)return;let i=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":i=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":i=r.value.slice(r.selectionStart);break;default:null!=e.data&&(i=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=i&&t.validate(i)||e.preventDefault()});(0,l.useEffect)(()=>{if(!e$()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n,r]);let i=e$()?null:e=>{let n=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:s,errorMessageProps:c,...u}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:o="text",validationBehavior:s="aria"}=e,[c,u]=ed(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=(0,Q.useFocusable)(e,t),h=ea({...e,value:c}
174),{isInvalid:m,validationErrors:f,validationDetails:g}=h.displayValidation,{labelProps:y,fieldProps:b,descriptionProps:v,errorMessageProps:k}=function(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=M(e),s=(0,_.useSlotId)([!!t,!!n,r,i]),l=(0,_.useSlotId)([!!t,!!n,r,i]);return{labelProps:a,fieldProps:o=(0,E.mergeProps)(o,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}({...e,isInvalid:m,errorMessage:e.errorMessage||f}),w=(0,N.filterDOMProps)(e,{labelable:!0}),C={type:o,pattern:e.pattern};return eu(t,c,u),!function(e,t,n){let{validationBehavior:r,focus:i}=e;(0,eh.useLayoutEffect)(()=>{if("native"===r&&(null==n?void 0:n.current)&&!n.current.disabled){var e;let r,i=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(i),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=(0,K.useEffectEvent)(()=>{t.resetValidation()}),o=(0,K.useEffectEvent)(e=>{var r,a;t.displayValidation.isInvalid||t.commitValidation();let o=null==n||null==(r=n.current)?void 0:r.form;!e.defaultPrevented&&n&&o&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}(o)===n.current&&(i?i():null==(a=n.current)||a.focus(),(0,x.setInteractionModality)("keyboard")),e.preventDefault()}),s=(0,K.useEffectEvent)(()=>{t.commitValidation()});(0,l.useEffect)(()=>{let e=null==n?void 0:n.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",o),e.addEventListener("change",s),null==t||t.addEventListener("reset",a),()=>{e.removeEventListener("invalid",o),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",a)}},[n,o,s,a,r])}(e,h,t),(0,l.useEffect)(()=>{if(t.current instanceof(0,p.getOwnerWindow)(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:y,inputProps:(0,E.mergeProps)(w,"input"===n?C:void 0,{disabled:r,readOnly:a,required:i&&"native"===s,"aria-required":i&&"aria"===s||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:c,onChange:e=>u(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(l.default.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...b}),descriptionProps:v,errorMessageProps:k,isInvalid:m,validationErrors:f,validationDetails:g}}(e,n),d=(0,l.useRef)(null);return{inputProps:(0,E.mergeProps)(o,{onBeforeInput:i,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;d.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:i}=d.current;n.current.value=e,n.current.setSelectionRange(r,i),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:c,...u}}eU={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"ØÙ٠رÙÙ
Ù"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"ÐÐ¾Ð¼ÐµÑ Ð½Ð° полеÑо"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"ÄÃselné pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αÏιθμοÏ"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokenttä"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"ש×× ×ספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"SzámmezÅ"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"æ°å¤ãã£ã¼ã«ã"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"ë²í¸ íë"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"Câmp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"ЧиÑловое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"ÄÃselné pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Å tevilÄno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerfält"}
174,"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Ðоле номеÑа"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"æ°ååæ®µ"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"æ¸åæ¬ä½"}};var eq={};function eG(e){var t;let n=(0,l.useRef)(void 0),{value:r,textValue:i,minValue:a,maxValue:o,isDisabled:s,isReadOnly:c,isRequired:u,onIncrement:d,onIncrementPage:p,onDecrement:m,onDecrementPage:f,onDecrementToMin:g,onIncrementToMax:y}=e,b=(0,ec.useLocalizedStringFormatter)((t=eq)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,l.useEffect)(()=>()=>clearTimeout(n.current),[]);let v=(0,l.useRef)(!1),x=()=>{v.current=!0},k=()=>{v.current=!1},w=""===i?b.format("Empty"):(i||`${r}`).replace("-","â");(0,l.useEffect)(()=>{v.current&&(O&&O.clear("assertive"),function(e,t="assertive",n=7e3){O?O.announce(e,t,n):(O=new B,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?O.announce(e,t,n):setTimeout(()=>{(null==O?void 0:O.isAttached())&&(null==O||O.announce(e,t,n))},100))}(w,"assertive"))},[w]);let C=(0,K.useEffectEvent)(e=>{clearTimeout(n.current),null==d||d(),n.current=window.setTimeout(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r<o)&&C(60)},e)}),S=(0,K.useEffectEvent)(e=>{clearTimeout(n.current),null==m||m(),n.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===r||isNaN(r)||r>a)&&S(60)},e)}),E=e=>{e.preventDefault()},{addGlobalListener:T,removeAllGlobalListeners:I}=h();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":w,"aria-valuemin":a,"aria-valuemax":o,"aria-disabled":s||void 0,"aria-readonly":c||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!c)switch(e.key){case"PageUp":if(p){e.preventDefault(),null==p||p();break}case"ArrowUp":case"Up":d&&(e.preventDefault(),null==d||d());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":m&&(e.preventDefault(),null==m||m());break;case"Home":g&&(e.preventDefault(),null==g||g());break;case"End":y&&(e.preventDefault(),null==y||y())}},onFocus:x,onBlur:k},incrementButtonProps:{onPressStart:()=>{C(400),T(window,"contextmenu",E)},onPressEnd:()=>{clearTimeout(n.current),I()},onFocus:x,onBlur:k},decrementButtonProps:{onPressStart:()=>{S(400),T(window,"contextmenu",E)},onPressEnd:()=>{clearTimeout(n.current),I()},onFocus:x,onBlur:k}}}eq={"ar-AE":{Empty:"ÙØ§Ø±Øº"},"bg-BG":{Empty:"ÐзпÑазни"},"cs-CZ":{Empty:"Prázdné"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Îδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"VacÃo"},"et-EE":{Empty:"Tühjenda"},"fi-FI":{Empty:"Tyhjä"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ר××§"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"Ãres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"ë¹ì´ ìì"},"lt-LT":{Empty:"TuÅ¡Äias"},"lv-LV":{Empty:"TukÅ¡s"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Ðе заполнено"},"sk-SK":{Empty:"Prázdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"BoÅ"},"uk-UA":{Empty:"ÐÑÑÑо"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空ç½"}};let eW=RegExp("^.*\\(.*\\).*$"),eK=["latn","arab","hanidec","deva","beng"];class eY{parse(e){return eX(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return eX(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return eX(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}let eZ=new Map;function eX(e,t,n){let r=eQ(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let i of eK)if(i!==r.options.numberingSystem){let r=eQ(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(r.isValidPartialNumber(n))return r}}return r}function eQ(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>
174e[0]<t[0]?-1:1).join():""),r=eZ.get(n);return r||(r=new eJ(e,t),eZ.set(n,r)),r}class eJ{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=e2(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=t.indexOf("-"),n=(t=t.replace("-","")).indexOf(".");-1===n&&(n=t.length),t=t.replace(".",""),t=n-2==0?`0.${t}`:n-2==-1?`0.0${t}`:n-2==-2?"0.00":`${t.slice(0,n-2)}.${t.slice(n-2)}`,e>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if("percent"===this.options.style){var r,i;let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((null!=(r=this.options.minimumFractionDigits)?r:0)+2,20),maximumFractionDigits:Math.min((null!=(i=this.options.maximumFractionDigits)?i:0)+2,20)};return new eY(this.locale,e).parse(new(0,L.NumberFormatter)(this.locale,e).format(n))}return"accounting"===this.options.currencySign&&eW.test(e)&&(n*=-1),n}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=(e=e.replace(",",this.symbols.decimal)).replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(e=e2(e,".",this.symbols.group))),"fr-FR"===this.options.locale&&this.symbols.group&&(e=e2(e," ",this.symbols.group),e=e2(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),!(this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&0===this.options.maximumFractionDigits)&&(this.symbols.group&&(e=e2(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0===e.length)}constructor(e,t={}){var n,r;this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,n,r){var i,a,o,s,l;let c=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),u=c.formatToParts(-10000.111),d=c.formatToParts(10000.111),h=e0.map(e=>c.formatToParts(e)),p=null!=(l=null==(i=u.find(e=>"minusSign"===e.type))?void 0:i.value)?l:"-",m=null==(a=d.find(e=>"plusSign"===e.type))?void 0:a.value;m||(null==r?void 0:r.signDisplay)!=="exceptZero"&&(null==r?void 0:r.signDisplay)!=="always"||(m="+");let f=null==(o=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>"decimal"===e.type))?void 0:o.value,g=null==(s=u.find(e=>"group"===e.type))?void 0:s.value,y=[...new Set([...u.filter(e=>!e1.has(e.type)).map(e=>e4(e.value)),...h.flatMap(e=>e.filter(e=>!e1.has(e.type)).map(e=>e4(e.value)))])].sort((e,t)=>t.length-e.length),b=0===y.length?RegExp("[\\p{White_Space}]","gu"):RegExp(`${y.join("|")}|[\\p{White_Space}]`,"gu"),v=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(0x24cb016ea)].reverse(),x=new Map(v.map((e,t)=>[e,t]));return{minusSign:p,plusSign:m,decimal:f,group:g,literals:b,numeral:RegExp(`[${v.join("")}]`,"g"),index:e=>String(x.get(e))}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((null!=(n=this.options.minimumFractionDigits)?n:0)>18||(null!=(r=this.options.maximumFractionDigits)?r:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}let e1=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),e0=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function e2(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function e4(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function e3(e,t,n){let r="+"===e?t+n:t-n;
174if(t%1!=0||n%1!=0){let i=t.toString().split("."),a=n.toString().split("."),o=Math.pow(10,Math.max(i[1]&&i[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*o),n=Math.round(n*o),r=("+"===e?t+n:t-n)/o}return r}let e5=(0,eb.parseColor)("#000000"),e6=(0,eb.parseColor)("#FFFFFF"),e7=e5.toHexInt(),e8=e6.toHexInt();function e9(e,t){let n=e||e5,r=n.toHexInt(),i=Math.min(Math.max(r+t,e7),e8);if(i!==r){let e=`#${i.toString(16).padStart(6,"0").toUpperCase()}`;n=(0,eb.parseColor)(e)}return n}let te=(0,l.createContext)(null),tt=(0,l.forwardRef)(function(e,n){return([e,n]=(0,r.useContextProps)(e,n,t.ColorFieldContext),e.channel)?l.default.createElement(tn,{...e,channel:e.channel,forwardedRef:n}):l.default.createElement(tr,{...e,forwardedRef:n})});function tn(e){var t;let{locale:n}=(0,R.useLocale)(),i=function(e){let{channel:t,colorSpace:n,locale:r}=e,i=ev("#000"),a=ev(e.value),o=ev(e.defaultValue),[s,c]=ed(a,null!=o?o:null,e.onChange),u=(0,l.useMemo)(()=>{let e=s||i;return n&&e?e.toFormat(n):e},[i,s,n]),d=u.getChannelValue(t),h=u.getChannelRange(t),p=(0,l.useMemo)(()=>u.getChannelFormatOptions(t),[u,t]),m="percent"===p.style&&100===h.maxValue?100:1;return{...function(e){let{minValue:t,maxValue:n,step:r,formatOptions:i,value:a,defaultValue:o=NaN,onChange:s,locale:c,isDisabled:u,isReadOnly:d}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===r||isNaN(r)?(0,A.clamp)(a,t,n):(0,A.snapValueToStep)(a,t,n,r)),isNaN(o)||(o=void 0===r||isNaN(r)?(0,A.clamp)(o,t,n):(0,A.snapValueToStep)(o,t,n,r));let[h,p]=ed(a,isNaN(o)?NaN:o,s),[m,f]=(0,l.useState)(()=>isNaN(h)?"":new(0,L.NumberFormatter)(c,i).format(h)),g=(0,l.useMemo)(()=>new eY(c,i),[c,i]),y=(0,l.useMemo)(()=>g.getNumberingSystem(m),[g,m]),b=(0,l.useMemo)(()=>new(0,L.NumberFormatter)(c,{...i,numberingSystem:y}),[c,i,y]),v=(0,l.useMemo)(()=>b.resolvedOptions(),[b]),x=(0,l.useCallback)(e=>isNaN(e)||null===e?"":b.format(e),[b]),k=ea({...e,value:h}),w=void 0===r||isNaN(r)?1:r;"percent"===v.style&&(void 0===r||isNaN(r))&&(w=.01);let[C,S]=(0,l.useState)(h),[E,T]=(0,l.useState)(c),[I,D]=(0,l.useState)(i);Object.is(h,C)&&c===E&&i===I||(f(x(h)),S(h),T(c),D(i));let N=(0,l.useMemo)(()=>g.parse(m),[g,m]),_=(e,r=0)=>{if(isNaN(N)){let e=isNaN(r)?0:r;return(0,A.snapValueToStep)(e,t,n,w)}{let r=(0,A.snapValueToStep)(N,t,n,w);return"+"===e&&r>N||"-"===e&&r<N?r:(0,A.snapValueToStep)(e3(e,N,w),t,n,w)}},P=(0,l.useMemo)(()=>!u&&!d&&(isNaN(N)||void 0===n||isNaN(n)||(0,A.snapValueToStep)(N,t,n,w)>N||e3("+",N,w)<=n),[u,d,t,n,w,N]),M=(0,l.useMemo)(()=>!u&&!d&&(isNaN(N)||void 0===t||isNaN(t)||(0,A.snapValueToStep)(N,t,n,w)<N||e3("-",N,w)>=t),[u,d,t,n,w,N]);return{...k,validate:e=>g.isValidPartialNumber(e,t,n),increment:()=>{let e=_("+",t);e===h&&f(x(e)),p(e),k.commitValidation()},incrementToMax:()=>{null!=n&&(p((0,A.snapValueToStep)(n,t,n,w)),k.commitValidation())},decrement:()=>{let e=_("-",n);e===h&&f(x(e)),p(e),k.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),k.commitValidation())},canIncrement:P,canDecrement:M,minValue:t,maxValue:n,numberValue:N,setNumberValue:p,setInputValue:f,inputValue:m,commit:()=>{let e;if(!m.length){p(NaN),f(void 0===a?"":x(h));return}isNaN(N)?f(x(h)):(e=void 0===r||isNaN(r)?(0,A.clamp)(N,t,n):(0,A.snapValueToStep)(N,t,n,r),p(e=g.parse(x(e))),f(x(void 0===a?e:h)))}}}({locale:r,value:null===s?NaN:d/m,onChange:e=>{Number.isNaN(e)?c(null):c(u.withChannelValue(t,e*m))},minValue:h.minValue/m,maxValue:h.maxValue/m,step:h.step/m,formatOptions:p}),colorValue:u}}({...e,locale:n}),a=(0,l.useRef)(null),[o,s]=(0,r.useSlot)(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:c,inputProps:u,descriptionProps:d,errorMessageProps:h,...p}=function(e,t,n){let{locale:r}=(0,R.useLocale)();return function(e,t,n){var r,i;let a,{id:o,decrementAriaLabel:s,incrementAriaLabel:c,isDisabled:u,isReadOnly:d,isRequired:h,minValue:p,maxValue:m,autoFocus:f,label:g,formatOptions:y,onBlur:b=()=>{},onFocus:v,onFocusChange:x,onKeyDown:w,onKeyUp:S,description:T,errorMessage:I,isWheelDisabled:D,...A}=e,{increment:P,incrementToMax:M,decrement:R,decrementToMin:L,numberValue:O,inputValue:B,commit:H,commitValidation:U}
174=t,z=(0,ec.useLocalizedStringFormatter)((i=eU)&&i.__esModule?i.default:i,"@react-aria/numberfield"),$=(0,_.useId)(o),{focusProps:V}=(0,k.useFocus)({onBlur(){H()}}),q=j(y),G=(0,l.useMemo)(()=>q.resolvedOptions(),[q]),W=j({...y,currencySign:void 0}),K=(0,l.useMemo)(()=>isNaN(O)?"":W.format(O),[W,O]),{spinButtonProps:Z,incrementButtonProps:X,decrementButtonProps:Q}=eG({isDisabled:u,isReadOnly:d,isRequired:h,maxValue:m,minValue:p,onIncrement:P,onIncrementToMax:M,onDecrement:R,onDecrementToMin:L,value:O,textValue:K}),[J,ee]=(0,l.useState)(!1),{focusWithinProps:et}=C({isDisabled:u,onFocusWithinChange:ee});ez({onScroll:(0,l.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?P():e.deltaY<0&&R())},[R,P]),isDisabled:D||u||d||!J},n);let en=(null!=(r=G.maximumFractionDigits)?r:0)>0,er=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,ea="numeric";(0,F.isIPhone)()?er?ea="text":en&&(ea="decimal"):(0,F.isAndroid)()&&(er?ea="numeric":en&&(ea="decimal"));let eo=(0,N.filterDOMProps)(e),es=(0,l.useCallback)(e=>{"Enter"===e.key?(H(),U()):e.continuePropagation()},[H,U]),{isInvalid:el,validationErrors:ed,validationDetails:eh}=t.displayValidation,{labelProps:ep,inputProps:em,descriptionProps:ef,errorMessageProps:eg}=eV({...A,...eo,name:void 0,label:g,autoFocus:f,isDisabled:u,isReadOnly:d,isRequired:h,validate:void 0,[ei]:t,value:B,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:$,type:"text",inputMode:ea,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:b,onFocus:v,onFocusChange:x,onKeyDown:(0,l.useMemo)(()=>(0,Y.chain)(es,w),[es,w]),onKeyUp:S,description:T,errorMessage:I},t,n);eu(n,t.numberValue,t.setNumberValue);let ey=(0,E.mergeProps)(Z,V,em,{role:null,"aria-roledescription":(0,F.isIOS)()?null:z.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ey["aria-required"]=void 0);let eb=e=>{var t;document.activeElement!==n.current&&("mouse"===e.pointerType?null==(t=n.current)||t.focus():e.target.focus())},ev=e["aria-label"]||("string"==typeof e.label?e.label:"");ev||(a=null!=e.label?ep.id:e["aria-labelledby"]);let ex=(0,_.useId)(),ek=(0,_.useId)(),ew=(0,E.mergeProps)(X,{"aria-label":c||z.format("increase",{fieldLabel:ev}).trim(),id:a&&!c?ex:null,"aria-labelledby":a&&!c?`${ex} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:eb}),eC=(0,E.mergeProps)(Q,{"aria-label":s||z.format("decrease",{fieldLabel:ev}).trim(),id:a&&!s?ek:null,"aria-labelledby":a&&!s?`${ek} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:eb});return{groupProps:{...et,role:"group","aria-disabled":u,"aria-invalid":el?"true":void 0},labelProps:ep,inputProps:ey,incrementButtonProps:ew,decrementButtonProps:eC,errorMessageProps:eg,descriptionProps:ef,isInvalid:el,validationErrors:ed,validationDetails:eh}}({...e,value:void 0,defaultValue:void 0,onChange:void 0,validate:void 0,"aria-label":e["aria-label"]||(e.label||e["aria-labelledby"]?void 0:t.colorValue.getChannelName(e.channel,r))},t,n)}({...(0,r.removeDataAttributes)(e),label:s,validationBehavior:null!=(t=e.validationBehavior)?t:"native"},i,a);return l.default.createElement(l.default.Fragment,null,ti(e,i,e.forwardedRef,u,a,c,o,d,h,p),e.name&&l.default.createElement("input",{type:"hidden",name:e.name,value:isNaN(i.numberValue)?"":i.numberValue}))}function tr(e){var t,n;let i=function(e){let{value:t,defaultValue:n,onChange:r}=e,{step:i}=e5.getChannelRange("red"),[a,o]=ed(ev(t),ev(n),r),[s,c]=(0,l.useState)(()=>(t||n)&&a?a.toString("hex"):""),u=ea({...e,value:a}),d=e=>{if(!a||!e||e.toHexInt()!==a.toHexInt())return void o(e)},[h,p]=(0,l.useState)(a);h!==a&&(c(a?a.toString("hex"):""),p(a));let m=(0,l.useMemo)(()=>{let e;try{e=(0,eb.parseColor)(s.startsWith("#")?s:`#${s}`)}catch{e=null}return e},[s]);return{...u,validate:e=>{var t;return""===e||!!(null==(t=e.match(/^#?[0-9a-f]{0,6}$/i))?void 0:t[0])},colorValue:a,inputValue:s,setInputValue:c,commit:()=>{if(!s.length){d(null),void 0===t||null===a?c(""):c(a.toString("hex"));return}if(null==m)return void c(a?a.toString("hex"):"");d(m);let e="";a&&(e=a.toString("hex")),c(e)},increment:()=>{let e=e9(m,i);e===a&&c(e.toString("hex")),d(e),u.commitValidation()},incrementToMax:()=>d(e6),decrement:()=>{let e=e9(m,-i);e===a&&c(e.toString("hex")),d(e),u.commitValidation()},decrementToMin:()=>d(e5)}}({...e,validationBehavior:null!=(t=e.validationBehavior)?t:"native"}),a=(0,l.useRef)(null),[o,s]=(0,r.useSlot)(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:c,inputProps:u,descriptionProps:d,errorMessageProps:h,...p}=function(e,t,n){let{isDisabled:r,isReadOnly:i,isRequired:a,isWheelDisabled:o,validationBehavior:s="aria"}
174=e,{colorValue:c,inputValue:u,increment:d,decrement:h,incrementToMax:p,decrementToMin:m,commit:f}=t,g=(0,_.useId)(),{spinButtonProps:y}=eG({isDisabled:r,isReadOnly:i,isRequired:a,maxValue:0xffffff,minValue:0,onIncrement:d,onIncrementToMax:p,onDecrement:h,onDecrementToMin:m,value:c?c.toHexInt():void 0,textValue:c?c.toString("hex"):void 0}),[b,v]=(0,l.useState)(!1),{focusWithinProps:x}=C({isDisabled:r,onFocusWithinChange:v});ez({onScroll:(0,l.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?d():e.deltaY<0&&h())},[h,d]),isDisabled:o||r||i||!b},n);let{inputProps:k,...w}=eV({...e,id:g,value:u,defaultValue:void 0,validate:void 0,[ei]:t,type:"text",autoComplete:"off",onChange:e=>{t.validate(e)&&t.setInputValue(e)}},t,n);return k=(0,E.mergeProps)(k,y,x,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:f}),"native"===s&&(k["aria-required"]=void 0),{inputProps:k,...w}}({...(0,r.removeDataAttributes)(e),label:s,validationBehavior:null!=(n=e.validationBehavior)?n:"native"},i,a);return ti(e,i,e.forwardedRef,u,a,c,o,d,h,p)}function ti(e,t,n,i,a,o,s,u,d,h){let p=(0,r.useRenderProps)({...e,values:{state:t,channel:e.channel||"hex",isDisabled:e.isDisabled||!1,isInvalid:h.isInvalid||!1},defaultClassName:"react-aria-ColorField"}),m=(0,N.filterDOMProps)(e);return delete m.id,l.default.createElement(r.Provider,{values:[[te,t],[T,{...i,ref:a}],[D,{...o,ref:s}],[c,{slots:{description:u,errorMessage:d}}],[J,h]]},l.default.createElement("div",{...m,...p,ref:n,slot:e.slot||void 0,"data-channel":e.channel||"hex","data-disabled":e.isDisabled||void 0,"data-invalid":h.isInvalid||void 0}))}e.s(["ColorField",0,tt],715295);var ta=e.i(843476),to=e.i(500932),ts=e.i(44729),tl=e.i(784192),tc=e.i(99245),tu=e.i(467592),td=e.i(870370);e.s(["ImageInput",0,e=>{let t,n=(0,to.c)(5),r=(0,tu.useEntity)(e.entityID,"page/type")?.data.value,{rep:i,undoManager:a}=(0,tu.useReplicache)();return n[0]!==r||n[1]!==e||n[2]!==i||n[3]!==a?(t=(0,ta.jsx)("input",{type:"file",accept:"image/*",onChange:async t=>{let n=t.currentTarget.files?.[0];n&&i&&await a.withUndoGroup(async()=>{await (0,td.addImage)(n,i,{entityID:e.entityID,attribute:e.card?"theme/card-background-image":"theme/background-image"}),e.onChange?.(),"canvas"===r&&await i.mutate.assertFact({entity:e.entityID,attribute:"canvas/background-pattern",data:{type:"canvas-pattern-union",value:"plain"}})})}}),n[0]=r,n[1]=e,n[2]=i,n[3]=a,n[4]=t):t=n[4],t},"ImageSettings",0,e=>{let t,n,r,i,a,o,s,l,c,u,d,h,p,m,f,g,y,b=(0,to.c)(54);(0,tu.useEntity)(e.entityID,e.card?"theme/card-background-image":"theme/background-image");let v=(0,tu.useEntity)(e.entityID,e.card?"theme/card-background-image-repeat":"theme/background-image-repeat"),{rep:x}=(0,tu.useReplicache)(),k=!v;b[0]!==x?.mutate||b[1]!==v?(t=async e=>{!e.currentTarget.checked||v&&v&&await x?.mutate.retractFact({factID:v.id})},b[0]=x?.mutate,b[1]=v,b[2]=t):t=b[2];let w=`w-full cursor-pointer ${!v?"text-[#595959]":" text-[#969696]"}`;b[3]!==w?(n=(0,ta.jsx)("div",{className:w,children:"cover"}),b[3]=w,b[4]=n):n=b[4],b[5]!==k||b[6]!==t||b[7]!==n?(r=(0,ta.jsx)("label",{htmlFor:"cover",className:"w-full",children:(0,ta.jsx)(tc.Radio,{radioCheckedClassName:"text-[#595959]!",radioEmptyClassName:"text-[#969696]!",type:"radio",id:"cover",name:"bg-image-options",value:"cover",checked:k,onChange:t,children:n})}),b[5]=k,b[6]=t,b[7]=n,b[8]=r):r=b[8];let C=!!v;b[9]!==e.card||b[10]!==e.entityID||b[11]!==x?.mutate||b[12]!==v?(i=async t=>{!t.currentTarget.checked||v||await x?.mutate.assertFact({entity:e.entityID,attribute:e.card?"theme/card-background-image-repeat":"theme/background-image-repeat",data:{type:"number",value:500}})},b[9]=e.card,b[10]=e.entityID,b[11]=x?.mutate,b[12]=v,b[13]=i):i=b[13];let S=`shrink-0 grow-0 w-fit z-10 cursor-pointer ${v?"text-[#595959]":" text-[#969696]"}`;b[14]!==S?(a=(0,ta.jsx)("div",{className:S,children:"repeat"}),b[14]=S,b[15]=a):a=b[15];let E=`flex font-normal ${v?"text-[#969696]":" text-[#C3C3C3]"}`,T=v?v.data.value:500;b[16]!==e.card||b[17]!==e.entityID||b[18]!==x?.mutate?(o=t=>{x?.mutate.assertFact({entity:e.entityID,attribute:e.card?"theme/card-background-image-repeat":"theme/background-image-repeat",data:{type:"number",value:parseInt(t.currentTarget.value)}})},b[16]=e.card,b[17]=e.entityID,b[18]=x?.mutate,b[19]=o):o=b[19],b[20]!==T||b[21]!==o?(s=(0,ta.jsx)(tl.Input,{type:"number",className:"w-10 text-right appearance-none bg-transparent",max:3e3,min:10,value:T,onChange:o}),b[20]=T,b[21]=o,b[22]=s):s=b[22],b[23]!==s||b[24]!==E?(l=(0,ta.jsxs)("div",{className:E,
174children:[s," ","px"]}),b[23]=s,b[24]=E,b[25]=l):l=b[25],b[26]!==l||b[27]!==a?(c=(0,ta.jsxs)("div",{className:"flex gap-2",children:[a,l]}),b[26]=l,b[27]=a,b[28]=c):c=b[28];let I=v?v.data.value:500;b[29]!==I?(u=[I],b[29]=I,b[30]=u):u=b[30],b[31]!==e.card||b[32]!==e.entityID||b[33]!==x?.mutate?(d=t=>{x?.mutate.assertFact({entity:e.entityID,attribute:e.card?"theme/card-background-image-repeat":"theme/background-image-repeat",data:{type:"number",value:t[0]}})},b[31]=e.card,b[32]=e.entityID,b[33]=x?.mutate,b[34]=d):d=b[34];let D=`${v?"bg-[#595959]":" bg-[#C3C3C3]"} relative grow rounded-full h-[3px] my-2`;b[35]!==D?(h=(0,ta.jsx)(ts.Track,{className:D}),b[35]=D,b[36]=h):h=b[36];let N=` 175 flex w-4 h-4 rounded-full border-2 border-white cursor-pointer 176 ${v?"bg-[#595959] shadow-[0_0_0_1px_#8C8C8C,inset_0_0_0_1px_#8C8C8C]":" bg-[#C3C3C3] "} 177 `;return b[37]!==N?(p=(0,ta.jsx)(ts.Thumb,{className:N,"aria-label":"Volume"}),b[37]=N,b[38]=p):p=b[38],b[39]!==u||b[40]!==d||b[41]!==h||b[42]!==p?(m=(0,ta.jsxs)(ts.Root,{className:"relative grow flex items-center select-none touch-none w-full h-fit px-1 ",value:u,max:3e3,min:10,step:10,onValueChange:d,children:[h,p]}),b[39]=u,b[40]=d,b[41]=h,b[42]=p,b[43]=m):m=b[43],b[44]!==c||b[45]!==m?(f=(0,ta.jsxs)("div",{className:"flex flex-col w-full",children:[c,m]}),b[44]=c,b[45]=m,b[46]=f):f=b[46],b[47]!==f||b[48]!==C||b[49]!==i?(g=(0,ta.jsx)("label",{htmlFor:"repeat",className:"pb-3 w-full",children:(0,ta.jsx)(tc.Radio,{type:"radio",id:"repeat",name:"bg-image-options",value:"repeat",radioCheckedClassName:"text-[#595959]!",radioEmptyClassName:"text-[#969696]!",checked:C,onChange:i,children:f})}),b[47]=f,b[48]=C,b[49]=i,b[50]=g):g=b[50],b[51]!==g||b[52]!==r?(y=(0,ta.jsx)(ta.Fragment,{children:(0,ta.jsxs)("div",{className:"themeBGImageControls font-bold flex flex-col gap-1 items-center px-3",children:[r,g]})}),b[51]=g,b[52]=r,b[53]=y):y=b[53],y}],505206);var th=e.i(868032);let tp=e=>[0,60,120,180,240,300,360].map(t=>e.withChannelValue("hue",t).toString("css")).join(", "),tm=e=>`${e.withChannelValue("saturation",0)}, transparent`,tf={hue:tp,saturation:tm,lightness:()=>"black, transparent, white"},tg={hue:tp,saturation:tm,brightness:()=>"black, transparent"},ty=(0,eb.parseColor)("#ffffff"),tb=(0,l.createContext)(null),tv=(0,l.forwardRef)(function(e,n){[e,n]=(0,r.useContextProps)(e,n,t.ColorAreaContext);let i=(0,l.useRef)(null),a=(0,l.useRef)(null),o=function(e){let{value:t,defaultValue:n,colorSpace:r,xChannel:i,yChannel:a,onChange:o,onChangeEnd:s}=e;t||n||(n=ty),t&&(t=(0,eb.normalizeColor)(t)),n&&(n=(0,eb.normalizeColor)(n));let[c,u]=ed(t,n,o),d=(0,l.useMemo)(()=>r&&c?c.toFormat(r):c,[c,r]),h=(0,l.useRef)(d),p=e=>{h.current=e,u(e)},m=(0,l.useMemo)(()=>d.getColorSpaceAxes({xChannel:i,yChannel:a}),[d,i,a]),f=d.getChannelRange(m.xChannel),g=d.getChannelRange(m.yChannel),{minValue:y,maxValue:b,step:v,pageSize:x}=f,{minValue:k,maxValue:w,step:C,pageSize:S}=g,[E,T]=(0,l.useState)(!1),I=(0,l.useRef)(!1),D=d.getChannelValue(m.xChannel),N=d.getChannelValue(m.yChannel),_=e=>{e===D||p(d.withChannelValue(m.xChannel,e))},P=e=>{e===N||p(d.withChannelValue(m.yChannel,e))};return{channels:m,xChannelStep:v,yChannelStep:C,xChannelPageStep:x,yChannelPageStep:S,value:d,setValue(e){p((0,eb.normalizeColor)(e))},xValue:D,setXValue:_,yValue:N,setYValue:P,setColorFromPoint(e,t){let n,r=y+(0,A.clamp)(e,0,1)*(b-y),i=k+(1-(0,A.clamp)(t,0,1))*(w-k);r!==D&&(r=(0,A.snapValueToStep)(r,y,b,v),n=d.withChannelValue(m.xChannel,r)),i!==N&&(i=(0,A.snapValueToStep)(i,k,w,C),n=(n||d).withChannelValue(m.yChannel,i)),n&&p(n)},getThumbPosition:()=>({x:(D-y)/(b-y),y:1-(N-k)/(w-k)}),incrementX(e=1){_(D+e>b?b:(0,A.snapValueToStep)(D+e,y,b,v))},incrementY(e=1){P(N+e>w?w:(0,A.snapValueToStep)(N+e,k,w,C))},decrementX(e=1){_((0,A.snapValueToStep)(D-e,y,b,v))},decrementY(e=1){P((0,A.snapValueToStep)(N-e,k,w,C))},setDragging(e){let t=I.current;I.current=e,s&&!e&&t&&s(h.current),T(e)},isDragging:E,getDisplayColor:()=>d.withChannelValue("alpha",1)}}(e),{colorAreaProps:s,xInputProps:c,yInputProps:u,thumbProps:d}=function(e,t){var n;let{isDisabled:r,inputXRef:i,inputYRef:a,containerRef:o,"aria-label":s,xName:c,yName:u}
177=e,d=(0,ec.useLocalizedStringFormatter)((n=th.default)&&n.__esModule?n.default:n,"@react-aria/color"),{addGlobalListener:p,removeGlobalListener:m}=h(),{direction:f,locale:g}=(0,R.useLocale)(),[y,b]=(0,l.useState)(null),v=(0,l.useCallback)((e=i)=>{e.current&&(0,Z.focusWithoutScrolling)(e.current)},[i]);eu(i,[t.xValue,t.yValue],([e,n])=>{let r=t.value.withChannelValue(t.channels.xChannel,e).withChannelValue(t.channels.yChannel,n);t.setValue(r)});let[x,w]=(0,l.useState)(!1),[S,T]=(0,l.useState)(!1),{xChannel:I,yChannel:D,zChannel:N}=t.channels,A=t.xChannelStep,_=t.yChannelStep,M=(0,l.useRef)(null),{keyboardProps:L}=(0,eN.useKeyboard)({onKeyDown(e){let n;if(!/^(PageUp|PageDown|Home|End)$/.test(e.key))return void e.continuePropagation();switch(e.preventDefault(),t.setDragging(!0),w(!0),e.key){case"PageUp":t.incrementY(t.yChannelPageStep),n="y";break;case"PageDown":t.decrementY(t.yChannelPageStep),n="y";break;case"Home":"rtl"===f?t.incrementX(t.xChannelPageStep):t.decrementX(t.xChannelPageStep),n="x";break;case"End":"rtl"===f?t.decrementX(t.xChannelPageStep):t.incrementX(t.xChannelPageStep),n="x"}t.setDragging(!1),n&&(v("x"===n?i:a),b(n))}}),j={onMoveStart(){M.current=null,t.setDragging(!0)},onMove({deltaX:e,deltaY:n,pointerType:r,shiftKey:i}){var a;let{incrementX:s,decrementX:l,incrementY:c,decrementY:u,xChannelPageStep:d,xChannelStep:h,yChannelPageStep:p,yChannelStep:m,getThumbPosition:g,setColorFromPoint:v}=t;null==M.current&&(M.current=g());let{width:x,height:k}=(null==(a=o.current)?void 0:a.getBoundingClientRect())||{width:0,height:0},C=0!==e||0!==n;if("keyboard"===r){let t=i&&d>h?d:h,r=i&&p>m?p:m;e>0&&"ltr"===f||e<0&&"rtl"===f?s(t):e<0&&"ltr"===f||e>0&&"rtl"===f?l(t):n>0?u(r):n<0&&c(r),w(C),b(y=C&&Math.abs(n)>Math.abs(e)?"y":"x")}else M.current.x+=("rtl"===f?-1:1)*e/x,M.current.y+=n/k,v(M.current.x,M.current.y)},onMoveEnd(){U.current=!1,t.setDragging(!1),v("x"===y?i:a)}},{moveProps:O}=eD(j),{focusWithinProps:B}=C({onFocusWithinChange:e=>{e||(w(!1),T(!1))}}),H=(0,l.useRef)(void 0),U=(0,l.useRef)(!1),{moveProps:z}=eD({onMoveStart(){U.current&&j.onMoveStart()},onMove(e){U.current&&j.onMove(e)},onMoveEnd(){U.current&&j.onMoveEnd()}}),$=e=>{t.isDragging||(H.current=e,w(!1),v(),t.setDragging(!0),"u">typeof PointerEvent?p(window,"pointerup",V,!1):(p(window,"mouseup",V,!1),p(window,"touchend",V,!1)))},V=e=>{var n,r;(null!=(r=e.pointerId)?r:null==(n=e.changedTouches)?void 0:n[0].identifier)===H.current&&(w(!1),v(),t.setDragging(!1),H.current=void 0,U.current=!1,"u">typeof PointerEvent?m(window,"pointerup",V,!1):(m(window,"mouseup",V,!1),m(window,"touchend",V,!1)))},q=(e,n,r,i)=>{let a=e.getBoundingClientRect(),{width:o,height:s}=a,l=(r-a.x)/o,c=(i-a.y)/s;"rtl"===f&&(l=1-l),l>=0&&l<=1&&c>=0&&c<=1&&!t.isDragging&&void 0===H.current&&(U.current=!0,w(!1),H.current=n,t.setColorFromPoint(l,c),v(),t.setDragging(!0),"u">typeof PointerEvent?p(window,"pointerup",G,!1):(p(window,"mouseup",G,!1),p(window,"touchend",G,!1)))},G=e=>{var n,r;let i=null!=(r=e.pointerId)?r:null==(n=e.changedTouches)?void 0:n[0].identifier;U.current&&i===H.current&&(U.current=!1,w(!1),H.current=void 0,t.setDragging(!1),v(),"u">typeof PointerEvent?m(window,"pointerup",G,!1):(m(window,"mouseup",G,!1),m(window,"touchend",G,!1)))},W=r?{}:(0,E.mergeProps)({..."u">typeof PointerEvent?{onPointerDown:e=>{"mouse"===e.pointerType&&(0!==e.button||e.altKey||e.ctrlKey||e.metaKey)||q(e.currentTarget,e.pointerId,e.clientX,e.clientY)}}:{onMouseDown:e=>{0!==e.button||e.altKey||e.ctrlKey||e.metaKey||q(e.currentTarget,void 0,e.clientX,e.clientY)},onTouchStart:e=>{q(e.currentTarget,e.changedTouches[0].identifier,e.changedTouches[0].clientX,e.changedTouches[0].clientY)}}},z),K=r?{}:(0,E.mergeProps)({..."u">typeof PointerEvent?{onPointerDown:e=>{"mouse"===e.pointerType&&(0!==e.button||e.altKey||e.ctrlKey||e.metaKey)||$(e.pointerId)}}:{onMouseDown:e=>{0!==e.button||e.altKey||e.ctrlKey||e.metaKey||$(void 0)},onTouchStart:e=>{$(e.changedTouches[0].identifier)}}},B,L,O),{focusProps:Y}=(0,k.useFocus)({onFocus:()=>{b("x")}}),{focusProps:X}=(0,k.useFocus)({onFocus:()=>{b("y")}}),Q=e=>{let{target:n}=e;T(!0),n===i.current?t.setXValue(parseFloat(n.value)):n===a.current&&t.setYValue(parseFloat(n.value))},J=(0,F.isIOS)()||(0,F.isAndroid)(),ee=t.getDisplayColor(),et=(0,l.useCallback)(e=>{let t=S||x;return`${t?d.format("colorNameAndValue",{name:ee.getChannelName(e,g),value:ee.formatChannelValue(e,g)}):[d.format("colorNameAndValue",{name:ee.getChannelName(e,g),value:ee.formatChannelValue(e,g)}),d.format("colorNameAndValue",{name:ee.getChannelName(e===D?I:D,g),value:ee.formatChannelValue(e===D?I:D,g)}),d.format("colorNameAndValue",{name:ee.getChannelName(N,g),value:ee.formatChannelValue(N,g)})].join(", ")}, ${ee.getColorName(g)}`},[g,ee,d,S,x,I,D,N]),en=d.format("colorPicker"),er=P({...e,"aria-label":s?d.format("colorInputLabel",{label:s,channelLabel:en}):en}),ei=P({...e,"aria-label":s?d.format("colorInputLabel",{label:s,channelLabel:en}):en}),ea=P({...e,"aria-label":s?`${s}, ${en}`:void 0},J?en:void 0),eo=d.format("twoDimensionalSlider"),{visuallyHiddenProps:es}=e_({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:el,thumbStyleProps:ed}=function({direction:e,state:t,zChannel:n,xChannel:r,yChannel:i}){return(0,l.useMemo)(()=>
177{let a="rtl"===e?"left":"right",o={},s=t.value.getChannelValue(n);switch(t.value.getColorSpace()){case"rgb":{let e=(0,eb.parseColor)("rgb(0, 0, 0)");o={background:[`linear-gradient(to ${a}, ${e.withChannelValue(r,0)}, ${e.withChannelValue(r,255)})`,`linear-gradient(to top, ${e.withChannelValue(i,0)}, ${e.withChannelValue(i,255)})`,e.withChannelValue(n,s)].join(","),backgroundBlendMode:"screen"};break}case"hsl":{let e=t.value.getColorChannels(),i=(0,eb.parseColor)("hsl(0, 100%, 50%)").withChannelValue(n,s),l=e.filter(e=>e!==n).map(e=>`linear-gradient(to ${e===r?a:"top"}, ${tf[e](i)})`).reverse();"hue"===n&&l.push(i.toString("css")),o={background:l.join(", ")};break}case"hsb":{let e=t.value.getColorChannels(),i=(0,eb.parseColor)("hsb(0, 100%, 100%)").withChannelValue(n,s),l=e.filter(e=>e!==n).map(e=>`linear-gradient(to ${e===r?a:"top"}, ${tg[e](i)})`).reverse();"hue"===n&&l.push(i.toString("css")),o={background:l.join(", ")}}}let{x:l,y:c}=t.getThumbPosition();"rtl"===e&&(l=1-l);let u={forcedColorAdjust:"none"};return{colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...u,...o}},thumbStyleProps:{style:{position:"absolute",left:`${100*l}%`,top:`${100*c}%`,transform:"translate(-50%, -50%)",touchAction:"none",...u}}}},[e,t,n,r,i])}({direction:f,state:t,xChannel:I,yChannel:D,zChannel:N});return{colorAreaProps:{...ea,...W,...el,role:"group"},thumbProps:{...K,...ed,role:"presentation"},xInputProps:{...er,...es,...Y,type:"range",min:t.value.getChannelRange(I).minValue,max:t.value.getChannelRange(I).maxValue,step:A,"aria-roledescription":eo,"aria-valuetext":et(I),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:r,value:t.value.getChannelValue(I),name:c,tabIndex:J||!y||"x"===y?void 0:-1,"aria-hidden":J||!y||"x"===y||x?void 0:"true",onChange:Q},yInputProps:{...ei,...es,...X,type:"range",min:t.value.getChannelRange(D).minValue,max:t.value.getChannelRange(D).maxValue,step:_,"aria-roledescription":eo,"aria-valuetext":et(D),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:r,value:t.value.getChannelValue(D),name:u,tabIndex:J||"y"===y?void 0:-1,"aria-hidden":J||"y"===y||x?void 0:"true",onChange:Q}}}({...e,inputXRef:i,inputYRef:a,containerRef:n},o),p=(0,r.useRenderProps)({...e,defaultClassName:"react-aria-ColorArea",defaultStyle:s.style,values:{state:o,isDisabled:e.isDisabled||!1}}),m=(0,N.filterDOMProps)(e);return delete m.id,l.default.createElement("div",{ref:n,...s,...m,...p,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0},l.default.createElement(r.Provider,{values:[[tb,o],[eS,{state:o,thumbProps:d,inputXRef:i,xInputProps:c,inputYRef:a,yInputProps:u,isDisabled:e.isDisabled}]]},p.children))});e.s(["ColorArea",0,tv],492185);var tx=e.i(859015),tk=e.i(250366),tw=e.i(227086),tC=e.i(814649),tS=e.i(4876),tE=e.i(793610);let tT=e=>{let t,n=(0,to.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,ta.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ta.jsx)("path",{d:"M4.26908 2.55223L7.82376 2.8657C8.37724 2.91446 8.89002 3.17813 9.2515 3.60008L11.2701 5.95652L11.4009 6.12547C11.6838 6.53216 11.8168 7.02792 11.773 7.52586L11.2349 13.6333C11.1318 14.8022 10.1002 15.6669 8.93119 15.5639L3.16751 15.0561C1.99865 14.953 1.13497 13.9213 1.23783 12.7524L1.96634 4.48289C2.06933 3.3139 3.1001 2.44938 4.26908 2.55223ZM4.1597 3.79734C3.67839 3.75494 3.25398 4.11099 3.21146 4.59227L2.48294 12.8618C2.44066 13.3431 2.79655 13.7686 3.27787 13.811L9.04154 14.3188C9.52262 14.3611 9.94709 14.0049 9.98978 13.5239L10.4605 8.17723L8.4263 7.99754C7.39505 7.90645 6.63243 6.99663 6.72318 5.96531L6.8931 4.03855L4.1597 3.79734ZM6.36576 0.319805L13.2554 0.92625C14.1493 1.00512 14.8097 1.79404 14.731 2.68797L13.9283 11.8061C13.8494 12.7001 13.0605 13.3614 12.1665 13.2827L11.8794 13.2573L12.4058 7.28465C12.4582 6.68925 12.2718 6.09769 11.8872 5.64012L9.73685 3.08152C9.35372 2.62581 8.80549 2.33994 8.21244 2.28758L4.58841 1.96824L4.60404 1.79539C4.6828 0.901582 5.47198 0.241343 6.36576 0.319805ZM7.9683 6.07566C7.93837 6.41922 8.19307 6.7221 8.53665 6.75242L10.4243 6.91941C10.395 6.86569
17710.3582 6.81825 10.3208 6.77L8.30228 4.41355C8.25125 4.35398 8.19227 4.30256 8.12845 4.25926L7.9683 6.07566Z",fill:"currentColor"})}),n[0]=t):t=n[0],t};e.s(["CopyTiny",0,tT],781543);let tI=e=>{let t,n,r=(0,to.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,ta.jsx)("path",{d:"M8.78343 1.30539C9.48078 0.593592 10.6233 0.581819 11.3352 1.27902L14.4504 4.33175C15.2886 5.15308 15.3029 6.49837 14.4817 7.33664L9.31175 12.614C8.71235 13.2257 7.75963 13.28 7.09593 12.7732L6.21214 13.6755C5.97056 13.9219 5.57486 13.9258 5.32835 13.6843L5.15843 13.5173L2.62229 15.1384C2.37716 15.2947 2.05558 15.2608 1.84788 15.0573L1.09886 14.323C0.891251 14.1194 0.851748 13.7997 1.00315 13.5515L2.56956 10.9812L2.39964 10.8152C2.15307 10.5736 2.14929 10.1779 2.39085 9.93136L3.33714 8.96457C2.92145 8.17051 3.04042 7.16777 3.7014 6.49289L8.78343 1.30539ZM2.32835 13.778L2.36839 13.8171L4.24241 12.6198L3.48558 11.8796L2.32835 13.778ZM3.72093 10.3591L5.75706 12.3542L6.19358 11.9079L4.15647 9.91378L3.72093 10.3591ZM10.4612 2.17257C10.2424 1.95827 9.89031 1.96164 9.67601 2.18039L4.59397 7.36691C4.25597 7.71196 4.26193 8.266 4.60667 8.60421L7.81272 11.7448C7.98168 11.9103 8.25367 11.9079 8.41917 11.739L13.5891 6.46164C13.927 6.11657 13.9211 5.56251 13.5764 5.22433L10.4612 2.17257ZM8.07249 4.61203C8.31404 4.3658 8.70981 4.36189 8.95628 4.60324C9.20284 4.84479 9.2066 5.24046 8.96507 5.48703L6.89183 7.60324C6.65032 7.84974 6.25462 7.85438 6.00804 7.613C5.76156 7.37143 5.75771 6.97575 5.99925 6.72921L8.07249 4.61203ZM9.43284 3.22824C9.67693 2.98484 10.0718 2.98449 10.3157 3.22824C10.5597 3.47232 10.5597 3.86893 10.3157 4.113L10.1438 4.28488C9.89974 4.52863 9.504 4.52771 9.25999 4.2839C9.01624 4.03983 9.01609 3.6441 9.25999 3.40011L9.43284 3.22824Z",fill:"currentColor"}),r[0]=t):t=r[0],r[1]!==e?(n=(0,ta.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),r[1]=e,r[2]=n):n=r[2],n},tD=[["1","2","3","A","B","C"],["4","5","6","D","E","F"]],tN=["7","8","9","0"],tA=e=>{let t,n=(0,to.c)(6),r=` 178 h-10 w-10 rounded-md 179 font-bold 180 flex items-center justify-center 181 border border-[#CCCCCC] text-[#969696] 182 disabled:bg-[#DBDBDB] disabled:border-[#DBDBDB] disabled:text-[#CCCCCC] disabled:cursor-not-allowed 183 ${e.className??""} 184 `;return n[0]!==e.ariaLabel||n[1]!==e.children||n[2]!==e.disabled||n[3]!==e.onClick||n[4]!==r?(t=(0,ta.jsx)("button",{onPointerDown:tP,onClick:e.onClick,disabled:e.disabled,"aria-label":e.ariaLabel,className:r,children:e.children}),n[0]=e.ariaLabel,n[1]=e.children,n[2]=e.disabled,n[3]=e.onClick,n[4]=r,n[5]=t):t=n[5],t},t_=e=>{let t,n,r,i,a,o,s,c,u,d,h,p,m,f,g,y,b,v,x,k,w,C,S,E,T,I=(0,to.c)(55);I[0]!==e.value?(t=e.value?e.value.toString("hex").toUpperCase():"#000000",I[0]=e.value,I[1]=t):t=I[1];let D=t,[N,A]=(0,l.useState)(D),_=(0,l.useRef)(!1),P=(0,l.useRef)(null),M=(0,tE.useSmoker)();I[2]!==e.value?(n=()=>{A(e.value?e.value.toString("hex").toUpperCase():"#000000"),_.current=!0},I[2]=e.value,I[3]=n):n=I[3];let R=n;I[4]!==N?(r=e=>{if(_.current){A("#"+e),_.current=!1;return}N.length>=7||A(t=>t+e)},I[4]=N,I[5]=r):r=I[5];let L=r;I[6]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{_.current=!1,A(tM)},I[6]=i):i=I[6];let j=i;I[7]!==N||I[8]!==e||I[9]!==R?(a=()=>{try{let t=N.replace("#",""),n=t;3===t.length?n=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t.length<6&&(n=t.padEnd(6,"0"));let r=(0,eb.parseColor)("#"+n);e.setValue(r),A("#"+n.toUpperCase()),_.current=!0}catch{R()}},I[7]=N,I[8]=e,I[9]=R,I[10]=a):a=I[10];let O=a,B=/^#[0-9A-Fa-f]{0,6}$/.test(N),F=/^#[0-9A-Fa-f]{3}$/.test(N)||/^#[0-9A-Fa-f]{6}$/.test(N);I[11]!==N||I[12]!==M?(o=()=>{navigator.clipboard.writeText(N);let e=P.current?.getBoundingClientRect();M({position:{x:e?e.left+e.width/2:0,y:e?e.top-8:0},text:"Copied!"})},I[11]=N,I[12]=M,I[13]=o):o=I[13];let H=o;I[14]===Symbol.for("react.memo_cache_sentinel")?(s=async()=>{try{let e=(await navigator.clipboard.readText()).trim();e.startsWith("#")||(e="#"+e),e=e.toUpperCase(),/^#[0-9A-Fa-f]{0,6}$/.test(e)&&(A(e),_.current=!1)}catch{}},I[14]=s):s=I[14];let U=s;I[15]!==R?(c=e=>{e&&R()},I[15]=R,I[16]=c):c=I[16],I[17]!==D?(u=(0,ta.jsx)("div",{className:"w-[72px] text-left bg-transparent outline-hidden truncate",children:D}),I[17]=D,I[18]=u):u=I[18];let z=` 185 flex items-center 186 rounded-md border px-2 py-1 text-sm font-mono 187 text-[#595959]! 188 ${B?"border-[#CCCCCC]":"border-red-400"} 189 `;I[19]!==N?(d=(0,ta.jsx)("span",{className:"select-all",children:N}),I[19]=N,I[20]=d):d=I[20],I[21]!==d||I[22]!==z?(h=(0,ta.jsx)("div",{className:z,children:d}),I[21]=d,I[22]=z,I[23]=h):h=I[23],I[24]===Symbol.for("react.memo_cache_sentinel")?(p=(0,ta.jsx)(tT,{}),I[24]=p):p=I[24],I[25]!==H?(m=(0,ta.jsxs)("button",{ref:P,onPointerDown:tR,onClick:H,className:"h-8 gap-2 rounded-md border border-[#CCCCCC] text-sm text-[#969696] font-bold flex items-center justify-center",children:[p," Copy"]}),I[25]=H,I[26]=m):m=I[26],I[27]===Symbol.for("react.memo_cache_sentinel")?(f=(0,ta.jsxs)("button",{onPointerDown:tL,onClick:U,className:"h-8 gap-2 rounded-md border border-[#CCCCCC] text-sm text-[#969696] font-bold flex items-center justify-center",children:[(0,ta.jsx)(tI,{}),"Paste"]}),I[27]=f):f=I[27],I[28]!==m?(g=(0,ta.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[m,f]}),I[28]=m,I[29]=g):g=I[29],I[30]===Symbol.for("react.memo_cache_sentinel")?(y=(0,ta.jsx)("hr",{className:"border-[#CCCCCC]"}),I[30]=y):y=I[30],I[31]!==L?(b=tD[0].map(e=>(0,ta.jsx)(tA,{onClick:()=>L(e),children:e},e)),I[31]=L,I[32]=b):b=I[32],I[33]!==L?(v=tD[1].map(e=>(0,ta.jsx)(tA,{onClick:()=>L(e),children:e},e)),I[33]=L,I[34]=v):v=I[34],I[35]!==L?(x=tN.map(e=>(0,ta.jsx)(tA,{onClick:()=>L(e),children:e},e)),I[35]=L,I[36]=x):x=I[36],I[37]===Symbol.for("react.memo_cache_sentinel")?(k=(0,ta.jsx)(tA,{onClick:j,ariaLabel:"Delete",className:"bg-accent-1! border-accent-1! text-accent-2!",children:"â«"}),I[37]=k):k=I[37];let $=!F&&!B;return I[38]===Symbol.for("react.memo_cache_sentinel")?(w=(0,ta.jsx)(tS.GoToArrow,{}),I[38]=w):w=I[38],I[39]!==O||I[40]!==$?(C=(0,ta.jsx)(tA,{onClick:O,disabled:$,ariaLabel:"Ap
189ply",className:"bg-accent-1! border-accent-1! text-accent-2!",children:w}),I[39]=O,I[40]=$,I[41]=C):C=I[41],I[42]!==b||I[43]!==v||I[44]!==x||I[45]!==C?(S=(0,ta.jsxs)("div",{className:"grid grid-cols-6 gap-1",children:[b,v,x,k,C]}),I[42]=b,I[43]=v,I[44]=x,I[45]=C,I[46]=S):S=I[46],I[47]!==h||I[48]!==g||I[49]!==S?(E=(0,ta.jsxs)("div",{className:"flex flex-col gap-2",children:[h,g,y,S]}),I[47]=h,I[48]=g,I[49]=S,I[50]=E):E=I[50],I[51]!==E||I[52]!==c||I[53]!==u?(T=(0,ta.jsx)(tC.Popover,{align:"center",className:"p-2! w-fit bg-white! text-[#595959] border-[#CCCCCC]!",arrowFill:"white",border:"#CCCCCC",onOpenChange:c,trigger:u,children:E}),I[51]=E,I[52]=c,I[53]=u,I[54]=T):T=I[54],T};function tP(e){return e.preventDefault()}function tM(e){return e.length<=1?e:e.slice(0,-1)}function tR(e){return e.preventDefault()}function tL(e){return e.preventDefault()}let tj=[["1","2","3"],["4","5","6"],["7","8","9"]],tO=e=>{let t,n=(0,to.c)(6),r=` 190 h-10 w-10 rounded-md 191 font-bold 192 flex items-center justify-center 193 border border-[#CCCCCC] text-[#969696] 194 disabled:bg-[#DBDBDB] disabled:border-[#DBDBDB] disabled:text-[#CCCCCC] disabled:cursor-not-allowed 195 ${e.className??""} 196 `;return n[0]!==e.ariaLabel||n[1]!==e.children||n[2]!==e.disabled||n[3]!==e.onClick||n[4]!==r?(t=(0,ta.jsx)("button",{onPointerDown:tF,onClick:e.onClick,disabled:e.disabled,"aria-label":e.ariaLabel,className:r,children:e.children}),n[0]=e.ariaLabel,n[1]=e.children,n[2]=e.disabled,n[3]=e.onClick,n[4]=r,n[5]=t):t=n[5],t},tB=e=>{let t,n,r,i,a,o,s,c,u,d,h,p,m,f,g,y,b=(0,to.c)(33);b[0]!==e.value?(t=e.value?Math.round(100*e.value.getChannelValue("alpha")):100,b[0]=e.value,b[1]=t):t=b[1];let v=t,x=`${v}%`,[k,w]=(0,l.useState)(String(v)),C=(0,l.useRef)(!1);b[2]!==e.value?(n=()=>{w(String(e.value?Math.round(100*e.value.getChannelValue("alpha")):100)),C.current=!0},b[2]=e.value,b[3]=n):n=b[3];let S=n;b[4]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{if(C.current){C.current=!1,w(e);return}w(t=>{let n="0"===t?e:t+e;return n.length>3||parseInt(n,10)>100?t:n})},b[4]=r):r=b[4];let E=r;b[5]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{C.current=!1,w(tH)},b[5]=i):i=b[5];let T=i;b[6]!==k||b[7]!==e||b[8]!==S?(a=()=>{let t=parseInt(k,10);if(isNaN(t)||t<0||t>100)return void S();if(e.value){let n=e.value.withChannelValue("alpha",t/100);e.setValue(n)}C.current=!0},b[6]=k,b[7]=e,b[8]=S,b[9]=a):a=b[9];let I=a,D=/^\d{1,3}$/.test(k)&&100>=parseInt(k,10);b[10]!==S?(o=e=>{e&&S()},b[10]=S,b[11]=o):o=b[11],b[12]!==x?(s=(0,ta.jsx)("button",{className:"w-[64px] pl-[6px] text-left bg-transparent outline-hidden truncate",children:x}),b[12]=x,b[13]=s):s=b[13];let N=` 197 flex items-center 198 rounded-md border px-2 py-1 text-sm font-mono 199 text-[#595959]! 200 ${D?"border-[#CCCCCC]":"border-red-400"} 201 `;b[14]!==k?(c=(0,ta.jsxs)("span",{className:"select-all",children:[k,"%"]}),b[14]=k,b[15]=c):c=b[15],b[16]!==N||b[17]!==c?(u=(0,ta.jsx)("div",{className:N,children:c}),b[16]=N,b[17]=c,b[18]=u):u=b[18],b[19]===Symbol.for("react.memo_cache_sentinel")?(d=tj.map(e=>e.map(e=>(0,ta.jsx)(tO,{onClick:()=>E(e),children:e},e))),b[19]=d):d=b[19],b[20]===Symbol.for("react.memo_cache_sentinel")?(h=(0,ta.jsx)(tO,{onClick:()=>E("0"),children:"0"}),p=(0,ta.jsx)(tO,{onClick:T,ariaLabel:"Delete",className:"bg-accent-1! border-accent-1! text-accent-2!",children:"â«"}),b[20]=h,b[21]=p):(h=b[20],p=b[21]);let A=!D;return b[22]===Symbol.for("react.memo_cache_sentinel")?(m=(0,ta.jsx)(tS.GoToArrow,{}),b[22]=m):m=b[22],b[23]!==I||b[24]!==A?(f=(0,ta.jsxs)("div",{className:"grid grid-cols-3 gap-1",children:[d,h,p,(0,ta.jsx)(tO,{onClick:I,disabled:A,ariaLabel:"Apply",className:"bg-accent-1! border-accent-1! text-accent-2!",children:m})]}),b[23]=I,b[24]=A,b[25]=f):f=b[25],b[26]!==f||b[27]!==u?(g=(0,ta.jsxs)("div",{className:"flex flex-col gap-2",children:[u,f]}),b[26]=f,b[27]=u,b[28]=g):g=b[28],b[29]!==g||b[30]!==o||b[31]!==s?(y=(0,ta.jsx)(tC.Popover,{align:"center",className:"p-2! w-fit bg-white! text-[#595959] border-[#CCCCCC]!",arrowFill:"white",border:"#CCCCCC",onOpenChange:o,trigger:s,children:g}),b[29]=g,b[30]=o,b[31]=s,b[32]=y):y=b[32],y};function tF(e){return e.preventDefault()}function tH(e){return e.length<=1?"0":e.slice(0,-1)}let tU="w-4 h-4 rounded-full border-2 border-white shadow-[0_0_0_1px_#8C8C8C,inset_0_0_0_1px_#8C8C8C]";function tz(e){e.currentTarget.setSelectionRange(1,e.currentTarget.value.length)}function t$(e){"Enter"!==e.key||e.currentTarget.blur()}function tV(e){e.currentTarget.setSelectionRange(0,e.currentTarget.value.length-1)}function tq(e){"Enter"!==e.key||e.currentTarget.blur()}e.s(["ColorPicker",0,e=>{let t,r,i,a,o,s,l,c,u,d,h,p,m=(0,to.c)(42),f=(0,tw.useIsMobile)();m[0]!==e?(t=()=>{e.openPicker===e.thisPicker?e.setOpenPicker("null"):e.setOpenPicker(e.thisPicker)},m[0]=e,m[1]=t):t=m[1];let g=`w-6 h-6 rounded-full border-2 border-white shadow-[0_0_0_1px_#8C8C8C] ${e.disabled?"opacity-50":""}`;m[2]===Symbol.for("react.memo_cache_sentinel")?(r={backgroundSize:"cover"},m[2]=r):r=m[2],m[3]!==e.value||m[4]!==g?(i=(0,ta.jsx)(n.ColorSwatch,{color:e.value,className:g,style:r}),m[3]=e.value,m[4]=g,m[5]=i):i=m[5];let y=`w-max ${e.labelClassName}`;return m[6]!==e.label||m[7]!==y?(a=(0,ta.jsx)("strong",{className:y,children:e.label}),m[6]=e.label,m[7]=y,m[8]=a):a=m[8],m[9]!==e.disabled||m[10]!==t||m[11]!==i||m[12]!==a?(o=(0,ta.jsxs)("button",{type:"button",disabled:e.disabled,className:"flex gap-2 items-center disabled:text-tertiary",onClick:t,children:[i,a]}),m[9]=e.disabled,m[10]=t,m[11]=i,m[12]=a,m[13]=o):o=m[13],m[14]!==f||m[15]!==e?(s=void 0===e.value?(0,ta.jsx)("div",{children:"default"}):e.disabled?(0,ta.jsx)("div",{className:"text-tertiary italic",children:"hidden"}):f?(0,ta.jsx)(t_,{value:e.value,setValue:e.setValue}):(0,ta.jsx)(tt,{className:`w-fit gap-1 ${e.fieldClassName}`,children:(0,ta.jsx)(I,{onMouseDown:tk.onMouseDown,onFocus:tz,onKeyDown:t$,onBlur:t=>{e.setValue((0,eb.parseColor)(t.currentTarget.value))},className:"w-[72px] bg-transparent outline-hidden disabled:text-tertiary"})}),m[14]=f,m[15]=e,m[16]=s):s=m[16],m[17]!==f||m[18]!==e.alpha||m[19]!==e.disabled||m[20]!==e.setValue||m[21]!==e.value?(l=e.alpha&&!e.disabled&&(0,ta.jsxs)(ta.Fragment,{children:[(0,ta.jsx)(tx.Separator,{classname:"my-1"}),f?(0,ta.jsx)(tB,{value:e.value,setValue:e.setValue}):(0,ta.jsx)(tt,{className:`w-[48px] pl-[6px] ${e.disabled?"opacity-50":""}`,channel:"alpha",children:(0,ta.jsx)(I,{disabled:e.disabled,onMouseDown:tk.onMouseDown,onFocus:tV,onKeyDown:tq,className:"w-[72px] bg-transparent outline-hidden "})})]}),m[17]=f,m[18]=e.alpha,m[19]=e.disabled,m[20]=e.setValue,m[21]=e.value,m[22]=l):l=m[22],m[23]!==s||m[24]!==l?(c=(0,ta.jsxs)("div",{className:"flex gap-1",children:[s,l]}),m[23]=s,m[24]=l,m[25]=c):c=m[25],m[26]!==o||m[27]!==c?(u=(0,ta.jsxs)("div",{className:"colorPickerLabel flex gap-2 items-center ",children:[o,c]}),m[26]=o,m[27]=c,m[28]=u):u=m[28],m[29]!==e.alpha||m[30]!==e.children||m[31]!==e.helpText||m[32]!==e.openPicker||m[33]!==e.thisPicker?(d=e.openPicker===e.thisPicker&&(0,ta.jsx)("div",{className:"w-full flex flex-col gap-2 px-1 pb-2",children:(0,ta.jsxs)(ta.Fragment,{children:[e.helpText&&(0,ta.jsx)("div",{className:"text-sm leading-tight text-tertiary pl-7 -mt-2.5",children:e.helpText}),(0,ta.jsx)(tv,{className:"w-full h-[128px] rounded-md",colorSpace:"hsb",xChannel:"saturation",yChannel:"brightness",children:(0,ta.jsx)(eE,{className:tU})}),(0,ta.jsx)(eH,{colorSpace:"hsb",className:"w-full",channel:"hue",children:(0,ta.jsx)(eB,{className:"h-2 w-full rounded-md",children:(0,ta.jsx)(eE,{className:`${tU} mt-[4px]`})})}),e.alpha&&(0,ta.jsx)(eH,{colorSpace:"hsb",className:"w-full mt-1 rounded-full",style:{backgroundImage:"url(/transparent-bg.png)",backgroundRepeat:"repeat",backgroundSize:"8px"},channel:"alpha",children:(0,ta.jsx)(eB,{className:"h-2 w-full rounded-md",children:(0,ta.jsx)(eE,{className:`${tU} mt-[4px]`})})}),e.children]})}),m[29]=e.alpha,m[30]=e.children,m[31]=e.helpText,m[32]=e.openPicker,m[33]=e.thisPicker,m[34]=d):d=m[34],m[35]!==u||m[36]!==d?(h=(0,ta.jsxs)("div",{className:"flex flex-col w-full gap-2",children:[u,d]}),m[35]=u,m[36]=d,m[37]=h):h=m[37],m[38]!==e.setValue||m[39]!==e.value||m[40]!==h?(p=(0,ta.jsx)(eC,{value:e.value,onChange:e.setValue,children:h}),m[38]=e.setValue,m[39]=e.value,m[40]=h,m[41]=p):p=m[41],p},"thumbStyle",0,tU],537712);var tG=e.i(416504),tW=e.i(88046),tK=e.i(69278),tY=e.i(788613);let tZ=e=>
201{let t,n=(0,to.c)(4);return n[0]!==e.font.displayName||n[1]!==e.font.id||n[2]!==e.selected?(t=(0,ta.jsx)(tG.RadioMenuItem,{value:e.font.id,selected:e.selected,className:` 202 fontOption text-normal! 203 `,children:e.font.displayName}),n[0]=e.font.displayName,n[1]=e.font.id,n[2]=e.selected,n[3]=t):t=n[3],t};e.s(["FontPicker",0,e=>{let t=(0,tw.useIsMobile)(),n=(0,tE.useSmoker)(),r=(0,l.useRef)(null),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(""),c=e.value||tW.defaultFontId,u=(0,tW.getFontConfig)(c),d=(0,tW.isCustomFontId)(c),h=Object.values(tW.fonts).sort((e,t)=>e.displayName.localeCompare(t.displayName)),[p,m]=(0,l.useState)(!1),f=async()=>{let t=(0,tW.parseGoogleFontInput)(o);if(t){m(!0);try{let i=`https://fonts.googleapis.com/css2?family=${t.googleFontsFamily}&display=swap`;if(!(await fetch(i,{method:"HEAD"})).ok){let e=r.current?.getBoundingClientRect();n({error:!0,position:{x:e?e.left+e.width/2:0,y:e?e.top-8:0},text:"No font found!"});return}let o=(0,tW.createCustomFontId)(t.fontName,t.googleFontsFamily);e.onChange(o),a(!1),s("")}catch{let e=r.current?.getBoundingClientRect();n({error:!0,position:{x:e?e.left+e.width/2:0,y:e?e.top-8:0},text:"No font found!"})}finally{m(!1)}}};return(0,ta.jsx)(tG.Menu,{asChild:!0,trigger:(0,ta.jsxs)("button",{className:"flex gap-2 items-center w-full !outline-none min-w-0",children:[(0,ta.jsx)("div",{className:`w-6 h-6 rounded-md border border-border relative text-sm bg-bg-page shrink-0 ${"Heading"===e.label?"font-bold":"text-secondary"}`,children:(0,ta.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2 ",children:"Aa"})}),(0,ta.jsx)("div",{className:"font-bold shrink-0",children:e.label}),(0,ta.jsx)("div",{className:"truncate",children:u.displayName})]}),side:t?"bottom":"right",align:"start",className:"w-fit !gap-0 !outline-none max-h-72 ",children:i?(0,ta.jsxs)("div",{className:"p-2 flex flex-col gap-2",children:[(0,ta.jsxs)("div",{children:[(0,ta.jsx)("div",{className:"font-bold text-secondary",children:"Paste any Google Font name"}),(0,ta.jsx)("div",{className:"text-sm text-tertiary",children:"This is case sensitive"})]}),(0,ta.jsx)("div",{ref:r,children:(0,ta.jsx)(tl.Input,{value:o,className:"w-full input-with-border",placeholder:"e.g. Roboto, Open Sans",autoFocus:!0,onChange:e=>s(e.currentTarget.value),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),f()):"Escape"===e.key&&(a(!1),s(""))}})}),(0,ta.jsxs)("div",{className:"flex gap-2 self-end items-center",children:[(0,ta.jsx)("button",{className:"px-1 py-0 rounded-md text-accent-contrast font-bold hover:bg-border-light",onClick:()=>{a(!1),s("")},children:"Nevermind"}),(0,ta.jsx)(tK.ButtonPrimary,{compact:!0,className:"",disabled:p,onClick:f,children:p?(0,ta.jsx)(tY.DotLoader,{}):"Add Font"})]})]}):(0,ta.jsxs)("div",{className:"flex flex-col h-full overflow-auto gap-0 py-1",children:[(0,ta.jsxs)(tG.RadioMenuGroup,{value:c,onValueChange:e.onChange,children:[h.map(e=>(0,ta.jsx)(tZ,{font:e,selected:e.id===c},e.id)),d&&(0,ta.jsx)(tZ,{font:u,selected:!0},c)]}),(0,ta.jsx)("hr",{className:"mx-2 my-1 border-border"}),(0,ta.jsx)(tG.MenuItem,{onSelect:e=>{e.preventDefault(),a(!0)},children:"Add a Custom Font"})]})})}],552401)},17250,596102,552893,937923,e=>{"use strict";var t=e.i(624099),n=e.i(868032),r=e.i(569080),i=e.i(720246),a=e.i(271645),o=e.i(768928);let s=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),l=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);var c=e.i(454453);let u=Symbol.for("react-aria.i18n.locale");function d(){let e="u">typeof window&&window[u]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:!function(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return s.has(t.script)}let t=e.split("-")[0];return l.has(t)}(e)?"ltr":"rtl"}}let h=d(),p=new Set;function m(){for(let e of(h=d(),p))e(h)}
203let f=a.default.createContext(null);function g(){let e=function(){let e=(0,c.useIsSSR)(),[t,n]=(0,a.useState)(h);return((0,a.useEffect)(()=>(0===p.size&&window.addEventListener("languagechange",m),p.add(n),()=>{p.delete(n),0===p.size&&window.removeEventListener("languagechange",m)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}();return(0,a.useContext)(f)||e}e.s(["useLocale",0,g],596102);var y=e.i(432433),b=e.i(551701);let v=new WeakMap;function x(e,t){let n,{locale:r}=g(),i=t&&y.LocalizedStringDictionary.getGlobalDictionaryForPackage(t)||((n=v.get(e))||(n=new(0,y.LocalizedStringDictionary)(e),v.set(e,n)),n);return(0,a.useMemo)(()=>new(0,b.LocalizedStringFormatter)(r,i),[r,i])}e.s(["useLocalizedStringFormatter",0,x],552893);let k=(0,a.createContext)(null),w=(0,a.forwardRef)(function(e,s){[e,s]=(0,t.useContextProps)(e,s,k);let{colorSwatchProps:l,color:c}=function(e){var t;let{color:s,colorName:l}=e,c=s||"#fff0",u=(0,a.useMemo)(()=>"string"==typeof c?(0,o.parseColor)(c):c,[c]),{locale:d}=g(),h=(0,r.filterDOMProps)(e,{labelable:!0}),p=x((t=n.default)&&t.__esModule?t.default:t,"@react-aria/color"),m=(0,i.useId)(e.id);return l||(l=0===u.getChannelValue("alpha")?p.format("transparent"):u.getColorName(d)),{colorSwatchProps:{...h,role:"img","aria-roledescription":p.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${m} ${e["aria-labelledby"]}`:void 0,id:m,style:{backgroundColor:u.toString("css"),forcedColorAdjust:"none"}},color:u||null}}(e),u=(0,t.useRenderProps)({...e,defaultClassName:"react-aria-ColorSwatch",defaultStyle:l.style,values:{color:c}});return a.default.createElement("div",{...l,...u,slot:e.slot||void 0,ref:s})});e.s(["ColorSwatch",0,w,"ColorSwatchContext",0,k],17250);var C={};C={"ar-AE":{colorSwatchPicker:"تغÙÙØ±Ø§Øª Ø§ÙØ£ÙÙØ§Ù",dropzoneLabel:"DropZone",selectPlaceholder:"ØØ¯Ø¯ Ø¹ÙØµØ±Ùا",tableResizer:"أداة تغÙÙØ± Ø§ÙØØ¬Ù
"},"bg-BG":{colorSwatchPicker:"ЦвеÑови моÑÑÑи",dropzoneLabel:"DropZone",selectPlaceholder:"ÐзбеÑеÑе пÑедмеÑ",tableResizer:"ÐÑеоÑазмеÑиÑел"},"cs-CZ":{colorSwatchPicker:"Vzorky barev",dropzoneLabel:"MÃsto pro pÅetaženÃ",selectPlaceholder:"Vyberte položku",tableResizer:"ZmÄna velikosti"},"da-DK":{colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"},"de-DE":{colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"GröÃenanpassung"},"el-GR":{colorSwatchPicker:"ΧÏÏμαÏικά δείγμαÏα",dropzoneLabel:"DropZone",selectPlaceholder:"ÎÏιλÎξÏε Îνα ανÏικείμενο",tableResizer:"Îλλαγή μεγÎθοÏ
Ï"},"en-US":{selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"},"es-ES":{colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artÃculo",tableResizer:"Cambiador de tamaño"},"et-EE":{colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"},"fi-FI":{colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"},"fr-FR":{colorSwatchPicker:"Ãchantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"},"he-IL":{colorSwatchPicker:"××××××ת צ××¢",dropzoneLabel:"DropZone",selectPlaceholder:"××ר פר××",tableResizer:"ש×× ×× ××××"},"hr-HR":{colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuÅ¡tanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veliÄine"},"hu-HU":{colorSwatchPicker:"SzÃntárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"ÃtméretezÅ"},"it-IT":{colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"},"ja-JP":{colorSwatchPicker:"ã«ã©ã¼ã¹ã¦ã©ãã",dropzoneLabel:"ããããã¾ã¼ã³",selectPlaceholder:"é
ç®ã鏿",tableResizer:"ãµã¤ãºå¤æ´ãã¼ã«"},"ko-KR":{colorSwatchPicker:"ìì 견본",dropzoneLabel:"ëë¡ ìì",selectPlaceholder:"í목 ì í",tableResizer:"í¬ê¸° ì¡°ì 기"},"lt-LT":{colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"âDropZoneâ",selectPlaceholder:"Pasirinkite elementÄ
",tableResizer:"Dydžio keitiklis"},"lv-LV":{colorSwatchPicker:"KrÄsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"IzvÄlÄties vienumu",tableResizer:"IzmÄra mainÄ«tÄjs"},"nb-NO":{colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"},"nl-NL":{colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"},"pl-PL":{colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"},"pt-BR":{colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"},"pt-PT":{colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"},"ro-RO":{colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"ZonÄ de plasare",selectPlaceholder:"SelectaÈi un element",tableResizer:"Instrument de redimensionare"},"ru-RU":{colorSwatchPicker:"ЦвеÑовÑе обÑазÑÑ",dropzoneLabel:"DropZone",selectPlaceholder:"ÐÑбеÑиÑе ÑлеменÑ",tableResizer:"СÑедÑÑво Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÑазмеÑа"},"sk-SK":{colorSwatchPicker:"VzorkovnÃky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"},"sl-SI":{colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"},"sr-SP":{colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veliÄine"},"sv-SE":{colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"},"tr-TR":{colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öÄe seçin",tableResizer:"Yeniden boyutlandırıcı"},"uk-UA":{colorSwatchPicker:"ÐÑазки колÑоÑÑв",dropzoneLabel:"DropZone",selectPlaceholder:"ÐибеÑÑÑÑ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ",tableResizer:"ÐаÑÑб змÑÐ½ÐµÐ½Ð½Ñ ÑозмÑÑÑ"},"zh-CN":{colorSwatchPicker:"é¢è²è²æ¿",dropzoneLabel:"æ¾ç½®åºå",selectPlaceholder:"éæ©ä¸ä¸ªé¡¹ç®",tableResizer:"å°ºå¯¸è°æ´å¨"},"zh-TW":{colorSwatchPicker:"è²ç¥¨",dropzoneLabel:"æ¾ç½®å",selectPlaceholder:"é¸åé
ç®",tableResizer:"大å°èª¿æ´å¨"}},e.s(["default",0,C],937923)},364957,e=>{"use strict";var t=e.i(271645);(0,t.createContext)(null);let n=(0,t.createContext)(null),r=(0,t.createContext)(null),i=(0,t.createContext)(null),a=(0,t.createContext)(null);(0,t.createContext)({}),e.s(["ColorAreaContext",0,n,"ColorFieldContext",0,r,"ColorSliderContext",0,i,"ColorWheelContext",0,a])},817016,e=>{"use strict";var t=e.i(624099),n=e.i(754343),r=e.i(936629),i=e.i(569080),a=e.i(271645);let o=(0,a.createContext)({}),s=(0,r.createLeafComponent)("separator",function(e,r){[e,r]=(0,t.useContextProps)(e,r,o);let{elementType:s,orientation:l,style:c,className:u,slot:d,...h}=e,p=s||"hr";"hr"===p&&"vertical"===l&&(p="div");let{separatorProps:m}
203=(0,n.useSeparator)({...h,elementType:s,orientation:l});return a.default.createElement(p,{...(0,i.filterDOMProps)(e),...m,style:c,className:null!=u?u:"react-aria-Separator",ref:r,slot:d||void 0})});e.s(["Separator",0,s,"SeparatorContext",0,o])},624099,797547,882179,174501,999661,991247,454453,720246,750179,e=>{"use strict";let t;var n=e.i(271645);function r(e){let t=(0,n.useRef)(null);return(0,n.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function i(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}}function a(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}e.s(["useObjectRef",0,r],797547),e.s(["mergeRefs",0,i],882179),e.s(["chain",0,a],174501);let o="u">typeof document?n.default.useLayoutEffect:()=>{};function s(e){let t=(0,n.useRef)(null);return o(()=>{t.current=e},[e]),(0,n.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}e.s(["useLayoutEffect",0,o],999661),e.s(["useEffectEvent",0,s],991247);let l={prefix:String(Math.round(1e10*Math.random())),current:0},c=n.default.createContext(l),u=n.default.createContext(!1);"u">typeof window&&window.document&&window.document.createElement;let d=new WeakMap,h="function"==typeof n.default.useId?function(e){let t=n.default.useId(),[r]=(0,n.useState)(g()),i=r?"react-aria":`react-aria${l.prefix}`;return e||`${i}-${t}`}:function(e){let t=(0,n.useContext)(c),r=function(e=!1){let t=(0,n.useContext)(c),r=(0,n.useRef)(null);if(null===r.current&&!e){var i,a;let e=null==(a=n.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(i=a.ReactCurrentOwner)?void 0:i.current;if(e){let n=d.get(e);null==n?d.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,d.delete(e))}r.current=++t.current}return r.current}(!!e),i=`react-aria${t.prefix}`;return e||`${i}-${r}`};function p(){return!1}function m(){return!0}function f(e){return()=>{}}function g(){return"function"==typeof n.default.useSyncExternalStore?n.default.useSyncExternalStore(f,p,m):(0,n.useContext)(u)}e.s(["useIsSSR",0,g,"useSSRSafeId",0,h],454453);let y=!!("u">typeof window&&window.document&&window.document.createElement),b=new Map;function v(e){let[r,i]=(0,n.useState)(e),a=(0,n.useRef)(null),s=h(r),l=(0,n.useRef)(null);if(t&&t.register(l,s),y){let e=b.get(s);e&&!e.includes(a)?e.push(a):b.set(s,[a])}return o(()=>()=>{t&&t.unregister(l),b.delete(s)},[s]),(0,n.useEffect)(()=>{let e=a.current;return e&&i(e),()=>{e&&(a.current=null)}}),s}function x(e,t){if(e===t)return e;let n=b.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=b.get(t);return r?(r.forEach(t=>t.current=e),e):t}"u">typeof FinalizationRegistry&&(t=new FinalizationRegistry(e=>{b.delete(e)})),e.s(["mergeIds",0,x,"useId",0,v,"useSlotId",0,function(e=[]){let t=v(),[r,i]=function(e){let[t,r]=(0,n.useState)(e),i=(0,n.useRef)(null),a=s(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}t===e.value?a():r(e.value)});o(()=>{i.current&&a()});let l=s(e=>{i.current=e(t),a()});return[t,l]}(t),a=(0,n.useCallback)(()=>{i(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,i]);return o(a,[t,a,...e]),r}],720246);var k=e.i(207670);function w(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];"function"==typeof n&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=a(n,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof i?t[e]=(0,k.default)(n,i):"id"===e&&n&&i?t.id=x(n,i):t[e]=void 0!==i?i:n}}return t}e.s(["mergeProps",0,w],750179);let C=Symbol("default");function S(e,t){let r=(0,n.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||C;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}e.s(["DEFAULT_SLOT",0,C,"Provider",0,function({values:e,children:t}){for(let[r,i]of e)t=n.default.createElement(r.Provider,{value:i},t);return t},"composeRenderProps",0,function(e,t){return n=>t("function"==typeof e?e(n):e,n)},"removeDataAttributes",0,function(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n},"useContextProps",0,function(e,t,a){let{ref:o,...s}=S(a,e.slot)||{},l=r((0,n.useMemo)(()=>i(t,o),[t,o])),c=w(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&("function"==typeof s.style||"function"==typeof e.style?c.style=t=>{let n="function"==typeof s.style?s.style(t):s.style,r={...t.defaultStyle,...n},i="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:c.style={...s.style,...e.style}),[c,l]},"useRenderProps",0,function(e){let{className:t,style:r,children:i,defaultClassName:a,defaultChildren:o,defaultStyle:s,values:l}=e;return(0,n.useMemo)(()=>{let e,n,c;return e="function"==typeof t?t({...l,defaultClassName:a}):t,n="function"==typeof r?r({...l,defaultStyle:s||{}}):r,c="function"==typeof i?i({...l,defaultChildren:o}):null==i?o:i,{className:null!=e?e:a,style:n||s?{...s,...n}:void 0,children:null!=c?c:o,"data-rac":""}},[t,r,i,a,o,s,l])}
203,"useSlot",0,function(e=!0){let[t,r]=(0,n.useState)(e),i=(0,n.useRef)(!1),a=(0,n.useCallback)(e=>{i.current=!0,r(!!e)},[]);return o(()=>{i.current||r(!1)},[]),[a,t]},"useSlottedContext",0,S],624099)},742531,997803,457579,733644,454751,436484,432066,784801,900065,586281,328010,583664,204108,35198,713059,807432,329422,878999,e=>{"use strict";var t=e.i(496481),n=e.i(420061);let r=f(/[A-Za-z]/),i=f(/[\dA-Za-z]/),a=f(/[#-'*+\--9=?A-Z^-~]/);function o(e){return null!==e&&(e<32||127===e)}let s=f(/\d/),l=f(/[\dA-Fa-f]/),c=f(/[!-/:-@[-`{-~]/);function u(e){return null!==e&&e<-2}function d(e){return null!==e&&(e<0||32===e)}function h(e){return -2===e||-1===e||32===e}let p=f(/\p{P}|\p{S}/u),m=f(/\s/);function f(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}e.s(["asciiAlpha",0,r,"asciiAlphanumeric",0,i,"asciiAtext",0,a,"asciiControl",0,o,"asciiDigit",0,s,"asciiHexDigit",0,l,"asciiPunctuation",0,c,"markdownLineEnding",0,u,"markdownLineEndingOrSpace",0,d,"markdownSpace",0,h,"unicodePunctuation",0,p,"unicodeWhitespace",0,m],997803);let g=function(e){var t,n;if(null==e)return b;if("function"==typeof e)return y(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=g(e[n]);return y(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,y(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,y(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function y(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function b(){return!0}e.s(["convert",0,g],457579);let v=[],x="skip";function k(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let a=g(i),o=r?-1:1;(function e(i,s,l){let c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){var c;let u,d,h,p=v;if((!t||a(i,s,l[l.length-1]||void 0))&&!1===(p=Array.isArray(c=n(i,l))?c:"number"==typeof c?[!0,c]:null==c?v:[c])[0])return p;if("children"in i&&i.children&&i.children&&p[0]!==x)for(d=(r?i.children.length:-1)+o,h=l.concat(i);d>-1&&d<i.children.length;){if(!1===(u=e(i.children[d],d,h)())[0])return u;d="number"==typeof u[1]?u[1]:d+o}return p}})(e,void 0,[])()}e.s(["EXIT",0,!1,"SKIP",0,x,"visitParents",0,k],733644);let w="phrasing",C=["autolink","link","image","label"];function S(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function E(e){this.config.enter.autolinkProtocol.call(this,e)}function T(e){this.config.exit.autolinkProtocol.call(this,e)}function I(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];(0,n.ok)("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function D(e){this.config.exit.autolinkEmail.call(this,e)}function N(e){this.exit(e)}function A(e){!function(e,t,n){let r=g((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),a=-1;for(;++a<i.length;)k(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){let e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,l=n.children.indexOf(e),c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,_],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,P]],{ignore:["link","linkReference"]})}function _(e,n,r,i,a){let o,s="";if(!M(a))return!1;if(/^w/i.test(n)&&(r=n+r,n="",s="http://"),(o=r.split(".")).length<2||o[o.length-1]&&(/_/.test(o[o.length-1])||!/[a-zA-Z\d]/.test(o[o.length-1]))||o[o.length-2]&&(/_/.test(o[o.length-2])||!/[a-zA-Z\d]/.test(o[o.length-2])))return!1;let l=function(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],i=r.indexOf(")"),a=(0,t.ccount)(e,"("),o=(0,t.ccount)(e,")");for(;-1!==i&&a>o;)e+=r.slice(0,i+1),i=(r=r.slice(i+1)).indexOf(")"),o++;return[e,r]}(r+i);if(!l[0])return!1;let c={type:"link",title:null,url:s+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}
203function P(e,t,n,r){return!(!M(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function M(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||m(n)||p(n))&&(!t||47!==n)}function R(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function L(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function j(){this.buffer()}function O(e){let t=this.resume(),r=this.stack[this.stack.length-1];(0,n.ok)("footnoteDefinition"===r.type),r.label=t,r.identifier=R(this.sliceSerialize(e)).toLowerCase()}function B(e){this.exit(e)}function F(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function H(){this.buffer()}function U(e){let t=this.resume(),r=this.stack[this.stack.length-1];(0,n.ok)("footnoteReference"===r.type),r.label=t,r.identifier=R(this.sliceSerialize(e)).toLowerCase()}function z(e){this.exit(e)}function $(e,t,n,r){let i=n.createTracker(r),a=i.move("[^"),o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]")}function V(e,t,n,r){let i=n.createTracker(r),a=i.move("[^"),o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),q)),o(),a}function q(e,t,n){return 0===t?e:(n?"":" ")+e}$.peek=function(){return"["};let G=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function W(e){this.enter({type:"delete",children:[]},e)}function K(e){this.exit(e)}function Y(e,t,n,r){let i=n.createTracker(r),a=n.enter("strikethrough"),o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function Z(e){return e.length}function X(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}function Q(e,t,n){return">"+(n?"":" ")+e}function J(e,t){return ee(e,t.inConstruct,!0)&&!ee(e,t.notInConstruct,!1)}function ee(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function et(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&J(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function en(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if("string"!=typeof t)throw TypeError("Expected substring");for(;-1!==r;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function er(e,t){return!!(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ei(e,t,n){return(n?"":" ")+e}function ea(e){let t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function eo(e,t,n,r){let i=function(e){let t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),a=n.enter("emphasis"),o=n.createTracker(r),s=o.move(i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function es(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),k(e,a,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}Y.peek=function(){return"~"},e.s(["patternInScope",0,J],454751),e.s(["longestStreak",0,en],436484),e.s(["formatCodeAsIndented",0,er],432066),eo.peek=function(e,t,n){return n.options.emphasis||"*"},e.s(["visit",0,es],784801);let el={};function ec(e,t){let n=t||el;return eu(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function eu(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ed(e.children,t,n)}return Array.isArray(e)?ed(e,t,n):""}function ed(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=eu(e[i],t,n);return r.join("")}function eh(e,t){let n=!1;return es(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ec(e)&&(t.options.setext||n))}function ep(e){return e.value||""}function em(e,t,n,r){let i=ea(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("image"),s=n.enter("label"),l=n.createTracker(r),c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),o(),c}function ef(e,t,n,r){let i=e.referenceType,a=n.enter("imageReference"),o=n.enter("label"),s=n.createTracker(r),l=s.move("!["),c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();let u=n.stack;n.stack=[],o=n.enter("reference");let d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function eg(e,t,n){let r=e.value||"",i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){let e,t=n.unsafe[a],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}function ey(e,t){let n=ec(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function eb(e,t,n,r){let i,a,o=ea(n),s='"'===o?"Quote":"Apostrophe",l=n.createTracker(r);if(ey(e,n)){let t=n.stack;n.stack=[],i=n.enter("autolink");let r=l.move("<");return r+=l.move(n.containerPhrasing(e,{before:r,after:">",...l.current()})),r+=l.move(">"),i(),n.stack=t,r}i=n.enter("link"),a=n.enter("label");let c=l.move("[");return c+=l.move(n.containerPhrasing(e,{before:c,after:"](",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),a()),c+=l.move(")"),i(),c}function ev(e,t,n,r){let i=e.referenceType,a=n.enter("linkReference"),o=n.enter("label"),s=n.createTracker(r),l=s.move("["),c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();let u=n.stack;n.stack=[],o=n.enter("reference");let d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function ex(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ek(e){let t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}e.s(["toString",0,ec],900065),e.s(["formatHeadingAsSetext",0,eh],586281),ep.peek=function(){return"<"},em.peek=function(){return"!"},ef.peek=function(){return"!"},eg.peek=function(){return"`"},eb.peek=function(e,t,n){return ey(e,n)?"<":"["},ev.peek=function(){return"["};let ew=g(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function eC(e,t,n,r){let i=function(e){let t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}e.s(["phrasing",0,ew],328010),eC.peek=function(e,t,n){return n.options.strong||"*"};let eS={blockquote:function(e,t,n,r){let i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Q);return i(),o},break:et,code:function(e,t,n,r){let i=function(e){let t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",o="`"===i?"GraveAccent":"Tilde";
203if(er(e,n)){let e=n.enter("codeIndented"),t=n.indentLines(a,ei);return e(),t}let s=n.createTracker(r),l=i.repeat(Math.max(en(a,i)+1,3)),c=n.enter("codeFenced"),u=s.move(l);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),a&&(u+=s.move(a+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){let i=ea(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("definition"),s=n.enter("label"),l=n.createTracker(r),c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),o(),c},emphasis:eo,hardBreak:et,heading:function(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(eh(e,n)){let t=n.enter("headingSetext"),r=n.enter("phrasing"),o=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),o+"\n"+(1===i?"=":"-").repeat(o.length-(Math.max(o.lastIndexOf("\r"),o.lastIndexOf("\n"))+1))}let o="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),s(),c},html:ep,image:em,imageReference:ef,inlineCode:eg,link:eb,linkReference:ev,list:function(e,t,n,r){let i=n.enter("list"),a=n.bulletCurrent,o=e.ordered?function(e){let t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):ex(n),s=e.ordered?"."===o?")":".":function(e){let t=ex(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n),l=!!t&&!!n.bulletLastUsed&&o===n.bulletLastUsed;if(!e.ordered){let t=e.children?e.children[0]:void 0;if("*"!==o&&"-"!==o||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),ek(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;let c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c},listItem:function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),a=n.bulletCurrent||ex(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);let l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?a:a+" ".repeat(o-a.length))+e});return l(),c},paragraph:function(e,t,n,r){let i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o},root:function(e,t,n,r){return(e.children.some(function(e){return ew(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:eC,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){let r=(ek(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function eE(e){let t=e._align;(0,n.ok)(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function eT(e){this.exit(e),this.data.inTable=void 0}function eI(e){this.enter({type:"tableRow",children:[]},e)}function eD(e){this.exit(e)}function eN(e){this.enter({type:"tableCell",children:[]},e)}function eA(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,e_));let r=this.stack[this.stack.length-1];(0,n.ok)("inlineCode"===r.type),r.value=t,this.exit(e)}function e_(e,t){return"|"===t?t:e}function eP(e){let t=this.stack[this.stack.length-2];(0,n.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function eM(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];(0,n.ok)("paragraph"===e.type);let r=e.children[0];if(r&&"text"===r.type){let n,i=t.children,a=-1;for(;++a<i.length;){let e=i[a];if("paragraph"===e.type){n=e;break}}n===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function eR(e,t,n,r){let i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);
203let l=eS.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),l}function eL(e,t,n,r){let i,a=e.length,o=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function ej(e,t){return e.length>0?(eL(e,e.length,0,t),e):t}e.s(["handle",0,eS],583664);let eO={}.hasOwnProperty;function eB(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(eO.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];if(a)for(r in a){eO.call(i,r)||(i[r]=[]);let e=a[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);eL(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let eF={tokenize:function(e,t,n){let r=0;return function t(a){return(87===a||119===a)&&r<3?(r++,e.consume(a),t):46===a&&3===r?(e.consume(a),i):n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},eH={tokenize:function(e,t,n){let r,i,a;return o;function o(t){return 46===t||95===t?e.check(ez,l,s)(t):null===t||d(t)||m(t)||45!==t&&p(t)?l(t):(a=!0,e.consume(t),o)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function l(e){return i||r||!a?n(e):t(e)}},partial:!0},eU={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(ez,t,a)(o):null===o||d(o)||m(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},ez={tokenize:function(e,t,n){return i;function i(r){return 33===r||34===r||39===r||41===r||42===r||44===r||46===r||58===r||59===r||63===r||95===r||126===r?(e.consume(r),i):38===r?(e.consume(r),o):93===r?(e.consume(r),a):60===r||null===r||d(r)||m(r)?t(r):n(r)}function a(e){return null===e||40===e||91===e||d(e)||m(e)?t(e):i(e)}function o(t){return r(t)?function t(a){return 59===a?(e.consume(a),i):r(a)?(e.consume(a),t):n(a)}(t):n(t)}},partial:!0},e$={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return i(e)?n(e):t(e)}},partial:!0},eV={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!eY.call(r,r.previous)||eJ(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(eF,e.attempt(eH,e.attempt(eU,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:eY},eq={name:"protocolAutolink",tokenize:function(e,t,n){let i=this,a="",s=!1;return function(t){return(72===t||104===t)&&eZ.call(i,i.previous)&&!eJ(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),l):n(t)};function l(t){if(r(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),l;if(58===t){let n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),c}return n(t)}function c(t){return 47===t?(e.consume(t),s)?u:(s=!0,c):n(t)}function u(t){return null===t||o(t)||d(t)||m(t)||p(t)?n(t):e.attempt(eH,e.attempt(eU,h),n)(t)}function h(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:eZ},eG={name:"emailAutolink",tokenize:function(e,t,n){let a,o,s=this;return function(t){return!eQ(t)||!eX.call(s,s.previous)||eJ(s.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return eQ(r)?(e.consume(r),t):64===r?(e.consume(r),l):n(r)}(t))};function l(t){return 46===t?e.check(e$,u,c)(t):45===t||95===t||i(t)?(o=!0,e.consume(t),l):u(t)}function c(t){return e.consume(t),a=!0,l}function u(i){return o&&a&&r(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:eX},eW={},eK=48;for(;eK<123;)eW[eK]=eG,58==++eK?eK=65:91===eK&&(eK=97);function eY(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||d(e)}function eZ(e){return!r(e)}function eX(e){return!(47===e||eQ(e))}function eQ(e){return 43===e||45===e||46===e||95===e||i(e)}function eJ(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function e1(e,t,n,r){let i=r?r-1:1/0,a=0;return function(r){return h(r)?(e.enter(n),function r(o){return h(o)&&a++<i?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}eW[43]=eG,eW[45]=eG,eW[46]=eG,eW[95]=eG,eW[72]=[eG,eq],eW[104]=[eG,eq],eW[87]=[eG,eV],eW[119]=[eG,eV],e.s(["factorySpace",0,e1],204108);let e0={tokenize:function(e,t,n){return function(t){return h(t)?e1(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||u(e)?t(e):n(e)}},partial:!0},e2={tokenize:function(e,t,n){let r=this;return e1(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function e4(e,t,n){let r,i=this,a=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;a--;){let e=i.events[a][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}
203return function(a){if(!r||!r._balanced)return n(a);let s=R(i.sliceSerialize({start:r.end,end:i.now()}));return 94===s.codePointAt(0)&&o.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)):n(a)}}function e3(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function e5(e,t,n){let r,i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(o>999||93===s&&!r||null===s||91===s||d(s))return n(s);if(93===s){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return a.includes(R(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return d(s)||(r=!0),o++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),o++,l):l(t)}}function e6(e,t,n){let r,i,a=this,o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||d(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=R(a.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return d(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(r)||o.push(r),e1(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function e7(e,t,n){return e.check(e0,t,e.attempt(e2,t,n))}function e8(e){e.exit("gfmFootnoteDefinition")}function e9(e){return null===e||d(e)||m(e)?1:p(e)?2:void 0}function te(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}class tt{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function tn(e,t,n){let r,i=this,a=0,o=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,a="tableHead"===r||"tableRow"===r?k:s;return a===k&&i.parser.lazy[i.now().line]?n(e):a(e)};function s(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,o+=1),l(n)}function l(t){return null===t?n(t):u(t)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m):n(t):h(t)?e1(e,l,"whitespace")(t):(o+=1,r&&(r=!1,a+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,l):(e.enter("data"),c(t))}function c(t){return null===t||124===t||d(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?p:c)}function p(t){return 92===t||124===t?(e.consume(t),c):c(t)}function m(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,h(t))?e1(e,f,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t)}
203function f(t){return 45===t||58===t?y(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),g):n(t)}function g(t){return h(t)?e1(e,y,"whitespace")(t):y(t)}function y(t){return 58===t?(o+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):45===t?(o+=1,b(t)):null===t||u(t)?x(t):n(t)}function b(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(n))}(t)):n(t)}function v(t){return h(t)?e1(e,x,"whitespace")(t):x(t)}function x(i){if(124===i)return f(i);if(null===i||u(i))return r&&a===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function k(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||u(n)?(e.exit("tableRow"),t(n)):h(n)?e1(e,w,"whitespace")(n):(e.enter("data"),C(n))}function C(t){return null===t||124===t||d(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?S:C)}function S(t){return 92===t||124===t?(e.consume(t),C):C(t)}}function tr(e,t){let n,r,i,a=-1,o=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0,h=new tt;for(;++a<e.length;){let p=e[a],m=p[1];"enter"===p[0]?"tableHead"===m.type?(u=!1,0!==d&&(ta(h,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(a,0,[["enter",n,t]])):"tableRow"===m.type||"tableDelimiterRow"===m.type?(o=!0,i=void 0,l=[0,0,0,0],c=[0,a+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(a,0,[["enter",r,t]])),s="tableDelimiterRow"===m.type?2:r?3:1):s&&("data"===m.type||"tableDelimiterMarker"===m.type||"tableDelimiterFiller"===m.type)?(o=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=ti(h,t,l,s,void 0,i),l=[0,0,0,0]),c[2]=a)):"tableCellDivider"===m.type&&(o?o=!1:(0!==l[1]&&(c[0]=c[1],i=ti(h,t,l,s,void 0,i)),c=[(l=c)[1],a,0,0])):"tableHead"===m.type?(u=!0,d=a):"tableRow"===m.type||"tableDelimiterRow"===m.type?(d=a,0!==l[1]?(c[0]=c[1],i=ti(h,t,l,s,a,i)):0!==c[1]&&(i=ti(h,t,c,s,a,i)),s=0):s&&("data"===m.type||"tableDelimiterMarker"===m.type||"tableDelimiterFiller"===m.type)&&(c[3]=a)}for(0!==d&&ta(h,t,d,n,r),h.consume(t.events),a=-1;++a<t.events.length;){let e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,a))}return e}function ti(e,t,n,r,i,a){0!==n[0]&&(a.end=Object.assign({},to(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));let o=to(t.events,n[1]);if(a={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){let i=to(t.events,n[2]),a=to(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},to(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ta(e,t,n,r,i){let a=[],o=to(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function to(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let ts={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return d(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return u(r)?t(r):h(r)?e.check({tokenize:tl},t,n)(r):n(r)}}};function tl(e,t,n){return e1(e,function(e){return null===e?n(e):t(e)},"whitespace")}let tc={};e.s(["default",0,function(e){let t,n,r=e||tc,i=this.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),s=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(eB([{text:eW},{document:{91:{name:"gfmFootnoteDefinition",tokenize:e6,continuation:{tokenize:e7},exit:e8}},text:{91:{name:"gfmFootnoteCall",tokenize:e5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:e4,resolveTo:e3}}},(t=(r||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,a=this.events,o=0;return function(s){return 126===i&&"characterEscape"!==a[a.length-1][1].type?r(s):(e.enter("strikethroughSequenceTemporary"),function a(s){let l=e9(i);if(126===s)return o>1?r(s):(e.consume(s),o++,a);if(o<2&&!t)return r(s);let c=e.exit("strikethroughSequenceTemporary"),u=e9(s);return c._open=!u||2===u&&!!l,c._close=!l||2===l&&!!u,n(s)}(s))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&eL(o,o.length,0,te(s,e.slice(r+1,n),t)),eL(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eL(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:tn,resolveAll:tr}}},{text:{91:ts}}
203])),o.push([{transforms:[A],enter:{literalAutolink:S,literalAutolinkEmail:E,literalAutolinkHttp:E,literalAutolinkWww:E},exit:{literalAutolink:N,literalAutolinkEmail:D,literalAutolinkHttp:T,literalAutolinkWww:I}},{enter:{gfmFootnoteDefinition:L,gfmFootnoteDefinitionLabelString:j,gfmFootnoteCall:F,gfmFootnoteCallString:H},exit:{gfmFootnoteDefinition:B,gfmFootnoteDefinitionLabelString:O,gfmFootnoteCall:z,gfmFootnoteCallString:U}},{canContainEols:["delete"],enter:{strikethrough:W},exit:{strikethrough:K}},{enter:{table:eE,tableData:eN,tableHeader:eN,tableRow:eI},exit:{codeText:eA,table:eT,tableData:eD,tableHeader:eD,tableRow:eD}},{exit:{taskListCheckValueChecked:eP,taskListCheckValueUnchecked:eP,paragraph:eM}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:w,notInConstruct:C},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:w,notInConstruct:C},{character:":",before:"[ps]",after:"\\/",inConstruct:w,notInConstruct:C}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:V,footnoteReference:$}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:G}],handlers:{delete:Y}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=eS.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){let r=e.children,i=-1,a=[],o=t.enter("table");for(;++i<r.length;)a[i]=l(r[i],t,n);return o(),a}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){let i=s([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function s(e,t){return function(e,t={}){let n=(t.align||[]).concat(),r=t.stringLength||Z,i=[],a=[],o=[],s=[],l=0,c=-1;for(;++c<e.length;){let n=[],i=[],d=-1;for(e[c].length>l&&(l=e[c].length);++d<e[c].length;){var u;let a=null==(u=e[c][d])?"":String(u);if(!1!==t.alignDelimiters){let e=r(a);i[d]=e,(void 0===s[d]||e>s[d])&&(s[d]=e)}n.push(a)}a[c]=n,o[c]=i}let d=-1;if("object"==typeof n&&"length"in n)for(;++d<l;)i[d]=X(n[d]);else{let e=X(n);for(;++d<l;)i[d]=e}d=-1;let h=[],p=[];for(;++d<l;){let e=i[d],n="",r="";99===e?(n=":",r=":"):108===e?n=":":114===e&&(r=":");let a=!1===t.alignDelimiters?1:Math.max(1,s[d]-n.length-r.length),o=n+"-".repeat(a)+r;!1!==t.alignDelimiters&&((a=n.length+a+r.length)>s[d]&&(s[d]=a),p[d]=a),h[d]=o}a.splice(1,0,h),o.splice(1,0,p),c=-1;let m=[];for(;++c<a.length;){let e=a[c],n=o[c];d=-1;let r=[];for(;++d<l;){let a=e[d]||"",o="",c="";if(!1!==t.alignDelimiters){let e=s[d]-(n[d]||0),t=i[d];114===t?o=" ".repeat(e):99===t?e%2?(o=" ".repeat(e/2+.5),c=" ".repeat(e/2-.5)):c=o=" ".repeat(e/2):c=" ".repeat(e)}!1===t.delimiterStart||d||r.push("|"),!1!==t.padding&&(!1!==t.alignDelimiters||""!==a)&&(!1!==t.delimiterStart||d)&&r.push(" "),!1!==t.alignDelimiters&&r.push(o),r.push(a),!1!==t.alignDelimiters&&r.push(c),!1!==t.padding&&r.push(" "),(!1!==t.delimiterEnd||d!==l-1)&&r.push("|")}m.push(!1===t.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){let r=e.children,i=-1,a=[],s=t.enter("tableRow");for(;++i<r.length;)a[i]=o(r[i],e,t,n);return s(),a}}(r),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:eR}}]})}],742531);let tu={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e1(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return u(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},td={tokenize:function(e){let t,n,r,i=this,a=[],o=0;return s;function s(t){if(o<a.length){let n=a[o];return i.containerState=n[1],e.attempt(n[0].continuation,l,c)(t)}return c(t)}function l(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&b();let r=i.events.length,a=r;for(;a--;)if("exit"===i.events[a][0]&&"chunkFlow"===i.events[a][1].type){n=i.events[a][1].end;break}y(o);let s=r;for(;s<i.events.length;)i.events[s][1].end=Object.assign({},n),s++;return eL(i.events,a+1,0,i.events.slice(r)),i.events.length=s,c(e)}return s(e)}function c(n){if(o===a.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return f(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(th,d,h)(n)}function d(e){return t&&b(),y(o),p(e)}function h(e){return i.parser.lazy[i.now().line]=o!==a.length,r=i.now().offset,f(e)}function p(t){return i.containerState={},e.attempt(th,m,f)(t)}function m(e){return o++,a.push([i.currentConstruct,i.containerState]),p(e)}function f(r){if(null===r){t&&b(),y(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),function t(n){if(null===n){g(e.exit("chunkFlow"),!0),y(0),e.consume(n);return}return u(n)?(e.consume(n),g(e.exit("chunkFlow")),o=0,i.interrupt=void 0,s):(e.consume(n),t)}(r)}function g(e,a){let s=i.sliceStream(e);
203if(a&&s.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(s),i.parser.lazy[e.start.line]){let e,n,a=t.events.length;for(;a--;)if(t.events[a][1].start.offset<r&&(!t.events[a][1].end||t.events[a][1].end.offset>r))return;let s=i.events.length,l=s;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){if(e){n=i.events[l][1].end;break}e=!0}for(y(o),a=s;a<i.events.length;)i.events[a][1].end=Object.assign({},n),a++;eL(i.events,l+1,0,i.events.slice(s)),i.events.length=a}}function y(t){let n=a.length;for(;n-- >t;){let t=a[n];i.containerState=t[1],t[0].exit.call(i,e)}a.length=t}function b(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},th={tokenize:function(e,t,n){return e1(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};class tp{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&tm(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),tm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),tm(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);tm(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);tm(this.left,t.reverse())}}}function tm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function tf(e){let t,n,r,i,a,o,s,l={},c=-1,u=new tp(e);for(;++c<u.length;){for(;c in l;)c=l[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,function(e,t){let n,r,i=e.get(t)[1],a=e.get(t)[2],o=t-1,s=[],l=i._tokenizer||a.parser[i.contentType](i.start),c=l.events,u=[],d={},h=-1,p=i,m=0,f=0,g=[0];for(;p;){for(;e.get(++o)[1]!==p;);s.push(o),!p._tokenizer&&(n=a.sliceStream(p),p.next||n.push(null),r&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++h<c.length;)"exit"===c[h][0]&&"enter"===c[h-1][0]&&c[h][1].type===c[h-1][1].type&&c[h][1].start.line!==c[h][1].end.line&&(f=h+1,g.push(f),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){let t=c.slice(g[h],g[h+1]),n=s.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),h=-1;++h<u.length;)d[m+u[h][0]]=m+u[h][1],m+=u[h][1]-u[h][0]-1;return d}(u,c)),c=l[c],s=!0);else if(t[1]._container){for(r=c,n=void 0;r--;)if("lineEnding"===(i=u.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(u.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else break;n&&(t[1].end=Object.assign({},u.get(n)[1].start),(a=u.slice(n,c)).unshift(t),u.splice(n,c-n+1,a))}}return eL(e,0,1/0,u.slice(0)),!s}let tg={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):u(t)?e.check(ty,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return tf(e),e}},ty={tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e1(e,i,"linePrefix")};function i(i){if(null===i||u(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0},tb={tokenize:function(e){let t=this,n=e.attempt(e0,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,e1(e,e.attempt(this.parser.constructs.flow,r,e.attempt(tg,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},tv={resolveAll:tC()},tx=tw("string"),tk=tw("text");function tw(e){return{tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),s)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:tC("text"===e?tS:void 0)}}function tC(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function tS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],a=t.sliceStream(i),o=a.length,s=-1,l=0;for(;o--;){let e=a[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)r=!0,l++;else if(-1===e);else{o++;break}}if(l){let a={type:n===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-l,offset:i.end.offset-l,_index:i.start._index+o,_bufferIndex:o?s:i.start._bufferIndex+s},end:Object.assign({},i.end)};i.end=Object.assign({},a.start),i.start.offset===i.end.offset?Object.assign(i,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}let tE={name:"attention",tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,a=e9(i);return function(o){return n=o,e.enter("attentionSequence"),function o(s){if(s===n)return e.consume(s),o;let l=e.exit("attentionSequence"),c=e9(s),u=!c||2===c&&a||r.includes(s),d=!a||2===a&&c||r.includes(i);return l._open=!!(42===n?u:u&&(a||!d)),l._close=!!(42===n?d:d&&(c||!u)),t(s)}(o)}},resolveAll:function(e,t){let n,r,i,a,o,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
203n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d=Object.assign({},e[n][1].end),h=Object.assign({},e[u][1].start);tT(d,-s),tT(h,s),a={type:s>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},o={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:s>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},a.start),e[u][1].start=Object.assign({},o.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=ej(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=ej(l,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=ej(l,te(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=ej(l,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=ej(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,eL(e,n-1,u-n+3,l),u=n+l.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function tT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let tI={name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return h(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){let r=this;return function(t){return h(t)?e1(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(tI,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}},tD={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return c(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},tN=document.createElement("i");function tA(e){let t="&"+e+";";tN.innerHTML=t;let n=tN.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let t_={name:"characterReference",tokenize:function(e,t,n){let r,a,o=this,c=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),u};function u(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),r=31,a=i,h(t))}function d(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,a=l,h):(e.enter("characterReferenceValue"),r=7,a=s,h(t))}function h(s){if(59===s&&c){let r=e.exit("characterReferenceValue");return a!==i||tA(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&c++<r?(e.consume(s),h):n(s)}}},tP={tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},tM={name:"codeFenced",tokenize:function(e,t,n){let r,i=this,a={tokenize:function(e,t,n){let a=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),h(t)?e1(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}
203function l(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a>=s?(e.exit("codeFencedFenceSequence"),h(i)?e1(e,c,"whitespace")(i):c(i)):n(i)}(t)):n(t)}function c(r){return null===r||u(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},o=0,s=0;return function(t){var a;let c;return a=t,o=(c=i.events[i.events.length-1])&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=a,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(s++,e.consume(i),t):s<3?n(i):(e.exit("codeFencedFenceSequence"),h(i)?e1(e,l,"whitespace")(i):l(i))}(a)};function l(a){return null===a||u(a)?(e.exit("codeFencedFence"),i.interrupt?t(a):e.check(tP,d,g)(a)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||u(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(i)):h(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),e1(e,c,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(a))}function c(t){return null===t||u(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||u(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function d(t){return e.attempt(a,g,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return o>0&&h(t)?e1(e,f,"linePrefix",o+1)(t):f(t)}function f(t){return null===t||u(t)?e.check(tP,d,g)(t):(e.enter("codeFlowValue"),function t(n){return null===n||u(n)?(e.exit("codeFlowValue"),f(n)):(e.consume(n),t)}(t))}function g(n){return e.exit("codeFenced"),t(n)}},concrete:!0},tR={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),e1(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?a(n):u(n)?e.attempt(tL,t,a)(n):(e.enter("codeFlowValue"),function n(r){return null===r||u(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function a(n){return e.exit("codeIndented"),t(n)}}},tL={tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):u(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):e1(e,a,"linePrefix",5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):u(e)?i(e):n(e)}},partial:!0};function tj(e,t,n,r,i,a,s,l,c){let h=c||1/0,p=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),m):null===t||32===t||41===t||o(t)?n(t):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(t))};function m(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(l),m(t)):null===t||60===t||u(t)?n(t):(e.consume(t),92===t?g:f)}function g(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function y(i){return!p&&(null===i||41===i||d(i))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(i)):p<h&&40===i?(e.consume(i),p++,y):41===i?(e.consume(i),p--,y):null===i||32===i||40===i||o(i)?n(i):(e.consume(i),92===i?b:y)}function b(t){return 40===t||41===t||92===t?(e.consume(t),y):y(t)}}function tO(e,t,n,r,i,a){let o,s=this,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),c};function c(h){return l>999||null===h||91===h||93===h&&!o||94===h&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):93===h?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):u(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(t){return null===t||91===t||93===t||u(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!h(t)),92===t?p:d)}function p(t){return 91===t||92===t||93===t?(e.consume(t),l++,d):d(t)}}function tB(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s):n(t)};function s(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),s(o)):null===t?n(t):u(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e1(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||u(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?d:c)}function d(t){return t===o||92===t?(e.consume(t),c):c(t)}}function tF(e,t){let n;return function r(i){return u(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):h(i)?e1(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}let tH={tokenize:function(e,t,n){return function(t){return d(t)?tF(e,r)(t):n(t)};function r(t){return tB(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return h(t)?e1(e,a,"whitespace")(t):a(t)}function a(e){return null===e||u(e)?t(e):n(e)}},partial:!0},tU=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],tz=["pre","script","style","textarea"],t$={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(e0,t,n)}},partial:!0},tV={tokenize:function(e,t,n){let r=this;return function(t){return u(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},tq={name:"labelEnd",tokenize:function(e,t,n){let r,i,a=this,o=a.events.length;for(;o--;)if(("labelImage"===a.events[o][1].type||"labelLink"===a.events[o][1].type)&&!a.events[o][1]._balanced){r=a.events[o][1];break}return function(t){return r?r._inactive?u(t):(i=a.parser.defined.includes(R(a.sliceSerialize({start:r.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(tG,c,i?c:u)(t):91===t?e.attempt(tW,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(tK,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,i,a,o=e.length,s=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=o);let l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},u={type:"labelText",start:Object.assign({},e[r+s+2][1].end),end:Object.assign({},e[i-2][1].start)};
203return a=ej(a=[["enter",l,t],["enter",c,t]],e.slice(r+1,r+s+3)),a=ej(a,[["enter",u,t]]),a=ej(a,te(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),a=ej(a,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),a=ej(a,e.slice(i+1)),a=ej(a,[["exit",l,t]]),eL(e,r,e.length,a),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){let n=e[t][1];("labelImage"===n.type||"labelLink"===n.type||"labelEnd"===n.type)&&(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},tG={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return d(t)?tF(e,i)(t):i(t)}function i(t){return 41===t?c(t):tj(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return d(t)?tF(e,s)(t):c(t)}function o(e){return n(e)}function s(t){return 34===t||39===t||40===t?tB(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return d(t)?tF(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},tW={tokenize:function(e,t,n){let r=this;return function(t){return tO.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(R(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},tK={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},tY={name:"labelStartImage",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:tq.resolveAll},tZ={name:"labelStartLink",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:tq.resolveAll}
203,tX={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e1(e,t,"linePrefix")}}},tQ={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(a){var o;return e.enter("thematicBreak"),r=o=a,function a(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),h(n)?e1(e,a,"whitespace")(n):a(n))}(o)):i>=3&&(null===o||u(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},tJ={name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:s(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(tQ,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return s(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),l(i)):n(i)}(t)}return n(t)};function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(e0,r.interrupt?n:c,e.attempt(t1,d,u))}
203function c(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return h(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(e0,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,e1(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!h(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(t0,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,e1(e,e.attempt(tJ,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},t1={tokenize:function(e,t,n){let r=this;return e1(e,function(e){let i=r.events[r.events.length-1];return!h(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},t0={tokenize:function(e,t,n){let r=this;return e1(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)},partial:!0},t2={name:"setextUnderline",tokenize:function(e,t,n){let r,i=this;return function(t){var o;let s,l=i.events.length;for(;l--;)if("lineEnding"!==i.events[l][1].type&&"linePrefix"!==i.events[l][1].type&&"content"!==i.events[l][1].type){s="paragraph"===i.events[l][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||s)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),h(n)?e1(e,a,"lineSuffix")(n):a(n))}(o)):n(t)};function a(r){return null===r||u(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);let o={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=o,e.push(["exit",o,t]),e}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,tO.call(i,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function a(t){return(r=R(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return d(t)?tF(e,s)(t):s(t)}function s(t){return tj(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(tH,c,c)(t)}function c(t){return h(t)?e1(e,p,"whitespace")(t):p(t)}function p(a){return null===a||u(a)?(e.exit("definition"),i.parser.defined.push(r),t(a)):n(a)}}}},"disable",0,{null:[]},"document",0,{42:tJ,43:tJ,45:tJ,48:tJ,49:tJ,50:tJ,51:tJ,52:tJ,53:tJ,54:tJ,55:tJ,56:tJ,57:tJ,62:tI},"flow",0,{35:{name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(i){var a;return e.enter("atxHeading"),a=i,e.enter("atxHeadingSequence"),function i(a){return 35===a&&r++<6?(e.consume(a),i):null===a||d(a)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||u(r)?(e.exit("atxHeading"),t(r)):h(r)?e1(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||d(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(a)):n(a)}(a)}},resolve:function(e,t){let n,r,i=e.length-2,a=3;return"whitespace"===e[3][1].type&&(a+=2),i-2>a&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4),i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},eL(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},42:tQ,45:[t2,tQ],60:{name:"htmlFlow",tokenize:function(e,t,n){let a,o,s,l,c,p=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),m};function m(i){return 33===i?(e.consume(i),f):47===i?(e.consume(i),o=!0,b):63===i?(e.consume(i),a=3,p.interrupt?t:O):r(i)?(e.consume(i),s=String.fromCharCode(i),v):n(i)}function f(i){return 45===i?(e.consume(i),a=2,g):91===i?(e.consume(i),a=5,l=0,y):r(i)?(e.consume(i),a=4,p.interrupt?t:O):n(i)}function g(r){return 45===r?(e.consume(r),p.interrupt?t:O):n(r)}function y(r){let i="CDATA[";return r===i.charCodeAt(l++)?(e.consume(r),l===i.length)?p.interrupt?t:N:y:n(r)}function b(t){return r(t)?(e.consume(t),s=String.fromCharCode(t),v):n(t)}function v(r){if(null===r||47===r||62===r||d(r)){let i=47===r,l=s.toLowerCase();return!i&&!o&&tz.includes(l)?(a=1,p.interrupt?t(r):N(r)):tU.includes(s.toLowerCase())?(a=6,i)?(e.consume(r),x):p.interrupt?t(r):N(r):(a=7,p.interrupt&&!p.parser.lazy[p.now().line]?n(r):o?function t(n){return h(n)?(e.consume(n),t):I(n)}(r):k(r))}return 45===r||i(r)?(e.consume(r),s+=String.fromCharCode(r),v):n(r)}function x(r){return 62===r?(e.consume(r),p.interrupt?t:N):n(r)}function k(t){return 47===t?(e.consume(t),I):58===t||95===t||r(t)?(e.consume(t),w):h(t)?(e.consume(t),k):I(t)}function w(t){return 45===t||46===t||58===t||95===t||i(t)?(e.consume(t),w):C(t)}function C(t){return 61===t?(e.consume(t),S):h(t)?(e.consume(t),C):k(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,E):h(t)?(e.consume(t),S):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||d(n)?C(n):(e.consume(n),t)}(t)}function E(t){return t===c?(e.consume(t),c=null,T):null===t||u(t)?n(t):(e.consume(t),E)}function T(e){return 47===e||62===e||h(e)?k(e):n(e)}function I(t){return 62===t?(e.consume(t),D):n(t)}function D(t){return null===t||u(t)?N(t):h(t)?(e.consume(t),D):n(t)}function N(t){return 45===t&&2===a?(e.consume(t),M):60===t&&1===a?(e.consume(t),R):62===t&&4===a?(e.consume(t),B):63===t&&3===a?(e.consume(t),O):93===t&&5===a?(e.consume(t),j):u(t)&&(6===a||7===a)?(e.exit("htmlFlowData"),e.check(t$,F,A)(t)):null===t||u(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),N)}function A(t){return e.check(tV,_,F)(t)}function _(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||u(t)?A(t):(e.enter("htmlFlowData"),N(t))}function M(t){return 45===t?(e.consume(t),O):N(t)}function R(t){return 47===t?(e.consume(t),s="",L):N(t)}function L(t){if(62===t){let n=s.toLowerCase();return tz.includes(n)?(e.consume(t),B):N(t)}return r(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),L):N(t)}function j(t){return 93===t?(e.consume(t),O):N(t)}function O(t){return 62===t?(e.consume(t),B):45===t&&2===a?(e.consume(t),O):N(t)}function B(t){return null===t||u(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),B)}function F(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},61:t2,95:tQ,96:tM,126:tM},"flowInitial",0,{[-2]:tR,[-1]:tR,32:tR},"insideSpan",0,{null:[tE,tv]},"string",0,{38:t_,92:tD},"text",0,{[-5]:tX,[-4]:tX,[-3]:tX,33:tY,38:t_,42:tE,60:[{name:"autolink",tokenize:function(e,t,n){let s=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return r(t)?(e.consume(t),c):64===t?n(t):d(t)}function c(t){return 43===t||45===t||46===t||i(t)?(s=1,function t(n){return 58===n?(e.consume(n),s=0,u):(43===n||45===n||46===n||i(n))&&s++<32?(e.consume(n),t):(s=0,d(n))}(t)):d(t)}function u(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||o(r)?n(r):(e.consume(r),u)}function d(t){return 64===t?(e.consume(t),h):a(t)?(e.consume(t),d):n(t)}function h(r){return i(r)?function r(a){return 46===a?(e.consume(a),s=0,h):62===a?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(a),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(a){if((45===a||i(a))&&s++<63){let n=45===a?t:r;return e.consume(a),n}return n(a)}(a)}(r):n(r)}}},{name:"htmlText",tokenize:function(e,t,n){let a,o,s,l=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),c};function c(t){return 33===t?(e.consume(t),p):47===t?(e.consume(t),E):63===t?(e.consume(t),C):r(t)?(e.consume(t),I):n(t)}function p(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),o=0,b):r(t)?(e.consume(t),w):n(t)}function m(t){return 45===t?(e.consume(t),y):n(t)}function f(t){return null===t?n(t):45===t?(e.consume(t),g):u(t)?(s=f,L(t)):(e.consume(t),f)}function g(t){return 45===t?(e.consume(t),y):f(t)}function y(e){return 62===e?R(e):45===e?g(e):f(e)}function b(t){let r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),o===r.length?v:b):n(t)}function v(t){return null===t?n(t):93===t?(e.consume(t),x):u(t)?(s=v,L(t)):(e.consume(t),v)}function x(t){return 93===t?(e.consume(t),k):v(t)}function k(t){return 62===t?R(t):93===t?(e.consume(t),k):v(t)}function w(t){return null===t||62===t?R(t):u(t)?(s=w,L(t)):(e.consume(t),w)}function C(t){return null===t?n(t):63===t?(e.consume(t),S):u(t)?(s=C,L(t)):(e.consume(t),C)}function S(e){return 62===e?R(e):C(e)}function E(t){return r(t)?(e.consume(t),T):n(t)}function T(t){return 45===t||i(t)?(e.consume(t),T):function t(n){return u(n)?(s=t,L(n)):h(n)?(e.consume(n),t):R(n)}(t)}function I(t){return 45===t||i(t)?(e.consume(t),I):47===t||62===t||d(t)?D(t):n(t)}function D(t){return 47===t?(e.consume(t),R):58===t||95===t||r(t)?(e.consume(t),N):u(t)?(s=D,L(t)):h(t)?(e.consume(t),D):R(t)}function N(t){return 45===t||46===t||58===t||95===t||i(t)?(e.consume(t),N):function t(n){return 61===n?(e.consume(n),A):u(n)?(s=t,L(n)):h(n)?(e.consume(n),t):D(n)}(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,_):u(t)?(s=A,L(t)):h(t)?(e.consume(t),A):(e.consume(t),P)}function _(t){return t===a?(e.consume(t),a=void 0,M):null===t?n(t):u(t)?(s=_,L(t)):(e.consume(t),_)}function P(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||d(t)?D(t):(e.consume(t),P)}function M(e){return 47===e||62===e||d(e)?D(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function L(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),j}function j(t){return h(t)?e1(e,O,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),s(t)}}}],91:tZ,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return u(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},tD],93:tq,95:tE,96:{name:"codeText",tokenize:function(e,t,n){let r,i,a=0;
203return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),a++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(l){return null===l?n(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),o):96===l?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",s(o))}(l)):u(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):(e.enter("codeTextData"),s(l))}function s(t){return null===t||32===t||96===t||u(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),s)}},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}}}],304127);var t4=e.i(304127);let t3=/[\0\t\n\r]/g;function t5(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let t6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function t7(e){return e.replace(t6,t8)}function t8(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return t5(n.slice(t?2:1),t?16:10)}return tA(n)||e}e.s(["decodeString",0,t7],35198);var t9=e.i(834425);let ne={}.hasOwnProperty;function nt(e){return{line:e.line,column:e.column,offset:e.offset}}function nn(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+(0,t9.stringifyPosition)({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+(0,t9.stringifyPosition)({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+(0,t9.stringifyPosition)({start:t.start,end:t.end})+") is still open")}e.s(["default",0,function(e){let t=this;t.parser=function(n){var r,i;let a,o,s,l;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(m),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(p),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(p,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:c,data:c,codeFlowValue:c,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(f),hardBreakTrailing:r(f),htmlFlow:r(g,i),htmlFlowData:c,htmlText:r(g,i),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(y),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(b,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(b),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(m),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=t5(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=tA(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=nt(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=R(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(d),hardBreakTrailing:o(d),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t7(t),n.identifier=R(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=nt(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
203ype)&&(c.call(this,e),u.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=R(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(ne.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:a,exit:s,buffer:i,resume:l,data:n},c=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?c.push(u):u=function(e,t,n){let r,i,a,o,s=t-1,l=-1,c=!1;for(;++s<=n;){let t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||l||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=s;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(s,0,["enter",i,t[2]]),s++,n++,a=void 0,o=!0}}}return e[t][1]._spread=c,n}(e,c.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];ne.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},o),e[u][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||nn).call(o,void 0,e[0])}for(r.position={start:nt(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:nt(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){a.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:nt(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||nn).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+(0,t9.stringifyPosition)({start:e.start,end:e.end})+"): itâs not open");n.position.end=nt(e.end)}function l(){return ec(this.stack.pop())}function c(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:nt(e.start),end:void 0},t.push(n)),this.stack.push(n)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=nt(e.end)}function d(){this.data.atHardBreak=!0}function h(e){this.data.characterReferenceType=e.type}function p(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function f(){return{type:"break"}}function g(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function b(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!tf(e););return e}((function(e){let t={defined:[],lazy:{},constructs:eB([t4,...(e||{}).extensions||[]]),content:n(tu),document:n(td),flow:n(tb),string:n(tx),text:n(tk)};return t;function n(e){return function(n){return function(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},a=[],o=[],s=[],l={consume:function(e){u(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e}
203,enter:function(e,t){let n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){let t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},attempt:f(function(e,t){g(e,t.from)}),check:f(m),interrupt:f(m,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let a,o=e[r];if("string"==typeof o)a=o;else switch(o){case -5:a="\r";break;case -4:a="\n";break;case -3:a="\r\n";break;case -2:a=t?" ":" ";break;case -1:if(!t&&n)continue;a=" ";break;default:a=String.fromCharCode(o)}n=-2===o,i.push(a)}return i.join("")}(h(e),t)},now:p,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){return(o=ej(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),d=d(t)}else d=d(n)}}(),null!==o[o.length-1])?[]:(g(t,0),c.events=te(a,c.events,c),c.events)}},d=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function h(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;if(r===a)n=[e[r].slice(i,o)];else{if(n=e.slice(r,a),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[a].slice(0,o))}return n}(o,e)}function p(){let{line:e,column:t,offset:n,_index:i,_bufferIndex:a}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:a}}function m(e,t){t.restore()}function f(e,t){return function(n,i,a){var o;let u,d,h,m;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return f([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function f(e){return(u=e,d=0,0===e.length)?a:g(e[d])}function g(e){return function(n){let i,a,o,u,d;return(i=p(),a=c.previous,o=c.currentConstruct,u=c.events.length,d=Array.from(s),m={restore:function(){r=i,c.previous=a,c.currentConstruct=o,c.events.length=u,s=d,y()},from:u},h=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?v(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,b,v)(n)}}function b(t){return e(h,m),i}function v(e){return(m.restore(),++d<u.length)?g(u[d]):a}}}function g(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&eL(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((o=1,s="",l=!0,function(e,t,n){let r,i,c,u,d,h=[];for(e=s+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),c=0,s="",l&&(65279===e.charCodeAt(0)&&c++,l=void 0);c<e.length;){if(t3.lastIndex=c,u=(r=t3.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(u),!r){s=e.slice(c);break}if(10===d&&c===u&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),c<u&&(h.push(e.slice(c,u)),o+=u-c),d){case 0:h.push(65533),o++;break;case 9:for(i=4*Math.ceil(o/4),h.push(-2);o++<i;)h.push(-1);break;case 10:h.push(-4),o=1;break;default:a=!0,o=1}c=u+1}return n&&(a&&h.push(-5),s&&h.push(s),h.push(null)),h})(n,r,!0))))}}],713059);let nr="object"==typeof self?self:globalThis,ni=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[a,o]=e[i];switch(a){case 0:case -1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new nr[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new nr[a](o),i)})(0)},{toString:na}={},{keys:no}=Object,ns=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=na.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},nl=([e,t])=>0===e&&("function"===t||"symbol"===t),nc=(e,{json:t,lossy:n}={})=>{var r,i,a;let o,s,l=[];return(r=!(t||n),i=!!t,a=new Map,o=(e,t)=>{let n=l.push(e)-1;return a.set(t,n),n},s=e=>{if(a.has(e))return a.get(e);let[t,n]=ns(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return o([-1],e)}return o([t,i],e)}case 1:{if(n)return o([n,[...e]],e);let r=[],i=o([t,r],e);for(let t of e)r.push(s(t));return i}case 2:{if(n)switch(n){case"BigInt":return o([n,e.toString()],e);case"Boolean":case"Number":case"String":return o([n,e.valueOf()],e)}if(i&&"toJSON"in e)return s(e.toJSON());let a=[],l=o([t,a],e);for(let t of no(e))(r||!nl(ns(e[t])))&&a.push([s(t),s(e[t])]);return l}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return o([t,{source:n,flags:r}],e)}case 5:{let n=[],i=o([t,n],e);for(let[t,i]of e)(r||!(nl(ns(t))||nl(ns(i))))&&n.push([s(t),s(i)]);return i}case 6:{let n=[],i=o([t,n],e);for(let t of e)(r||!nl(ns(t)))&&n.push(s(t));return i}}let{message:l}=e;return o([t,{name:n,message:l}],e)})(e),l}
203,nu="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ni(nc(e,t)):structuredClone(e):(e,t)=>ni(nc(e,t));function nd(e){let t=[],n=-1,r=0,a=0;for(;++n<e.length;){let o=e.charCodeAt(n),s="";if(37===o&&i(e.charCodeAt(n+1))&&i(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),a=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function nh(e,t){let n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function np(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}e.s(["default",0,nu],807432);let nm=ng("end"),nf=ng("start");function ng(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ny(e){let t=nf(e),n=nm(e);if(t&&n)return{start:t,end:n}}function nb(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function nv(e){let t=e.spread;return null==t?e.children.length>1:t}function nx(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}e.s(["pointEnd",0,nm,"pointStart",0,nf,"position",0,ny],329422);let nk={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=nd(i.toLowerCase()),o=e.footnoteOrder.indexOf(i),s=e.footnoteCounts.get(i);void 0===s?(s=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=o+1,s+=1,e.footnoteCounts.set(i,s);let l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nb(e,t);let i={src:nd(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){let n={src:nd(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nb(e,t);let i={href:nd(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){let n={href:nd(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=nv(n[r])}return t}(n):nv(t),a={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){let e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}let l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=nf(t.children[1]),o=nm(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:"element",tagName:"table",properties:{}
203,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length,s=-1,l=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(nx(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(nx(t.slice(i),i>0,!1)),a.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:nw,yaml:nw,definition:nw,footnoteDefinition:nw};function nw(){}let nC={}.hasOwnProperty,nS={};function nE(e,t){e.position&&(t.position=ny(e))}function nT(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,nu(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function nI(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function nD(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function nN(e,t){let r,i,a,o,s=(r=t||nS,i=new Map,a=new Map,o={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=nD(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=nD(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:nT,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...nk,...r.handlers},one:function(e,t){let n=e.type,r=o.handlers[n];if(nC.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=nu(n);return r.children=o.all(e),r}return nu(e)}return(o.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(nC.call(n,"hProperties")||nC.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(o,e,t)},options:r,patch:nE,wrap:nI},es(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o),l=s.one(e,void 0),c=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||nh,r=e.options.footnoteBackLabel||np,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[],l=-1;for(;++l<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),c=nd(o.toLowerCase()),u=0,d=[],h=e.footnoteCounts.get(o);for(;void 0!==h&&++u<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else a.push(...d);let m={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...nu(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)}
203,{type:"text",value:"\n"}]}}(s),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return c&&((0,n.ok)("children"in u),u.children.push({type:"text",value:"\n"},c)),u}e.s(["default",0,function(e,t){return e&&"run"in e?async function(n,r){let i=nN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return nN(n,{file:r,...t||e})}}],878999)},512197,921491,255960,570613,303873,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(864293);e.s(["CanvasZoomLayer",0,function(e){let i,a,o,s,l,c=(0,n.c)(20),{layerRef:u,spacerRef:d,contentWidth:h,centered:p,locked:m,pageScroll:f}=(0,r.useCanvasZoomEngine)();c[0]!==h?(i={width:h},c[0]=h,c[1]=i):i=c[1];let g=`canvasWrapper max-w-full ${f?"canvasPageScroll":"h-full overflow-y-scroll no-scrollbar"} touch-pan-x touch-pan-y ${e.className??""}`,y=`canvasZoomSpacer ${p?"canvasZoomCentered":""} ${m?"canvasZoomLocked":""}`,b=e.mobileArea?.width,v=e.mobileArea?.left;c[2]!==h||c[3]!==e.contentHeight||c[4]!==b||c[5]!==v?(a={"--canvas-content-width":h,"--canvas-content-height":e.contentHeight,"--canvas-mobile-area":b,"--canvas-mobile-left":v},c[2]=h,c[3]=e.contentHeight,c[4]=b,c[5]=v,c[6]=a):a=c[6];let x=a;return c[7]!==u||c[8]!==e.children?(o=(0,t.jsx)("div",{ref:u,className:"canvasZoomLayer",children:e.children}),c[7]=u,c[8]=e.children,c[9]=o):o=c[9],c[10]!==d||c[11]!==y||c[12]!==x||c[13]!==o?(s=(0,t.jsx)("div",{ref:d,className:y,style:x,children:o}),c[10]=d,c[11]=y,c[12]=x,c[13]=o,c[14]=s):s=c[14],c[15]!==e.id||c[16]!==i||c[17]!==g||c[18]!==s?(l=(0,t.jsx)("div",{id:e.id,style:i,className:g,children:s}),c[15]=e.id,c[16]=i,c[17]=g,c[18]=s,c[19]=l):l=c[19],l}],512197);var i=e.i(271645),a=e.i(680915),o=e.i(813029),s=e.i(553445),l=e.i(669590);e.s(["CanvasFocusZoom",0,function(e){let t,c,u,d=(0,n.c)(9),h=(0,r.useCanvasZoomEngine)();d[0]!==e.pageEntityID?(t=t=>t.focusedEntity?.entityType==="block"&&(0,a.pageOfParent)(t.focusedEntity.parent)===e.pageEntityID?t.focusedEntity.entityID:null,d[0]=e.pageEntityID,d[1]=t):t=d[1];let p=(0,o.useUIState)(t);return d[2]!==h||d[3]!==p||d[4]!==e.pageEntityID?(c=()=>{if(!p||!window.matchMedia("(pointer: coarse)").matches||(0,l.getCanvasZoom)(e.pageEntityID)>=.999999)return;let t=h.boxRef.current,n=document.getElementById(s.elementId.block(p).container);if(!t||!n||!t.contains(n))return;let r=n.getBoundingClientRect(),i=h.viewportRect(),a=h.canvasPointAt(h.toViewport(r.left,r.top)),o=h.toViewport(Math.min(Math.max(r.left,i.left+24),i.left+i.width-24),Math.min(Math.max(r.top,i.top+24),i.top+i.height-24));h.schedule({zoom:h.clamp(1),anchorViewport:o,anchorCanvas:a})},d[2]=h,d[3]=p,d[4]=e.pageEntityID,d[5]=c):c=d[5],d[6]!==h||d[7]!==p?(u=[p,h],d[6]=h,d[7]=p,d[8]=u):u=d[8],(0,i.useEffect)(c,u),null}],921491);var c=e.i(69278),u=e.i(450030);let d=e=>{let r,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0ZM3.29821 7C2.74592 7 2.29821 7.44771 2.29821 8C2.29821 8.55228 2.74592 9 3.29821 9H12.7018C13.2541 9 13.7018 8.55228 13.7018 8C13.7018 7.44772 13.2541 7 12.7018 7H3.29821Z",fill:"currentColor"}),a[0]=r):r=a[0],a[1]!==e?(i=(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r}),a[1]=e,a[2]=i):i=a[2],i};e.s(["CanvasZoomControls",0,function(e){let i,a,o,s,l,h,p,m=(0,n.c)(18),{zoom:f,min:g,max:y,ready:b,locked:v,zoomIn:x,zoomOut:k,reset:w}=(0,r.useCanvasZoom)();if(v)return null;let C=`canvasZoomControls flex flex-row items-center gap-1 text-tertiary ${b?"":"invisible"} ${e.className||""}`,S=f<=g;m[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(d,{}),m[0]=i):i=m[0],m[1]!==S||m[2]!==k?(a=(0,t.jsx)(c.TooltipButton,{side:"bottom",tooltipContent:"Zoom out",disabled:S,className:"hover:text-accent-contrast disabled:text-border disabled:cursor-default",onMouseDown:k,children:i}),m[1]=S,m[2]=k,m[3]=a):a=m[3],m[4]!==f?(o=Math.round(100*f),m[4]=f,m[5]=o):o=m[5],m[6]!==w||m[7]!==o?(s=(0,t.jsxs)(c.TooltipButton,{side:"bottom",tooltipContent:"Reset to 100%",className:"text-sm tabular-nums w-10 text-center hover:text-accent-contrast",onMouseDown:w,children:[o,"%"]}),m[6]=w,m[7]=o,m[8]=s):s=m[8];let E=f>=y;return m[9]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(u.AddTiny,{}),m[9]=l):l=m[9],m[10]!==E||m[11]!==x?(h=(0,t.jsx)(c.TooltipButton,{side:"bottom",tooltipContent:"Zoom in",disabled:E,className:"hover:text-accent-contrast disabled:text-border disabled:cursor-default",onMouseDown:x,children:l}
203),m[10]=E,m[11]=x,m[12]=h):h=m[12],m[13]!==C||m[14]!==a||m[15]!==s||m[16]!==h?(p=(0,t.jsxs)("div",{className:C,children:[a,s,h]}),m[13]=C,m[14]=a,m[15]=s,m[16]=h,m[17]=p):p=m[17],p}],255960);var h=e.i(523995);e.s(["mobileViewArea",0,function(e,t=h.CONTENT_WIDTH){let n=Math.min(520,t);return"left"===e?{left:0,width:n}:"center"===e?{left:Math.round((t-n)/2),width:n}:null}],570613),e.s(["MobileViewSmall",0,e=>{let r,i,a,o,s=(0,n.c)(5);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("rect",{x:"7.5",y:"3.5",width:"9",height:"17",rx:"2",stroke:"currentColor",strokeWidth:"1.5"}),i=(0,t.jsx)("path",{d:"M10.5 6.5H13.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),a=(0,t.jsx)("path",{d:"M3 6V18M21 6V18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:"2 2"}),s[0]=r,s[1]=i,s[2]=a):(r=s[0],i=s[1],a=s[2]),s[3]!==e?(o=(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r,i,a]}),s[3]=e,s[4]=o):o=s[4],o}],303873)},864293,523995,669590,e=>{"use strict";var t=e.i(843476),n=e.i(500932),r=e.i(271645);let i=[.25,.5,.75,1,1.5,2];function a(e,t){return Math.min(.25,e/t||1)}function o(e,t){return Math.min(1,e/t||1)}function s(e,t,n){return Math.max(0,(e.left+e.width/2)*t-n/2)}function l(e,t){return Number.isFinite(e)?Math.min(2,Math.max(t,e)):t}function c(e,t){let n=e;return(1===t?n=16*e:2===t&&(n=800*e),Number.isFinite(n))?Math.exp(-Math.max(-10,Math.min(10,n))/100):1}function u(e,t){if(1===t){for(let t=1;t<i.length;t++){let n=i[t-1],r=i[t];if(r-n>(e-n)*2)return r}return i[i.length-1]}for(let t=i.length-1;t>0;t--){let n=i[t-1],r=i[t];if(r-n>(r-e)*2)return n}return i[0]}function d(e){return{scrollLeft:e.anchorCanvas.x*e.zoom-e.anchorViewport.x,scrollTop:e.anchorCanvas.y*e.zoom-e.anchorViewport.y}}function h(e){return{x:(e.scrollLeft+e.anchorViewport.x)/e.zoom,y:(e.scrollTop+e.anchorViewport.y)/e.zoom}}let p={top:0,right:0,bottom:0,left:0};function m(e,t){return{left:Math.max(0,-e.left),top:Math.max(0,-e.top),right:Math.max(0,e.left+t.width-t.scrollWidth),bottom:Math.max(0,e.top+t.height-t.scrollHeight)}}function f(e,t,n,r){let i={...e},a={left:0,top:0};return(e.left&&t.left>=n.left+e.left&&(i.left=0,a.left=e.left),e.top&&t.top>=n.top+e.top&&(i.top=0,a.top=e.top),e.right&&t.left+r.width<=r.scrollWidth-e.right&&(i.right=0),e.bottom&&t.top+r.height<=r.scrollHeight-e.bottom&&(i.bottom=0),i.left===e.left&&i.top===e.top&&i.right===e.right&&i.bottom===e.bottom)?null:{pads:i,shift:a}}function g(e,t,n){if(!(n>0))return e;let r=Math.log(t/e);return .001>Math.abs(r)?t:e*Math.exp(r*(1-Math.exp(-n/60)))}e.s(["CONTENT_WIDTH",0,1272,"MAX_ZOOM",0,2,"NO_PADS",0,p,"anchorToCanvas",0,h,"approachZoom",0,g,"clampZoom",0,l,"fitZoom",0,o,"minZoom",0,a,"nextStep",0,u,"padsForScroll",0,m,"scrollForAnchor",0,d,"scrollToCenterArea",0,s,"trimPads",0,f,"wheelToZoomFactor",0,c],523995);let y=new Map,b=!1;function v(e){return y.get(e)??1}function x(e){return y.has(e)}function k(e,t){y.set(e,t)}function w(e){b=e}e.s(["clientToCanvas",0,function(e,t,n){let r=e.getBoundingClientRect(),i=v(t);return{x:(n.clientX-r.left)/i,y:(n.clientY-r.top)/i}},"getCanvasZoom",0,v,"hasCanvasZoom",0,x,"isCanvasPinching",0,function(){return b},"setCanvasPinching",0,w,"setCanvasZoom",0,k],669590);var C=e.i(760524);function S(e){let t=e[0],n=e[1];return{dist:Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY),mid:{x:(t.clientX+n.clientX)/2,y:(t.clientY+n.clientY)/2}}}let E=(0,r.createContext)(null),T=(0,r.createContext)(null);function I(e){for(let t=e?.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)return t}return null}e.s(["CanvasZoomProvider",0,function(e){var i,y;let b,D,N,{pageKey:A,contentWidth:_}=e,P=!!e.pageScroll,M=(0,r.useRef)(e.initialArea);M.current=e.initialArea;let R=!!e.centered,L=!!e.lockViewerZoom,j=(0,r.useRef)(null),O=(0,r.useRef)(null),B=(0,r.useRef)(null),F=(0,r.useRef)(null),H=(0,r.useRef)(.25),[U,z]=(0,r.useState)(v(A)),[$,V]=(0,r.useState)(H.current),[q,G]=(0,r.useState)(!1),W=(0,r.useRef)(null),K=(0,r.useRef)(null),Y=(0,r.useRef)(null),Z=(0,r.useRef)(p),X=(0,r.useRef)(!1),Q=(0,r.useRef)(!1),J=(0,r.useRef)(0),ee=(0,r.useRef)(0),et=(0,r.useRef)(0),en=(0,r.useMemo)(()=>{let e=()=>{let e=j.current,t=O.current;return e&&t?{x:e,y:t}:null},t=e=>({left:e.x.scrollLeft,top:e.y.scrollTop}),n=e=>({width:e.x.clientWidth,height:e.y.clientHeight,scrollWidth:e.x.scrollWidth,scrollHeight:e.y.scrollHeight}),r=(e,t)=>{let n=t.getBoundingClientRect(),r=e.x.getBoundingClientRect(),i=e.y.getBoundingClientRect();return{left:n.left-r.left-e.x.clientLeft+e.x.scrollLeft,top:n.top-i.top-e.y.clientTop+e.y.scrollTop}},i=(e,t)=>{Z.current=t,e.style.padding=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`},a=(e,n)=>{e.x.scrollLeft=n.left,e.y.scrollTop=n.top,Y.current=t(e)},o=e=>e.x===e.y?[e.x]:[e.x,e.y],s=e=>{for(let t of o(e))t.removeEventListener("scroll",u),t.addEventListener("scroll",u,{once:!0})},c=()=>{et.current&&window.clearTimeout(et.current),et.current=0,J.current=0;let r=K.current;K.current=null;let s=e(),l=B.current,c=F.current;if(r&&s&&l&&c){Q.current=!1;for(let e of o(s))e.removeEventListener("scroll",u);let e=t(s),d={left:Math.round(Math.round(r.virtual.left)+e.left-r.scroll0.left+r.base0.left),top:Math.round(Math.round(r.virtual.top)+e.top-r.scroll0.top+r.base0.top)},h=v(A);c.style.padding="",c.style.setProperty("--canvas-zoom",String(h)),l.style.setProperty("--canvas-zoom",String(h));let p=m(d,n(s));i(c,p),l.style.transform="",a(s,{left:d.left+p.left,top:d.top+p.top});let f=r.pausedMedia;f.length&&window.requestAnimationFrame(()=>{for(let e of f)e.play().catch(()=>{})})}z(v(A))},u=()=>{let n=e(),r=Y.current;if(n&&r){let e=t(n);if(e.left===r.left&&e.top===r.top){K.current&&s(n);return}Y.current=null}y.settleNow()},p=(n,i=!1)=>{ee.current=0;let a=W.current,o=e(),l=B.current;if(!a||!o||!l)return;let u=K.current??((e,n)=>{let i=t(e),a=r(e,n),o={scroll0:i,origin0:a,base0:{left:a.left-Z.current.left,top:a.top-Z.current.top},virtual:{left:i.left-a.left,top:i.top-a.top},pausedMedia:[]};for(let e of n.querySelectorAll("video"))e.paused||e.ended||(e.pause(),o.pausedMedia.push(e));return K.current=o,s(e),o})(o,l),h=J.current?n-J.current:0;J.current=n;let m=i||a.immediate?a.zoom:g(v(A),a.zoom,h);m===a.zoom?W.current=null:ee.current=window.requestAnimationFrame(p),k(A,m);let f=d({...a,zoom:m});u.virtual={left:f.scrollLeft,top:f.scrollTop};let y=u.scroll0.left-u.origin0.left-Math.round(u.virtual.left),b=u.scroll0.top-u.origin0.top-Math.round(u.virtual.top);l.style.transform=`translate(${y}px, ${b}px) scale(${m})`,et.current&&window.clearTimeout(et.current),et.current=window.setTimeout(c,200)},y={boxRef:j,layerRef:B,spacerRef:F,minRef:H,contentWidth:_,centered:R,pageScroll:P,locked:L,targetZoom:()=>W.current?.zoom??v(A),viewportRect:()=>{let t=e();return t?{left:t.x.getBoundingClientRect().left+t.x.clientLeft,top:t.y.getBoundingClientRect().top+t.y.clientTop,width:t.x.clientWidth,height:t.y.clientHeight}:{left:0,top:0,width:0,height:0}},toViewport:(e,t)=>{let n=y.viewportRect();return{x:e-n.left,y:t-n.top}},viewportCenter:()=>{let e=y.viewportRect();return{x:e.width/2,y:e.height/2}},canvasPointAt:n=>{let i=K.current,a=e(),o=B.current,s=a?t(a):{left:0,top:0},l=a&&o?r(a,o):Z.current;return h({anchorViewport:n,scrollLeft:i?i.virtual.left:s.left-l.left,scrollTop:i?i.virtual.top:s.top-l.top,zoom:v(A)})},clamp:e=>l(e,H.current),schedule:e=>{W.current=e,ee.current||(ee.current=window.requestAnimationFrame(p))},zoomAt:(e,t,n)=>
203y.schedule({zoom:y.clamp(e),anchorViewport:t,anchorCanvas:y.canvasPointAt(t),immediate:n}),zoomAtClient:(e,t,n,r)=>y.zoomAt(e,y.toViewport(t,n),r),settleNow:()=>{ee.current&&window.cancelAnimationFrame(ee.current),ee.current=0,W.current&&p(performance.now(),!0),K.current&&c()},trimPads:()=>{let o=e(),s=F.current;if(K.current||!o||!s)return;let l=t(o),c=f(Z.current,l,r(o,s),n(o));c&&(i(s,c.pads),a(o,{left:l.left-c.shift.left,top:l.top-c.shift.top}))}};return y},[A,_,R,P,L]),er=e.initialArea?.width??null;(0,r.useLayoutEffect)(()=>{let e,t=B.current,n=F.current,r=n?.parentElement??null,i=P?I(r):r;if(j.current=r,O.current=i,!r||!i||!t||!n)return;Z.current=p,n.style.padding="",H.current=a(r.clientWidth,_),V(H.current);let c=(e=getComputedStyle(t).transform)&&"none"!==e?new DOMMatrixReadOnly(e).a:1,u=!L&&x(A),d=M.current,h=o(r.clientWidth,d?.width??_);r.clientWidth&&!t.style.getPropertyValue("--canvas-zoom")&&(X.current=Math.abs(c-h)>.02*h);let m=u?l(v(A),H.current):X.current?h:c;if(Q.current=X.current&&1e-6>Math.abs(m-h),Math.abs(m-c)>1e-6&&(n.style.setProperty("--canvas-zoom",String(m)),t.style.setProperty("--canvas-zoom",String(m))),L||u||!d||(r.scrollLeft=s(d,m,r.clientWidth)),R){let e=Number(n.style.getPropertyValue("--canvas-content-height"))||0;r.scrollLeft=_*m/2,i.scrollTop=e*m/2}k(A,m),z(m),G(!0)},[A,_,R,P,L,er]),(0,r.useEffect)(()=>{let e=j.current,t=O.current;if(!e||!t||!B.current||!F.current)return;let n=new AbortController,r=n.signal,i=new ResizeObserver(()=>{if(Q.current&&!K.current){let t=o(e.clientWidth,M.current?.width??_);F.current?.style.setProperty("--canvas-zoom",String(t)),B.current?.style.setProperty("--canvas-zoom",String(t)),k(A,t),z(t)}let t=a(e.clientWidth,_);t!==H.current&&(H.current=t,V(t))});i.observe(e);let s=0,l=()=>{s&&window.clearTimeout(s),s=0,en.trimPads()},c=()=>{K.current||(s&&window.clearTimeout(s),s=window.setTimeout(l,150))};for(let n of new Set([e,t]))n.addEventListener("scroll",c,{passive:!0,signal:r}),n.addEventListener("scrollend",l,{signal:r});return e.addEventListener("pointerup",c,{signal:r}),e.addEventListener("touchend",c,{passive:!0,signal:r}),()=>{n.abort(),i.disconnect(),s&&window.clearTimeout(s),ee.current&&window.cancelAnimationFrame(ee.current),et.current&&window.clearTimeout(et.current),ee.current=0,et.current=0,W.current=null,K.current=null}},[en,_,A]),i=!L,y=e.doubleTapZoom??!0,(N=(0,n.c)(5))[0]!==y||N[1]!==i||N[2]!==en?(b=()=>{let e,t,n,r,a,o,s,l,d=en.boxRef.current;if(!d||!i)return;let h=new AbortController,p=h.signal;e=!1,t=!1,n=1,r=null,a=!1,o=0,s=null,l=null,d.addEventListener("wheel",e=>{if(t||!(e.ctrlKey||e.metaKey))return;e.preventDefault();let n=c(e.deltaY,e.deltaMode);en.zoomAtClient(en.targetZoom()*n,e.clientX,e.clientY)},{passive:!1,signal:p}),"GestureEvent"in window&&!(0,C.isIOS)()&&(d.addEventListener("gesturestart",e=>{e.preventDefault(),t=!0,n=en.targetZoom()},{passive:!1,signal:p}),d.addEventListener("gesturechange",e=>{e.preventDefault(),en.zoomAtClient(n*e.scale,e.clientX,e.clientY,!0)},{passive:!1,signal:p}),d.addEventListener("gestureend",e=>{e.preventDefault(),t=!1},{passive:!1,signal:p}));let m=()=>{r&&(r=null,w(!1),en.settleNow())};d.addEventListener("touchstart",e=>{if(e.touches.length<2||(e.preventDefault(),a=!0,s=null,l=null,r))return;let{dist:t,mid:n}=S(e.touches);r={state:"unsure",startDist:Math.max(t,1),startMid:n,startZoom:en.targetZoom(),anchorCanvas:en.canvasPointAt(en.toViewport(n.x,n.y))},w(!0)},{passive:!1,signal:p}),d.addEventListener("touchmove",e=>{if(!r||(e.cancelable&&e.preventDefault(),e.touches.length<2))return;let{dist:t,mid:n}=S(e.touches),i=Math.abs(t-r.startDist),a=Math.hypot(n.x-r.startMid.x,n.y-r.startMid.y),o=()=>{r.state="zooming",r.startDist=Math.max(t,1)};if("unsure"===r.state?i>8?o():a>16&&(r.state="panning"):"panning"===r.state&&i>48&&o(),"unsure"===r.state)return;let s="zooming"===r.state?r.startZoom*(t/r.startDist):r.startZoom;en.schedule({zoom:en.clamp(s),anchorViewport:en.toViewport(n.x,n.y),anchorCanvas:r.anchorCanvas,immediate:!0})},{passive:!1,signal:p});let f=e=>{e.touches.length<2&&m(),!a||(e.cancelable&&e.preventDefault(),e.touches.length>0||(a=!1,o=Date.now()+250))};d.addEventListener("touchend",f,{passive:!1,signal:p}),d.addEventListener("touchcancel",f,{signal:p});let g=e=>r?e.stopImmediatePropagation():"pointermove"===e.type||"pointerdown"===e.type?void 0:void(!(!a&&Date.now()>o)&&(e.preventDefault(),e.stopImmediatePropagation()));for(let e of["pointermove","pointerdown","mousedown","click"])window.addEventListener(e,g,{capture:!0,signal:p});return d.addEventListener("pointerenter",()=>e=!0,{signal:p}),d.addEventListener("pointerleave",()=>e=!1,{signal:p}),window.addEventListener("keydown",t=>{if(!(t.ctrlKey||t.metaKey)||t.altKey)return;let n=!!document.activeElement&&d.contains(document.activeElement);if(!e&&!n)return;let r=null;if("="===t.key||"+"===t.key||"NumpadAdd"===t.code?r=1:"-"===t.key||"_"===t.key||"NumpadSubtract"===t.code?r=-1:("0"===t.key||"Digit0"===t.code||"Numpad0"===t.code)&&(r=0),null===r)return;t.preventDefault();let i=0===r?1:u(en.targetZoom(),r);en.zoomAt(i,en.viewportCenter())},{capture:!0,signal:p}),d.addEventListener("pointerdown",e=>{if("touch"!==e.pointerType||!e.isPrimary||r||!y){s=null;return}s={id:e.pointerId,x:e.clientX,y:e.clientY,t:e.timeStamp}},{signal:p}),d.addEventListener("pointercancel",()=>s=null,{signal:p}),d.addEventListener("pointerup",e=>{let t=s;if(s=null,!t||t.id!==e.pointerId||r||Math.hypot(e.clientX-t.x,e.clientY-t.y)>10)return;let n={x:e.clientX,y:e.clientY,t:e.timeStamp},i=l;if(l=n,!i||n.t-i.t>300||Math.hypot(n.x-i.x,n.y-i.y)>30||(l=null,e.target?.closest?.("a, button, input, textarea, select, video, audio, [contenteditable], [role='button'], .ProseMirror")))return;let a=en.targetZoom(),o=a<.999999?1:a>=1.999999?en.minRef.current:u(a,1);en.zoomAtClient(o,n.x,n.y)},{signal:p}),()=>{h.abort(),m()}},D=[en,i,y],N[0]=y,N[1]=i,N[2]=en,N[3]=b,N[4]=D):(b=N[3],D=N[4]),(0,r.useEffect)(b,D);let ei=(0,r.useMemo)(()=>{let e=e=>en.zoomAt(e,en.viewportCenter());return{zoom:U,min:$,max:2,ready:q,locked:L,zoomIn:()=>e(u(en.targetZoom(),1)),zoomOut:()=>e(u(en.targetZoom(),-1)),reset:()=>e(1)}},[en,U,$,q,L]);return(0,t.jsx)(T.Provider,{value:en,children:(0,t.jsx)(E.Provider,{value:ei,children:e.children})})},"nearestScroller",0,I,"useCanvasImage",0,function(e,t){let i,a=(0,n.c)(3);if(!(0,r.useContext)(T)){let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e={decoding:"async",className:""},a[0]=e):e=a[0],e}let o="image/gif"===t||"image/apng"===t||e&&/\.(gif|apng|webp)(\?|$)/i.test(e)?"canvasAnimatedImage":"";return a[1]!==o?(i={decoding:"sync",className:o},a[1]=o,a[2]=i):i=a[2],i},"useCanvasZoom",0,function(){let e=(0,r.useContext)(E);if(!e)throw Error("useCanvasZoom must be used inside CanvasZoomProvider");return e},"useCanvasZoomEngine",0,function(){let e=(0,r.useContext)(T);if(!e)throw Error("useCanvasZoomEngine must be used inside CanvasZoomProvider");return e},"useCanvasZoomLevel",0,function(){return(0,r.useContext)(E)?.zoom??1}],864293)},393991,658172,150248,e=>{"use strict";var t=e.i(271645),n=e.i(467592),r=e.i(64572),i=e.i(680016),a=e.i(929495),o=e.i(261355),s=e.i(500932),l=e.i(789606);function c(e,t){if(e===t)return!0;
203if(null===e||null===t||"object"!=typeof e||"object"!=typeof t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!c(e[i],t[i]))return!1;return!0}function u(e,r,i){let a,u,h,p=(0,s.c)(10),m=(0,n.useReplicache)();p[0]===Symbol.for("react.memo_cache_sentinel")?(a={default:!1},p[0]=a):a=p[0];let f=(0,l.useSubscribe)(m.rep,d,a),[g,y]=(0,t.useState)(null);return p[1]!==e||p[2]!==r||p[3]!==f||p[4]!==m.rep?(u=()=>{if(!m.rep||!f)return;let t=(0,o.getBlockStructureMirror)(m.rep),n=n=>{n&&!n.has("populated")&&!e.some(e=>n.has(e))||t.populated&&y(e=>{let n=r(t);return null!==e&&c(e,n)?e:n})};n(null);let i=t.subscribe(n);return()=>{i(),y(null)}},p[1]=e,p[2]=r,p[3]=f,p[4]=m.rep,p[5]=u):u=p[5],p[6]!==i||p[7]!==f||p[8]!==m.rep?(h=[m.rep,f,...i],p[6]=i,p[7]=f,p[8]=m.rep,p[9]=h):h=p[9],(0,t.useEffect)(u,h),g}async function d(e){return!!await e.get("initialized")}e.s(["deepEquals",0,c],658172),e.s(["useMirrorQuery",0,u],150248);let h=["canvas/block","block/type"],p=(e,t)=>e.eav(t,"canvas/block").map(t=>{let n=e.eav(t.data.value,"block/type")[0];return n?{...t.data,type:n.data.value}:null}).filter(e=>null!==e),m=[...o.blockListAttributes,"canvas/block"];e.s(["useBlocks",0,e=>{let r=(0,n.useReplicache)(),a=(0,t.useMemo)(()=>null===e?[]:(0,i.getBlocksWithTypeLocal)(r.initialFacts,e),[r.initialFacts,e]);return u(o.blockListAttributes,t=>null===e?[]:(0,i.getBlocksFromMirror)(t,e),[e])||a},"useCanvasBlocksWithType",0,e=>{let i=(0,n.useReplicache)(),o=(0,t.useMemo)(()=>null===e?[]:p((0,r.scanIndexLocal)(i.initialFacts),e),[i.initialFacts,e]);return(u(h,t=>null===e?[]:p(t,e),[e])||o).toSorted((e,t)=>(0,a.canvasBlockOrder)(e.position,t.position))},"usePageReadingOrder",0,e=>{let a=(0,n.useReplicache)(),o=(0,t.useMemo)(()=>null===e?[]:(0,i.getPageReadingOrder)((0,r.scanIndexLocal)(a.initialFacts),e),[a.initialFacts,e]);return u(m,t=>null===e?[]:(0,i.getPageReadingOrder)(t,e),[e])||o}],393991)},792834,e=>{"use strict";var t=e.i(500932),n=e.i(467592),r=e.i(929495),i=e.i(523995),a=e.i(876082),o=e.i(960622);function s(e){return e.data.position}e.s(["useCanvasSize",0,function(e){let l,c,u,d,h=(0,t.c)(19),p=(0,n.useEntity)(e,"canvas/block"),m=(0,n.useEntity)(e,"canvas/fixed-width")?.data.value,f=(0,n.useEntity)(e,"canvas/fixed-height")?.data.value,g=!!m&&!!f,{rootEntity:y}=(0,n.useReplicache)(),b=(0,a.useLeafletPublicationPage)()?y:null,v=(0,n.useEntity)(b,"root/page");if(h[0]!==e||h[1]!==v){let t;h[3]!==e?(t=t=>t.data.value===e,h[3]=e,h[4]=t):t=h[4],l=v.some(t),h[0]=e,h[1]=v,h[2]=l}else l=h[2];let x=l,k=(0,n.useEntity)(b,"theme/page-width")?.data.value,w=!(0,o.useCardBorderHidden)();h[5]!==g||h[6]!==m||h[7]!==x||h[8]!==k||h[9]!==w?(c=g&&m||(x?(k||624)-2*!!w:i.CONTENT_WIDTH),h[5]=g,h[6]=m,h[7]=x,h[8]=k,h[9]=w,h[10]=c):c=h[10];let C=c;h[11]!==p||h[12]!==g||h[13]!==f?(u=g&&f||(0,r.canvasContentHeight)(p.map(s)),h[11]=p,h[12]=g,h[13]=f,h[14]=u):u=h[14];let S=u;return h[15]!==g||h[16]!==S||h[17]!==C?(d={width:C,height:S,fixed:g},h[15]=g,h[16]=S,h[17]=C,h[18]=d):d=h[18],d}],792834)},195040,e=>{"use strict";var t=e.i(500932),n=e.i(467592),r=e.i(789606),i=e.i(64572),a=e.i(506356);function o(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function s(e){return e.entityID}e.s(["useCanvasPaintOrder",0,function(e){let l,c,u,d=(0,t.c)(5),{rep:h}=(0,n.useReplicache)();return d[0]!==e?(l=async t=>(await (0,a.canvasLayers)({scanIndex:(0,i.scanIndex)(t)},e)).map(s),d[0]=e,d[1]=l):l=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(c=[],d[2]=c):c=d[2],d[3]!==e?(u={default:c,dependencies:[e],isEqual:o},d[3]=e,d[4]=u):u=d[4],(0,r.useSubscribe)(h,l,u)}])},662661,e=>{"use strict";var t=e.i(500932),n=e.i(393991);function r(e){return"text"===e.type||"heading"===e.type}e.s(["usePageMetadata",0,function(e){let i,a=(0,t.c)(2),o=(0,n.usePageReadingOrder)(e);return a[0]!==o?(i=o.filter(r).slice(0,3),a[0]=o,a[1]=i):i=a[1],i}])},921598,e=>{"use strict";var t=e.i(500932),n=e.i(283599),r=e.i(271235),i=e.i(935593);let a=e=>e.length?`contributor-profiles-${[...e].sort().join(",")}`:null;async function o(e){let t=await (0,i.callRPC)("get_profiles",{dids:e});return t?.result?.profiles??{}}e.s(["prefetchContributorProfiles",0,function(e){let t=a(e);t&&(0,r.preload)(t,()=>o(e))},"useContributorProfiles",0,function(e){let r,i,s=(0,t.c)(4);return s[0]!==e?(r=a(e),s[0]=e,s[1]=r):r=s[1],s[2]!==e?(i=()=>o(e),s[2]=e,s[3]=i):i=s[3],(0,n.default)(r,i)}])},851181,e=>{"use strict";var t=e.i(271645),n=e.i(781553);let r=0,i=e=>e.preventDefault();e.s(["didBodyDragJustEnd",0,()=>Date.now()-r<250,"useDrag",0,e=>{let a=(0,t.useRef)(e);a.current=e;let o=(0,t.useRef)(!1),s=(0,t.useRef)(null),l=(0,t.useRef)(null),[c,u]=(0,t.useState)(null);(0,t.useEffect)(()=>{let e=new AbortController;return window.addEventListener("touchmove",e=>{s.current&&e.preventDefault()},{signal:e.signal,passive:!1}),()=>{e.abort(),s.current?.abort(),l.current?.abort()}},[]);let d=(e,t=e)=>{s.current?.abort();let n=new AbortController;s.current=n;let r={x:t.x-e.x,y:t.y-e.y};u(r),window.addEventListener("pointermove",t=>{t.preventDefault(),u(r={x:t.clientX-e.x,y:t.clientY-e.y})},{signal:n.signal});let i=()=>{n.abort(),s.current=null,a.current.onDragEnd(r),u(null)};for(let e of["pointerup","pointercancel","touchend"])window.addEventListener(e,i,{signal:n.signal})}
203,h=e=>{e.defaultPrevented||(e.preventDefault(),d({x:e.clientX,y:e.clientY}))};return{dragDelta:c,handlers:{onMouseDown:h,onPointerDown:e=>{"mouse"!==e.pointerType&&h(e)}},bodyHandlers:{onPointerDown:t=>{if(!t.isPrimary||0!==t.button)return;let i=t.target;if(!t.currentTarget.contains(i))return;let{bodyIgnore:a,bodyText:s}=e;if(a&&i.closest(a))return;let c=s&&i.closest("[contenteditable]")?s:null;if(c&&(t.shiftKey||t.metaKey||t.ctrlKey||t.altKey))return;let u={x:t.clientX,y:t.clientY},{pointerId:h,pointerType:p}=t,m=!!c&&"touch"!==p;o.current=m;let f=l.current=new AbortController,{signal:g}=f,y=!1,b=()=>{m||window.getSelection()?.removeAllRanges()},v=e=>{y=!0,b(),d(u,e)},x="touch"===p?window.setTimeout(()=>v(u),n.LONG_PRESS_DELAY):void 0;g.addEventListener("abort",()=>window.clearTimeout(x)),window.addEventListener("pointermove",e=>{if(y||e.pointerId!==h)return;let t=Math.hypot(e.clientX-u.x,e.clientY-u.y);"touch"===p?t>n.LONG_PRESS_TOLERANCE&&f.abort():t>=8&&v({x:e.clientX,y:e.clientY})},{signal:g}),window.addEventListener("pointerdown",e=>{y||e.pointerId===h||f.abort()},{signal:g}),i.addEventListener("touchmove",e=>{y&&e.cancelable&&e.preventDefault()},{signal:g,passive:!1}),document.addEventListener("selectionchange",()=>{y&&b()},{signal:g}),window.addEventListener("contextmenu",e=>{(y||"touch"===p)&&e.preventDefault()},{signal:g});let k=e=>{if(e.pointerId!==h)return;if(f.abort(),o.current=!1,!y){m&&"pointerup"===e.type&&c?.onClick({target:i,x:e.clientX,y:e.clientY});return}r=Date.now();let t=new AbortController;for(let e of["mousedown","click"])window.addEventListener(e,e=>{e.preventDefault(),e.stopPropagation()},{capture:!0,signal:t.signal});window.setTimeout(()=>t.abort(),250*("touch"===p))};for(let e of["pointerup","pointercancel"])window.addEventListener(e,k,{signal:g,capture:!0})},onMouseDownCapture:e=>{o.current&&(e.preventDefault(),e.stopPropagation())},onDragStart:i}}}])},828517,e=>{"use strict";var t,n=e.i(271645),r=e.i(467034),i=Symbol("workers-module");Symbol.dispose||(Symbol.dispose=Symbol.for("dispose")),Symbol.asyncDispose||(Symbol.asyncDispose=Symbol.for("asyncDispose")),Promise.withResolvers||(Promise.withResolvers=function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}});var a=globalThis[i],o=a?a.RpcTarget:class{},s=(async function(){}).constructor,l=void 0!==r.Buffer?r.Buffer.prototype:void 0;function c(e){switch(typeof e){case"boolean":case"number":case"string":return"primitive";case"undefined":return"undefined";case"object":case"function":break;case"bigint":return"bigint";default:return"unsupported"}if(null===e)return"primitive";let t=Object.getPrototypeOf(e);switch(t){case Object.prototype:return"object";case Function.prototype:case s.prototype:return"function";case Array.prototype:return"array";case Date.prototype:return"date";case Uint8Array.prototype:case l:return"bytes";case WritableStream.prototype:return"writable";case ReadableStream.prototype:return"readable";case Headers.prototype:return"headers";case Request.prototype:return"request";case Response.prototype:return"response";case x.prototype:return"stub";case k.prototype:return"rpc-promise";default:if(a){if(t==a.RpcStub.prototype||e instanceof a.ServiceStub)return"rpc-target";else if(t==a.RpcPromise.prototype||t==a.RpcProperty.prototype)return"rpc-thenable"}if(e instanceof o)return"rpc-target";if(e instanceof Error)return"error";return"unsupported"}}function u(){throw Error("RPC map() implementation was not loaded.")}var d={applyMap:u,sendMap:u};function h(){throw Error("Stream implementation was not loaded.")}var p={createWritableStreamHook:h,createWritableStreamFromHook:h,createReadableStreamHook:h},m=class{stream(e,t){let n,r=this.call(e,t).pull();return r instanceof Promise?n=r.then(e=>{e.dispose()}):(r.dispose(),n=Promise.resolve()),{promise:n}}},f=class extends m{constructor(e){super(),this.error=e}call(e,t){return this}map(e,t,n){return this}get(e){return this}dup(){return this}pull(){return Promise.reject(this.error)}ignoreUnhandledRejections(){}dispose(){}onBroken(e){try{e(this.error)}catch(e){Promise.resolve(e)}}},g=new f(Error("Attempted to use RPC stub after it has been disposed.")),y=(e,t,n)=>e.call(t,n),b=Symbol("realStub"),v={apply(e,t,n){let r=e.raw;return new k(y(r.hook,r.pathIfPromise||[],S.fromAppParams(n)),[])},get(e,t,n){let r=e.raw;return t===b?r:t in k.prototype?r[t]:"string"==typeof t?new k(r.hook,r.pathIfPromise?[...r.pathIfPromise,t]:[t]):t!==Symbol.dispose||r.pathIfPromise&&0!=r.pathIfPromise.length?void 0:()=>{r.hook.dispose(),r.hook=g}},has(e,t){let n=e.raw;return t===b||(t in k.prototype?t in n:"string"==typeof t||t===Symbol.dispose&&(!n.pathIfPromise||0==n.pathIfPromise.length)||!1)},construct(e,t){throw Error("An RPC stub cannot be used as a constructor.")},defineProperty(e,t,n){throw Error("Can't define properties on RPC stubs.")},deleteProperty(e,t){throw Error("Can't delete properties on RPC stubs.")},getOwnPropertyDescriptor(e,t){},getPrototypeOf:e=>Object.getPrototypeOf(e.raw),isExtensible:e=>!1,ownKeys:e=>[],preventExtensions:e=>!0,set(e,t,n,r){throw Error("Can't assign properties on RPC stubs.")},setPrototypeOf(e,t){throw Error("Can't override prototype of RPC stubs.")}},x=class e extends o{constructor(e,t){if(super(),!(e instanceof m)){let n=e;if(e=n instanceof o||n instanceof Function?N.create(n,void 0):new I(S.fromAppReturn(n)),t)throw TypeError("RpcStub constructor expected one argument, received t
203wo.")}this.hook=e,this.pathIfPromise=t;let n=()=>{};return n.raw=this,new Proxy(n,v)}hook;pathIfPromise;dup(){let t=this[b];return new e(t.pathIfPromise?t.hook.get(t.pathIfPromise):t.hook.dup())}onRpcBroken(e){this[b].hook.onBroken(e)}map(e){let{hook:t,pathIfPromise:n}=this[b];return d.sendMap(t,n||[],e)}toString(){return"[object RpcStub]"}},k=class extends x{constructor(e,t){super(e,t)}then(e,t){return C(this).then(...arguments)}catch(e){return C(this).catch(...arguments)}finally(e){return C(this).finally(...arguments)}toString(){return"[object RpcPromise]"}};function w(e){let{hook:t,pathIfPromise:n}=e[b];if(!n||!(n.length>0))return t}async function C(e){let{hook:t,pathIfPromise:n}=e[b];return n.length>0&&(t=t.get(n)),(await t.pull()).deliverResolve()}var S=class e{constructor(e,t,n,r){this.value=e,this.source=t,this.hooks=n,this.promises=r}static fromAppParams(t){return new e(t,"params")}static fromAppReturn(t){return new e(t,"return")}static fromArray(t){let n=[],r=[],i=[];for(let e of t){for(let t of(e.ensureDeepCopied(),e.hooks))n.push(t);for(let t of e.promises)t.parent===e&&(t={parent:i,property:i.length,promise:t.promise}),r.push(t);i.push(e.value)}return new e(i,"owned",n,r)}static forEvaluate(t,n){return new e(null,"owned",t,n)}static deepCopyFrom(t,n,r){let i=new e(null,"owned",[],[]);return i.value=i.deepCopy(t,n,"value",i,!0,r),i}rpcTargets;getHookForRpcTarget(e,t,n=!0){if("params"===this.source){if(n){let t=e;"function"==typeof t.dup&&(e=t.dup())}return N.create(e,t)}if("return"===this.source){let r=this.rpcTargets?.get(e);if(r)if(n)return r.dup();else return this.rpcTargets?.delete(e),r;return(r=N.create(e,t),n)?(this.rpcTargets||(this.rpcTargets=new Map),this.rpcTargets.set(e,r),r.dup()):r}throw Error("owned payload shouldn't contain raw RpcTargets")}getHookForWritableStream(e,t,n=!0){if("params"===this.source)return p.createWritableStreamHook(e);if("return"===this.source){let t=this.rpcTargets?.get(e);if(t)if(n)return t.dup();else return this.rpcTargets?.delete(e),t;return(t=p.createWritableStreamHook(e),n)?(this.rpcTargets||(this.rpcTargets=new Map),this.rpcTargets.set(e,t),t.dup()):t}throw Error("owned payload shouldn't contain raw WritableStreams")}getHookForReadableStream(e,t,n=!0){if("params"===this.source)return p.createReadableStreamHook(e);if("return"===this.source){let t=this.rpcTargets?.get(e);if(t)if(n)return t.dup();else return this.rpcTargets?.delete(e),t;return(t=p.createReadableStreamHook(e),n)?(this.rpcTargets||(this.rpcTargets=new Map),this.rpcTargets.set(e,t),t.dup()):t}throw Error("owned payload shouldn't contain raw ReadableStreams")}deepCopy(e,t,n,r,i,a){switch(c(e)){case"unsupported":case"primitive":case"bigint":case"date":case"bytes":case"error":case"undefined":return e;case"array":{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=this.deepCopy(e[r],e,r,n,i,a);return n}case"object":{let t={};for(let n in e)t[n]=this.deepCopy(e[n],e,n,t,i,a);return t}case"stub":case"rpc-promise":{let t;if(t=i?function(e){let{hook:t,pathIfPromise:n}=e[b];return n?t.get(n):t.dup()}(e):function(e){let{hook:t,pathIfPromise:n}=e[b];return n&&n.length>0?t.get(n):t}(e),!(e instanceof k))return this.hooks.push(t),new x(t);{let e=new k(t,[]);return this.promises.push({parent:r,property:n,promise:e}),e}}case"function":case"rpc-target":{let n;return n=a?a.getHookForRpcTarget(e,t,i):N.create(e,t),this.hooks.push(n),new x(n)}case"rpc-thenable":{let o;return o=a?new k(a.getHookForRpcTarget(e,t,i),[]):new k(N.create(e,t),[]),this.promises.push({parent:r,property:n,promise:o}),o}case"writable":{let n;return n=a?a.getHookForWritableStream(e,t,i):p.createWritableStreamHook(e),this.hooks.push(n),e}case"readable":{let n;return n=a?a.getHookForReadableStream(e,t,i):p.createReadableStreamHook(e),this.hooks.push(n),e}case"headers":return new Headers(e);case"request":return e.body&&this.deepCopy(e.body,e,"body",e,i,a),new Request(e);case"response":return e.body&&this.deepCopy(e.body,e,"body",e,i,a),new Response(e.body,e);default:throw Error("unreachable")}}ensureDeepCopied(){if("owned"!==this.source){let e="params"===this.source;this.hooks=[],this.promises=[];try{this.value=this.deepCopy(this.value,void 0,"value",this,e,this)}catch(e){throw this.hooks=void 0,this.promises=void 0,e}if(this.source="owned",this.rpcTargets&&this.rpcTargets.size>0)throw Error("Not all rpcTargets were accounted for in deep-copy?");this.rpcTargets=void 0}}deliverTo(t,n,r){if(this.ensureDeepCopied(),this.value instanceof k)e.deliverRpcPromiseTo(this.value,t,n,r);else for(let i of(t[n]=this.value,this.promises))e.deliverRpcPromiseTo(i.promise,i.parent,i.property,r)}static deliverRpcPromiseTo(t,n,r,i){let a=w(t);if(!a)throw Error("property promises should have been resolved earlier");let o=a.pull();o instanceof e?o.deliverTo(n,r,i):i.push(o.then(e=>{let t=[];if(e.deliverTo(n,r,t),t.length>0)return Promise.all(t)}))}async deliverCall(t,n){try{let r=[];this.deliverTo(this,"value",r),r.length>0&&await Promise.all(r);let i=Function.prototype.apply.call(t,n,this.value);if(i instanceof k)return e.fromAppReturn(i);return e.fromAppReturn(await i)}finally{this.dispose()}}async deliverResolve(){try{let e=[];this.deliverTo(this,"value",e),e.length>0&&await Promise.all(e);let t=this.value;return t instanceof Object&&!(Symbol.dispose in t)&&Object.defineProperty(t,Symbol.dispose,{value:()=>
203this.dispose(),writable:!0,enumerable:!1,configurable:!0}),t}catch(e){throw this.dispose(),e}}dispose(){if("owned"===this.source)this.hooks.forEach(e=>e.dispose()),this.promises.forEach(e=>e.promise[Symbol.dispose]());else if("return"===this.source&&(this.disposeImpl(this.value,void 0),this.rpcTargets&&this.rpcTargets.size>0))throw Error("Not all rpcTargets were accounted for in disposeImpl()?");this.source="owned",this.hooks=[],this.promises=[]}disposeImpl(e,t){switch(c(e)){case"unsupported":case"primitive":case"bigint":case"bytes":case"date":case"error":case"undefined":case"rpc-thenable":case"headers":default:return;case"array":{let t=e.length;for(let n=0;n<t;n++)this.disposeImpl(e[n],e);return}case"object":for(let t in e)this.disposeImpl(e[t],e);return;case"stub":case"rpc-promise":{let t=w(e);t&&t.dispose();return}case"function":case"rpc-target":{let t=this.rpcTargets?.get(e);t?(t.dispose(),this.rpcTargets.delete(e)):D(e);return}case"request":case"response":e.body&&this.disposeImpl(e.body,e);return;case"writable":{let t=this.rpcTargets?.get(e);t?this.rpcTargets.delete(e):t=p.createWritableStreamHook(e),t.dispose();return}case"readable":{let t=this.rpcTargets?.get(e);t?this.rpcTargets.delete(e):t=p.createReadableStreamHook(e),t.dispose();return}}}ignoreUnhandledRejections(){this.hooks?(this.hooks.forEach(e=>{e.ignoreUnhandledRejections()}),this.promises.forEach(e=>e.promise[b].hook.ignoreUnhandledRejections())):this.ignoreUnhandledRejectionsImpl(this.value)}ignoreUnhandledRejectionsImpl(e){switch(c(e)){case"unsupported":case"primitive":case"bigint":case"bytes":case"date":case"error":case"undefined":case"function":case"rpc-target":case"writable":case"readable":case"headers":case"request":case"response":default:return;case"array":{let t=e.length;for(let n=0;n<t;n++)this.ignoreUnhandledRejectionsImpl(e[n]);return}case"object":for(let t in e)this.ignoreUnhandledRejectionsImpl(e[t]);return;case"stub":case"rpc-promise":e[b].hook.ignoreUnhandledRejections();return;case"rpc-thenable":e.then(e=>{},e=>{});return}}};function E(e,t,n,r){for(let i=0;i<n.length;i++){t=e;let a=n[i];if(a in Object.prototype){e=void 0;continue}switch(c(e)){case"object":case"function":e=Object.hasOwn(e,a)?e[a]:void 0;break;case"array":e=Number.isInteger(a)&&a>=0?e[a]:void 0;break;case"rpc-target":case"rpc-thenable":if(Object.hasOwn(e,a))throw TypeError(`Attempted to access property '${a}', which is an instance property of the RpcTarget. To avoid leaking private internals, instance properties cannot be accessed over RPC. If you want to make this property available over RPC, define it as a method or getter on the class, instead of an instance property.`);e=e[a],r=null;break;case"stub":case"rpc-promise":{let{hook:t,pathIfPromise:r}=e[b];return{hook:t,remainingPath:r?r.concat(n.slice(i)):n.slice(i)}}case"writable":case"readable":case"primitive":case"bigint":case"bytes":case"date":case"error":case"headers":case"request":case"response":e=void 0;break;case"undefined":e=e[a];break;case"unsupported":if(0===i)throw TypeError("RPC stub points at a non-serializable type.");{let e=n.slice(0,i).join("."),t=n.slice(0,i).join(".");throw TypeError(`'${e}' is not a serializable type, so property ${t} cannot be accessed.`)}default:throw TypeError("unreachable")}}if(e instanceof k){let{hook:t,pathIfPromise:n}=e[b];return{hook:t,remainingPath:n||[]}}return{value:e,parent:t,owner:r}}var T=class extends m{call(e,t){try{let{value:n,owner:r}=this.getValue(),i=E(n,void 0,e,r);if(i.hook)return i.hook.call(i.remainingPath,t);if("function"!=typeof i.value)throw TypeError(`'${e.join(".")}' is not a function.`);let a=t.deliverCall(i.value,i.parent);return new A(a.then(e=>new I(e)))}catch(e){return new f(e)}}map(e,t,n){try{let r;try{let{value:t,owner:n}=this.getValue();r=E(t,void 0,e,n)}catch(e){for(let e of t)e.dispose();throw e}if(r.hook)return r.hook.map(r.remainingPath,t,n);return d.applyMap(r.value,r.parent,r.owner,t,n)}catch(e){return new f(e)}}get(e){try{let{value:t,owner:n}=this.getValue();if(0===e.length&&null===n)throw Error("Can't dup an RpcTarget stub as a promise.");let r=E(t,void 0,e,n);if(r.hook)return r.hook.get(r.remainingPath);return new I(S.deepCopyFrom(r.value,r.parent,r.owner))}catch(e){return new f(e)}}},I=class e extends T{constructor(e){super(),this.payload=e}payload;getPayload(){if(this.payload)return this.payload;throw Error("Attempted to use an RPC StubHook after it was disposed.")}getValue(){let e=this.getPayload();return{value:e.value,owner:e}}dup(){let t=this.getPayload();return new e(S.deepCopyFrom(t.value,void 0,t))}pull(){return this.getPayload()}ignoreUnhandledRejections(){this.payload&&this.payload.ignoreUnhandledRejections()}dispose(){this.payload&&(this.payload.dispose(),this.payload=void 0)}onBroken(e){this.payload&&this.payload.value instanceof x&&this.payload.value.onRpcBroken(e)}};function D(e){if(Symbol.dispose in e)try{e[Symbol.dispose]()}catch(e){Promise.reject(e)}}var N=class e extends T{static create(t,n){return"function"!=typeof t&&(n=void 0),new e(t,n)}constructor(e,t,n){super(),this.target=e,this.parent=t,n?n.refcount&&(this.refcount=n.refcount,++this.refcount.count):Symbol.dispose in e&&(this.refcount={count:1})}target;parent;refcount;
203getTarget(){if(this.target)return this.target;throw Error("Attempted to use an RPC StubHook after it was disposed.")}getValue(){return{value:this.getTarget(),owner:null}}dup(){return new e(this.getTarget(),this.parent,this)}pull(){let e=this.getTarget();return"then"in e?Promise.resolve(e).then(e=>S.fromAppReturn(e)):Promise.reject(Error("Tried to resolve a non-promise stub."))}ignoreUnhandledRejections(){}dispose(){this.target&&(this.refcount&&0==--this.refcount.count&&D(this.target),this.target=void 0)}onBroken(e){}},A=class e extends m{promise;resolution;constructor(e){super(),this.promise=e.then(e=>(this.resolution=e,e))}call(t,n){return n.ensureDeepCopied(),new e(this.promise.then(e=>e.call(t,n)))}stream(e,t){return t.ensureDeepCopied(),{promise:this.promise.then(n=>n.stream(e,t).promise)}}map(t,n,r){return new e(this.promise.then(e=>e.map(t,n,r),e=>{for(let e of n)e.dispose();throw e}))}get(t){return new e(this.promise.then(e=>e.get(t)))}dup(){return this.resolution?this.resolution.dup():new e(this.promise.then(e=>e.dup()))}pull(){return this.resolution?this.resolution.pull():this.promise.then(e=>e.pull())}ignoreUnhandledRejections(){this.resolution?this.resolution.ignoreUnhandledRejections():this.promise.then(e=>{e.ignoreUnhandledRejections()},e=>{})}dispose(){this.resolution?this.resolution.dispose():this.promise.then(e=>{e.dispose()},e=>{})}onBroken(e){this.resolution?this.resolution.onBroken(e):this.promise.then(t=>{t.onBroken(e)},e)}},_=new class{exportStub(e){throw Error("Cannot serialize RPC stubs without an RPC session.")}exportPromise(e){throw Error("Cannot serialize RPC stubs without an RPC session.")}getImport(e){}unexport(e){}createPipe(e){throw Error("Cannot create pipes without an RPC session.")}onSendError(e){}},P={Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError},M=class e{constructor(e,t){this.exporter=e,this.source=t}static devaluate(t,n,r=_,i){let a=new e(r,i);try{return a.devaluateImpl(t,n,0)}catch(e){if(a.exports)try{r.unexport(a.exports)}catch(e){}throw e}}exports;devaluateImpl(e,t,n){if(n>=64)throw Error("Serialization exceeded maximum allowed depth. (Does the message contain cycles?)");switch(c(e)){case"unsupported":{let t;try{t=`Cannot serialize value: ${e}`}catch(e){t="Cannot serialize value: (couldn't stringify value)"}throw TypeError(t)}case"primitive":if("number"!=typeof e||isFinite(e))return e;if(e===1/0)return["inf"];if(e===-1/0)return["-inf"];else return["nan"];case"object":{let t={};for(let r in e)t[r]=this.devaluateImpl(e[r],e,n+1);return t}case"array":{let t=e.length,r=Array(t);for(let i=0;i<t;i++)r[i]=this.devaluateImpl(e[i],e,n+1);return[r]}case"bigint":return["bigint",e.toString()];case"date":return["date",e.getTime()];case"bytes":{let t;if(e.toBase64)return["bytes",e.toBase64({omitPadding:!0})];if(void 0!==r.Buffer)t=(e instanceof r.Buffer?e:r.Buffer.from(e.buffer,e.byteOffset,e.byteLength)).toString("base64");else{let n="";for(let t=0;t<e.length;t++)n+=String.fromCharCode(e[t]);t=btoa(n)}return["bytes",t.replace(/=+$/,"")]}case"headers":return["headers",[...e]];case"request":{let t={};"GET"!==e.method&&(t.method=e.method);let r=[...e.headers];if(r.length>0&&(t.headers=r),e.body)t.body=this.devaluateImpl(e.body,e,n+1),t.duplex=e.duplex||"half";else if(void 0===e.body&&!["GET","HEAD","OPTIONS","TRACE","DELETE"].includes(e.method)){let n=e.arrayBuffer(),r=new ReadableStream({async start(e){try{e.enqueue(new Uint8Array(await n)),e.close()}catch(t){e.error(t)}}}),i=p.createReadableStreamHook(r);t.body=["readable",this.exporter.createPipe(r,i)],t.duplex=e.duplex||"half"}return e.cache&&"default"!==e.cache&&(t.cache=e.cache),"follow"!==e.redirect&&(t.redirect=e.redirect),e.integrity&&(t.integrity=e.integrity),e.mode&&"cors"!==e.mode&&(t.mode=e.mode),e.credentials&&"same-origin"!==e.credentials&&(t.credentials=e.credentials),e.referrer&&"about:client"!==e.referrer&&(t.referrer=e.referrer),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.keepalive&&(t.keepalive=e.keepalive),e.cf&&(t.cf=e.cf),e.encodeResponseBody&&"automatic"!==e.encodeResponseBody&&(t.encodeResponseBody=e.encodeResponseBody),["request",e.url,t]}case"response":{let t=this.devaluateImpl(e.body,e,n+1),r={};200!==e.status&&(r.status=e.status),e.statusText&&(r.statusText=e.statusText);let i=[...e.headers];if(i.length>0&&(r.headers=i),e.cf&&(r.cf=e.cf),e.encodeBody&&"automatic"!==e.encodeBody&&(r.encodeBody=e.encodeBody),e.webSocket)throw TypeError("Can't serialize a Response containing a webSocket.");return["response",t,r]}case"error":{let t=e,n=this.exporter.onSendError(t);n&&(t=n);let r=["error",t.name,t.message];return n&&n.stack&&r.push(n.stack),r}case"undefined":return["undefined"];case"stub":case"rpc-promise":{if(!this.source)throw Error("Can't serialize RPC stubs in this context.");let{hook:t,pathIfPromise:n}=e[b],r=this.exporter.getImport(t);if(void 0!==r)if(!n)return["import",r];else if(n.length>0)return["pipeline",r,n];else return["pipeline",r];return t=n?t.get(n):t.dup(),this.devaluateHook(n?"promise":"export",t)}case"function":case"rpc-target":{if(!this.source)throw Error("Can't serialize RPC stubs in this context.");let n=this.source.getHookForRpcTarget(e,t);return this.devaluateHook("export",n)}case"rpc-thenable":{if(!this.source)throw Error("Can't serialize RPC stubs in this context.");let n=this.source.getHookForRpcTarget(e,t);return this.devaluateHook("promise",n)}case"writable":{if(!this.source)throw Error("Can't serialize WritableStream in this context.");let n=this.source.getHookForWritableStream(e,t);return this.devaluateHook("writable",n)}case"readable":{if(!this.source)throw Error("Can't serialize ReadableStream in this context.");let n=this.source.getHookForReadableStream(e,t);return["readable",this.exporter.createPipe(e,n)]}default:throw Error("unreachable")}}devaluateHook(e,t){this.exports||(this.exports=[]);let n="promise"===e?this.exporter.exportPromise(t):this.exporter.exportStub(t);return this.exports.push(n),[e,n]}},R=class e{constructor(e){this.importer=e}hooks=[];promises=[];evaluate(e){let t=S.forEvaluate(this.hooks,this.promises);try{return t.value=this.evaluateImpl(e,t,"value"),t}catch(e){throw t.dispose(),e}}evaluateCopy(e){return this.evaluate(structuredClone(e))}evaluateImpl(t,n,i){if(t instanceof Array){if(1==t.length&&t[0]instanceof Array){let e=t[0];for(let t=0;t<e.length;t++)e[t]=this.evaluateImpl(e[t],e,t);return e}switch(t[0]){case"bigint":if("string"==typeof t[1])return BigInt(t[1]);break;case"date":if("number"==typeof t[1])return new Date(t[1]);break;case"bytes":if("string"==typeof t[1])if(void 0!==r.Buffer)return r.Buffer.from(t[1],"base64");else{if(Uint8Array.fromBase64)return Uint8Array.fromBase64(t[1]);let e=atob(t[1]),n=e.length,r=new Uint8Array(n);for(let t=0;t<n;t++)r[t]=e.charCodeAt(t);return r}break;case"error":if(t.length>=3&&"string"==typeof t[1]&&"string"==typeof t[2]){let e=new(P[t[1]]||Error)(t[2]);return"string"==typeof t[3]&&(e.stack=t[3]),e}break;case"undefined":if(1===t.length)return;break;case"inf":return 1/0;case"-inf":return-1/0;case"nan":return NaN;case"headers":if(2===t.length&&t[1]instanceof Array)return new Headers(t[1]);break;case"request":{if(3!==t.length||"string"!=typeof t[1])break;let e=t[1],r=t[2];if("object"!=typeof r||null===r)break;
203if(r.body)if(r.body=this.evaluateImpl(r.body,r,"body"),null===r.body||"string"==typeof r.body||r.body instanceof Uint8Array||r.body instanceof ReadableStream);else throw TypeError("Request body must be of type ReadableStream.");if(r.signal&&(r.signal=this.evaluateImpl(r.signal,r,"signal"),!(r.signal instanceof AbortSignal)))throw TypeError("Request siganl must be of type AbortSignal.");if(r.headers&&!(r.headers instanceof Array))throw TypeError("Request headers must be serialized as an array of pairs.");let a=new Request(e,r);if(!(r.body instanceof ReadableStream)||void 0!==a.body)return a;{let e=new k(new A(new Response(r.body).arrayBuffer().then(e=>{let t=new Request(a,{body:new Uint8Array(e)});return new I(S.fromAppReturn(t))})),[]);return this.promises.push({promise:e,parent:n,property:i}),e}}case"response":{if(3!==t.length)break;let e=this.evaluateImpl(t[1],n,i);if(null===e||"string"==typeof e||e instanceof Uint8Array||e instanceof ReadableStream);else throw TypeError("Response body must be of type ReadableStream.");let r=t[2];if("object"!=typeof r||null===r)break;
203if(r.webSocket)throw TypeError("Can't deserialize a Response containing a webSocket.");if(r.headers&&!(r.headers instanceof Array))throw TypeError("Request headers must be serialized as an array of pairs.");return new Response(e,r)}case"import":case"pipeline":{if(t.length<2||t.length>4||"number"!=typeof t[1])break;let r=this.importer.getExport(t[1]);if(!r)throw Error(`no such entry on exports table: ${t[1]}`);let a="pipeline"==t[0],o=e=>{if(!a)return this.hooks.push(e),new k(e,[]);{let t=new k(e,[]);return this.promises.push({promise:t,parent:n,property:i}),t}};if(2==t.length)if(a)return o(r.get([]));else return o(r.dup());let s=t[2];if(!(s instanceof Array)||!s.every(e=>"string"==typeof e||"number"==typeof e))break;if(3==t.length)return o(r.get(s));let l=t[3];if(!(l instanceof Array))break;return l=new e(this.importer).evaluate([l]),o(r.call(s,l))}case"remap":{if(5!==t.length||"number"!=typeof t[1]||!(t[2]instanceof Array)||!(t[3]instanceof Array)||!(t[4]instanceof Array))break;let e=this.importer.getExport(t[1]);if(!e)throw Error(`no such entry on exports table: ${t[1]}`);let r=t[2];if(!r.every(e=>"string"==typeof e||"number"==typeof e))break;let a=t[3].map(e=>{if(!(e instanceof Array)||2!==e.length||"import"!==e[0]&&"export"!==e[0]||"number"!=typeof e[1])throw TypeError(`unknown map capture: ${JSON.stringify(e)}`);if("export"===e[0])return this.importer.importStub(e[1]);{let t=this.importer.getExport(e[1]);if(!t)throw Error(`no such entry on exports table: ${e[1]}`);return t.dup()}}),o=t[4],s=new k(e.map(r,a,o),[]);return this.promises.push({promise:s,parent:n,property:i}),s}case"export":case"promise":if("number"==typeof t[1])if("promise"==t[0]){let e=new k(this.importer.importPromise(t[1]),[]);return this.promises.push({parent:n,property:i,promise:e}),e}else{let e=this.importer.importStub(t[1]);return this.hooks.push(e),new x(e)}break;case"writable":if("number"==typeof t[1]){let e=this.importer.importStub(t[1]),n=p.createWritableStreamFromHook(e);return this.hooks.push(e),n}break;case"readable":if("number"==typeof t[1]){let e=this.importer.getPipeReadable(t[1]),n=p.createReadableStreamHook(e);return this.hooks.push(n),e}}throw TypeError(`unknown special value: ${JSON.stringify(t)}`)}if(!(t instanceof Object))return t;for(let e in t)e in Object.prototype||"toJSON"===e?(this.evaluateImpl(t[e],t,e),delete t[e]):t[e]=this.evaluateImpl(t[e],t,e);return t}},L=class{constructor(e,t,n){this.session=e,this.importId=t,n&&(this.activePull=Promise.withResolvers())}localRefcount=0;remoteRefcount=1;activePull;resolution;onBrokenRegistrations;resolve(e){if(0==this.localRefcount)return void e.dispose();if(this.resolution=e,this.sendRelease(),this.onBrokenRegistrations){for(let t of this.onBrokenRegistrations){let n=this.session.onBrokenCallbacks[t],r=this.session.onBrokenCallbacks.length;e.onBroken(n),this.session.onBrokenCallbacks[r]===n?delete this.session.onBrokenCallbacks[r]:delete this.session.onBrokenCallbacks[t]}this.onBrokenRegistrations=void 0}this.activePull&&(this.activePull.resolve(),this.activePull=void 0)}async awaitResolution(){return this.activePull||(this.session.sendPull(this.importId),this.activePull=Promise.withResolvers()),await this.activePull.promise,this.resolution.pull()}dispose(){this.resolution?this.resolution.dispose():(this.abort(Error("RPC was canceled because the RpcPromise was disposed.")),this.sendRelease())}abort(e){this.resolution||(this.resolution=new f(e),this.activePull&&(this.activePull.reject(e),this.activePull=void 0),this.onBrokenRegistrations=void 0)}onBroken(e){if(this.resolution)this.resolution.onBroken(e);else{let t=this.session.onBrokenCallbacks.length;this.session.onBrokenCallbacks.push(e),this.onBrokenRegistrations||(this.onBrokenRegistrations=[]),this.onBrokenRegistrations.push(t)}}sendRelease(){this.remoteRefcount>0&&(this.session.sendRelease(this.importId,this.remoteRefcount),this.remoteRefcount=0)}},j=class e extends m{constructor(e,t){super(),this.isPromise=e,++t.localRefcount,this.entry=t}entry;collectPath(e){return this}getEntry(){if(this.entry)return this.entry;throw Error("This RpcImportHook was already disposed.")}call(e,t){let n=this.getEntry();return n.resolution?n.resolution.call(e,t):n.session.sendCall(n.importId,e,t)}stream(e,t){let n=this.getEntry();return n.resolution?n.resolution.stream(e,t):n.session.sendStream(n.importId,e,t)}map(e,t,n){let r;try{r=this.getEntry()}catch(e){for(let e of t)e.dispose();throw e}return r.resolution?r.resolution.map(e,t,n):r.session.sendMap(r.importId,e,t,n)}get(e){let t=this.getEntry();return t.resolution?t.resolution.get(e):t.session.sendCall(t.importId,e)}dup(){return new e(!1,this.getEntry())}pull(){let e=this.getEntry();if(!this.isPromise)throw Error("Can't pull this hook because it's not a promise hook.");return e.resolution?e.resolution.pull():e.awaitResolution()}ignoreUnhandledRejections(){}dispose(){let e=this.entry;this.entry=void 0,e&&0==--e.localRefcount&&e.dispose()}onBroken(e){this.entry&&this.entry.onBroken(e)}}
203,O=class extends j{session;constructor(e){super(!1,e),this.session=e.session}dispose(){if(this.session){let e=this.session;this.session=void 0,e.shutdown()}}},B=class{constructor(e,t,n){let r;this.transport=e,this.options=n,this.exports.push({hook:t,refcount:1}),this.imports.push(new L(this,0,!1));let i=new Promise((e,t)=>{r=t});this.cancelReadLoop=r,this.readLoop(i).catch(e=>this.abort(e))}exports=[];reverseExports=new Map;imports=[];abortReason;cancelReadLoop;nextExportId=-1;onBatchDone;pullCount=0;onBrokenCallbacks=[];getMainImport(){return new O(this.imports[0])}shutdown(){this.abort(Error("RPC session was shut down by disposing the main stub"),!1)}exportStub(e){if(this.abortReason)throw this.abortReason;let t=this.reverseExports.get(e);if(void 0!==t)return++this.exports[t].refcount,t;{let t=this.nextExportId--;return this.exports[t]={hook:e,refcount:1},this.reverseExports.set(e,t),t}}exportPromise(e){if(this.abortReason)throw this.abortReason;let t=this.nextExportId--;return this.exports[t]={hook:e,refcount:1},this.reverseExports.set(e,t),this.ensureResolvingExport(t),t}unexport(e){for(let t of e)this.releaseExport(t,1)}releaseExport(e,t){let n=this.exports[e];if(!n)throw Error(`no such export ID: ${e}`);if(n.refcount<t)throw Error(`refcount would go negative: ${n.refcount} < ${t}`);n.refcount-=t,0===n.refcount&&(delete this.exports[e],this.reverseExports.delete(n.hook),n.hook.dispose())}onSendError(e){if(this.options.onSendError)return this.options.onSendError(e)}ensureResolvingExport(e){let t=this.exports[e];if(!t)throw Error(`no such export ID: ${e}`);if(!t.pull){let n=async()=>{let e=t.hook;for(;;){let t=await e.pull();if(t.value instanceof x){let{hook:n,pathIfPromise:r}=t.value[b];if(r&&0==r.length&&void 0===this.getImport(e)){e=n;continue}}return t}},r=t.autoRelease;++this.pullCount,t.pull=n().then(t=>{let n=M.devaluate(t.value,void 0,this,t);this.send(["resolve",e,n]),r&&this.releaseExport(e,1)},t=>{this.send(["reject",e,M.devaluate(t,void 0,this)]),r&&this.releaseExport(e,1)}).catch(t=>{try{this.send(["reject",e,M.devaluate(t,void 0,this)]),r&&this.releaseExport(e,1)}catch(e){this.abort(e)}}).finally(()=>{0==--this.pullCount&&this.onBatchDone&&this.onBatchDone.resolve()})}}getImport(e){return e instanceof j&&e.entry&&e.entry.session===this?e.entry.importId:void 0}importStub(e){if(this.abortReason)throw this.abortReason;let t=this.imports[e];return t||(t=new L(this,e,!1),this.imports[e]=t),new j(!1,t)}importPromise(e){if(this.abortReason)throw this.abortReason;if(this.imports[e])return new f(Error("Bug in RPC system: The peer sent a promise reusing an existing export ID."));let t=new L(this,e,!0);return this.imports[e]=t,new j(!0,t)}getExport(e){return this.exports[e]?.hook}getPipeReadable(e){let t=this.exports[e];if(!t||!t.pipeReadable)throw Error(`Export ${e} is not a pipe or its readable end was already consumed.`);let n=t.pipeReadable;return t.pipeReadable=void 0,n}createPipe(e,t){if(this.abortReason)throw this.abortReason;this.send(["pipe"]);let n=this.imports.length,r=new L(this,n,!1);this.imports.push(r);let i=new j(!1,r),a=p.createWritableStreamFromHook(i);return e.pipeTo(a).catch(()=>{}).finally(()=>t.dispose()),n}send(e){let t;if(void 0!==this.abortReason)return 0;try{t=JSON.stringify(e)}catch(e){try{this.abort(e)}catch(e){}throw e}return this.transport.send(t).catch(e=>this.abort(e,!1)),t.length}sendCall(e,t,n){if(this.abortReason)throw this.abortReason;let r=["pipeline",e,t];if(n){let e=M.devaluate(n.value,void 0,this,n);r.push(e[0])}this.send(["push",r]);let i=new L(this,this.imports.length,!1);return this.imports.push(i),new j(!0,i)}sendStream(e,t,n){if(this.abortReason)throw this.abortReason;let r=["pipeline",e,t],i=M.devaluate(n.value,void 0,this,n);r.push(i[0]);let a=this.send(["stream",r]),o=this.imports.length,s=new L(this,o,!0);return s.remoteRefcount=0,s.localRefcount=1,this.imports.push(s),{promise:s.awaitResolution().then(e=>{e.dispose(),delete this.imports[o]},e=>{throw delete this.imports[o],e}),size:a}}sendMap(e,t,n,r){if(this.abortReason){for(let e of n)e.dispose();throw this.abortReason}let i=n.map(e=>{let t=this.getImport(e);return void 0!==t?["import",t]:["export",this.exportStub(e)]});this.send(["push",["remap",e,t,i,r]]);let a=new L(this,this.imports.length,!1);return this.imports.push(a),new j(!0,a)}sendPull(e){if(this.abortReason)throw this.abortReason;this.send(["pull",e])}sendRelease(e,t){this.abortReason||(this.send(["release",e,t]),delete this.imports[e])}abort(e,t=!0){if(void 0===this.abortReason){if(this.cancelReadLoop(e),t)try{this.transport.send(JSON.stringify(["abort",M.devaluate(e,void 0,this)])).catch(e=>{})}catch(e){}if(void 0===e&&(e="undefined"),this.abortReason=e,this.onBatchDone&&this.onBatchDone.reject(e),this.transport.abort)try{this.transport.abort(e)}catch(e){Promise.resolve(e)}for(let t in this.onBrokenCallbacks)try{this.onBrokenCallbacks[t](e)}catch(e){Promise.resolve(e)}for(let t in this.imports)this.imports[t].abort(e);
203for(let e in this.exports)this.exports[e].hook.dispose()}}async readLoop(e){for(;!this.abortReason;){let t=JSON.parse(await Promise.race([this.transport.receive(),e]));if(this.abortReason)break;if(t instanceof Array)switch(t[0]){case"push":if(t.length>1){let e=new I(new R(this).evaluate(t[1]));e.ignoreUnhandledRejections(),this.exports.push({hook:e,refcount:1});continue}break;case"stream":if(t.length>1){let e=new I(new R(this).evaluate(t[1]));e.ignoreUnhandledRejections();let n=this.exports.length;this.exports.push({hook:e,refcount:1,autoRelease:!0}),this.ensureResolvingExport(n);continue}break;case"pipe":{let{readable:e,writable:t}=new TransformStream,n=p.createWritableStreamHook(t);this.exports.push({hook:n,refcount:1,pipeReadable:e});continue}case"pull":{let e=t[1];if("number"==typeof e){this.ensureResolvingExport(e);continue}break}case"resolve":case"reject":{let e=t[1];if("number"==typeof e&&t.length>2){let n=this.imports[e];if(n)if("resolve"==t[0])n.resolve(new I(new R(this).evaluate(t[2])));else{let e=new R(this).evaluate(t[2]);e.dispose(),n.resolve(new f(e.value))}else"resolve"==t[0]&&new R(this).evaluate(t[2]).dispose();continue}break}case"release":{let e=t[1],n=t[2];if("number"==typeof e&&"number"==typeof n){this.releaseExport(e,n);continue}break}case"abort":{let e=new R(this).evaluate(t[1]);e.dispose(),this.abort(e,!1)}}throw Error(`bad RPC message: ${JSON.stringify(t)}`)}}async drain(){if(this.abortReason)throw this.abortReason;if(this.pullCount>0){let{promise:e,resolve:t,reject:n}=Promise.withResolvers();this.onBatchDone={resolve:t,reject:n},await e}}getStats(){let e={imports:0,exports:0};for(let t in this.imports)++e.imports;for(let t in this.exports)++e.exports;return e}},F=class{#e;#t;constructor(e,t,n={}){let r;r=t?new I(S.fromAppReturn(t)):new f(Error("This connection has no main object.")),this.#e=new B(e,r,n),this.#t=new x(this.#e.getMainImport())}getRemoteMain(){return this.#t}getStats(){return this.#e.getStats()}drain(){return this.#e.drain()}},H=class{constructor(e){this.#n=e,e.start(),e.addEventListener("message",e=>{this.#r||(null===e.data?this.#i(Error("Peer closed MessagePort connection.")):"string"==typeof e.data?this.#a?(this.#a(e.data),this.#a=void 0,this.#o=void 0):this.#s.push(e.data):this.#i(TypeError("Received non-string message from MessagePort.")))}),e.addEventListener("messageerror",e=>{this.#i(Error("MessagePort message error."))})}#n;#a;#o;#s=[];#r;async send(e){if(this.#r)throw this.#r;this.#n.postMessage(e)}async receive(){if(this.#s.length>0)return this.#s.shift();if(!this.#r)return new Promise((e,t)=>{this.#a=e,this.#o=t});throw this.#r}abort(e){try{this.#n.postMessage(null)}catch(e){}this.#n.close(),this.#r||(this.#r=e)}#i(e){!this.#r&&(this.#r=e,this.#o&&(this.#o(e),this.#a=void 0,this.#o=void 0))}},U=class{context;captureMap=new Map;instructions=[];constructor(e,n){t?this.context={parent:t,captures:[],subject:t.capture(e),path:n}:this.context={parent:void 0,captures:[],subject:e,path:n},t=this}unregister(){t=this.context.parent}makeInput(){return new $(this,0)}makeOutput(e){let t;try{t=M.devaluate(e.value,void 0,this,e)}finally{e.dispose()}return(this.instructions.push(t),this.context.parent)?(this.context.parent.instructions.push(["remap",this.context.subject,this.context.path,this.context.captures.map(e=>["import",e]),this.instructions]),new $(this.context.parent,this.context.parent.instructions.length)):this.context.subject.map(this.context.path,this.context.captures,this.instructions)}pushCall(e,t,n){let r=M.devaluate(n.value,void 0,this,n);r=r[0];let i=this.capture(e.dup());return this.instructions.push(["pipeline",i,t,r]),new $(this,this.instructions.length)}pushGet(e,t){let n=this.capture(e.dup());return this.instructions.push(["pipeline",n,t]),new $(this,this.instructions.length)}capture(e){if(e instanceof $&&e.mapper===this)return e.idx;let t=this.captureMap.get(e);if(void 0===t){if(this.context.parent){let t=this.context.parent.capture(e);this.context.captures.push(t)}else this.context.captures.push(e);t=-this.context.captures.length,this.captureMap.set(e,t)}return t}exportStub(e){throw Error("Can't construct an RpcTarget or RPC callback inside a mapper function. Try creating a new RpcStub outside the callback first, then using it inside the callback.")}exportPromise(e){return this.exportStub(e)}getImport(e){return this.capture(e)}unexport(e){}createPipe(e){throw Error("Cannot send ReadableStream inside a mapper function.")}onSendError(e){}};function z(){throw Error("Attempted to use an abstract placeholder from a mapper function. Please make sure your map function has no side effects.")}d.sendMap=(e,t,n)=>{let r,i=new U(e,t);try{r=S.fromAppReturn(function(e,t){let n=y;y=e;try{return t()}finally{y=n}}(i.pushCall.bind(i),()=>n(new k(i.makeInput(),[]))))}finally{i.unregister()}if(r instanceof Promise)throw r.catch(e=>{}),Error("RPC map() callbacks cannot be async.");return new k(i.makeOutput(r),[])};var $=class extends m{constructor(e,t){super(),this.mapper=e,this.idx=t}dup(){return this}dispose(){}get(e){return 0==e.length?this:t?t.pushGet(this,e):void z()}call(e,t){z()}map(e,t,n){z()}pull(){z()}ignoreUnhandledRejections(){}onBroken(e){z()}},V=class{constructor(e,t){this.captures=e,this.variables=[t]}variables;
203dispose(){for(let e of this.variables)e.dispose()}apply(e){try{if(e.length<1)throw Error("Invalid empty mapper function.");for(let t of e.slice(0,-1)){let e=new R(this).evaluateCopy(t);if(e.value instanceof x){let t=w(e.value);if(t){this.variables.push(t);continue}}this.variables.push(new I(e))}return new R(this).evaluateCopy(e[e.length-1])}finally{for(let e of this.variables)e.dispose()}}importStub(e){throw Error("A mapper function cannot refer to exports.")}importPromise(e){return this.importStub(e)}getExport(e){return e<0?this.captures[-e-1]:this.variables[e]}getPipeReadable(e){throw Error("A mapper function cannot use pipe readables.")}};function q(e,t,n,r,i){let a=new V(r,new I(S.deepCopyFrom(e,t,n)));try{return a.apply(i)}finally{a.dispose()}}d.applyMap=(e,t,n,r,i)=>{try{let a;if(e instanceof k)throw Error("applyMap() can't be called on RpcPromise");if(e instanceof Array){let t=[];try{for(let a of e)t.push(q(a,e,n,r,i))}catch(e){for(let e of t)e.dispose();throw e}a=S.fromArray(t)}else a=null==e?S.fromAppReturn(e):q(e,t,n,r,i);return new I(a)}finally{for(let e of r)e.dispose()}};var G=class e extends m{state;static create(t){return new e({refcount:1,writer:t.getWriter(),closed:!1})}constructor(e,t){super(),this.state=e,t&&++e.refcount}getState(){if(this.state)return this.state;throw Error("Attempted to use a WritableStreamStubHook after it was disposed.")}call(e,t){try{let n=this.getState();if(1!==e.length||"string"!=typeof e[0])throw Error("WritableStream stub only supports direct method calls");let r=e[0];if("write"!==r&&"close"!==r&&"abort"!==r)throw t.dispose(),Error(`Unknown WritableStream method: ${r}`);("close"===r||"abort"===r)&&(n.closed=!0);let i=n.writer[r],a=t.deliverCall(i,n.writer);return new A(a.then(e=>new I(e)))}catch(e){return new f(e)}}map(e,t,n){for(let e of t)e.dispose();return new f(Error("Cannot use map() on a WritableStream"))}get(e){return new f(Error("Cannot access properties on a WritableStream stub"))}dup(){return new e(this.getState(),this)}pull(){return Promise.reject(Error("Cannot pull a WritableStream stub"))}ignoreUnhandledRejections(){}dispose(){let e=this.state;this.state=void 0,e&&0==--e.refcount&&(e.closed||e.writer.abort(Error("WritableStream RPC stub was disposed without calling close()")).catch(()=>{}),e.writer.releaseLock())}onBroken(e){}},W=class{constructor(e){this.now=e}window=262144;bytesInFlight=0;inStartupPhase=!0;delivered=0;deliveredTime=0;firstAckTime=0;firstAckDelivered=0;minRtt=1/0;roundsWithoutIncrease=0;lastRoundWindow=0;roundStartTime=0;onSend(e){this.bytesInFlight+=e;let t={sentTime:this.now(),size:e,deliveredAtSend:this.delivered,deliveredTimeAtSend:this.deliveredTime,windowAtSend:this.window,windowFullAtSend:this.bytesInFlight>=this.window};return{token:t,shouldBlock:t.windowFullAtSend}}onError(e){this.bytesInFlight-=e.size}onAck(e){let t=this.now();this.delivered+=e.size,this.deliveredTime=t,this.bytesInFlight-=e.size;let n=t-e.sentTime;if(this.minRtt=Math.min(this.minRtt,n),0===this.firstAckTime)this.firstAckTime=t,this.firstAckDelivered=this.delivered;else{let n,r;0===e.deliveredTimeAtSend?(n=this.firstAckTime,r=this.firstAckDelivered):(n=e.deliveredTimeAtSend,r=e.deliveredAtSend);let i=t-n,a=this.delivered-r,o=this.inStartupPhase?2:1.25,s=a/i*this.minRtt*o;s=Math.min(s,e.windowAtSend*o),s=e.windowFullAtSend?Math.max(s,.9*e.windowAtSend):Math.max(s,this.window),this.window=Math.max(Math.min(s,0x40000000),65536),this.inStartupPhase&&e.sentTime>=this.roundStartTime&&(this.window>1.25*this.lastRoundWindow?this.roundsWithoutIncrease=0:++this.roundsWithoutIncrease>=3&&(this.inStartupPhase=!1),this.roundStartTime=t,this.lastRoundWindow=this.window)}return this.bytesInFlight<this.window}},K=class e extends m{state;static create(t){return new e({refcount:1,stream:t,canceled:!1})}constructor(e,t){super(),this.state=e,t&&++e.refcount}call(e,t){return t.dispose(),new f(Error("Cannot call methods on a ReadableStream stub"))}map(e,t,n){for(let e of t)e.dispose();return new f(Error("Cannot use map() on a ReadableStream"))}get(e){return new f(Error("Cannot access properties on a ReadableStream stub"))}dup(){let t=this.state;if(!t)throw Error("Attempted to dup a ReadableStreamStubHook after it was disposed.");return new e(t,this)}pull(){return Promise.reject(Error("Cannot pull a ReadableStream stub"))}ignoreUnhandledRejections(){}dispose(){let e=this.state;this.state=void 0,e&&0==--e.refcount&&!e.canceled&&(e.canceled=!0,e.stream.locked||e.stream.cancel(Error("ReadableStream RPC stub was disposed without being consumed")).catch(()=>{}))}onBroken(e){}};p.createWritableStreamHook=G.create,p.createWritableStreamFromHook=function(e){let t,n,r,i=!1,a=new W(()=>performance.now()),o=()=>{i||(i=!0,e.dispose())};
203return new WritableStream({write(i,s){if(void 0!==r)throw r;let l=S.fromAppParams([i]),{promise:c,size:u}=e.stream(["write"],l);if(void 0===u)return c.catch(e=>{throw void 0===r&&(r=e),e});{let{token:e,shouldBlock:i}=a.onSend(u);if(c.then(()=>{a.onAck(e)&&t&&(t(),t=void 0,n=void 0)},i=>{a.onError(e),void 0===r&&(r=i,s.error(i),o()),n&&(n(i),t=void 0,n=void 0)}),i)return new Promise((e,r)=>{t=e,n=r})}},async close(){if(void 0!==r)throw o(),r;let{promise:t}=e.stream(["close"],S.fromAppParams([]));try{await t}catch(e){throw r??e}finally{o()}},abort(i){if(void 0!==r)return;r=i??Error("WritableStream was aborted"),n&&(n(r),t=void 0,n=void 0);let{promise:a}=e.stream(["abort"],S.fromAppParams([i]));a.then(()=>o(),()=>o())}})},p.createReadableStreamHook=K.create;var Y=o;class Z extends Y{#l;constructor(e){super(),this.#l=e}open(e){this.#l.onOpen(e)}replaceWith(e){this.#l.onReplaceWith(e)}addBelow(e){this.#l.onAddBelow(e)}}e.s(["useIframeChannel",0,function(e){let t=(0,n.useRef)(null),r=(0,n.useRef)(e);r.current=e;let i=(0,n.useRef)(null),a=(0,n.useCallback)(()=>{i.current&&(i.current[Symbol.dispose](),i.current=null)},[]),o=(0,n.useCallback)(e=>{let n=t.current;if(!n?.contentWindow||e.source!==n.contentWindow||e.data?.type!=="parts.page.connect")return;a();let{port1:o,port2:s}=new MessageChannel,l=new Z({onOpen:e=>r.current.onOpen(e),onReplaceWith:e=>r.current.onReplaceWith(e),onAddBelow:e=>r.current.onAddBelow(e)});try{i.current=new F(new H(o),l,void 0).getRemoteMain()}catch(e){throw console.error("[parts.page] RPC session creation failed",e),e}n.contentWindow.postMessage({type:"parts.page.channel"},"*",[s])},[a]);return(0,n.useEffect)(()=>(window.addEventListener("message",o),()=>{window.removeEventListener("message",o),a()}),[o,a]),{iframeRef:(0,n.useCallback)(e=>{t.current=e},[])}}],828517)},774753,e=>{"use strict";var t,n,r,i,a,o,s,l,c,u,d,h,p,m,f,g,y,b,v,x,k,w,C,S,E,T,I,D,N,A,_,P=e.i(175765),M=e.i(742531),R=e.i(713059),L=e.i(878999),j=e.i(227118);function O(e){let t={...this.data("settings"),...e};this.compiler=function(e){return(0,j.toHtml)(e,t)}}var B=e.i(784801),F=e.i(420061);class H{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function U(e,t){let n={},r={},i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new H(n,r,t)}function z(e){return e.toLowerCase()}H.prototype.property={},H.prototype.normal={},H.prototype.space=null;class ${constructor(e,t){this.property=e,this.attribute=t}}$.prototype.space=null,$.prototype.boolean=!1,$.prototype.booleanish=!1,$.prototype.overloadedBoolean=!1,$.prototype.number=!1,$.prototype.commaSeparated=!1,$.prototype.spaceSeparated=!1,$.prototype.commaOrSpaceSeparated=!1,$.prototype.mustUseProperty=!1,$.prototype.defined=!1;let V=0,q=Q(),G=Q(),W=Q(),K=Q(),Y=Q(),Z=Q(),X=Q();function Q(){return 2**++V}e.s(["boolean",0,q,"booleanish",0,G,"commaOrSpaceSeparated",0,X,"commaSeparated",0,Z,"number",0,K,"overloadedBoolean",0,W,"spaceSeparated",0,Y],400744);var J=e.i(400744);let ee=Object.keys(J);class et extends ${constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<ee.length;){const e=ee[i];!function(e,t,n){n&&(e[t]=n)}(this,ee[i],(n&J[e])===J[e])}}}et.prototype.defined=!0;let en={}.hasOwnProperty;function er(e){let t,n={},r={};for(t in e.properties)if(en.call(e.properties,t)){let i=e.properties[t],a=new et(t,e.transform(e.attributes||{},t),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(a.mustUseProperty=!0),n[t]=a,r[z(t)]=t,r[z(a.attribute)]=t}return new H(n,r,e.space)}let ei=er({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ea=er({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function eo(e,t){return t in e?e[t]:t}function es(e,t){return eo(e,t.toLowerCase())}let el=er({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:es,properties:{xmlns:null,xmlnsXLink:null}}),ec=er({transform:(e,t)=>
vendor: 3,980 bytes, line 203
203"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:G,ariaAutoComplete:null,ariaBusy:G,ariaChecked:G,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:Y,ariaCurrent:null,ariaDescribedBy:Y,ariaDetails:null,ariaDisabled:G,ariaDropEffect:Y,ariaErrorMessage:null,ariaExpanded:G,ariaFlowTo:Y,ariaGrabbed:G,ariaHasPopup:null,ariaHidden:G,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Y,ariaLevel:K,ariaLive:null,ariaModal:G,ariaMultiLine:G,ariaMultiSelectable:G,ariaOrientation:null,ariaOwns:Y,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:G,ariaReadOnly:G,ariaRelevant:null,ariaRequired:G,ariaRoleDescription:Y,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:G,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null}}),eu=er({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:es,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Z,acceptCharset:Y,accessKey:Y,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:Y,autoFocus:q,autoPlay:q,blocking:Y,capture:null,charSet:null,checked:q,cite:null,className:Y,cols:K,colSpan:null,content:null,contentEditable:G,controls:q,controlsList:Y,coords:K|Z,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:W,draggable:G,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:Y,height:K,hidden:q,high:K,href:null,hrefLang:null,htmlFor:Y,httpEquiv:Y,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:Y,itemRef:Y,itemScope:q,itemType:Y,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:K,pattern:null,ping:Y,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:Y,required:q,reversed:q,rows:K,rowSpan:K,sandbox:Y,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:G,src:null,
203srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:G,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Y,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:G,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:K,security:null,unselectable:null}}),ed=er({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
203-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:eo,properties:{about:X,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:Y,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Z,g2:Z,glyphName:Z,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:X,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:K,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
203Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Y,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:X,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:X,rev:X,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:X,requiredFeatures:X,requiredFonts:X,requiredFormats:X,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:X,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:X,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:X,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),eh=U([ea,ei,el,ec,eu],"html"),ep=U([ea,ei,el,ec,ed],"svg");var em=e.i(76696);let ef=/[#.]/g,eg=/^data[-\w.:]+$/i,ey=/-[a-z]/g,eb=/[A-Z]/g;function ev(e,t){let n=z(t),r=t,i=$;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&eg.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(ey,ek);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ey.test(e)){let n=e.replace(eb,ex);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=et}return new i(r,t)}function ex(e){return"-"+e.toLowerCase()}function ek(e){return e.charAt(1).toUpperCase()}var ew=e.i(359091);let eC=new Set(["button","menu","reset","submit"]),eS={}.hasOwnProperty;function eE(e,t,n){let r=n&&function(e){let t={},n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}(n);return function(n,i,...a){let o,s=-1;if(null==n)o={type:"root",children:[]},a.unshift(i);else{var l,c;if((o=function(e,t){let n,r,i=e||"",a={},o=0;for(;o<i.length;){ef.lastIndex=o;let e=ef.exec(i),t=i.slice(o,e?e.index:i.length);t&&(n?"#"===n?a.id=t:Array.isArray(a.className)?a.className.push(t):a.className=[t]:r=t,o+=t.length),e&&(n=e[0],o++)}return{type:"element",tagName:r||t||"div",properties:a,children:[]}}(n,t)).tagName=o.tagName.toLowerCase(),r&&eS.call(r,o.tagName)&&(o.tagName=r[o.tagName]),l=i,c=o.tagName,!(null==l||"object"!=typeof l||Array.isArray(l))&&("input"===c||!l.type||"string"!=typeof l.type||!("children"in l&&Array.isArray(l.children))&&("button"===c?eC.has(l.type.toLowerCase()):!("value"in l)))){let t;
203for(t in i)eS.call(i,t)&&function(e,t,n,r){let i,a=ev(e,n),o=-1;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;i=r}else i="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?(0,ew.parse)(r):a.commaSeparated?(0,em.parse)(r):a.commaOrSpaceSeparated?(0,ew.parse)((0,em.parse)(r).join(" ")):eT(a,a.property,r):Array.isArray(r)?r.concat():"style"===a.property?function(e){let t,n=[];for(t in e)eS.call(e,t)&&n.push([t,e[t]].join(": "));return n.join("; ")}(r):String(r);if(Array.isArray(i)){let e=[];for(;++o<i.length;){let t=eT(a,a.property,i[o]);e[o]=t}i=e}if("className"===a.property&&Array.isArray(t.className)){let e=i;i=t.className.concat(e)}t[a.property]=i}}(e,o.properties,t,i[t])}else a.unshift(i)}for(;++s<a.length;)!function e(t,n){let r=-1;if(null==n);else if("string"==typeof n||"number"==typeof n)t.push({type:"text",value:String(n)});else if(Array.isArray(n))for(;++r<n.length;)e(t,n[r]);else if("object"==typeof n&&"type"in n)"root"===n.type?e(t,n.children):t.push(n);else throw Error("Expected node, nodes, or string, got `"+n+"`")}(o.children,a[s]);return"element"===o.type&&"template"===o.tagName&&(o.content={type:"root",children:o.children},o.children=[]),o}}function eT(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||z(n)===z(t)))return!0}return n}let eI=eE(eh,"div"),eD=eE(ep,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]);function eN(e,t){let n=e.indexOf("\r",t),r=e.indexOf("\n",t);return -1===r?n:-1===n||n+1===r?r:n<r?n:r}let eA={}.hasOwnProperty,e_=Object.prototype;function eP(e,t){let n;switch(t.nodeName){case"#comment":return n={type:"comment",value:t.data},eR(e,t,n),n;case"#document":case"#document-fragment":{let r="mode"in t&&("quirks"===t.mode||"limited-quirks"===t.mode);if(n={type:"root",children:eM(e,t.childNodes),data:{quirksMode:r}},e.file&&e.location){let t,r,i=String(e.file),a=(t=String(i),r=[],{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;r.length<e.line;){let e=r[r.length-1],n=eN(t,e),i=-1===n?t.length+1:n+1;if(e===i)break;r.push(i)}let n=(e.line>1?r[e.line-2]:0)+e.column-1;if(n<r[e.line-1])return n}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let n=0;for(;;){let i=r[n];if(void 0===i){let e=eN(t,r[n-1]);i=-1===e?t.length+1:e+1,r[n]=i}if(i>e)return{line:n+1,column:e-(n>0?r[n-1]:0)+1,offset:e};n++}}}}),o=a.toPoint(0),s=a.toPoint(i.length);(0,F.ok)(o,"expected `start`"),(0,F.ok)(s,"expected `end`"),n.position={start:o,end:s}}return n}case"#documentType":return eR(e,t,n={type:"doctype"}),n;case"#text":return n={type:"text",value:t.value},eR(e,t,n),n;default:return function(e,t){let n=e.schema;e.schema="http://www.w3.org/2000/svg"===t.namespaceURI?ep:eh;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;eA.call(e_,n)||(i[n]=e.value)}let a=("svg"===e.schema.space?eD:eI)(t.tagName,i,eM(e,t.childNodes));if(eR(e,t,a),"template"===a.tagName){let n=t.sourceCodeLocation,r=n&&n.startTag&&eL(n.startTag),i=n&&n.endTag&&eL(n.endTag),o=eP(e,t.content);r&&i&&e.file&&(o.position={start:r.end,end:i.start}),a.content=o}return e.schema=n,a}(e,t)}}function eM(e,t){let n=-1,r=[];for(;++n<t.length;){let i=eP(e,t[n]);r.push(i)}return r}function eR(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let r=function(e,t,n){let r=eL(n);if("element"===t.type){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r,i={};if(n.attrs)for(r in n.attrs)eA.call(n.attrs,r)&&(i[ev(e.schema,r).property]=eL(n.attrs[r]));
203(0,F.ok)(n.startTag,"a start tag should exist");let a=eL(n.startTag),o=n.endTag?eL(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=i,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function eL(e){let t=ej({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ej({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ej(e){return e.line&&e.column?e:void 0}let eO=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);(t=g=g||(g={}))[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER";let eB="[CDATA[",eF="doctype",eH="script";function eU(e){return e>=55296&&e<=57343}function ez(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function e$(e){return e>=64976&&e<=65007||eO.has(e)}(n=y=y||(y={})).controlCharacterInInputStream="control-character-in-input-stream",n.noncharacterInInputStream="noncharacter-in-input-stream",n.surrogateInInputStream="surrogate-in-input-stream",n.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",n.endTagWithAttributes="end-tag-with-attributes",n.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",n.unexpectedSolidusInTag="unexpected-solidus-in-tag",n.unexpectedNullCharacter="unexpected-null-character",n.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",n.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",n.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",n.missingEndTagName="missing-end-tag-name",n.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",n.unknownNamedCharacterReference="unknown-named-character-reference",n.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",n.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",n.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",n.eofBeforeTagName="eof-before-tag-name",n.eofInTag="eof-in-tag",n.missingAttributeValue="missing-attribute-value",n.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",n.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",n.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",n.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",n.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",n.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",n.missingDoctypePublicIdentifier="missing-doctype-public-identifier",n.missingDoctype
203SystemIdentifier="missing-doctype-system-identifier",n.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",n.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",n.cdataInHtmlContent="cdata-in-html-content",n.incorrectlyOpenedComment="incorrectly-opened-comment",n.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",n.eofInDoctype="eof-in-doctype",n.nestedComment="nested-comment",n.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",n.eofInComment="eof-in-comment",n.incorrectlyClosedComment="incorrectly-closed-comment",n.eofInCdata="eof-in-cdata",n.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",n.nullCharacterReference="null-character-reference",n.surrogateCharacterReference="surrogate-character-reference",n.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",n.controlCharacterReference="control-character-reference",n.noncharacterCharacterReference="noncharacter-character-reference",n.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",n.missingDoctypeName="missing-doctype-name",n.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",n.duplicateAttribute="duplicate-attribute",n.nonConformingDoctype="non-conforming-doctype",n.missingDoctype="missing-doctype",n.misplacedDoctype="misplaced-doctype",n.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",n.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",n.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",n.openElementsLeftAfterEof="open-elements-left-after-eof",n.abandonedHeadElementChild="abandoned-head-element-child",n.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",n.nestedNoscriptInHead="nested-noscript-in-head",n.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class eV{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){let{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(t>=56320&&t<=57343)return this.pos++,this._addGap(),(e-55296)*1024+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(y.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let n=this.html.charCodeAt(t);return n===g.CARRIAGE_RETURN?g.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let e=this.html.charCodeAt(this.pos);return e===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):e===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,eU(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===g.LINE_FEED||e===g.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){ez(e)?this._err(y.controlCharacterInInputStream):e$(e)&&this._err(y.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}function eq(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}(r=b=b||(b={}))[r.CHARACTER=0]="CHARACTER",r[r.NULL_CHARACTER=1]="NULL_CHARACTER",r[r.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",r[r.START_TAG=3]="START_TAG",r[r.END_TAG=4]="END_TAG",r[r.COMMENT=5]="COMMENT",r[r.DOCTYPE=6]="DOCTYPE",r[r.EOF=7]="EOF",r[r.HIBERNATION=8]="HIBERNATION";let eG=new Uint16Array('
vendor: 16,129 bytes, line 203
203áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 203
203ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 203
203astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
203'.split("").map(e=>e.charCodeAt(0))),eW=new Uint16Array("Èaglq \x15\x18\x1bÉ\x0f\0\0\x12p;ä¦os;ä§t;ä¾t;ä¼uot;ä¢".split("").map(e=>e.charCodeAt(0))),eK=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),eY=null!=(v=String.fromCodePoint)?v:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};function eZ(e){return e>=x.ZERO&&e<=x.NINE}(i=x||(x={}))[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z",(a=k||(k={}))[a.VALUE_LENGTH=49152]="VALUE_LENGTH",a[a.BRANCH_LENGTH=16256]="BRANCH_LENGTH",a[a.JUMP_TABLE=127]="JUMP_TABLE",(o=w||(w={}))[o.EntityStart=0]="EntityStart",o[o.NumericStart=1]="NumericStart",o[o.NumericDecimal=2]="NumericDecimal",o[o.NumericHex=3]="NumericHex",o[o.NamedEntity=4]="NamedEntity",(s=C||(C={}))[s.Legacy=0]="Legacy",s[s.Strict=1]="Strict",s[s.Attribute=2]="Attribute";class eX{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=w.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=C.Strict}startEntity(e){this.decodeMode=e,this.state=w.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case w.EntityStart:if(e.charCodeAt(t)===x.NUM)return this.state=w.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=w.NamedEntity,this.stateNamedEntity(e,t);case w.NumericStart:return this.stateNumericStart(e,t);case w.NumericDecimal:return this.stateNumericDecimal(e,t);case w.NumericHex:return this.stateNumericHex(e,t);case w.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===x.LOWER_X?(this.state=w.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=w.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;
203this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){var r;let i=e.charCodeAt(t);if(!eZ(i)&&(!((r=i)>=x.UPPER_A)||!(r<=x.UPPER_F))&&(!(r>=x.LOWER_A)||!(r<=x.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!eZ(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n,r,i;if(this.consumed<=t)return null==(n=this.errors)||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===x.SEMI)this.consumed+=1;else if(this.decodeMode===C.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:null!=(i=eK.get(r))?i:r,this.consumed),this.errors&&(e!==x.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&k.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=eJ(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return 0===this.result||this.decodeMode===C.Attribute&&(0===i||function(e){var t;return e===x.EQUALS||(t=e)>=x.UPPER_A&&t<=x.UPPER_Z||t>=x.LOWER_A&&t<=x.LOWER_Z||eZ(t)}(a))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((r=n[this.treeIndex])&k.VALUE_LENGTH)>>14)){if(a===x.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==C.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&k.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~k.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case w.NamedEntity:return 0!==this.result&&(this.decodeMode!==C.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case w.NumericDecimal:return this.emitNumericEntity(0,2);case w.NumericHex:return this.emitNumericEntity(0,3);case w.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case w.EntityStart:return 0}}}function eQ(e){let t="",n=new eX(e,e=>t+=eY(e));return function(e,r){let i=0,a=0;for(;(a=e.indexOf("&",a))>=0;){t+=e.slice(i,a),n.startEntity(r);let o=n.write(e,a+1);if(o<0){i=a+n.end();break}i=a+o,a=0===o?i+1:i}let o=t+e.slice(i);return t="",o}}function eJ(e,t,n,r){let i=(t&k.BRANCH_LENGTH)>>7,a=t&k.JUMP_TABLE;if(0===i)return 0!==a&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else{if(!(n>r))return e[t+i];s=t-1}}return -1}eQ(eG),eQ(eW),(l=S=S||(S={})).HTML="http://www.w3.org/1999/xhtml",l.MATHML="http://www.w3.org/1998/Math/MathML",l.SVG="http://www.w3.org/2000/svg",l.XLINK="http://www.w3.org/1999/xlink",l.XML="http://www.w3.org/XML/1998/namespace",l.XMLNS="http://www.w3.org/2000/xmlns/",(c=E=E||(E={})).TYPE="type",c.ACTION="action",c.ENCODING="encoding",c.PROMPT="prompt",c.NAME="name",c.COLOR="color",c.FACE="face",c.SIZE="size",(u=T=T||(T={})).NO_QUIRKS="no-quirks",u.QUIRKS="quirks",u.LIMITED_QUIRKS="limited-quirks",(d=I=I||(I={})).A="a",d.ADDRESS="address",d.ANNOTATION_XML="annotation-xml",d.APPLET="applet",d.AREA="area",d.ARTICLE="article",d.ASIDE="aside",d.B="b",d.BASE="base",d.BASEFONT="basefont",d.BGSOUND="bgsound",d.BIG="big",d.BLOCKQUOTE="blockquote",d.BODY="body",d.BR="br",d.BUTTON="button",d.CAPTION="caption",d.CENTER="center",d.CODE="code",d.COL="col",d.COLGROUP="colgroup",d.DD="dd",d.DESC="desc",d.DETAILS="details",d.DIALOG="dialog",d.DIR="dir",d.DIV="div",d.DL="dl",d.DT="dt",d.EM="em",d.EMBED="embed",d.FIELDSET="fieldset",d.FIGCAPTION="figcaption",d.FIGURE="figure",d.FONT="font",d.FOOTER="footer",d.FOREIGN_OBJECT="foreignObject",d.FORM="form",d.FRAME="frame",d.FRAMESET="frameset",d.H1="h1",d.H2="h2",d.H3="h3",d.H4="h4",d.H5="h5",d.H6="h6",d.HEAD="head",d.HEADER="header",d.HGROUP="hgroup",d.HR="hr",d.HTML="html",d.I="i",d.IMG="img",d.IMAGE="image",d.INPUT="input",d.IFRAME="iframe",d.KEYGEN="keygen",d.LABEL="label",d.LI="li",d.LINK="link",d.LISTING="listing",d.MAIN="main",d.MALIGNMARK="malignmark",d.MARQUEE="marquee",d.MATH="math",d.MENU="menu",d.META="meta",d.MGLYPH="mglyph",d.MI="mi",d.MO="mo",d.MN="mn",d.MS="ms",d.MTEXT="mtext",d.NAV="nav",d.NOBR="nobr",d.NOFRAMES="noframes",d.NOEMBED="noembed",d.NOSCRIPT="noscript",d.OBJECT="object",d.OL="ol",d.OPTGROUP="optgroup",d.OPTION="option",d.P="p",d.PARAM="param",d.PLAINTEXT="plaintext",d.PRE="pre",d.RB="rb",d.RP="rp",d.RT="rt",d.RTC="rtc",d.RUBY="ruby",d.S="s",d.SCRIPT="script",d.SECTION="section",d.SELECT="select",d.SOURCE="source",d.SMALL="small",d.SPAN="span",d.STRIKE="str
203ike",d.STRONG="strong",d.STYLE="style",d.SUB="sub",d.SUMMARY="summary",d.SUP="sup",d.TABLE="table",d.TBODY="tbody",d.TEMPLATE="template",d.TEXTAREA="textarea",d.TFOOT="tfoot",d.TD="td",d.TH="th",d.THEAD="thead",d.TITLE="title",d.TR="tr",d.TRACK="track",d.TT="tt",d.U="u",d.UL="ul",d.SVG="svg",d.VAR="var",d.WBR="wbr",d.XMP="xmp",(h=D=D||(D={}))[h.UNKNOWN=0]="UNKNOWN",h[h.A=1]="A",h[h.ADDRESS=2]="ADDRESS",h[h.ANNOTATION_XML=3]="ANNOTATION_XML",h[h.APPLET=4]="APPLET",h[h.AREA=5]="AREA",h[h.ARTICLE=6]="ARTICLE",h[h.ASIDE=7]="ASIDE",h[h.B=8]="B",h[h.BASE=9]="BASE",h[h.BASEFONT=10]="BASEFONT",h[h.BGSOUND=11]="BGSOUND",h[h.BIG=12]="BIG",h[h.BLOCKQUOTE=13]="BLOCKQUOTE",h[h.BODY=14]="BODY",h[h.BR=15]="BR",h[h.BUTTON=16]="BUTTON",h[h.CAPTION=17]="CAPTION",h[h.CENTER=18]="CENTER",h[h.CODE=19]="CODE",h[h.COL=20]="COL",h[h.COLGROUP=21]="COLGROUP",h[h.DD=22]="DD",h[h.DESC=23]="DESC",h[h.DETAILS=24]="DETAILS",h[h.DIALOG=25]="DIALOG",h[h.DIR=26]="DIR",h[h.DIV=27]="DIV",h[h.DL=28]="DL",h[h.DT=29]="DT",h[h.EM=30]="EM",h[h.EMBED=31]="EMBED",h[h.FIELDSET=32]="FIELDSET",h[h.FIGCAPTION=33]="FIGCAPTION",h[h.FIGURE=34]="FIGURE",h[h.FONT=35]="FONT",h[h.FOOTER=36]="FOOTER",h[h.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",h[h.FORM=38]="FORM",h[h.FRAME=39]="FRAME",h[h.FRAMESET=40]="FRAMESET",h[h.H1=41]="H1",h[h.H2=42]="H2",h[h.H3=43]="H3",h[h.H4=44]="H4",h[h.H5=45]="H5",h[h.H6=46]="H6",h[h.HEAD=47]="HEAD",h[h.HEADER=48]="HEADER",h[h.HGROUP=49]="HGROUP",h[h.HR=50]="HR",h[h.HTML=51]="HTML",h[h.I=52]="I",h[h.IMG=53]="IMG",h[h.IMAGE=54]="IMAGE",h[h.INPUT=55]="INPUT",h[h.IFRAME=56]="IFRAME",h[h.KEYGEN=57]="KEYGEN",h[h.LABEL=58]="LABEL",h[h.LI=59]="LI",h[h.LINK=60]="LINK",h[h.LISTING=61]="LISTING",h[h.MAIN=62]="MAIN",h[h.MALIGNMARK=63]="MALIGNMARK",h[h.MARQUEE=64]="MARQUEE",h[h.MATH=65]="MATH",h[h.MENU=66]="MENU",h[h.META=67]="META",h[h.MGLYPH=68]="MGLYPH",h[h.MI=69]="MI",h[h.MO=70]="MO",h[h.MN=71]="MN",h[h.MS=72]="MS",h[h.MTEXT=73]="MTEXT",h[h.NAV=74]="NAV",h[h.NOBR=75]="NOBR",h[h.NOFRAMES=76]="NOFRAMES",h[h.NOEMBED=77]="NOEMBED",h[h.NOSCRIPT=78]="NOSCRIPT",h[h.OBJECT=79]="OBJECT",h[h.OL=80]="OL",h[h.OPTGROUP=81]="OPTGROUP",h[h.OPTION=82]="OPTION",h[h.P=83]="P",h[h.PARAM=84]="PARAM",h[h.PLAINTEXT=85]="PLAINTEXT",h[h.PRE=86]="PRE",h[h.RB=87]="RB",h[h.RP=88]="RP",h[h.RT=89]="RT",h[h.RTC=90]="RTC",h[h.RUBY=91]="RUBY",h[h.S=92]="S",h[h.SCRIPT=93]="SCRIPT",h[h.SECTION=94]="SECTION",h[h.SELECT=95]="SELECT",h[h.SOURCE=96]="SOURCE",h[h.SMALL=97]="SMALL",h[h.SPAN=98]="SPAN",h[h.STRIKE=99]="STRIKE",h[h.STRONG=100]="STRONG",h[h.STYLE=101]="STYLE",h[h.SUB=102]="SUB",h[h.SUMMARY=103]="SUMMARY",h[h.SUP=104]="SUP",h[h.TABLE=105]="TABLE",h[h.TBODY=106]="TBODY",h[h.TEMPLATE=107]="TEMPLATE",h[h.TEXTAREA=108]="TEXTAREA",h[h.TFOOT=109]="TFOOT",h[h.TD=110]="TD",h[h.TH=111]="TH",h[h.THEAD=112]="THEAD",h[h.TITLE=113]="TITLE",h[h.TR=114]="TR",h[h.TRACK=115]="TRACK",h[h.TT=116]="TT",h[h.U=117]="U",h[h.UL=118]="UL",h[h.SVG=119]="SVG",h[h.VAR=120]="VAR",h[h.WBR=121]="WBR",h[h.XMP=122]="XMP";let e1=new Map([[I.A,D.A],[I.ADDRESS,D.ADDRESS],[I.ANNOTATION_XML,D.ANNOTATION_XML],[I.APPLET,D.APPLET],[I.AREA,D.AREA],[I.ARTICLE,D.ARTICLE],[I.ASIDE,D.ASIDE],[I.B,D.B],[I.BASE,D.BASE],[I.BASEFONT,D.BASEFONT],[I.BGSOUND,D.BGSOUND],[I.BIG,D.BIG],[I.BLOCKQUOTE,D.BLOCKQUOTE],[I.BODY,D.BODY],[I.BR,D.BR],[I.BUTTON,D.BUTTON],[I.CAPTION,D.CAPTION],[I.CENTER,D.CENTER],[I.CODE,D.CODE],[I.COL,D.COL],[I.COLGROUP,D.COLGROUP],[I.DD,D.DD],[I.DESC,D.DESC],[I.DETAILS,D.DETAILS
203],[I.DIALOG,D.DIALOG],[I.DIR,D.DIR],[I.DIV,D.DIV],[I.DL,D.DL],[I.DT,D.DT],[I.EM,D.EM],[I.EMBED,D.EMBED],[I.FIELDSET,D.FIELDSET],[I.FIGCAPTION,D.FIGCAPTION],[I.FIGURE,D.FIGURE],[I.FONT,D.FONT],[I.FOOTER,D.FOOTER],[I.FOREIGN_OBJECT,D.FOREIGN_OBJECT],[I.FORM,D.FORM],[I.FRAME,D.FRAME],[I.FRAMESET,D.FRAMESET],[I.H1,D.H1],[I.H2,D.H2],[I.H3,D.H3],[I.H4,D.H4],[I.H5,D.H5],[I.H6,D.H6],[I.HEAD,D.HEAD],[I.HEADER,D.HEADER],[I.HGROUP,D.HGROUP],[I.HR,D.HR],[I.HTML,D.HTML],[I.I,D.I],[I.IMG,D.IMG],[I.IMAGE,D.IMAGE],[I.INPUT,D.INPUT],[I.IFRAME,D.IFRAME],[I.KEYGEN,D.KEYGEN],[I.LABEL,D.LABEL],[I.LI,D.LI],[I.LINK,D.LINK],[I.LISTING,D.LISTING],[I.MAIN,D.MAIN],[I.MALIGNMARK,D.MALIGNMARK],[I.MARQUEE,D.MARQUEE],[I.MATH,D.MATH],[I.MENU,D.MENU],[I.META,D.META],[I.MGLYPH,D.MGLYPH],[I.MI,D.MI],[I.MO,D.MO],[I.MN,D.MN],[I.MS,D.MS],[I.MTEXT,D.MTEXT],[I.NAV,D.NAV],[I.NOBR,D.NOBR],[I.NOFRAMES,D.NOFRAMES],[I.NOEMBED,D.NOEMBED],[I.NOSCRIPT,D.NOSCRIPT],[I.OBJECT,D.OBJECT],[I.OL,D.OL],[I.OPTGROUP,D.OPTGROUP],[I.OPTION,D.OPTION],[I.P,D.P],[I.PARAM,D.PARAM],[I.PLAINTEXT,D.PLAINTEXT],[I.PRE,D.PRE],[I.RB,D.RB],[I.RP,D.RP],[I.RT,D.RT],[I.RTC,D.RTC],[I.RUBY,D.RUBY],[I.S,D.S],[I.SCRIPT,D.SCRIPT],[I.SECTION,D.SECTION],[I.SELECT,D.SELECT],[I.SOURCE,D.SOURCE],[I.SMALL,D.SMALL],[I.SPAN,D.SPAN],[I.STRIKE,D.STRIKE],[I.STRONG,D.STRONG],[I.STYLE,D.STYLE],[I.SUB,D.SUB],[I.SUMMARY,D.SUMMARY],[I.SUP,D.SUP],[I.TABLE,D.TABLE],[I.TBODY,D.TBODY],[I.TEMPLATE,D.TEMPLATE],[I.TEXTAREA,D.TEXTAREA],[I.TFOOT,D.TFOOT],[I.TD,D.TD],[I.TH,D.TH],[I.THEAD,D.THEAD],[I.TITLE,D.TITLE],[I.TR,D.TR],[I.TRACK,D.TRACK],[I.TT,D.TT],[I.U,D.U],[I.UL,D.UL],[I.SVG,D.SVG],[I.VAR,D.VAR],[I.WBR,D.WBR],[I.XMP,D.XMP]]);function e0(e){var t;return null!=(t=e1.get(e))?t:D.UNKNOWN}let e2=D,e4={[S.HTML]:new Set([e2.ADDRESS,e2.APPLET,e2.AREA,e2.ARTICLE,e2.ASIDE,e2.BASE,e2.BASEFONT,e2.BGSOUND,e2.BLOCKQUOTE,e2.BODY,e2.BR,e2.BUTTON,e2.CAPTION,e2.CENT
203ER,e2.COL,e2.COLGROUP,e2.DD,e2.DETAILS,e2.DIR,e2.DIV,e2.DL,e2.DT,e2.EMBED,e2.FIELDSET,e2.FIGCAPTION,e2.FIGURE,e2.FOOTER,e2.FORM,e2.FRAME,e2.FRAMESET,e2.H1,e2.H2,e2.H3,e2.H4,e2.H5,e2.H6,e2.HEAD,e2.HEADER,e2.HGROUP,e2.HR,e2.HTML,e2.IFRAME,e2.IMG,e2.INPUT,e2.LI,e2.LINK,e2.LISTING,e2.MAIN,e2.MARQUEE,e2.MENU,e2.META,e2.NAV,e2.NOEMBED,e2.NOFRAMES,e2.NOSCRIPT,e2.OBJECT,e2.OL,e2.P,e2.PARAM,e2.PLAINTEXT,e2.PRE,e2.SCRIPT,e2.SECTION,e2.SELECT,e2.SOURCE,e2.STYLE,e2.SUMMARY,e2.TABLE,e2.TBODY,e2.TD,e2.TEMPLATE,e2.TEXTAREA,e2.TFOOT,e2.TH,e2.THEAD,e2.TITLE,e2.TR,e2.TRACK,e2.UL,e2.WBR,e2.XMP]),[S.MATHML]:new Set([e2.MI,e2.MO,e2.MN,e2.MS,e2.MTEXT,e2.ANNOTATION_XML]),[S.SVG]:new Set([e2.TITLE,e2.FOREIGN_OBJECT,e2.DESC]),[S.XLINK]:new Set,[S.XML]:new Set,[S.XMLNS]:new Set};function e3(e){return e===e2.H1||e===e2.H2||e===e2.H3||e===e2.H4||e===e2.H5||e===e2.H6}I.STYLE,I.SCRIPT,I.XMP,I.IFRAME,I.NOEMBED,I.NOFRAMES,I.PLAINTEXT;let e5=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);(p=N||(N={}))[p.DATA=0]="DATA",p[p.RCDATA=1]="RCDATA",p[p.RAWTEXT=2]="RAWTEXT",p[p.SCRIPT_DATA=3]="SCRIPT_DATA",p[p.PLAINTEXT=4]="PLAINTEXT",p[p.TAG_OPEN=5]="TAG_OPEN",p[p.END_TAG_OPEN=6]="END_TAG_OPEN",p[p.TAG_NAME=7]="TAG_NAME",p[p.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",p[p.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",p[p.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",p[p.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",p[p.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",p[p.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",p[p.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",p[p.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",p[p.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",p[p.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",p[p.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",p[p.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",p[p.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",p[p.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",p[p.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",p[p.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",p[p.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",p[p.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",p[p.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",p[p.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",p[p.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",p[p.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",p[p.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",p[p.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",p[p.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",p[p.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",p[p.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",p[p.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",p[p.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",p[p.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",p[p.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",p[p.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",p[p.BOGUS_COMMENT=40]="BOGUS_COMMENT",p[p.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",p[p.COMMENT_START=42]="COMMENT_START",p[p.COMMENT_START_DASH=43]="COMMENT_START_DASH",p[p.COMMENT=44]="COMMENT",p[p.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",p[p.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",p[p.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",p[p.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",p[p.COMMENT_END_DASH=49]="COMMENT_END_DASH",p[p.COMMENT_END=50]="COMMENT_END",p[p.COMMENT_END_BANG=51]="COMMENT_END_BANG",p[p.DOCTYPE=52]="DOCTYPE",p[p.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",p[p.DOCTYPE_NAME=54]="DOCTYPE_NAME",p[p.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",p[p.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",p[p.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",p[p.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",p[p.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",p[p.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",p[p.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",p[p.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",p[p.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",p[p.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",p[p.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",p[p.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",p[p.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",p[p.CDATA_SECTION=68]="CDATA_SECTION",p[p.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",p[p.CDATA_SECTION_END=70]="CDATA_SECTION_END",p[p.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",p[p.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",p[p.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",p[p.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",p[p.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",p[p.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",p[p.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",p[p.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END";let e6={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function e7(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function e8(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function e9(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z||e8(e)}function te(e){return e9(e)||e7(e)}function tt(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_F}function tn(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_F}function tr(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function ti(e){return tr(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}class ta{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=N.DATA,this.returnState=N.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new eV(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,n;null==(n=(t=this.handler).onParseError)||n.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:b.START_TAG,tagName:"",tagID:D.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:b.END_TAG,tagName:"",tagID:D.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:b.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:b.DOCTYPE,name:e,forceQuirks:!1,publicId:null,
203systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let n=this.currentToken;null===eq(n,this.currentAttr.name)?(n.attrs.push(this.currentAttr),n.location&&this.currentLocation&&((null!=(e=(t=n.location).attrs)?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(y.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=e0(e.tagName),e.type===b.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(y.endTagWithAttributes),e.selfClosing&&this._err(y.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case b.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case b.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case b.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:b.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=t;return}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=tr(e)?b.WHITESPACE_CHARACTER:e===g.NULL?b.NULL_CHARACTER:b.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(b.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,n=0,r=!1;for(let a=0,o=eG[0];a>=0&&!((a=eJ(eG,o,a+1,e))<0);e=this._consume()){n+=1;let s=(o=eG[a])&k.VALUE_LENGTH;if(s){var i;let o=(s>>14)-1;if(e!==g.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((i=this.preprocessor.peek(1))===g.EQUALS_SIGN||te(i))?(t=[g.AMPERSAND],a+=o):(t=0===o?[eG[a]&~k.VALUE_LENGTH]:1===o?[eG[++a]]:[eG[++a],eG[++a]],n=0,r=e!==g.SEMICOLON),0===o){this._consume();break}}}return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(y.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case N.DATA:this._stateData(e);break;case N.RCDATA:this._stateRcdata(e);break;case N.RAWTEXT:this._stateRawtext(e);break;case N.SCRIPT_DATA:this._stateScriptData(e);break;case N.PLAINTEXT:this._statePlaintext(e);break;case N.TAG_OPEN:this._stateTagOpen(e);break;case N.END_TAG_OPEN:this._stateEndTagOpen(e);break;case N.TAG_NAME:this._stateTagName(e);break;case N.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case N.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case N.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case N.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case N.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case N.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case N.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case N.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case N.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case N.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case N.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case N.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case N.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case N.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscape
vendor: 7,576 bytes, line 203
203Start(e);break;case N.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case N.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case N.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case N.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case N.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case N.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case N.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case N.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case N.BOGUS_COMMENT:this._stateBogusComment(e);break;case N.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case N.COMMENT_START:this._stateCommentStart(e);break;case N.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case N.COMMENT:this._stateComment(e);break;case N.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case N.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case N.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case N.COMMENT_END:this._stateCommentEnd(e);break;case N.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case N.DOCTYPE:this._stateDoctype(e);break;case N.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case N.DOCTYPE_NAME:this._stateDoctypeName(e);break;case N.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case N.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case N.CDATA_SECTION:this._stateCdataSection(e);break;case N.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case N.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case N.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case N.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case N.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case N.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case N.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case N.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case N.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case N.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw Error("Unknown state")}}_stateData(e){switch(e){case g.LESS_THAN_SIGN:this.state=N.TAG_OPEN;break;case g.AMPERSAND:this.returnState=N.DATA,this.state=N.CHARACTER_REFERENCE;break;case g.NULL:this._err(y.unexpectedNullCharacter),this._emitCodePoint(e);break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case g.AMPERSAND:this.returnState=N.RCDATA,this.state=N.CHARACTER_REFERENCE;break;case g.LESS_THAN_SIGN:this.state=N.RCDATA_LESS_THAN_SIGN;break;case g.NULL:this._err(y.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case g.LESS_THAN_SIGN:this.state=N.RAWTEXT_LESS_THAN_SIGN;break;case g.NULL:this._err(y.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case g.LESS_THAN_SIGN:this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break;case g.NULL:this._err(y.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case g.NULL:this._err(y.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(e9(e))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(e);else switch(e){case g.EXCLAMATION_MARK:this.state=N.MARKUP_DECLARATION_OPEN;break;case g.SOLIDUS:this.state=N.END_TAG_OPEN;break;case g.QUESTION_MARK:this._err(y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(e);break;case g.EOF:this._err(y.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(y.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(e9(e))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(e);else switch(e){case g.GREATER_THAN_SIGN:this._err(y.missingEndTagName),this.state=N.DATA;break;case g.EOF:this._err(y.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(y.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=N.BEFORE_ATTRIBUTE_NAME;break;case g.SOLIDUS:this.state=N.SELF_CLOSING_START_TAG;break;case g.GREATER_THAN_SIGN:this.state=N.DATA,this.emitCurrentTagToken();break;case g.NULL:this._err(y.unexpectedNullCharacter),t.tagName+="�";break;case g.EOF:this._err(y.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(e8(e)?e+32:e)}}_stateRcdataLessThanSign(e){e===g.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){e9(e)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,
vendor: 7,207 bytes, line 203
203!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===g.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){e9(e)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case g.SOLIDUS:this.state=N.SCRIPT_DATA_END_TAG_OPEN;break;case g.EXCLAMATION_MARK:this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){e9(e)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===g.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===g.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case g.HYPHEN_MINUS:this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case g.NULL:this._err(y.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case g.HYPHEN_MINUS:this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case g.NULL:this._err(y.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case g.HYPHEN_MINUS:this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case g.GREATER_THAN_SIGN:this.state=N.SCRIPT_DATA,this._emitChars(">");break;case g.NULL:this._err(y.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===g.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:e9(e)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){e9(e)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(eH,!1)&&ti(this.preprocessor.peek(eH.length))){this._emitCodePoint(e);for(let e=0;e<eH.length;e++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case g.HYPHEN_MINUS:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case g.NULL:this._err(y.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case g.HYPHEN_MINUS:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case g.NULL:this._err(y.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case g.HYPHEN_MINUS:this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case g.GREATER_THAN_SIGN:this.state=N.SCRIPT_DATA,this._emitChars(">");break;case g.NULL:this._err(y.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===g.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(eH,!1)&&ti(this.preprocessor.peek(eH.length))){this._emitCodePoint(e);for(let e=0;e<eH.length;e++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case g.EQUALS_SIGN:this._err(y.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case g.EQUALS_SIGN:this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break;case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:this._err(y.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case g.NULL:this._err(y.unexpectedNullCharacter),this.currentAttr.name+="
203�";break;default:this.currentAttr.name+=String.fromCodePoint(e8(e)?e+32:e)}}_stateAfterAttributeName(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:this.state=N.SELF_CLOSING_START_TAG;break;case g.EQUALS_SIGN:this.state=N.BEFORE_ATTRIBUTE_VALUE;break;case g.GREATER_THAN_SIGN:this.state=N.DATA,this.emitCurrentTagToken();break;case g.EOF:this._err(y.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case g.APOSTROPHE:this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(y.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break;default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case g.QUOTATION_MARK:this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case g.AMPERSAND:this.returnState=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=N.CHARACTER_REFERENCE;break;case g.NULL:this._err(y.unexpectedNullCharacter),this.currentAttr.value+="�";break;case g.EOF:this._err(y.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case g.APOSTROPHE:this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case g.AMPERSAND:this.returnState=N.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=N.CHARACTER_REFERENCE;break;case g.NULL:this._err(y.unexpectedNullCharacter),this.currentAttr.value+="�";break;case g.EOF:this._err(y.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break;case g.AMPERSAND:this.returnState=N.ATTRIBUTE_VALUE_UNQUOTED,this.state=N.CHARACTER_REFERENCE;break;case g.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break;case g.NULL:this._err(y.unexpectedNullCharacter),this.currentAttr.value+="�";break;case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:this._err(y.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case g.EOF:this._err(y.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break;case g.SOLIDUS:this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break;case g.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break;case g.EOF:this._err(y.eofInTag),this._emitEOFToken();break;default:this._err(y.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case g.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break;case g.EOF:this._err(y.eofInTag),this._emitEOFToken();break;default:this._err(y.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case g.GREATER_THAN_SIGN:this.state=N.DATA,this.emitCurrentComment(t);break;case g.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case g.NULL:this._err(y.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch("--",!0)?(this._createCommentToken(3),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(eF,!1)?(this.currentLocation=this.getCurrentLocation(eF.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(eB,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(y.cdataInHtmlContent),this._createCommentToken(eB.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(y.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case g.HYPHEN_MINUS:this.state=N.COMMENT_START_DASH;break;case g.GREATER_THAN_SIGN:{this._err(y.abruptClosingOfEmptyComment),this.state=N.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=N.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case g.HYPHEN_MINUS:this.state=N.COMMENT_END;break;case g.GREATER_THAN_SIGN:this._err(y.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(t);break;case g.EOF:this._err(y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=N.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case g.HYPHEN_MINUS:this.state=N.COMMENT_END_DASH;break;case g.LESS_THAN_SIGN:t.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break;case g.NULL:this._err(y.unexpectedNullCharacter),t.data+="�";break;case g.EOF:this._err(y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case g.EXCLAMATION_MARK:t.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break;case g.LESS_THAN_SIGN:t.data+="<";break;default:this.state=N.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===g.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===g.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==g.GREATER_THAN_SIGN&&e!==g.EOF&&this._err(y.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case g.HYPHEN_MINUS:this.state=N.COMMENT_END;break;case g.EOF:this._err(y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=N.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case g.GREATER_THAN_SIGN:this.state=N.DATA,this.emitCurrentComment(t);break;case g.EXCLAMATION_MARK:this.state=N.COMMENT_END_BANG;break;case g.HYPHEN_MINUS:t.data+="-";break;case g.EOF:this._err(y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=N.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case g.HYPHEN_MINUS:t.data+="--!",this.state=N.COMMENT_END_DASH;break;case g.GREATER_THAN_SIGN:this._err(y.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(t);break;case g.EOF:this._err(y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=N.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=N.BEFORE_DOCTYPE_NAME;break;case g.GREATER_THAN_SIGN:this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case g.EOF:{this._err(y.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(y.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(e8(e))this._createDoctypeToken(String.fromCharCode(e+32)),this.state=N.DOCTYPE_NAME;else switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:this._err(y.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=N.DOCTYPE_NAME;break;case g.GREATER_THAN_SIGN:{this._err(y.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=N.DATA;break}case g.EOF:{this._err(y.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=N.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=N.AFTER_DOCTYPE_NAME;break;case g.GREATER_THAN_SIGN:this.state=N.DATA,this.emitCurrentDoctype(t);break;
203case g.NULL:this._err(y.unexpectedNullCharacter),t.name+="�";break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(e8(e)?e+32:e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:this.state=N.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch("public",!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch("system",!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(y.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case g.QUOTATION_MARK:this._err(y.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:this._err(y.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(y.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(y.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:t.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:t.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(y.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(y.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case g.QUOTATION_MARK:this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case g.NULL:this._err(y.unexpectedNullCharacter),t.publicId+="�";break;case g.GREATER_THAN_SIGN:this._err(y.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=N.DATA;break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case g.APOSTROPHE:this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case g.NULL:this._err(y.unexpectedNullCharacter),t.publicId+="�";break;case g.GREATER_THAN_SIGN:this._err(y.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=N.DATA;break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case g.GREATER_THAN_SIGN:this.state=N.DATA,this.emitCurrentDoctype(t);break;case g.QUOTATION_MARK:this._err(y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:this._err(y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;
vendor: 9,783 bytes, line 203
203default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=N.DATA;break;case g.QUOTATION_MARK:t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case g.QUOTATION_MARK:this._err(y.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:this._err(y.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(y.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:t.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(y.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case g.QUOTATION_MARK:this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case g.NULL:this._err(y.unexpectedNullCharacter),t.systemId+="�";break;case g.GREATER_THAN_SIGN:this._err(y.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=N.DATA;break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case g.APOSTROPHE:this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case g.NULL:this._err(y.unexpectedNullCharacter),t.systemId+="�";break;case g.GREATER_THAN_SIGN:this._err(y.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=N.DATA;break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=N.DATA;break;case g.EOF:this._err(y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(y.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case g.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=N.DATA;break;case g.NULL:this._err(y.unexpectedNullCharacter);break;case g.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case g.RIGHT_SQUARE_BRACKET:this.state=N.CDATA_SECTION_BRACKET;break;case g.EOF:this._err(y.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===g.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case g.GREATER_THAN_SIGN:this.state=N.DATA;break;case g.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=N.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===g.NUMBER_SIGN?this.state=N.NUMERIC_CHARACTER_REFERENCE:te(e)?(this.state=N.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){let t=this._matchNamedCharacterReference(e);if(this._ensureHibernation());else if(t){for(let e=0;e<t.length;e++)this._flushCodePointConsumedAsCharacterReference(t[e]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this.state=N.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){te(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===g.SEMICOLON&&this._err(y.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===g.LATIN_SMALL_X||e===g.LATIN_CAPITAL_X?this.state=N.HEXADEMICAL_CHARACTER_REFERENCE_START:e7(e)?(this.state=N.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(y.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(g.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){e7(e)||tt(e)||tn(e)?(this.state=N.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e)):(this._err(y.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(g.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState)}_stateHexademicalCharacterReference(e){tt(e)?this.charRefCode=16*this.charRefCode+e-55:tn(e)?this.charRefCode=16*this.charRefCode+e-87:e7(e)?this.charRefCode=16*this.charRefCode+e-48:e===g.SEMICOLON?this.state=N.NUMERIC_CHARACTER_REFERENCE_END:(this._err(y.missingSemicolonAfterCharacterReference),this.state=N.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){e7(e)?this.charRefCode=10*this.charRefCode+e-48:e===g.SEMICOLON?this.state=N.NUMERIC_CHARACTER_REFERENCE_END:(this._err(y.missingSemicolonAfterCharacterReference),this.state=N.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===g.NULL)this._err(y.nullCharacterReference),this.charRefCode=g.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(y.characterReferenceOutsideUnicodeRange),this.charRefCode=g.REPLACEMENT_CHARACTER;else if(eU(this.charRefCode))this._err(y.surrogateCharacterReference),this.charRefCode=g.REPLACEMENT_CHARACTER;else if(e$(this.charRefCode))this._err(y.noncharacterCharacterReference);else if(ez(this.charRefCode)||this.charRefCode===g.CARRIAGE_RETURN){this._err(y.controlCharacterReference);let e=e5.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}let to=new Set([D.DD,D.DT,D.LI,D.OPTGROUP,D.OPTION,D.P,D.RB,D.RP,D.RT,D.RTC]),ts=new Set([...to,D.CAPTION,D.COLGROUP,D.TBODY,D.TD,D.TFOOT,D.TH,D.THEAD,D.TR]),tl=new Map([[D.APPLET,S.HTML],[D.CAPTION,S.HTML],[D.HTML,S.HTML],[D.MARQUEE,S.HTML],[D.OBJECT,S.HTML],[D.TABLE,S.HTML],[D.TD,S.HTML],[D.TEMPLATE,S.HTML],[D.TH,S.HTML],[D.ANNOTATION_XML,S.MATHML],[D.MI,S.MATHML],[D.MN,S.MATHML],[D.MO,S.MATHML],[D.MS,S.MATHML],[D.MTEXT,S.MATHML],[D.DESC,S.SVG],[D.FOREIGN_OBJECT,S.SVG],[D.TITLE,S.SVG]]),tc=[D.H1,D.H2,D.H3,D.H4,D.H5,D.H6],tu=[D.TR,D.TEMPLATE,D.HTML],td=[D.TBODY,D.TFOOT,D.THEAD,D.TEMPLATE,D.HTML],th=[D.TABLE,D.TEMPLATE,D.HTML],tp=[D.TD,D.TH];class tm{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=D.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===D.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===S.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==S.HTML)this.shortenToLe
203ngth(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(t<0?0:t)}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n<0?0:n)}popUntilNumberedHeaderPopped(){this.popUntilPopped(tc,S.HTML)}popUntilTableCellPopped(){this.popUntilPopped(tp,S.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return -1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(th,S.HTML)}clearBackToTableBodyContext(){this.clearBackTo(td,S.HTML)}clearBackToTableRowContext(){this.clearBackTo(tu,S.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===D.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===D.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===S.HTML)break;if(tl.get(n)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if(e3(t)&&n===S.HTML)break;if(tl.get(t)===n)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===S.HTML)break;if((n===D.UL||n===D.OL)&&r===S.HTML||tl.get(n)===r)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===S.HTML)break;if(n===D.BUTTON&&r===S.HTML||tl.get(n)===r)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===S.HTML){if(n===e)return!0;if(n===D.TABLE||n===D.TEMPLATE||n===D.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===S.HTML){if(t===D.TBODY||t===D.THEAD||t===D.TFOOT)return!0;if(t===D.TABLE||t===D.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===S.HTML){if(n===e)return!0;if(n!==D.OPTION&&n!==D.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;to.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;ts.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&ts.has(this.currentTagId);)this.pop()}}(m=A=A||(A={}))[m.Marker=0]="Marker",m[m.Element=1]="Element";let tf={type:A.Marker};class tg{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===A.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1)>=3&&this.entries.splice(t.idx,1)}}insertMarker(){this.entries.unshift(tf)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:A.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:A.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(tf);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===A.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===A.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===A.Element&&t.element===e)}}function ty(e){return{nodeName:"#text",value:e,parentNode:null}}let tb={createDocument:()=>({nodeName:"#document",mode:T.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}
203),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>"#documentType"===e.nodeName);i?(i.name=t,i.publicId=n,i.systemId=r):tb.appendChild(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null})},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(tb.isTextNode(n)){n.value+=t;return}}tb.appendChild(e,ty(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&tb.isTextNode(r)?r.value+=t:tb.insertBefore(e,ty(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},tv="html",tx=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],tk=[...tx,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],tw=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),tC=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],tS=[...tC,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function tE(e,t){return t.some(t=>e.startsWith(t))}let tT=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),tI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:S.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:S.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:S.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:S.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:S.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:S.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:S.XLINK}
203],["xml:base",{prefix:"xml",name:"base",namespace:S.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:S.XML}],["xml:space",{prefix:"xml",name:"space",namespace:S.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:S.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:S.XMLNS}]]),tD=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),tN=new Set([D.B,D.BIG,D.BLOCKQUOTE,D.BODY,D.BR,D.CENTER,D.CODE,D.DD,D.DIV,D.DL,D.DT,D.EM,D.EMBED,D.H1,D.H2,D.H3,D.H4,D.H5,D.H6,D.HEAD,D.HR,D.I,D.IMG,D.LI,D.LISTING,D.MENU,D.META,D.NOBR,D.OL,D.P,D.PRE,D.RUBY,D.S,D.SMALL,D.SPAN,D.STRONG,D.STRIKE,D.SUB,D.SUP,D.TABLE,D.TT,D.U,D.UL,D.VAR
203]);function tA(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function t_(e){for(let t=0;t<e.attrs.length;t++){let n=tT.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function tP(e){for(let t=0;t<e.attrs.length;t++){let n=tI.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}(f=_||(_={}))[f.INITIAL=0]="INITIAL",f[f.BEFORE_HTML=1]="BEFORE_HTML",f[f.BEFORE_HEAD=2]="BEFORE_HEAD",f[f.IN_HEAD=3]="IN_HEAD",f[f.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",f[f.AFTER_HEAD=5]="AFTER_HEAD",f[f.IN_BODY=6]="IN_BODY",f[f.TEXT=7]="TEXT",f[f.IN_TABLE=8]="IN_TABLE",f[f.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",f[f.IN_CAPTION=10]="IN_CAPTION",f[f.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",f[f.IN_TABLE_BODY=12]="IN_TABLE_BODY",f[f.IN_ROW=13]="IN_ROW",f[f.IN_CELL=14]="IN_CELL",f[f.IN_SELECT=15]="IN_SELECT",f[f.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",f[f.IN_TEMPLATE=17]="IN_TEMPLATE",f[f.AFTER_BODY=18]="AFTER_BODY",f[f.IN_FRAMESET=19]="IN_FRAMESET",f[f.AFTER_FRAMESET=20]="AFTER_FRAMESET",f[f.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",f[f.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";let tM={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},tR=new Set([D.TABLE,D.TBODY,D.TFOOT,D.THEAD,D.TR]),tL={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:tb,onParseError:null};class tj{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...tL,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new ta(this.options,this),this.activeFormattingElements=new tg(this.treeAdapter),this.fragmentContextID=n?e0(this.treeAdapter.getTagName(n)):D.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new tm(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...tL,...t};null!=e||(e=n.treeAdapter.createElement(I.TEMPLATE,S.HTML,[]));let r=n.treeAdapter.createElement("documentmock",S.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===D.TEMPLATE&&i.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;let i=null!=(r=e.location)?r:tM,a={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(e,t,n){var r,i;null==(i=(r=this.treeAdapter).onItemPush)||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null==(r=(n=this.treeAdapter).onItemPop)||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||this.treeAdapter.getNamespaceURI(e)===S.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,S.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=e6.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;
203for(;e;){if(this.treeAdapter.getTagName(e)===I.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===S.HTML)switch(this.fragmentContextID){case D.TITLE:case D.TEXTAREA:this.tokenizer.state=e6.RCDATA;break;case D.STYLE:case D.XMP:case D.IFRAME:case D.NOEMBED:case D.NOFRAMES:case D.NOSCRIPT:this.tokenizer.state=e6.RAWTEXT;break;case D.SCRIPT:this.tokenizer.state=e6.SCRIPT_DATA;break;case D.PLAINTEXT:this.tokenizer.state=e6.PLAINTEXT}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,S.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,S.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(I.HTML,S.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,D.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,a=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===b.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){let t,n;return!!this.currentNotInHTML&&(0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,(e.tagID!==D.SVG||this.treeAdapter.getTagName(t)!==I.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==S.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===D.MGLYPH||e.tagID===D.MALIGNMARK)&&!this._isIntegrationPoint(n,t,S.HTML)))}_processToken(e){switch(e.type){case b.CHARACTER:this.onCharacter(e);break;case b.NULL_CHARACTER:this.onNullCharacter(e);break;case b.COMMENT:this.onComment(e);break;case b.DOCTYPE:this.onDoctype(e);break;case b.START_TAG:this._processStartTag(e);break;case b.END_TAG:this.onEndTag(e);break;case b.EOF:this.onEof(e);break;case b.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){let r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return(!n||n===S.HTML)&&function(e,t,n){if(t===S.MATHML&&e===D.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===E.ENCODING){let t=n[e].value.toLowerCase();return"text/html"===t||"application/xhtml+xml"===t}}return t===S.SVG&&(e===D.FOREIGN_OBJECT||e===D.DESC||e===D.TITLE)}(e,r,i)||(!n||n===S.MATHML)&&r===S.MATHML&&(e===D.MI||e===D.MO||e===D.MN||e===D.MS||e===D.MTEXT)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===A.Marker||this.openElements.contains(e.element)),n=t<0?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(D.P),this.openElements.popUntilTagNamePopped(D.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case D.TR:this.insertionMode=_.IN_ROW;return;case D.TBODY:case D.THEAD:case D.TFOOT:this.insertionMode=_.IN_TABLE_BODY;return;case D.CAPTION:this.insertionMode=_.IN_CAPTION;return;case D.COLGROUP:this.insertionMode=_.IN_COLUMN_GROUP;return;case D.TABLE:this.insertionMode=_.IN_TABLE;return;case D.BODY:this.insertionMode=_.IN_BODY;return;case D.FRAMESET:this.insertionMode=_.IN_FRAMESET;return;case D.SELECT:return void this._resetInsertionModeForSelect(e);case D.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case D.HTML:this.insertionMode=this.headElement?_.AFTER_HEAD:_.BEFORE_HEAD;return;case D.TD:case D.TH:if(e>0){this.insertionMode=_.IN_CELL;return}break;case D.HEAD:if(e>0){this.insertionMode=_.IN_HEAD;return}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===D.TEMPLATE)break;if(e===D.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(e){return tR.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case D.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===S.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case D.TABLE:{let n=this.treeAdapter.getParentNode(t);if(n)return{parent:n,beforeElement:t};return{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return e4[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,n=e,t._insertCharacters(n),t.framesetOk=!1)}switch(this.insertionMode){case _.INITIAL:tH(this,e);break;case _.BEFORE_HTML:tU(this,e);break;case _.BEFORE_HEAD:tz(this,e);break;case _.IN_HEAD:tq(this,e);break;case _.IN_HEAD_NO_SCRIPT:tG(this,e);break;case _.AFTER_HEAD:tW(this,e);break;case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:tZ(this,e);break;case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:t5(this,e);break;case _.IN_TABLE_TEXT:ne(this,e);break;case _.IN_COLUMN_GROUP:ni(this,e);break;case _.AFTER_BODY:np(this,e);break;case _.AFTER_AFTER_BODY:nm(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,(n=e).chars="�",t._insertCharacters(n))}switch(this.insertionMode){case _.INITIAL:tH(this,e);break;case _.BEFORE_HTML:tU(this,e);break;case _.BEFORE_HEAD:tz(this,e);break;case _.IN_HEAD:tq(this,e);break;case _.IN_HEAD_NO_SCRIPT:tG(this,e);break;case _.AFTER_HEAD:tW(this,e);break;case _.TEXT:this._insertCharacters(e);break;case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:t5(this,e);break;case _.IN_COLUMN_GROUP:ni(this,e);break;case _.AFTER_BODY:np(this,e);break;case _.AFTER_AFTER_BODY:nm(this,e)}}onComment(e){var t,n,r,i;if(this.skipNextNewLine=!1,this.currentNotInHTML)return void tB(this,e);switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:tB(this,e);break;case _.IN_TABLE_TEXT:nt(this,e);break;case _.AFTER_BODY:t=this,n=e,t._appendCommentNode(n,t.openElements.items[0]);break;case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:r=this,i=e,r._appendCommentNode(i,r.document)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:!function(e,t){e._setDocumentType(t);let n=t.forceQuirks?T.QUIRKS:function(e){if(e.name!==tv)return T.QUIRKS;let{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return T.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),tw.has(n))return T.QUIRKS;let e=null===t?tk:tx;if(tE(n,e))return T.QUIRKS;if(tE(n,e=null===t?tC:tS))return T.LIMITED_QUIRKS}return T.NO_QUIRKS}(t);(t.name!==tv||null!==t.publicId||null!==t.systemId&&"about:legacy-compat"!==t.systemId)&&e._err(t,y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=_.BEFORE_HTML}(this,e);break;case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:this._err(e,y.misplacedDoctype);break;case _.IN_TABLE_TEXT:nt(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){let n;if((n=t.tagID)===D.FONT&&t.attrs.some(({name:e})=>e===E.COLOR||e===E.SIZE||e===E.FACE)||tN.has(n))nf(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);if(r===S.MATHML)tA(t);else if(r===S.SVG){let e;null!=(e=tD.get(t.tagName))&&(t.tagName=e,t.tagID=e0(t.tagName)),t_(t)}tP(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:tH(this,e);break;case _.BEFORE_HTML:t=this,(n=e).tagID===D.HTML?(t._insertElement(n,S.HTML),t.insertionMode=_.BEFORE_HEAD):tU(t,n);break;case _.BEFORE_HEAD:var t,n,r,i,a,o,s,l,c,u,d,h,p=this,m=e;switch(m.tagID){case D.HTML:t0(p,m);break;case D.HEAD:p._insertElement(m,S.HTML),p.headElement=p.openElements.current,p.insertionMode=_.IN_HEAD;break;default:tz(p,m)}break;case _.IN_HEAD:t$(this,e);break;case _.IN_HEAD_NO_SCRIPT:var f=this,g=e;switch(g.tagID){case D.HTML:t0(f,g);break;case D.BASEFONT:case D.BGSOUND:case D.HEAD:case D.LINK:case D.META:case D.NOFRAMES:case D.STYLE:t$(f,g);break;case D.NOSCRIPT:f._err(g,y.nestedNoscriptInHead);break;default:tG(f,g)}break;case _.AFTER_HEAD:var b=this,v=e;switch(v.tagID){case D.HTML:t0(b,v);break;case D.BODY:b._insertElement(v,S.HTML),b.framesetOk=!1,b.insertionMode=_.IN_BODY;break;case D.FRAMESET:b._insertElement(v,S.HTML),b.insertionMode=_.IN_FRAMESET;break;case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:case D.NOFRAMES:case D.SCRIPT:case D.STYLE:case D.TEMPLATE:case D.TITLE:b._err(v,y.abandonedHeadElementChild),b.openElements.push(b.headElement,D.HEAD),t$(b,v),b.openElements.remove(b.headElement);break;case D.HEAD:b._err(v,y.misplacedStartTagForHeadElement);break;default:tW(b,v)}break;case _.IN_BODY:t0(this,e);break;case _.IN_TABLE:t6(this,e);break;case _.IN_TABLE_TEXT:nt(this,e);break;case _.IN_CAPTION:let x;r=this,x=(i=e).tagID,nn.has(x)?r.openElements.hasInTableScope(D.CAPTION)&&(r.openElements.generateImpliedEndTags(),r.openElements.popUntilTagNamePopped(D.CAPTION),r.activeFormattingElements.clearToLastMarker(),r.insertionMode=_.IN_TABLE,t6(r,i)):t0(r,i);break;case _.IN_COLUMN_GROUP:nr(this,e);break;case _.IN_TABLE_BODY:na(this,e);break;case _.IN_ROW:ns(this,e);break;case _.IN_CELL:let k;a=this,k=(o=e).tagID,nn.has(k)?(a.openElements.hasInTableScope(D.TD)||a.openElements.hasInTableScope(D.TH))&&(a._closeTableCell(),ns(a,o)):t0(a,o);break;case _.IN_SELECT:nc(this,e);break;case _.IN_SELECT_IN_TABLE:let w;s=this,(w=(l=e).tagID)===D.CAPTION||w===D.TABLE||w===D.TBODY||w===D.TFOOT||w===D.THEAD||w===D.TR||w===D.TD||w===D.TH?(s.openElements.popUntilTagNamePopped(D.SELECT),s._resetInsertionMode(),s._processStartTag(l)):nc(s,l);break;case _.IN_TEMPLATE:var C=this,E=e;switch(E.tagID){case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:case D.NOFRAMES:case D.SCRIPT:case D.STYLE:case D.TEMPLATE:case D.TITLE:t$(C,E);break;case D.CAPTION:case D.COLGROUP:case D.TBODY:case D.TFOOT:case D.THEAD:C.tmplInsertionModeStack[0]=_.IN_TABLE,C.insertionMode=_.IN_TABLE,t6(C,E);break;case D.COL:C.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,C.insertionMode=_.IN_COLUMN_GROUP,nr(C,E);break;case D.TR:C.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,C.insertionMode=_.IN_TABLE_BODY,na(C,E);break;case D.TD:case D.TH:C.tmplInsertionModeStack[0]=_.IN_ROW,C.insertionMode=_.IN_ROW,ns(C,E);break;default:C.tmplInsertionModeStack[0]=_.IN_BODY,C.insertionMode=_.IN_BODY,t0(C,E)}break;case _.AFTER_BODY:c=this,(u=e).tagID===D.HTML?t0(c,u):np(c,u);break;case _.IN_FRAMESET:var T=this,I=e;switch(I.tagID){case D.HTML:t0(T,I);break;case D.FRAMESET:T._insertElement(I,S.HTML);break;case D.FRAME:T._appendElement(I,S.HTML),I.ackSelfClosing=!0;break;case D.NOFRAMES:t$(T,I)}break;case _.AFTER_FRAMESET:var N=this,A=e;switch(A.tagID){case D.HTML:t0(N,A);break;case D.NOFRAMES:t$(N,A)}break;case _.AFTER_AFTER_BODY:d=this,(h=e).tagID===D.HTML?t0(d,h):nm(d,h);break;case _.AFTER_AFTER_FRAMESET:var P=this,M=e;switch(M.tagID){case D.HTML:t0(P,M);break;case D.NOFRAMES:t$(P,M)}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===D.P||t.tagID===D.BR){nf(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===S.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLe
203ngth(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:tH(this,e);break;case _.BEFORE_HTML:let t;r=this,((t=(i=e).tagID)===D.HTML||t===D.HEAD||t===D.BODY||t===D.BR)&&tU(r,i);break;case _.BEFORE_HEAD:let n;a=this,(n=(o=e).tagID)===D.HEAD||n===D.BODY||n===D.HTML||n===D.BR?tz(a,o):a._err(o,y.endTagWithoutMatchingOpenElement);break;case _.IN_HEAD:var r,i,a,o,s,l,c,u,d,h,p,m,f=this,g=e;switch(g.tagID){case D.HEAD:f.openElements.pop(),f.insertionMode=_.AFTER_HEAD;break;case D.BODY:case D.BR:case D.HTML:tq(f,g);break;case D.TEMPLATE:tV(f,g);break;default:f._err(g,y.endTagWithoutMatchingOpenElement)}break;case _.IN_HEAD_NO_SCRIPT:var b=this,v=e;switch(v.tagID){case D.NOSCRIPT:b.openElements.pop(),b.insertionMode=_.IN_HEAD;break;case D.BR:tG(b,v);break;default:b._err(v,y.endTagWithoutMatchingOpenElement)}break;case _.AFTER_HEAD:var x=this,k=e;switch(k.tagID){case D.BODY:case D.HTML:case D.BR:tW(x,k);break;case D.TEMPLATE:tV(x,k);break;default:x._err(k,y.endTagWithoutMatchingOpenElement)}break;case _.IN_BODY:t4(this,e);break;case _.TEXT:s=this,e.tagID===D.SCRIPT&&(null==(l=s.scriptHandler)||l.call(s,s.openElements.current)),s.openElements.pop(),s.insertionMode=s.originalInsertionMode;break;case _.IN_TABLE:t7(this,e);break;case _.IN_TABLE_TEXT:nt(this,e);break;case _.IN_CAPTION:var w=this,C=e;let S=C.tagID;switch(S){case D.CAPTION:case D.TABLE:w.openElements.hasInTableScope(D.CAPTION)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(D.CAPTION),w.activeFormattingElements.clearToLastMarker(),w.insertionMode=_.IN_TABLE,S===D.TABLE&&t7(w,C));break;case D.BODY:case D.COL:case D.COLGROUP:case D.HTML:case D.TBODY:case D.TD:case D.TFOOT:case D.TH:case D.THEAD:case D.TR:break;default:t4(w,C)}break;case _.IN_COLUMN_GROUP:var E=this,T=e;switch(T.tagID){case D.COLGROUP:E.openElements.currentTagId===D.COLGROUP&&(E.openElements.pop(),E.insertionMode=_.IN_TABLE);break;case D.TEMPLATE:tV(E,T);break;case D.COL:break;default:ni(E,T)}break;case _.IN_TABLE_BODY:no(this,e);break;case _.IN_ROW:nl(this,e);break;case _.IN_CELL:var I=this,N=e;let A=N.tagID;switch(A){case D.TD:case D.TH:I.openElements.hasInTableScope(A)&&(I.openElements.generateImpliedEndTags(),I.openElements.popUntilTagNamePopped(A),I.activeFormattingElements.clearToLastMarker(),I.insertionMode=_.IN_ROW);break;case D.TABLE:case D.TBODY:case D.TFOOT:case D.THEAD:case D.TR:I.openElements.hasInTableScope(A)&&(I._closeTableCell(),nl(I,N));break;case D.BODY:case D.CAPTION:case D.COL:case D.COLGROUP:case D.HTML:break;default:t4(I,N)}break;case _.IN_SELECT:nu(this,e);break;case _.IN_SELECT_IN_TABLE:let P;c=this,(P=(u=e).tagID)===D.CAPTION||P===D.TABLE||P===D.TBODY||P===D.TFOOT||P===D.THEAD||P===D.TR||P===D.TD||P===D.TH?c.openElements.hasInTableScope(P)&&(c.openElements.popUntilTagNamePopped(D.SELECT),c._resetInsertionMode(),c.onEndTag(u)):nu(c,u);break;case _.IN_TEMPLATE:d=this,(h=e).tagID===D.TEMPLATE&&tV(d,h);break;case _.AFTER_BODY:nh(this,e);break;case _.IN_FRAMESET:p=this,e.tagID===D.FRAMESET&&!p.openElements.isRootHtmlElementCurrent()&&(p.openElements.pop(),p.fragmentContext||p.openElements.currentTagId===D.FRAMESET||(p.insertionMode=_.AFTER_FRAMESET));break;case _.AFTER_FRAMESET:m=this,e.tagID===D.HTML&&(m.insertionMode=_.AFTER_AFTER_FRAMESET);break;case _.AFTER_AFTER_BODY:nm(this,e)}}onEof(e){switch(this.insertionMode){case _.INITIAL:tH(this,e);break;case _.BEFORE_HTML:tU(this,e);break;case _.BEFORE_HEAD:tz(this,e);break;case _.IN_HEAD:tq(this,e);break;case _.IN_HEAD_NO_SCRIPT:tG(this,e);break;case _.AFTER_HEAD:tW(this,e);break;case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:t3(this,e);break;case _.TEXT:var t,n;t=this,n=e,t._err(n,y.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(n);break;case _.IN_TABLE_TEXT:nt(this,e);break;case _.IN_TEMPLATE:nd(this,e);break;case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:tF(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCo
203deAt(0)===g.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)return void this._insertCharacters(e);switch(this.insertionMode){case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:this._insertCharacters(e);break;case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:tY(this,e);break;case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:t5(this,e);break;case _.IN_TABLE_TEXT:t9(this,e)}}}function tO(e,t){for(let n=0;n<8;n++){let n=function(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):t2(e,t),n}(e,t);if(!n)break;let r=function(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=function(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=function(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&function(e,t,n){let r=e0(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===D.TEMPLATE&&i===S.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}(e,a,i),function(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}(e,r,n)}}function tB(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function tF(e,t){if(e.stopped=!0,t.location){let n=2*!e.fragmentContext;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function tH(e,t){e._err(t,y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,T.QUIRKS),e.insertionMode=_.BEFORE_HTML,e._processToken(t)}function tU(e,t){e._insertFakeRootElement(),e.insertionMode=_.BEFORE_HEAD,e._processToken(t)}function tz(e,t){e._insertFakeElement(I.HEAD,D.HEAD),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD,e._processToken(t)}function t$(e,t){switch(t.tagID){case D.HTML:t0(e,t);break;case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:e._appendElement(t,S.HTML),t.ackSelfClosing=!0;break;case D.TITLE:e._switchToTextParsing(t,e6.RCDATA);break;case D.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,e6.RAWTEXT):(e._insertElement(t,S.HTML),e.insertionMode=_.IN_HEAD_NO_SCRIPT);break;case D.NOFRAMES:case D.STYLE:e._switchToTextParsing(t,e6.RAWTEXT);break;case D.SCRIPT:e._switchToTextParsing(t,e6.SCRIPT_DATA);break;case D.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=_.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break;case D.HEAD:e._err(t,y.misplacedStartTagForHeadElement);break;default:tq(e,t)}}function tV(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==D.TEMPLATE&&e._err(t,y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(D.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,y.endTagWithoutMatchingOpenElement)}function tq(e,t){e.openElements.pop(),e.insertionMode=_.AFTER_HEAD,e._processToken(t)}function tG(e,t){let n=t.type===b.EOF?y.openElementsLeftAfterEof:y.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=_.IN_HEAD,e._processToken(t)}function tW(e,t){e._insertFakeElement(I.BODY,D.BODY),e.insertionMode=_.IN_BODY,tK(e,t)}function tK(e,t){switch(t.type){case b.CHARACTER:tZ(e,t);break;case b.WHITESPACE_CHARACTER:tY(e,t);break;case b.COMMENT:tB(e,t);break;case b.START_TAG:t0(e,t);break;case b.END_TAG:t4(e,t);break;case b.EOF:t3(e,t)}}function tY(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function tZ(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function tX(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,S.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tQ(e){let t=eq(e,E.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function tJ(e,t){e._switchToTextParsing(t,e6.RAWTEXT)}function t1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,S.HTML)}function t0(e,t){switch(t.tagID){case D.I:case D.S:case D.B:case D.U:case D.EM:case D.TT:case D.BIG:case D.CODE:case D.FONT:case D.SMALL:case D.STRIKE:case D.STRONG:e._reconstructActiveFormattingElements(),e._insertElement(t,S.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case D.A:let n;(n=e.activeFormattingElements.getElementEntryInScopeWithTagName(I.A))&&(tO(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,S.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case D.H1:case D.H2:case D.H3:case D.H4:case D.H5:case D.H6:e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e3(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,S.HTML);break;case D.P:case D.DL:case D.OL:case D.UL:case D.DIV:case D.DIR:case D.NAV:case D.MAIN:case D.MENU:case D.ASIDE:case D.CENTER:case D.FIGURE:case D.FOOTER:case D.HEADER:case D.HGROUP:case D.DIALOG:case D.DETAILS:case D.ADDRESS:case D.ARTICLE:case D.SECTION:case D.SUMMARY:case D.FIELDSET:case D.BLOCKQUOTE:case D.FIGCAPTION:e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,S.HTML);break;case D.LI:case D.DD:case D.DT:e.framesetOk=!1;let r=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let n=e.openElements.tagIDs[t];if(r===D.LI&&n===D.LI||(r===D.DD||r===D.DT)&&(n===D.DD||n===D.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==D.ADDRESS&&n!==D.DIV&&n!==D.P&&e._isSpecialElement(e.openElements.items[t],n))break}e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,S.HTML);break;case D.BR:case D.IMG:case D.WBR:case D.AREA:case D.EMBED:case D.KEYGEN:tX(e,t);break;case D.HR:e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._appendElement(t,S.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;break;case D.RB:case D.RTC:e.openElements.hasInScope(D.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,S.HTML);break;case D.RT:case D.RP:e.openElements.hasInScope(D.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(D.RTC),e._insertElement(t,S.HTML);break;case D.PRE:case D.LISTING:e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,S.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;break;case D.XMP:e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,e6.RAWTEXT);break;case D.SVG:e._reconstructActiveFormattingElements(),t_(t),tP(t),t.selfClosing?e._appendElement(t,S.SVG):e._insertElement(t,S.SVG),t.ackSelfClosing=!0;break;case D.HTML:0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);break;case D.BASE:case D.LINK:case D.META:case D.STYLE:case D.TITLE:case D.SCRIPT:case D.BGSOUND:case D.BASEFONT:case D.TEMPLATE:t$(e,t);break;case D.BODY:let i;(i=e.openElements.tryPeekProperlyNestedBodyElement())&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(i,t.attrs));break;case D.FORM:let a;a=e.openElements.tmplCount>0,(!e.formElement||a)&&(e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,S.HTML),a||(e.formElement=e.openElements.current));break;case D.NOBR:e._reconstructActiveFormattingElements(),e.openElements.hasInScope(D.NOBR)&&(tO(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,S.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case D.MATH:e._reconstructActiveFormattingElements(),tA(t),tP(t),t.selfClosing?e._appendElement(t,S.MATHML):e._insertElement(t,S.MATHML),t.ackSelfClosing=!0;break;case D.TABLE:e.treeAdapter.getDocumentMode(e.document)!==T.QUIRKS&&e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,S.HTML),e.framesetOk=!1,e.insertionMode=_.IN_TABLE;break;case D.INPUT:e._reconstructActiveFormattingElements(),e._appendElement(t,S.HTML),tQ(t)||(e.framesetOk=!1),t.ackSelfClosing=!0;break;case D.PARAM:case D.TRACK:case D.SOURCE:e._appendElement(t,S.HTML),t.ackSelfClosing=!0;break;case D.IMAGE:t.tagName=I.IMG,t.tagID=D.IMG,tX(e,t);break;case D.BUTTON:e.openElements.hasInScope(D.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(D.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,S.HTML),e.framesetOk=!1;break;
203case D.APPLET:case D.OBJECT:case D.MARQUEE:e._reconstructActiveFormattingElements(),e._insertElement(t,S.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;break;case D.IFRAME:e.framesetOk=!1,e._switchToTextParsing(t,e6.RAWTEXT);break;case D.SELECT:e._reconstructActiveFormattingElements(),e._insertElement(t,S.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===_.IN_TABLE||e.insertionMode===_.IN_CAPTION||e.insertionMode===_.IN_TABLE_BODY||e.insertionMode===_.IN_ROW||e.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT;break;case D.OPTION:case D.OPTGROUP:e.openElements.currentTagId===D.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,S.HTML);break;case D.NOEMBED:tJ(e,t);break;case D.FRAMESET:let o;o=e.openElements.tryPeekProperlyNestedBodyElement(),e.framesetOk&&o&&(e.treeAdapter.detachNode(o),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,S.HTML),e.insertionMode=_.IN_FRAMESET);break;case D.TEXTAREA:e._insertElement(t,S.HTML),e.skipNextNewLine=!0,e.tokenizer.state=e6.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=_.TEXT;break;case D.NOSCRIPT:e.options.scriptingEnabled?tJ(e,t):t1(e,t);break;case D.PLAINTEXT:e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,S.HTML),e.tokenizer.state=e6.PLAINTEXT;break;case D.COL:case D.TH:case D.TD:case D.TR:case D.HEAD:case D.FRAME:case D.TBODY:case D.TFOOT:case D.THEAD:case D.CAPTION:case D.COLGROUP:break;default:t1(e,t)}}function t2(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==D.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function t4(e,t){switch(t.tagID){case D.A:case D.B:case D.I:case D.S:case D.U:case D.EM:case D.TT:case D.BIG:case D.CODE:case D.FONT:case D.NOBR:case D.SMALL:case D.STRIKE:case D.STRONG:tO(e,t);break;case D.P:e.openElements.hasInButtonScope(D.P)||e._insertFakeElement(I.P,D.P),e._closePElement();break;case D.DL:case D.UL:case D.OL:case D.DIR:case D.DIV:case D.NAV:case D.PRE:case D.MAIN:case D.MENU:case D.ASIDE:case D.BUTTON:case D.CENTER:case D.FIGURE:case D.FOOTER:case D.HEADER:case D.HGROUP:case D.DIALOG:case D.ADDRESS:case D.ARTICLE:case D.DETAILS:case D.SECTION:case D.SUMMARY:case D.LISTING:case D.FIELDSET:case D.BLOCKQUOTE:case D.FIGCAPTION:let n;n=t.tagID,e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n));break;case D.LI:e.openElements.hasInListItemScope(D.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(D.LI),e.openElements.popUntilTagNamePopped(D.LI));break;case D.DD:case D.DT:let r;r=t.tagID,e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r));break;case D.H1:case D.H2:case D.H3:case D.H4:case D.H5:case D.H6:e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());break;case D.BR:e._reconstructActiveFormattingElements(),e._insertFakeElement(I.BR,D.BR),e.openElements.pop(),e.framesetOk=!1;break;case D.BODY:if(e.openElements.hasInScope(D.BODY)&&(e.insertionMode=_.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}break;case D.HTML:e.openElements.hasInScope(D.BODY)&&(e.insertionMode=_.AFTER_BODY,nh(e,t));break;case D.FORM:!function(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(D.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(D.FORM):n&&e.openElements.remove(n))}(e);break;case D.APPLET:case D.OBJECT:case D.MARQUEE:let i;i=t.tagID,e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i),e.activeFormattingElements.clearToLastMarker());break;case D.TEMPLATE:tV(e,t);break;default:t2(e,t)}}function t3(e,t){e.tmplInsertionModeStack.length>0?nd(e,t):tF(e,t)}function t5(e,t){if(tR.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=_.IN_TABLE_TEXT,t.type){case b.CHARACTER:ne(e,t);break;case b.WHITESPACE_CHARACTER:t9(e,t)}else t8(e,t)}function t6(e,t){switch(t.tagID){case D.TD:case D.TH:case D.TR:e.openElements.clearBackToTableContext(),e._insertFakeElement(I.TBODY,D.TBODY),e.insertionMode=_.IN_TABLE_BODY,na(e,t);break;case D.STYLE:case D.SCRIPT:case D.TEMPLATE:t$(e,t);break;case D.COL:e.openElements.clearBackToTableContext(),e._insertFakeElement(I.COLGROUP,D.COLGROUP),e.insertionMode=_.IN_COLUMN_GROUP,nr(e,t);break;case D.FORM:e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,S.HTML),e.formElement=e.openElements.current,e.openElements.pop());break;case D.TABLE:e.openElements.hasInTableScope(D.TABLE)&&(e.openElements.popUntilTagNamePopped(D.TABLE),e._resetInsertionMode(),e._processStartTag(t));break;case D.TBODY:case D.TFOOT:case D.THEAD:e.openElements.clearBackToTableContext(),e._insertElement(t,S.HTML),e.insertionMode=_.IN_TABLE_BODY;break;case D.INPUT:tQ(t)?e._appendElement(t,S.HTML):t8(e,t),t.ackSelfClosing=!0;break;case D.CAPTION:e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,S.HTML),e.insertionMode=_.IN_CAPTION;break;case D.COLGROUP:e.openElements.clearBackToTableContext(),e._insertElement(t,S.HTML),e.insertionMode=_.IN_COLUMN_GROUP;break;default:t8(e,t)}}function t7(e,t){switch(t.tagID){case D.TABLE:e.openElements.hasInTableScope(D.TABLE)&&(e.openElements.popUntilTagNamePopped(D.TABLE),e._resetInsertionMode());break;case D.TEMPLATE:tV(e,t);break;case D.BODY:case D.CAPTION:case D.COL:case D.COLGROUP:case D.HTML:case D.TBODY:case D.TD:case D.TFOOT:case D.TH:case D.THEAD:case D.TR:break;default:t8(e,t)}}function t8(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,tK(e,t),e.fosterParentingEnabled=n}
vendor: 4,138 bytes, line 203
203function t9(e,t){e.pendingCharacterTokens.push(t)}function ne(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function nt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)t8(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}let nn=new Set([D.CAPTION,D.COL,D.COLGROUP,D.TBODY,D.TD,D.TFOOT,D.TH,D.THEAD,D.TR]);function nr(e,t){switch(t.tagID){case D.HTML:t0(e,t);break;case D.COL:e._appendElement(t,S.HTML),t.ackSelfClosing=!0;break;case D.TEMPLATE:t$(e,t);break;default:ni(e,t)}}function ni(e,t){e.openElements.currentTagId===D.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE,e._processToken(t))}function na(e,t){switch(t.tagID){case D.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,S.HTML),e.insertionMode=_.IN_ROW;break;case D.TH:case D.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(I.TR,D.TR),e.insertionMode=_.IN_ROW,ns(e,t);break;case D.CAPTION:case D.COL:case D.COLGROUP:case D.TBODY:case D.TFOOT:case D.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,t6(e,t));break;default:t6(e,t)}}function no(e,t){let n=t.tagID;switch(t.tagID){case D.TBODY:case D.TFOOT:case D.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE);break;case D.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,t7(e,t));break;case D.BODY:case D.CAPTION:case D.COL:case D.COLGROUP:case D.HTML:case D.TD:case D.TH:case D.TR:break;default:t7(e,t)}}function ns(e,t){switch(t.tagID){case D.TH:case D.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,S.HTML),e.insertionMode=_.IN_CELL,e.activeFormattingElements.insertMarker();break;case D.CAPTION:case D.COL:case D.COLGROUP:case D.TBODY:case D.TFOOT:case D.THEAD:case D.TR:e.openElements.hasInTableScope(D.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,na(e,t));break;default:t6(e,t)}}function nl(e,t){switch(t.tagID){case D.TR:e.openElements.hasInTableScope(D.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY);break;case D.TABLE:e.openElements.hasInTableScope(D.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,no(e,t));break;case D.TBODY:case D.TFOOT:case D.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(D.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,no(e,t));break;case D.BODY:case D.CAPTION:case D.COL:case D.COLGROUP:case D.HTML:case D.TD:case D.TH:break;default:t7(e,t)}}function nc(e,t){switch(t.tagID){case D.HTML:t0(e,t);break;case D.OPTION:e.openElements.currentTagId===D.OPTION&&e.openElements.pop(),e._insertElement(t,S.HTML);break;case D.OPTGROUP:e.openElements.currentTagId===D.OPTION&&e.openElements.pop(),e.openElements.currentTagId===D.OPTGROUP&&e.openElements.pop(),e._insertElement(t,S.HTML);break;case D.INPUT:case D.KEYGEN:case D.TEXTAREA:case D.SELECT:e.openElements.hasInSelectScope(D.SELECT)&&(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode(),t.tagID!==D.SELECT&&e._processStartTag(t));break;case D.SCRIPT:case D.TEMPLATE:t$(e,t)}}function nu(e,t){switch(t.tagID){case D.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===D.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===D.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===D.OPTGROUP&&e.openElements.pop();break;case D.OPTION:e.openElements.currentTagId===D.OPTION&&e.openElements.pop();break;case D.SELECT:e.openElements.hasInSelectScope(D.SELECT)&&(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode());break;case D.TEMPLATE:tV(e,t)}}
203function nd(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(D.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):tF(e,t)}function nh(e,t){var n;if(t.tagID===D.HTML){if(e.fragmentContext||(e.insertionMode=_.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===D.HTML){e._setEndLocation(e.openElements.items[0],t);let r=e.openElements.items[1];!r||(null==(n=e.treeAdapter.getNodeSourceCodeLocation(r))?void 0:n.endTag)||e._setEndLocation(r,t)}}else np(e,t)}function np(e,t){e.insertionMode=_.IN_BODY,tK(e,t)}function nm(e,t){e.insertionMode=_.IN_BODY,tK(e,t)}function nf(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==S.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}let ng=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function ny(e,t){return function(n){let r,i=0,a="";for(;r=e.exec(n);)i!==r.index&&(a+=n.substring(i,r.index)),a+=t.get(r[0].charCodeAt(0)),i=r.index+1;return a+n.substring(i)}}function nb(e,t){return tj.parse(e,t)}function nv(e,t,n){"string"==typeof e&&(n=t,t=e,e=null);let r=tj.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}String.prototype.codePointAt,ny(/[&<>'"]/g,ng),ny(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),ny(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),I.AREA,I.BASE,I.BASEFONT,I.BGSOUND,I.BR,I.COL,I.EMBED,I.FRAME,I.HR,I.IMG,I.INPUT,I.KEYGEN,I.LINK,I.META,I.PARAM,I.SOURCE,I.TRACK,I.WBR;var nx=e.i(541991),nk=e.i(660787);let nw={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"}
203,missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}}
203,nC=/-[a-z]/g,nS=/%c(?:([-+])(\d+))?/g,nE=/%x/g,nT={2:!0,1:!1,0:null};function nI(e){return e.charAt(1).toUpperCase()}function nD(e){let{emitParseErrors:t,...n}={...this.data("settings"),...e};this.parser=function(e,r){var i;let a,o,s,l,c,u;return o=(a={...n,onerror:t?function(e){r.path&&(e.name=r.path+":"+e.name,e.file=r.path),r.messages.push(e)}:void 0}).onerror,s=e instanceof nx.VFile?e:new nx.VFile(e),l=a.fragment?nv:nb,i=l(c=String(s),{sourceCodeLocationInfo:!0,onParseError:a.onerror?function(e){let t=e.code,n=t.replace(nC,nI),r=a[n],i=null==r||r,l="number"==typeof i?i:+!!i;if(l){let r=nw[n];(0,F.ok)(r,"expected known error from `parse5`");let i=new nk.VFileMessage(u(r.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:"hast-util-from-html"});s.path&&(i.file=s.path,i.name=s.path+":"+i.name),i.fatal=nT[l],i.note=u(r.description),i.url=!1===r.url?void 0:"https://html.spec.whatwg.org/multipage/parsing.html#parse-error-"+t,(0,F.ok)(o,"`internalOnerror` is not passed if `onerror` is not set"),o(i)}function u(t){return t.replace(nS,function(t,n,r){var i;let a=(r?Number.parseInt(r,10):0)*("-"===n?-1:1);return"`"===(i=c.charAt(e.startOffset+a))?"` ` `":i}).replace(nE,function(){return"0x"+c.charCodeAt(e.startOffset).toString(16).toUpperCase()})}}:null,scriptingEnabled:!1}),eP({file:(u={file:s,space:a.space,verbose:a.verbose}).file||void 0,location:!1,schema:"svg"===u.space?ep:eh,verbose:u.verbose||!1},i)}}var nN=e.i(807432);let nA=function(e,t,n,r,i){let a=n_(t);if(null!=n&&("number"!=typeof n||n<0||n===1/0))throw Error("Expected positive finite `index`");if(null!=r&&(!r.type||!r.children))throw Error("Expected valid `parent`");if(null==n!=(null==r))throw Error("Expected both `index` and `parent`");return!!nR(e)&&a.call(i,e,n,r)},n_=function(e){if(null==e)return nM;if("string"==typeof e){var t;return t=e,nP(function(e){return e.tagName===t})}if("object"==typeof e){var n=e;let t=[],r=-1;for(;++r<n.length;)t[r]=n_(n[r]);return nP(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}if("function"==typeof e)return nP(e);throw Error("Expected function, string, or array as `test`")};function nP(e){return function(t,n,r){return!!(nR(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function nM(e){return!!(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}function nR(e){return null!==e&&"object"==typeof e&&"type"in e&&"tagName"in e}let nL=n_(function(e){return"audio"===e.tagName||"canvas"===e.tagName||"embed"===e.tagName||"iframe"===e.tagName||"img"===e.tagName||"math"===e.tagName||"object"===e.tagName||"picture"===e.tagName||"svg"===e.tagName||"video"===e.tagName});var nj=e.i(124963),nO=e.i(457579);let nB=["address","article","aside","blockquote","body","br","caption","center","col","colgroup","dd","dialog","dir","div","dl","dt","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","legend","li","li","listing","main","menu","nav","ol","optgroup","option","p","plaintext","pre","section","summary","table","tbody","td","td","tfoot","th","th","thead","tr","ul","wbr","xmp"],nF=["button","input","select","textarea"],nH=["area","base","basefont","dialog","datalist","head","link","meta","noembed","noframes","param","rp","script","source","style","template","track","title"],nU=(0,nO.convert)(["doctype","comment"]);function nz(e){return nL(e)||nA(e,nF)}function n$(e){return" "===e||"\n"===e}function nV(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function nq(){return" "}var nG=e.i(329422);let nW=function(e,t,n){let r=(0,nO.convert)(n);if(!e||!e.type||!e.children)throw Error("Expected parent node");if("number"==typeof t){if(t<0||t===1/0)throw Error("Expected positive finite number as index")}else if((t=e.children.indexOf(t))<0)throw Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},nK=/\n/g,nY=/[\t ]+/g,nZ=n_("br"),nX=n_(function(e){return"td"===e.tagName||"th"===e.tagName}),nQ=n_("p"),nJ=n_("tr"),n1=n_(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return!!(e.properties||{}).hidden},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),n0=n_(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function n2(e,t){let n,r="children"in e?e.children:[],i=n0(e),a=n3(e,{whitespace:(t||{}).whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];("text"===e.type||"comment"===e.type)&&o.push(...n4(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...function e(t,n,r){return"element"===t.type?function(t,n,r){let i,a,o=n3(t,r),s=t.children||[],l=-1,c=[];if(n1(t))return c;for(nZ(t)||nJ(t)&&nW(n,t,nJ)?a="\n":nQ(t)?(i=2,a=2):n0(t)&&(i=1,a=1);++l<s.length;)c=c.concat(e(s[l],t,{whitespace:o,breakBefore:l?void 0:i,breakAfter:l<s.length-1?nZ(s[l+1]):a}));return nX(t)&&nW(n,t,nX)&&c.push(" "),i&&c.unshift(i),a&&c.push(a),c}
203(t,n,r):"text"===t.type?"normal"===r.whitespace?n4(t,r):[String(t.value)]:[]}(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?nZ(r[s+1]):i}));let l=[];for(s=-1;++s<o.length;){let e=o[s];"number"==typeof e?void 0!==n&&e>n&&(n=e):e&&(void 0!==n&&n>-1&&l.push("\n".repeat(n)||" "),n=-1,l.push(e))}return l.join("")}function n4(e,t){let n,r=String(e.value),i=[],a=[],o=0;for(;o<=r.length;){nK.lastIndex=o;let e=nK.exec(r),n=e&&"index"in e?e.index:r.length;i.push(function(e,t,n){let r,i=[],a=0;for(;a<e.length;){nY.lastIndex=a;let n=nY.exec(e);r=n?n.index:e.length,a||r||!n||t||i.push(""),a!==r&&i.push(e.slice(a,r)),a=n?r+n[0].length:r}return a===r||n||i.push(""),i.join(" ")}(r.slice(o,n).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==o||t.breakBefore,n!==r.length||t.breakAfter)),o=n+1}let s=-1;for(;++s<i.length;)8203===i[s].charCodeAt(i[s].length-1)||s<i.length-1&&8203===i[s+1].charCodeAt(0)?(a.push(i[s]),n=void 0):i[s]?("number"==typeof n&&a.push(n),a.push(i[s]),n=0):(0===s||s===i.length-1)&&a.push(0);return a}function n3(e,t){if("element"===e.type){let n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}let n5="language-";function n6(e,t){let n,r,i=t.children,a=-1;if("pre"===t.tagName)for(;++a<i.length;){let e=i[a];if("element"===e.type&&"code"===e.tagName&&e.properties&&e.properties.className&&Array.isArray(e.properties.className)){n=e.properties.className;break}}if(n){for(a=-1;++a<n.length;)if(String(n[a]).slice(0,n5.length)===n5){r=String(n[a]).slice(n5.length);break}}let o={type:"code",lang:r||null,meta:null,value:function(e){let t=String(e),n=t.length;for(;n>0;){let e=t.codePointAt(n-1);if(void 0!==e&&(10===e||13===e))n--;else break}return t.slice(0,n)}(n2(t))};return e.patch(t,o),o}function n7(e,t){let n={type:"delete",children:e.all(t)};return e.patch(t,n),n}function n8(e){let t=-1;if(e.length>1){for(;++t<e.length;)if(e[t].spread)return!0}return!1}function n9(e,t){let n=e.all({type:"root",children:t}),r=e.toSpecificContent(n,re);return 0===r.length?[]:1===r.length?r[0].children:[{type:"list",ordered:!1,start:null,spread:n8(r),children:r}]}function re(){return{type:"listItem",spread:!1,checked:null,children:[]}}function rt(e,t){let n={type:"emphasis",children:e.all(t)};return e.patch(t,n),n}function rn(e,t){let n={type:"heading",depth:Number(t.tagName.charAt(1))||1,children:e.all(t)};return e.patch(t,n),n}function rr(e,t){let n=t.properties||{},r={type:"image",url:e.resolve(String(n.src||"")||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):""};return e.patch(t,r),r}function ri(e,t){let n={type:"inlineCode",value:n2(t)}
203;return e.patch(t,n),n}function ra(e,t){let n=[],r=[],i=t||e.properties||{},a=function e(t){let n=[],r=-1;for(;++r<t.children.length;){let i=t.children[r];"children"in i&&Array.isArray(i.children)&&n.push(...e(i)),"element"!==i.type||"option"!==i.tagName||i.properties&&i.properties.disabled||n.push(i)}return n}(e),o=Math.min(Number.parseInt(String(i.size),10),0)||(i.multiple?4:1),s=-1;for(;++s<a.length;){let e=a[s];e&&e.properties&&e.properties.selected&&n.push(e)}let l=n.length>0?n:a,c=l.length>o?o:l.length;for(s=-1;++s<c;){let e=l[s],t=e.properties||{},n=n2(e),i=n||String(t.label||""),a=String(t.value||"")||n;r.push([a,i===a?void 0:i])}return r}let ro={}.hasOwnProperty,rs=new Set(["pingback","prefetch","stylesheet"]),rl=n_(["a","abbr","area","b","bdi","bdo","br","button","cite","code","data","datalist","del","dfn","em","i","input","ins","kbd","keygen","label","map","mark","meter","noscript","output","progress","q","ruby","s","samp","script","select","small","span","strong","sub","sup","template","textarea","time","u","var","wbr"]),rc=n_("meta");function ru(e){var t;let n;return!!("text"===e.type||rl(e)||nL(e)||function(e){if("element"!==e.type||"link"!==e.tagName)return!1;if(e.properties.itemProp)return!0;let t=e.properties.rel,n=-1;if(!Array.isArray(t)||0===t.length)return!1;for(;++n<t.length;)if(!rs.has(String(t[n])))return!1;return!0}(e)||rc(e)&&(t="itemProp",null!=(n="element"===e.type&&ro.call(e.properties,t)&&e.properties[t])&&!1!==n))}function rd(e,t){let{rest:n,checkbox:r}=function e(t){let n=t.children[0];if(n&&"element"===n.type&&"input"===n.tagName&&n.properties&&("checkbox"===n.properties.type||"radio"===n.properties.type))return{checkbox:n,rest:{...t,children:t.children.slice(1)}};if(n&&"element"===n.type&&"p"===n.tagName){let{checkbox:r,rest:i}=e(n);if(r)return{checkbox:r,rest:{...t,children:[i,...t.children.slice(1)]}}}return{checkbox:void 0,rest:t}}(t),i=r?!!r.properties.checked:null,a={type:"listItem",spread:function e(t){let n=-1,r=!1;for(;++n<t.children.length;){let i=t.children[n];if("element"===i.type){if(ru(i))continue;if("p"===i.tagName||r||e(i))return!0;r=!0}}return!1}(n),checked:i,children:e.toFlow(e.all(n))};return e.patch(t,a),a}function rh(e,t){let n="ol"===t.tagName,r=e.toSpecificContent(e.all(t),rp),i=null;n&&(i=t.properties&&t.properties.start?Number.parseInt(String(t.properties.start),10):1);let a={type:"list",ordered:n,start:i,spread:n8(r),children:r};return e.patch(t,a),a}function rp(){return{type:"listItem",spread:!1,checked:null,children:[]}}var rm=e.i(900065),rf=e.i(733644),rg=e.i(328010);function ry(e){let t=-1;for(;++t<e.length;){let n=e[t];if(!rv(n)||"children"in n&&ry(n.children))return!0}return!1}function rb(e){return function e(t,n,r){let i=function(t){let n=[],r=-1;for(;++r<t.length;){let i=t[r];("delete"===i.type||"link"===i.type)&&ry(i.children)?n.push(...function(t){return e(t.children,function(e){let n=rx(t);return n.children=e,[n]},function(e){if("children"in e&&"children"in t){let n=rx(t),r=rx(e);return n.children=e.children,r.children.push(n),r}return{...e}})}(i)):n.push(i)}return n}(t),a=[],o=[],s=-1;for(;++s<i.length;){let e=i[s];rv(e)?o.push(e):(o.length>0&&(a.push(...n(o)),o=[]),a.push(r(e)))}return o.length>0&&(a.push(...n(o)),o=[]),a}(e,function(e){return e.every(function(e){return"text"===e.type&&(0,nj.whitespace)(e.value)})?[]:[{type:"paragraph",children:e}]},function(e){return e})}function rv(e){let t=e.data&&e.data.hName;return t?ru({type:"element",tagName:t,properties:{},children:[]}):(0,rg.phrasing)(e)}function rx(e){return(0,nN.default)({...e,children:[]})}function rk(e,t){let n=t.properties||{},r="video"===t.tagName?String(n.poster||""):"",i=String(n.src||""),a=-1,o=!1,s=e.all(t),l={type:"root",children:s};if((0,B.visit)(l,function(e){if("link"===e.type)return o=!0,rf.EXIT}),o||ry(s))return s;for(;!i&&++a<t.children.length;){let e=t.children[a];"element"===e.type&&"source"===e.tagName&&e.properties&&(i=String(e.properties.src||""))}if(r){let n={type:"image",title:null,url:e.resolve(r),alt:(0,rm.toString)(s)};e.patch(t,n),s=[n]}let c=s,u={type:"link",title:n.title?String(n.title):null,url:e.resolve(i),children:c};return e.patch(t,u),u}function rw(e,t){let n=e.all(t);if(n.length>0){let r={type:"paragraph",children:n};return e.patch(t,r),r}}let rC=['"'];function rS(e,t){let n={type:"strong",children:e.all(t)};return e.patch(t,n),n}function rE(e,t){let n={type:"tableCell",children:e.all(t)};if(e.patch(t,n),t.properties){let e=t.properties.rowSpan,r=t.properties.colSpan;if(e||r){let t=n.data||(n.data={});e&&(t.hastUtilToMdastTemporaryRowSpan=e),r&&(t.hastUtilToMdastTemporaryColSpan=r)}}return n}function rT(){return{type:"tableCell",children:[]}}function rI(){return{type:"tableCell",children:[]}}function rD(){return{type:"tableRow",children:[]}}let rN={comment:function(e,t){let n={type:"html",value:"<!--"+t.value+"-->"};return e.patch(t,n),n},doctype:rM,root:function(e,t){let n=e.all(t);(e.options.document||ry(n))&&(n=rb(n));let r={type:"root",children:n};return e.patch(t,r),r},text:function(e,t){let n={type:"text",value:t.value};return e.patch(t,n),n}}
203,rA={applet:rM,area:rM,basefont:rM,bgsound:rM,caption:rM,col:rM,colgroup:rM,command:rM,content:rM,datalist:rM,dialog:rM,element:rM,embed:rM,frame:rM,frameset:rM,isindex:rM,keygen:rM,link:rM,math:rM,menu:rM,menuitem:rM,meta:rM,nextid:rM,noembed:rM,noframes:rM,optgroup:rM,option:rM,param:rM,script:rM,shadow:rM,source:rM,spacer:rM,style:rM,svg:rM,template:rM,title:rM,track:rM,abbr:r_,acronym:r_,bdi:r_,bdo:r_,big:r_,blink:r_,button:r_,canvas:r_,cite:r_,data:r_,details:r_,dfn:r_,font:r_,ins:r_,label:r_,map:r_,marquee:r_,meter:r_,nobr:r_,noscript:r_,object:r_,output:r_,progress:r_,rb:r_,rbc:r_,rp:r_,rt:r_,rtc:r_,ruby:r_,slot:r_,small:r_,span:r_,sup:r_,sub:r_,tbody:r_,tfoot:r_,thead:r_,time:r_,address:rP,article:rP,aside:rP,body:rP,center:rP,div:rP,fieldset:rP,figcaption:rP,figure:rP,form:rP,footer:rP,header:rP,hgroup:rP,html:rP,legend:rP,main:rP,multicol:rP,nav:rP,picture:rP,section:rP,a:function(e,t){let n=t.properties||{},r=e.all(t),i={type:"link",url:e.resolve(String(n.href||"")||null),title:n.title?String(n.title):null,children:r};return e.patch(t,i),i},audio:rk,b:rS,base:function(e,t){e.baseFound||(e.frozenBaseUrl=String(t.properties&&t.properties.href||"")||void 0,e.baseFound=!0)},blockquote:function(e,t){let n={type:"blockquote",children:e.toFlow(e.all(t))};return e.patch(t,n),n},br:function(e,t){let n={type:"break"};return e.patch(t,n),n},code:ri,dir:rh,dl:function(e,t){let n=[],r=[],i=-1;for(;++i<t.children.length;){let e=t.children[i];"element"===e.type&&"div"===e.tagName?n.push(...e.children):n.push(e)}let a={definitions:[],titles:[]};for(i=-1;++i<n.length;){let e=n[i];if("element"===e.type&&"dt"===e.tagName){let t=n[i-1];t&&"element"===t.type&&"dd"===t.tagName&&(r.push(a),a={definitions:[],titles:[]}),a.titles.push(e)}else a.definitions.push(e)}r.push(a),i=-1;let o=[];for(;++i<r.length;){let t=[...n9(e,r[i].titles),...n9(e,r[i].definitions)];t.length>0&&o.push({type:"listItem",spread:t.length>1,checked:null,children:t})}if(o.length>0){let n={type:"list",ordered:!1,start:null,spread:n8(o),children:o};return e.patch(t,n),n}},dt:rd,dd:rd,del:n7,em:rt,h1:rn,h2:rn,h3:rn,h4:rn,h5:rn,h6:rn,hr:function(e,t){let n={type:"thematicBreak"};return e.patch(t,n),n},i:rt,iframe:function(e,t){let n=t.properties||{},r=String(n.src||""),i=String(n.title||"");if(r&&i){let n={type:"link",title:null,url:e.resolve(r),children:[{type:"text",value:i}]};return e.patch(t,n),n}},img:rr,image:rr,input:function(e,t){let n=t.properties||{},r=String(n.value||n.placeholder||"");if(n.disabled||"hidden"===n.type||"file"===n.type)return;if("checkbox"===n.type||"radio"===n.type){let r={type:"text",value:n.checked?e.options.checked||"[x]":e.options.unchecked||"[ ]"};return e.patch(t,r),r}if("image"===n.type){let i=n.alt||r;if(i){let r={type:"image",url:e.resolve(String(n.src||"")||null),title:String(n.title||"")||null,alt:String(i)};return e.patch(t,r),r}return}let i=[];if(r)i=[[r,void 0]];else if("button"!==n.type&&"file"!==n.type&&"password"!==n.type&&"reset"!==n.type&&"submit"!==n.type&&n.list){let t=String(n.list),r=e.elementById.get(t);r&&"datalist"===r.tagName&&(i=ra(r,n))}if(0===i.length)return;if("password"===n.type&&(i[0]=["â¢".repeat(i[0][0].length),void 0]),"email"===n.type||"url"===n.type){let t=[],r=-1;for(;++r<i.length;){let a=e.resolve(i[r][0]),o={type:"link",title:null,url:"email"===n.type?"mailto:"+a:a,children:[{type:"text",value:i[r][1]||a}]};t.push(o),r!==i.length-1&&t.push({type:"text",value:", "})}return t}let a=[],o=-1;for(;++o<i.length;)a.push(i[o][1]?i[o][1]+" ("+i[o][0]+")":i[o][0]);let s={type:"text",value:a.join(", ")};return e.patch(t,s),s},kbd:ri,li:rd,listing:n6,mark:rt,ol:rh,p:rw,plaintext:n6,pre:n6,q:function(e,t){let n=e.options.quotes||rC;e.qNesting++;let r=e.all(t);e.qNesting--;let i=n[e.qNesting%n.length],a=r[0],o=r[r.length-1],s=i.charAt(0),l=i.length>1?i.charAt(1):i;return a&&"text"===a.type?a.value=s+a.value:r.unshift({type:"text",value:s}),o&&"text"===o.type?o.value+=l:r.push({type:"text",value:l}),r},s:n7,samp:ri,select:function(e,t){let n=ra(t),r=-1,i=[];for(;++r<n.length;){let e=n[r];i.push(e[1]?e[1]+" ("+e[0]+")":e[0])}if(i.length>0){let n={type:"text",value:i.join(", ")};return e.patch(t,n),n}},strike:n7,strong:rS,summary:rw,table:function(e,t){var n;let r,i,a;if(e.inTable){let n={type:"text",value:n2(t)}
203;return e.patch(t,n),n}e.inTable=!0;let{align:o,headless:s}=(n=t,r={align:[null],headless:!0},i=0,a=0,(0,B.visit)(n,function(e){if("element"===e.type){if("table"===e.tagName&&n!==e)return rf.SKIP;if(("th"===e.tagName||"td"===e.tagName)&&e.properties){if(!r.align[a]){let t=String(e.properties.align||"")||null;("center"===t||"left"===t||"right"===t||null===t)&&(r.align[a]=t)}r.headless&&i<2&&"th"===e.tagName&&(r.headless=!1),a++}else"thead"===e.tagName?r.headless=!1:"tr"===e.tagName&&(i++,a=0)}}),r),l=e.toSpecificContent(e.all(t),rD);s&&l.unshift(rD());let c=-1;for(;++c<l.length;){let t=l[c],n=e.toSpecificContent(t.children,rI);t.children=n}let u=1;for(c=-1;++c<l.length;){let e=l[c].children,t=-1;for(;++t<e.length;){let n=e[t];if(n.data){let e=n.data,r=Number.parseInt(String(e.hastUtilToMdastTemporaryColSpan),10)||1,i=Number.parseInt(String(e.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||i>1){let e=c-1;for(;++e<c+i;){let n=t-1;for(;++n<t+r&&l[e];){let r=[];(e!==c||n!==t)&&r.push({type:"tableCell",children:[]}),l[e].children.splice(n,0,...r)}}}"hastUtilToMdastTemporaryColSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,"hastUtilToMdastTemporaryRowSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,0===Object.keys(n.data).length&&delete n.data}}e.length>u&&(u=e.length)}for(c=-1;++c<l.length;){let e=l[c].children,t=e.length-1;for(;++t<u;)e.push({type:"tableCell",children:[]})}let d=o.length-1;for(;++d<u;)o.push(null);e.inTable=!1;let h={type:"table",align:o,children:l};return e.patch(t,h),h},td:rE,textarea:function(e,t){let n={type:"text",value:n2(t)}
203;return e.patch(t,n),n},th:rE,tr:function(e,t){let n={type:"tableRow",children:e.toSpecificContent(e.all(t),rT)};return e.patch(t,n),n},tt:ri,u:rt,ul:rh,var:ri,video:rk,wbr:function(e,t){let n={type:"text",value:"â"};return e.patch(t,n),n},xmp:n6};function r_(e,t){return e.all(t)}function rP(e,t){return e.toFlow(e.all(t))}function rM(){}let rR={}.hasOwnProperty;function rL(e){let t=e.children||[],n=[],r=-1;for(;++r<t.length;){let i=t[r],a=this.one(i,e);Array.isArray(a)?n.push(...a):a&&n.push(a)}let i=0,a=n.length;for(;i<a&&"break"===n[i].type;)i++;for(;a>i&&"break"===n[a-1].type;)a--;return 0===i&&a===n.length?n:n.slice(i,a)}function rj(e,t){if("element"===e.type){if(e.properties&&"ignore"===e.properties.dataMdast)return;if(rR.call(this.handlers,e.tagName))return this.handlers[e.tagName](this,e,t)||void 0}else if(rR.call(this.nodeHandlers,e.type))return this.nodeHandlers[e.type](this,e,t)||void 0;if("value"in e&&"string"==typeof e.value){let t={type:"text",value:e.value};return this.patch(e,t),t}if("children"in e)return this.all(e)}function rO(e,t){e.position&&(t.position=(0,nG.position)(e))}function rB(e){let t=this.frozenBaseUrl;return null==e?"":t?String(new URL(e,t)):e}function rF(e){return rb(e)}function rH(e,t){let n=t(),r=[],i=[],a=-1;for(;++a<e.length;){let t=e[a];t.type===n.type?(i.length>0&&(t.children.unshift(...i),i=[]),r.push(t)):i.push(t)}if(i.length>0){let e=r[r.length-1];e||(e=t(),r.push(e)),e.children.push(...i),i=[]}return r}let rU={};function rz(e,t){var n;let r,i,a=(0,nN.default)(e),o=t||rU,s=(n=({newlines:!0===o.newlines}).newlines?nV:nq,i=function(e){return String(e).replace(/[\t\n\v\f\r ]+/g,n)},function(e){!function e(t,n){if("children"in t){let r={...n};
203return("root"===t.type||nA(t,nB))&&(r.before=!0,r.after=!0),r.whitespace=function(e,t){if("tagName"in e&&e.properties)switch(e.tagName){case"listing":case"plaintext":case"script":case"style":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return e.properties.wrap?"pre-wrap":"pre";case"td":case"th":return e.properties.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}return t.whitespace}(t,n),function(t,n){let r=n.before,i=n.after,a=t.children,o=a.length,s=-1;for(;++s<o;){let t=e(a[s],{...n,after:function e(t,n,r){for(;++n<t.length;){var i;let r=t[n],a=function(e){if("element"===e.type){if(nz(e))return!1;if(function(e){return nA(e,nB)}(e))return!0}else if("text"===e.type){if(!(0,nj.whitespace)(e))return!1}else if(!nU(e))return!1}(r);if(void 0===a&&"children"in r&&!("element"===(i=r).type&&i.properties.hidden||nU(i)||nA(i,nH))&&(a=e(r.children,-1)),"boolean"==typeof a)return a}return r}(a,s,i),before:r});t.remove?(a.splice(s,1),s--,o--):t.ignore||(r=t.stripAtStart),nz(a[s])&&(r=!1)}return{ignore:!1,stripAtStart:!!(r||i),remove:!1}}(t,r)}if("text"===t.type){if("normal"===n.whitespace){var r,i;let e,a,o,s;return r=t,e=(i=n).collapse(r.value),a={ignore:!1,stripAtStart:!1,remove:!1},o=0,s=e.length,i.before&&n$(e.charAt(0))&&o++,o!==s&&n$(e.charAt(s-1))&&(i.after?s--:a.stripAtStart=!0),o===s?a.remove=!0:r.value=e.slice(o,s),a}"nowrap"===n.whitespace&&(t.value=n.collapse(t.value))}return{ignore:nU(t),stripAtStart:!1,remove:!1}}(e,{collapse:i,whitespace:"normal"})}),l={all:rL,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...rA,...o.handlers},inTable:!1,nodeHandlers:{...rN,...o.nodeHandlers},one:rj,options:o,patch:rO,qNesting:0,resolve:rB,toFlow:rF,toSpecificContent:rH};s(a),(0,B.visit)(a,function(e){if(e&&"element"===e.type&&e.properties){let t=String(e.properties.id||"")||void 0;t&&!l.elementById.has(t)&&l.elementById.set(t,e)}});let c=l.one(a,void 0);return r=c?Array.isArray(c)?{type:"root",children:c}:c:{type:"root",children:[]},(0,B.visit)(r,function(e,t,n){if("text"===e.type&&void 0!==t&&n){let r=n.children[t-1];if(r&&r.type===e.type)return r.value+=e.value,n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t-1;if(e.value=e.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,"$1"),n&&("heading"===n.type||"paragraph"===n.type||"root"===n.type)&&(t||(e.value=e.value.replace(/^[\t ]+/,"")),t===n.children.length-1&&(e.value=e.value.replace(/[\t ]+$/,""))),!e.value)return n.children.splice(t,1),t}}),r}let r$={document:!0};function rV(e,t){return e&&"run"in e?async function(n,r){let i=rz(n,{...r$,...t});await e.run(i,r)}:function(t){return rz(t,{...r$,...e})}}var rq=e.i(369587);let rG={}.hasOwnProperty;var rW=e.i(583664),rK=e.i(432066),rY=e.i(586281);let rZ=[function(e,t,n,r){if("code"===t.type&&(0,rK.formatCodeAsIndented)(t,r)&&("list"===e.type||e.type===t.type&&(0,rK.formatCodeAsIndented)(e,r)))return!1;if("spread"in n&&"boolean"==typeof n.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&(0,rY.formatHeadingAsSetext)(t,r)))return;return+!!n.spread}}],rX=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],rQ=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:rX},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:rX},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:rX},{atBreak:!0,character:"+",after:"(?:[ \r\n])"},{atBreak:!0,character:"-",after:"(?:[ \r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:rX},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:rX},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:rX},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:rX},{atBreak:!0,character:"~"}];var rJ=e.i(35198);function r1(e){return e.label||!e.identifier?e.label||"":(0,rJ.decodeString)(e.identifier)}function r0(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}let r2=/\r?\n|\r/g;function r4(e,t){let n,r=[],i=0,a=0;for(;n=r2.exec(e);)o(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,a++;return o(e.slice(i)),r.join("");function o(e){r.push(t(e,a,!e))}}var r3=e.i(454751);function r5(e,t){return e-t}function r6(e,t){let n,r=/\\(?=[!-/:-@[-`{-~])/g,i=[],a=[],o=e+t,s=-1,l=0;for(;n=r.exec(o);)i.push(n.index);for(;++s<i.length;)l!==i[s]&&a.push(e.slice(l,i[s])),a.push("\\"),l=i[s];return a.push(e.slice(l)),a.join("")}function r7(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:function(e){let t=e||"",n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=1===n.length?a+o.length:1+o.length+r,t},current:function(){return{now:{line:i,column:a},lineShift:r}},shift:function(e){r+=e}}}function r8(e){throw Error("Cannot handle value `"+e+"`, expected node")}function r9(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function ie(e,t){if("definition"===e.type&&e.type===t.type)return 0}function it(e,t){return function(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let c,u=i[o];if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),c=n?n(i[o+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else c=n.after;a.length>0&&("\r"===s||"\n"===s)&&"html"===u.type&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),s=" ",(l=t.createTracker(n)).move(a.join(""))),a.push(l.move(t.handle(u,e,t,{...l.current(),before:s,after:c}))),s=a[a.length-1].slice(-1)}return r.pop(),a.join("")}(e,this,t)}function ir(e,t){return function(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:"\n",after:"\n",...a.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(function(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(!0===a||1===a)break;if("number"==typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n<!---->\n\n"}return"\n\n"}(n,i[s+1],e,t)))}return r.pop(),o.join("")}(e,this,t)}function ii(e,t){return function(e,t,n){let r=(n.before||"")+(t||"")+(n.after||""),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t,n=e.unsafe[s];if(!(0,r3.patternInScope)(e.stack,n))continue;let a=e.compilePattern(n);for(;t=a.exec(r);){let e="before"in n||!!n.atBreak,r="after"in n,a=t.index+(e?t[1].length:0);i.includes(a)?(o[a].before&&!e&&(o[a].before=!1),o[a].after&&!r&&(o[a].after=!1)):(i.push(a),o[a]={before:e,after:r})}}i.sort(r5);let l=n.before?n.before.length:0,c=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];!(e<l)&&!(e>=c)&&(!(e+1<c)||i[s+1]!==e+1||!o[e].after||o[e+1].before||o[e+1].after)&&(i[s-1]!==e-1||!o[e].before||o[e-1].before||o[e-1].after)&&(l!==e&&a.push(r6(r.slice(l,e),"\\")),l=e,!/[!-/:-@[-`{-~]/.test(r.charAt(e))||n.encode&&n.encode.includes(r.charAt(e))?(a.push("&#x"+r.charCodeAt(e).toString(16).toUpperCase()+";"),l++):a.push("\\"))}return a.push(r6(r.slice(l,c),n.after)),a.join("")}(this,e,t)}function ia(e){let t=this;t.compiler=function(n){return function(e,t={}){let n={enter:function(e){return n.stack.push(e),function(){n.stack.pop()}},indentLines:r4,associationId:r1,containerPhrasing:it,containerFlow:ir,createTracker:r7,compilePattern:r0,safe:ii,stack:[],unsafe:[...rQ],join:[...rZ],handlers:{...rW.handle},options:{},indexStack:[],handle:void 0};!function e(t,n){var r,i,a,o;let s,l=-1;if(n.extensions)for(;++l<n.extensions.length;)e(t,n.extensions[l]);for(s in n)if(rG.call(n,s))switch(s){case"extensions":break;case"unsafe":case"join":r=t[s],(i=n[s])&&r.push(...i);break;case"handlers":a=t[s],(o=n[s])&&Object.assign(a,o);break;default:t.options[s]=n[s]}return t}(n,t),n.options.tightDefinitions&&n.join.push(ie),n.handle=(0,rq.zwitch)("type",{invalid:r8,unknown:r9,handlers:n.handlers});let r=n.handle(e,void 0,n,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return r&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n"),r}(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}var io=e.i(436484),is=e.i(204108),il=e.i(997803);let ic={tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(e.consume(r),o++,t):o<2?n(r):(e.exit("mathFlowFenceSequence"),(0,is.factorySpace)(e,s,"whitespace")(r))}(t)};function s(t){return null===t||(0,il.markdownLineEnding)(t)?l(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(r){return null===r||(0,il.markdownLineEnding)(r)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),l(r)):36===r?n(r):(e.consume(r),t)}(t))}function l(n){return(e.exit("mathFlowFence"),r.interrupt)?t(n):e.attempt(iu,c,h)(n)}function c(t){return e.attempt({tokenize:p,partial:!0},h,u)(t)}function u(t){return(a?(0,is.factorySpace)(e,d,"linePrefix",a+1):d)(t)}function d(t){return null===t?h(t):(0,il.markdownLineEnding)(t)?e.attempt(iu,c,h)(t):(e.enter("mathFlowValue"),function t(n){return null===n||(0,il.markdownLineEnding)(n)?(e.exit("mathFlowValue"),d(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("mathFlow"),t(n)}function p(e,t,n){let i=0;return(0,is.factorySpace)(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(i++,e.consume(r),t):i<o?n(r):(e.exit("mathFlowFenceSequence"),(0,is.factorySpace)(e,a,"whitespace")(r))}(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function a(r){return null===r||(0,il.markdownLineEnding)(r)?(e.exit("mathFlowFence"),t(r)):n(r)}}},concrete:!0,name:"mathFlow"},iu={tokenize:function(e,t,n){let r=this;return function(n){return null===n?t(n):(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};function id(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("mathTextData"===e[t][1].type){e[r][1].type="mathTextPadding",e[i][1].type="mathTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="mathTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e}function ih(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}let ip={};function im(e){let t,n=e||ip,r=this.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push({flow:{36:ic},text:{36:(null==(t=(n||{}).singleDollarTextMath)&&(t=!0),{tokenize:function(e,n,r){let i,a,o=0;return function(n){return e.enter("mathText"),e.enter("mathTextSequence"),function n(i){return 36===i?(e.consume(i),o++,n):o<2&&!t?r(i):(e.exit("mathTextSequence"),s(i))}(n)};function s(t){return null===t?r(t):36===t?(a=e.enter("mathTextSequence"),i=0,function t(r){return 36===r?(e.consume(r),i++,t):i===o?(e.exit("mathTextSequence"),e.exit("mathText"),n(r)):(a.type="mathTextData",l(r))}(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):(0,il.markdownLineEnding)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("mathTextData"),l(t))}function l(t){return null===t||32===t||36===t||(0,il.markdownLineEnding)(t)?(e.exit("mathTextData"),s(t)):(e.consume(t),l)}},resolve:id,previous:ih,name:"mathText"})}}),a.push(function(){return{enter:{mathFlow:function(e){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},e)},mathFlowFenceMeta:function(){this.buffer()},mathText:function(e){this.enter({type:"inlineMath",value:"",data:{hName:"
203code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},e),this.buffer()}},exit:{mathFlow:function(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),n=this.stack[this.stack.length-1];(0,F.ok)("math"===n.type),this.exit(e),n.value=t;let r=n.data.hChildren[0];(0,F.ok)("element"===r.type),(0,F.ok)("code"===r.tagName),r.children.push({type:"text",value:t}),this.data.mathFlowInside=void 0},mathFlowFence:function(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)},mathFlowFenceMeta:function(){let e=this.resume(),t=this.stack[this.stack.length-1];(0,F.ok)("math"===t.type),t.meta=e},mathFlowValue:e,mathText:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,F.ok)("inlineMath"===n.type),this.exit(e),n.value=t,n.data.hChildren.push({type:"text",value:t})},mathTextData:e}};function e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}()),o.push(function(e){let t=(e||{}).singleDollarTextMath;return null==t&&(t=!0),n.peek=function(){return"$"},{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:"\n",inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:function(e,t,n,r){let i=e.value||"",a=n.createTracker(r),o="$".repeat(Math.max((0,io.longestStreak)(i,"$")+1,2)),s=n.enter("mathFlow"),l=a.move(o);if(e.meta){let t=n.enter("mathFlowMeta");l+=a.move(n.safe(e.meta,{after:"\n",before:l,encode:["$"],...a.current()})),t()}return l+=a.move("\n"),i&&(l+=a.move(i+"\n")),l+=a.move(o),s(),l},inlineMath:n}};function n(e,n,r){let i=e.value||"",a=1;for(!t&&a++;RegExp("(^|[^$])"+"\\$".repeat(a)+"([^$]|$)").test(i);)a++;let o="$".repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=" "+i+" ");let s=-1;for(;++s<r.unsafe.length;){let e,t=r.unsafe[s];if(!t.atBreak)continue;let n=r.compilePattern(t);for(;e=n.exec(i);){let t=e.index;10===i.codePointAt(t)&&13===i.codePointAt(t-1)&&t--,i=i.slice(0,t)+" "+i.slice(e.index+1)}}return o+i+o}}(n))}function ig(e,t){return{type:"element",tagName:"div",properties:{dataType:"math",dataTex:t.value},children:[]}}function iy(e,t){let n=t.properties?.dataTex;return"string"==typeof n&&n.trim()?{type:"math",value:n.trim(),meta:null}:e.all(t)}function ib(){return e=>{(0,B.visit)(e,"list",e=>{for(let t of(e.spread=!1,e.children))"listItem"===t.type&&(t.spread=!1)})}}e.s(["htmlToMarkdown",0,function(e){return String((0,P.unified)().use(nD).use(rV,{handlers:{div:iy}}).use(M.default).use(im).use(ib).use(ia,{bullet:"-"}).processSync(e))},"markdownToHtml",0,function(e){let t,n,r=e;return(t=(0,P.unified)().use(R.default).use(M.default).parse(r),n=!1,(0,B.visit)(t,"html",e=>{(e.value||"").replace(/<[^>]*>/g,"").trim()&&(n=!0)}),n)?r.split("\n").map(e=>`<p>${e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</p>`).join("\n"):(e=function(e){let t=e.split("\n"),n=[],r=e=>/^\s{0,3}>/.test(e),i=e=>/^\s{0,3}\|/.test(e),a=e=>/^\s{0,3}(=+|-{2,})\s*$/.test(e),o=null;for(let e=0;e<t.length;e++){let s=t[e];n.push(s);let l=s.match(/^\s{0,3}(`{3,}|~{3,})/)?.[1];if(o){l&&s.trim().startsWith(o)&&(o=null);continue}if(l){o=l;continue}let c=t[e+1];!(void 0===c||!c.trim()||!s.trim()||a(c)||r(s)&&r(c))&&(i(s)&&i(c)||n.push(""))}return n.join("\n")}(e),String((0,P.unified)().use(R.default).use(M.default).use(im,{singleDollarTextMath:!1}).use(L.default,{handlers:{math:ig,inlineMath:ig}}).use(O).processSync(e)))}],774753)},680016,261355,e=>{"use strict";let t=["card/block","block/type","block/is-list","block/heading-level","block/check-list","block/list-style","block/list-number"],n=new Set([...t,"canvas/block","block/footnote","block/comment","gallery/image"]);class r{byId=new Map;byEntityAttribute=new Map;listeners=new Set;pendingChanged=null;populated=!1;constructor(e){e.experimentalWatch(e=>this.apply(e),{initialValuesInFirstDiff:!0})}eav(e,t){return this.byEntityAttribute.get(`${e}-${t}`)||[]}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}remove(e){let t=this.byId.get(e);if(!t)return null;this.byId.delete(e);let n=`${t.entity}-${t.attribute}`,r=this.byEntityAttribute.get(n);if(r){let t=r.filter(t=>t.id!==e);0===t.length?this.byEntityAttribute.delete(n):this.byEntityAttribute.set(n,t)}return t}add(e){this.byId.set(e.id,e);let t=`${e.entity}-${e.attribute}`,n=this.byEntityAttribute.get(t);n?n.push(e):this.byEntityAttribute.set(t,[e])}apply(e){let t=new Set;for(let i of(this.populated||(this.populated=!0,t.add("populated")),e)){var r;if("del"===i.op||"change"===i.op){let e=this.remove(i.key);e&&t.add(e.attribute)}("add"===i.op||"change"===i.op)&&"object"==typeof(r=i.newValue)&&null!==r&&n.has(r.attribute)&&(this.add(i.newValue),t.add(i.newValue.attribute))}t.size>0&&this.notify(t)}notify(e){if(this.pendingChanged){for(let t of e)this.pendingChanged.add(t);return}this.pendingChanged=e,setTimeout(()=>{let e=this.pendingChanged;for(let t of(this.pendingChanged=null,this.listeners))try{t(e)}catch(e){console.error("BlockStructureMirror listener threw",e)}},0)}}let i=new WeakMap;function a(e){let t=i.get(e);return t||(t=new r(e),i.set(e,t)),t}e.s(["blockListAttributes",0,t,"getBlockStructureMirror",0,a],261355);var o=e.i(64572),s=e.i(929495);function l(e,t){let n=e.eav(t,"card/block").toSorted((e,t)=>e.data.position===t.data.position?e.id>t.id?1:-1:e.data.position>t.data.position?1:-1).map(t=>{let n=e.eav(t.data.value,"block/type")[0],r=e.eav(t.data.value,"block/is-list");if(!n)return null;let i="heading"===n.data.value?e.eav(t.data.value,"block/heading-level")[0]?.data.value:void 0;if(r[0]?.data.value){let n=(r,i,a,o)=>{let s=e.eav(r.data.value,"card/block").toSorted((e,t)=>e.data.position===t.data.position?e.id>t.id?1:-1:e.data.position>t.data.position?1:-1),l=e.eav(r.data.value,"block/type")[0],c=e.eav(r.data.value,"block/check-list"),u=e.eav(r.data.value,"block/list-style")[0],d=e.eav(r.data.value,"block/list-number")[0];if(!l)return[];let h=[...o,{entity:r.data.value,depth:a}],p=s.map(e=>n(e,r.data.value,a+1,h));
203return[{entityID:r.data.value,position:r.data.position,factID:r.id,type:l.data.value,parent:t.entity,listData:{depth:a,parent:i,path:h,checklist:!!c[0],checked:c[0]?.data.value,listStyle:u?.data.value,listStart:d?.data.value}},...p.flat()]};return n(t,t.entity,1,[])}return[{entityID:t.data.value,position:t.data.position,factID:t.id,type:n.data.value,parent:t.entity,...void 0!==i&&{headingLevel:i}}]}).flat().filter(e=>null!==e),r=[];for(let e of n){let t="heading"===e.type&&!e.listData,n=e.headingLevel??1;if(t)for(;r.length>0&&r[r.length-1].level>=n;)r.pop();r.length&&(e.headingPath=r.map(e=>e.entity)),t&&r.push({entity:e.entityID,level:n})}let i=new Map;for(let e of n){if(!e.listData){i.clear();continue}if("ordered"!==e.listData.listStyle)continue;let t=e.listData.parent;void 0!==e.listData.listStart?i.set(t,e.listData.listStart):i.has(t)||i.set(t,1),e.listData.displayNumber=i.get(t),i.set(t,i.get(t)+1)}return n}e.s(["filterBlocksForZoom",0,function(e,t){return t?e.filter(e=>e.entityID===t||e.listData?.path.some(e=>e.entity===t)):e},"getBlocksFromMirror",0,(e,t)=>l(e,t),"getBlocksWithTypeLocal",0,(e,t)=>l((0,o.scanIndexLocal)(e),t),"getCanvasBlock",0,(e,t,n)=>{let r=a(e),i=r.eav(t,"canvas/block").find(e=>e.data.value===n),o=r.eav(n,"block/type")[0]?.data.value;if(!i||!o||"group"===o)return null;let s="heading"===o?r.eav(n,"block/heading-level")[0]?.data.value:void 0,l=r.eav(n,"block/check-list")[0];return{entityID:n,parent:t,factID:i.id,position:"",type:o,...void 0!==s&&{headingLevel:s},...r.eav(n,"block/is-list")[0]?.data.value&&{listData:{depth:1,parent:t,path:[{entity:n,depth:1}],checklist:!!l,checked:l?.data.value,listStyle:r.eav(n,"block/list-style")[0]?.data.value,listStart:r.eav(n,"block/list-number")[0]?.data.value}}}},"getPageBlocks",0,(e,t)=>l(a(e),t),"getPageReadingOrder",0,function(e,t){let n=e.eav(t,"canvas/block").toSorted((e,t)=>(0,s.canvasBlockOrder)(e.data.position,t.data.position)).flatMap(n=>{let r=e.eav(n.data.value,"block/type")[0]?.data.value;return r?"group"===r?l(e,n.data.value):[{entityID:n.data.value,parent:t,factID:n.id,position:"",type:r}]:[]});return[...l(e,t),...n]},"isBlockHidden",0,function(e,t){return(e.listData?.path.some(n=>t.includes(n.entity)&&n.entity!==e.entityID)??!1)||(e.headingPath?.some(e=>t.includes(e))??!1)}],680016)},988314,e=>{"use strict";var t=e.i(768834),n=e.i(579473),r=e.i(827121);let i=(0,t.create)((0,n.subscribeWithSelector)(()=>({lastXPosition:0,editorStates:{}}))),a=(e,t)=>{i.setState(n=>{let r=n.editorStates[e];return r?{editorStates:{...n.editorStates,[e]:{...r,...t}}}:n})};e.s(["restoreEditorState",0,(e,t)=>{let n=i.getState().editorStates[e];if(!n)return;if(n.editor.plugins===t.plugins)return a(e,{editor:t});let o=n.editor.tr.replaceWith(0,n.editor.doc.content.size,t.doc.content),s=Math.min(t.selection.head,o.doc.content.size);o.setSelection(r.Selection.near(o.doc.resolve(s))),o.setMeta("addToHistory",!1),n.view?n.view.dispatch(o):a(e,{editor:n.editor.apply(o)})},"setEditorState",0,a,"useEditorStates",0,i])},950649,e=>{"use strict";var t=e.i(768834),n=e.i(579473);let r=(0,t.create)((0,n.combine)({collapsedThreads:new Set},e=>({toggleCollapsed:t=>{e(e=>{let n=new Set(e.collapsedThreads);return n.has(t)?n.delete(t):n.add(t),{collapsedThreads:n}})},isCollapsed:e=>!1})));e.s(["useThreadState",0,r])},468034,993417,e=>{"use strict";var t=e.i(478802),n=e.i(110383),r=e.i(553445);async function i(e,r){let i=(0,n.v7)();return await e.mutate.addBlock({parent:r.parent,factID:(0,n.v7)(),permission_set:r.permission_set,type:r.type,position:(0,t.generateKeyBetween)(r.position,r.nextPosition),newEntityID:i}),i}e.s(["addBlockBelow",0,i,"focusNewTextBlock",0,function(e,t=30){setTimeout(()=>{let n=0,i=()=>{let a=document.getElementById(r.elementId.block(e).text);if(a)return a.focus();++n>=t||requestAnimationFrame(i)};i()},10)}],468034);var a=e.i(813029),o=e.i(64572),s=e.i(680016),l=e.i(394191),c=e.i(680915);async function u(e,t,n){let r=[];for(let n of e){let[e]=await t.query(e=>(0,o.scanIndex)(e).eav(n,"block/type"));if(e?.data.value==="card"||e?.data.value==="embedded-canvas"){let[e]=await t?.query(e=>(0,o.scanIndex)(e).eav(n,"block/card")||[]);r=[e?.data.value]}if(e?.data.value==="mailbox"){let[e]=await t?.query(e=>(0,o.scanIndex)(e).eav(n,"mailbox/archive")||[]),[i]=await t?.query(e=>(0,o.scanIndex)(e).eav(n,"mailbox/draft")||[]);r=[e?.data.value,i?.data.value]}}let i=a.useUIState.getState().focusedEntity,u=i?.entityType==="page"?i.entityID:i?.parent;if(u){let n=await t?.query(e=>(0,o.scanIndex)(e).eav(u,"page/type"));if(n[0]?.data.value==="canvas")a.useUIState.getState().setFocusedBlock({entityType:"page",entityID:u}),a.useUIState.getState().setSelectedBlocks([]);else{let n=(0,s.getPageBlocks)(t,u),r=a.useUIState.getState().selectedBlocks,i=r[0],d=r[e.length-1],h=n?.[n.findIndex(e=>e.entityID===i?.entityID)-1],p=await t?.query(e=>(0,o.scanIndex)(e).eav(h?.entityID,"block/type")),m=n?.[n.findIndex(e=>e.entityID===d.entityID)+1],f=await t?.query(e=>(0,o.scanIndex)(e).eav(m?.entityID,"block/type"));h?(a.useUIState.getState().setSelectedBlock({entityID:h.entityID,parent:h.parent}),(0,l.focusBlock)({entityID:h.entityID,type:p?.[0].data.value,parent:h.parent},{type:"end"})):m?(a.useUIState.getState().setSelectedBlock({entityID:m.entityID,parent:m.parent}),(0,l.focusBlock)({entityID:m.entityID,type:f?.[0]?.data.value,parent:m.parent},{type:"start"})):(a.useUIState.getState().setFocusedBlock({entityType:"page",entityID:(0,c.pageOfParent)(u)}),a.useUIState.getState().setSelectedBlocks([]))}}
203r.forEach(e=>e&&a.useUIState.getState().closePage(e));let d=async()=>{for(let n of e)for(let e of(await t.query(e=>(0,o.scanIndex)(e).eav(n,"block/footnote"))))await t.mutate.deleteFootnote({footnoteEntityID:e.data.value,blockID:n});await Promise.all(e.map(e=>t?.mutate.removeBlock({blockEntity:e,parent:u})))};n?await n.withUndoGroup(d):await d()}e.s(["deleteBlock",0,u],993417)},170685,670751,433823,836811,193950,54642,836120,75187,513585,213250,100375,429307,40797,385691,e=>{"use strict";var t=e.i(593302);function n(e,t){return 0===t?e:n(t,e%t)}function r(e){if(!e)return null;if(e["aspect-ratio"]){let[t,r]=function(e,t=100){let r=1,i=1,a=1/0;for(let n=1;n<=t;n++){let t=Math.round(e*n),o=Math.abs(e-t/n);if(o<a&&(a=o,r=t,i=n,o<1e-9))break}let o=n(r,i);return[r/o,i/o]}(e["aspect-ratio"]);return`${t}/${r}`}if(e.width&&e.height){let t=n(e.width,e.height);return`${e.width/t}/${e.height/t}`}return null}async function i(e,t,n,r){let i=[{entity:t,attribute:"block/type",data:{type:"block-type-union",value:"standard-site-post"}},{entity:t,attribute:"block/standard-site-post",data:{type:"string",value:n}}];r&&(i.ignoreUndo=!0),await e.mutate.assertFact(i)}async function a(e,t,n,r){let i=[{entity:t,attribute:"block/type",data:{type:"block-type-union",value:"standard-site-publication"}},{entity:t,attribute:"block/standard-site-publication",data:{type:"string",value:n}}];r&&(i.ignoreUndo=!0),await e.mutate.assertFact(i)}async function o(e,t,n,o){if(!n)return;let s=e=>(o&&(e.ignoreUndo=!0),n.mutate.assertFact(e)),c=await fetch("/api/link_previews",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({url:e,type:"meta"})});if(200!==c.status)return void await s([{entity:t,attribute:"link/url",data:{type:"string",value:e}},{entity:t,attribute:"block/type",data:{type:"block-type-union",value:"link"}}]);let u=await c.json();if(u.leafletPost)return void await i(n,t,u.leafletPost.uri,o);if(u.leafletPublication)return void await a(n,t,u.leafletPublication.uri,o);if(u.blueskyPost){let r="bsky.app";try{r=new URL(e).host}catch{}if(await l(u.blueskyPost.uri,r,t,n,o))return}if(!u.success)return void await s([{entity:t,attribute:"link/url",data:{type:"string",value:e}},{entity:t,attribute:"block/type",data:{type:"block-type-union",value:"link"}}]);if(u.data.links?.player?.[0]){let e=u.data.links?.player?.[0],n=[{entity:t,attribute:"block/type",data:{type:"block-type-union",value:"embed"}},{entity:t,attribute:"embed/url",data:{type:"string",value:e.href}}],i=r(e.media);i?n.push({entity:t,attribute:"embed/aspect-ratio",data:{type:"string",value:i}}):n.push({entity:t,attribute:"embed/height",data:{type:"number",value:e.media?.height||300}}),await s(n);return}await s([{entity:t,attribute:"link/url",data:{type:"string",value:e}},{entity:t,attribute:"block/type",data:{type:"block-type-union",value:"link"}},{entity:t,attribute:"link/title",data:{type:"string",value:u.data.meta?.title||""}},{entity:t,attribute:"link/description",data:{type:"string",value:u.data.meta?.description||""}}]);let d=await fetch("/api/link_previews",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({url:e,type:"image"})}),h=await d.json();await s({entity:t,attribute:"link/preview",data:{fallback:"",type:"image",src:h.url,width:h.width,height:h.height}})}async function s(e,t,n){let r=e?.split("/"),i=r?r[2]:"bsky.app",a=r?r[4]:"",o=r?r[6]:"";return l(`at://${a}/app.bsky.feed.post/${o}`,i,t,n)}async function l(e,t,n,r,i){let a=await c(e);if(!a||void 0===a)return!1;let o=[{entity:n,attribute:"block/type",data:{type:"block-type-union",value:"bluesky-post"}},{entity:n,attribute:"block/bluesky-post",data:{type:"bluesky-post",value:JSON.parse(JSON.stringify(a.data.thread))}},{entity:n,attribute:"bluesky-post/host",data:{type:"string",value:t}}];return i&&(o.ignoreUndo=!0),await r.mutate.assertFact(o),!0}async function c(e){let n=new t.AtpAgent({service:"https://public.api.bsky.app"});try{return await n.getPostThread({uri:e,depth:0,parentHeight:0}).then(e=>e)}catch(e){return}}e.s(["getAspectRatio",0,r],670751),e.s(["addBlueskyPostBlock",0,s,"addLinkBlock",0,o,"assertStandardSitePostFacts",0,i,"assertStandardSitePublicationFacts",0,a],170685);var u=e.i(813029),d=e.i(261355),h=e.i(680016),p=e.i(482448),m=e.i(553445),f=e.i(394191);async function g(e,t,n){u.useUIState.getState().focusedEntity,u.useUIState.setState(()=>({focusedEntity:{entityType:"page",entityID:e}})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,p.scrollIntoViewIfNeeded)(document.getElementById(m.elementId.page(e).container),!1,"smooth",.8)})}),"focusFirstBlock"===n&&setTimeout(()=>{let n=(0,h.getPageReadingOrder)((0,d.getBlockStructureMirror)(t),e)[0];n&&setTimeout(()=>{(0,f.focusBlock)(n,{type:"start"})},500)},50)}e.s(["focusPage",0,g],433823);var y=e.i(868679);let b="leafletEditorPrefs-v1";function v(){try{let e=JSON.parse(localStorage.getItem(b)??"{}");return{pageLinkDisplay:(0,y.isPageLinkDisplay)(e?.pageLinkDisplay)?e.pageLinkDisplay:void 0}}catch{return{}}}e.s(["getEditorPrefs",0,v,"setEditorPref",0,function(e,t){try{localStorage.setItem(b,JSON.stringify({...v(),[e]:t}))}catch{}}],836811);let x=(0,e.i(768834).create)(()=>({}));e.s(["usePollBlockUIState",0,x],193950);var k=e.i(843476),w=e.i(500932);e.s(["BlockButtonSmall",0,e=>{let t,n,r=(0,w.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.53207 1.97182C7.53207 1.5576 7.19628 1.22182 6.78207 1.22182C6.36785 1.22182 6.03207 1.5576 6.03207 1.97182V4.05128C6.
20303207 4.46549 6.36785 4.80128 6.78207 4.80128C7.19628 4.80128 7.53207 4.46549 7.53207 4.05128V1.97182ZM3.62975 2.21817C3.37649 1.8904 2.90548 1.82999 2.5777 2.08325C2.24993 2.3365 2.18953 2.80752 2.44278 3.13529L4.01521 5.17036C4.26846 5.49813 4.73948 5.55854 5.06725 5.30528C5.39502 5.05202 5.45543 4.58101 5.20217 4.25324L3.62975 2.21817ZM10.558 3.78971C10.7922 3.4481 10.7052 2.98127 10.3636 2.74702C10.0219 2.51277 9.55512 2.59981 9.32087 2.94142L8.39772 4.28767C8.16347 4.62929 8.25051 5.09612 8.59212 5.33037C8.93373 5.56462 9.40057 5.47758 9.63482 5.13597L10.558 3.78971ZM1.27137 5.25744C0.865303 5.17568 0.469839 5.43857 0.388073 5.84463C0.306306 6.2507 0.569201 6.64616 0.975264 6.72793L3.27446 7.1909C3.68053 7.27267 4.07599 7.00977 4.15776 6.60371C4.23952 6.19765 3.97663 5.80218 3.57056 5.72042L1.27137 5.25744ZM3.84382 9.46008C4.23975 9.33839 4.46208 8.91878 4.34039 8.52284C4.2187 8.1269 3.79909 7.90458 3.40315 8.02627L1.81228 8.5152C1.41635 8.63689 1.19402 9.0565 1.31571 9.45244C1.4374 9.84837 1.85701 10.0707 2.25295 9.94901L3.84382 9.46008ZM7.03725 6.81012C6.88041 6.76897 6.69114 6.77767 6.47065 6.94802C6.28652 7.09028 6.24349 7.25009 6.2559 7.42889C6.27066 7.64151 6.36831 7.83561 6.41379 7.89654L6.42359 7.91004L11.1362 14.5892C11.2707 14.7799 11.2878 15.0296 11.1806 15.2368C11.0733 15.444 10.8596 15.5743 10.6263 15.5745C10.0976 15.5752 9.27053 15.5217 8.69318 15.4844L8.69309 15.4844C8.44321 15.4682 8.24012 15.4551 8.12826 15.4507C7.80371 15.4379 7.45335 15.6385 7.38185 16.0112C7.33227 16.2698 7.37677 16.4188 7.42966 16.5081C7.4861 16.6035 7.59584 16.704 7.79728 16.783C7.88252 16.8164 8.22336 16.9137 8.78389 17.0619C9.32178 17.2041 10.0151 17.3815 10.7627 17.5716L11.4606 17.749L11.4613 17.7491C12.6176 18.0428 13.8237 18.349 14.7222 18.5886L19.9243 14.6724C19.9209 14.6279 19.9144 14.5745 19.9034 14.5127C19.8598 14.2687 19.7582 13.9611 19.5955 13.6714C19.4685 13.4455 19.3161 13.1714 19.1477 12.8687L19.1476 12.8684L19.1473 12.868L19.1472 12.8678L19.1468 12.867C18.8486 12.3309 18.5006 11.7054 18.1565 11.0992C17.6106 10.1376 17.1103 9.28974 16.8597 8.95397C16.6926 8.73002 16.2319 8.48077 15.6815 8.55951L16.2659 9.14063C16.5106 9.38403 16.5117 9.77975 16.2683 10.0245C16.025 10.2693 15.6292 10.2704 15.3845 10.027L14.1471 8.79644C14.1423 8.7917 14.1376 8.78689 14.133 8.782C14.0429 8.68641 13.7456 8.55949 13.3474 8.58823C13.2195 8.59747 13.1124 8.62004 13.0242 8.65026L14.3817 10.0542C14.6216 10.3024 14.6149 10.6981 14.3668 10.938C14.1186 11.1779 13.7229 11.1713 13.483 10.9231L11.6861 9.06455C11.4948 8.87064 11.2357 8.77488 10.9918 8.79404C10.8564 8.80468 10.7078 8.85211 10.5641 8.96174L12.5193 11.3775C12.7365 11.6458 12.695 12.0394 12.4267 12.2565C12.1584 12.4737 11.7648 12.4322 11.5477 12.1639L9.26591 9.34461L9.26445 9.34279L7.48373 7.12574C7.47642 7.11664 7.46936 7.10733 7.46257 7.09783C7.38144 6.98434 7.22126 6.8584 7.03725 6.81012ZM11.156 18.9613C12.1476 19.2131 13.1677 19.4721 13.9985 19.6902C13.9616 19.9621 13.9927 20.2968 14.1943 20.567L15.1543 21.8533C15.4795 22.289 15.8967 22.5237 16.368 22.4786C16.747 22.4423 17.0375 22.2248 17.1542 22.1374L17.1653 22.1291C18.0981 21.4329 19.0298 20.7353 19.9615 20.0377L19.9638 20.0359C20.8948 19.3389 21.8257 18.6419 22.7577 17.9463C23.0316 17.7419 23.2256 17.4441 23.2533 17.0807C23.2799 16.7324 23.1468 16.4164 22.9591 16.1649L21.9991 14.8786C21.7829 14.5889 21.4706 14.3692 21.133 14.2882C21.065 13.9107 20.9172 13.472 20.6853 13.0592C20.5634 12.8423 20.4135 12.5727 20.2465 12.2726L20.246 12.2717C19.9452 11.731 19.5894 11.0913 19.2435 10.4821C18.7126 9.54681 18.1695 8.61909 17.8615 8.20633C17.2927 7.44422 15.9261 6.93571 14.6184 7.60472C14.2011 7.38147 13.6924 7.31008 13.2574 7.34148C12.8614 7.37007 12.3952 7.49539 12.0292 7.78282C11.6844 7.60323 11.2922 7.51659 10.8939 7.54788C10.4962 7.57913 10.1124 7.7263 9.77985 7.98835L8.46804 6.35511C8.22863 6.02801 7.83363 5.72676 7.35447 5.60104C6.84044 5.46618 6.24812 5.54034 5.70642 5.95885C5.12836 6.40546 4.97358 7.00672 5.0089 7.51546C5.04151 7.98521 5.23324 8.40116 5.4063 8.63646L9.38501 14.2755C9.21037 14.2648 9.03901 14.2536 8.87896 14.2432L8.8788 14.2432L8.87855 14.2431C8.59391 14.2245 8.34511 14.2083 8.17747 14.2017C7.41871 14.1718 6.37369 14.6316 6.15423 15.7758C6.05834 16.2757 6.11804 16.7461 6.35389 17.1447C6.58617 17.5373 6.94968 17.7932 7.34083 17.9467C7.51114 18.0135 7.94268 18.1324 8.46435 18.2703C9.00865 18.4143 9.7073 18.593 10.4546 18.7831L11.1558 18.9612L11.156 18.9613ZM15.2354 19.872C15.2382
20319.8391 15.2475 19.8049 15.263 19.7741L20.8537 15.5655C20.9132 15.5586 20.9671 15.5857 20.9974 15.6262L21.9141 16.8555C21.961 16.9375 21.9559 16.9933 21.8789 17.0508C20.4678 18.1049 19.1219 19.1093 17.7418 20.1391L16.4177 21.1273C16.2854 21.226 16.2588 21.2432 16.1561 21.1056L15.2354 19.872Z",fill:"currentColor"}),r[0]=t):t=r[0],r[1]!==e?(n=(0,k.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),r[1]=e,r[2]=n):n=r[2],n}],54642),e.s(["BlockCalendarSmall",0,e=>{let t,n,r,i=(0,w.c)(4);return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("path",{d:"M6.18047 19.3H3.5C3.22386 19.3 3 19.0762 3 18.8V5.80005C3 5.52391 3.22386 5.30005 3.5 5.30005H7.5M6.18047 19.3C6.62026 20.2647 7.06178 20.8513 7.26475 21.0943C7.3377 21.1817 7.44011 21.2319 7.55351 21.2414C8.31746 21.3056 11.5817 21.4897 16.9 20.5617C19.1949 20.1613 20.7153 19.0931 21.4612 18.441C21.7315 18.2046 21.6222 17.7792 21.3027 17.6153C20.3079 17.105 18.6 15.8525 18.6 13.2678V7.79888C18.6 7.52274 18.3761 7.30005 18.1 7.30005H17.5M6.18047 19.3C5.58866 18.0019 5 16.0192 5 13.2678V7.79869C5 7.52255 5.22386 7.30005 5.5 7.30005H7M11.75 5.30005H13.5M11.8 7.30005H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),n=(0,k.jsx)("path",{d:"M8 11.8H12.1313C15.5 11.8 16.5 11.5 16.5 11.5M7.95869 9C9.01704 9 9.875 7.65685 9.875 6C9.875 4.34315 9.01704 3 7.95869 3C7.55649 3 7.18323 3.19398 6.875 3.52543M14.0837 9C15.142 9 16 7.65685 16 6C16 4.34315 15.142 3 14.0837 3C13.6815 3 13.3082 3.19398 13 3.52543",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),i[0]=t,i[1]=n):(t=i[0],n=i[1]),i[2]!==e?(r=(0,k.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t,n]}),i[2]=e,i[3]=r):r=i[3],r}],836120),e.s(["BlockPostHeaderSmall",0,e=>{let t,n,r=(0,w.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 3C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3H5ZM5 5H19V19H5V5ZM7 7.25C7 6.83579 7.33579 6.5 7.75 6.5H11.25C11.6642 6.5 12 6.83579 12 7.25C12 7.66421 11.6642 8 11.25 8H7.75C7.33579 8 7 7.66421 7 7.25ZM7.75 9.5C7.33579 9.5 7 9.83579 7 10.25V11.75C7 12.1642 7.33579 12.5 7.75 12.5H16.25C16.6642 12.5 17 12.1642 17 11.75V10.25C17 9.83579 16.6642 9.5 16.25 9.5H7.75ZM7 14.75C7 14.3358 7.33579 14 7.75 14H14.25C14.6642 14 15 14.3358 15 14.75C15 15.1642 14.6642 15.5 14.25 15.5H7.75C7.33579 15.5 7 15.1642 7 14.75ZM7.75 16.5C7.33579 16.5 7 16.8358 7 17.25C7 17.6642 7.33579 18 7.75 18H10.25C10.6642 18 11 17.6642 11 17.25C11 16.8358 10.6642 16.5 10.25 16.5H7.75Z",fill:"currentColor"}),r[0]=t):t=r[0],r[1]!==e?(n=(0,k.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),r[1]=e,r[2]=n):n=r[2],n}],75187),e.s(["BlockEmbeddedCanvasSmall",0,e=>{let t,n,r,i=(0,w.c)(4);return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("rect",{x:"2.75",y:"4.75",width:"18.5",height:"14.5",rx:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),n=(0,k.jsx)("path",{d:"M6 15.5C7.5 12 9 10 10.5 11.5C12 13 12.5 14.5 14.5 12C15.9 10.25 17 9 18 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),i[0]=t,i[1]=n):(t=i[0],n=i[1]),i[2]!==e?(r=(0,k.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t,n]}),i[2]=e,i[3]=r):r=i[3],r}],513585),e.s(["EMBEDDED_CANVAS_SIZES",0,{short:{width:624,height:240},medium:{width:624,height:416},square:{width:624,height:624},tall:{width:624,height:832}},"clampToCanvas",0,function(e,t,n){let r=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n));return{x:r(e.x,24-t.width,n.width-24),y:n.fixed?r(e.y,24-t.height,n.height-24):e.y}},"visibleCanvasX",0,function(e,t){return Math.min(e,t-24)}],213250),e.s(["BlockEmbedSmall",0,e=>{let t,n,r=(0,w.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.46482 4.883C1.91067 4.98108 1.5331 5.51071 1.62106 6.066
20357L3.89264 20.2924C3.9928 20.9196 4.58099 21.3382 5.20639 21.2276L7.0985 20.8926C7.50637 20.8205 7.78407 20.4303 7.71874 20.0213C7.65342 19.6123 7.26982 19.3392 6.86195 19.4114L5.31448 19.6853L3.63798 9.18756C3.57266 8.77853 3.85035 8.38842 4.25822 8.31623L18.1651 5.8547C18.5714 5.78279 18.954 6.05348 19.0213 6.46052L19.2574 7.88871C19.325 8.29733 19.7101 8.56824 20.1176 8.49379C20.5251 8.41935 20.8007 8.02774 20.7331 7.61911C20.4898 6.1478 20.2504 4.67608 20.0133 3.20373C19.9259 2.64596 19.4034 2.27283 18.8475 2.37123L2.46482 4.883ZM4.67512 6.70302C4.75339 7.15668 4.44908 7.58789 3.99542 7.66616C3.54176 7.74443 3.11055 7.44011 3.03228 6.98645C2.95401 6.53279 3.25833 6.10158 3.71199 6.02332C4.16564 5.94505 4.59686 6.24936 4.67512 6.70302ZM6.29083 7.2701C6.74449 7.19184 7.0488 6.76062 6.97053 6.30697C6.89227 5.85331 6.46105 5.54899 6.0074 5.62726C5.55374 5.70553 5.24942 6.13674 5.32769 6.5904C5.40596 7.04405 5.83717 7.34837 6.29083 7.2701ZM9.26558 5.91097C9.34384 6.36463 9.03953 6.79584 8.58587 6.87411C8.13221 6.95237 7.701 6.64806 7.62273 6.1944C7.54447 5.74074 7.84878 5.30953 8.30244 5.23126C8.7561 5.153 9.18731 5.45731 9.26558 5.91097ZM15.3128 9.91529C16.862 8.45042 19.3054 8.51878 20.7702 10.068C22.2351 11.6172 22.1667 14.0606 20.6175 15.5254L18.822 17.2232C18.1852 17.8254 17.3973 18.1684 16.5884 18.2561C16.608 18.2325 16.6284 18.2084 16.6496 18.1833C16.8035 18.0014 17.0003 17.7687 17.2541 17.3261C17.4271 17.0242 17.6434 16.4598 17.7167 16.0543L19.5122 14.3565C20.4159 13.5021 20.4557 12.0769 19.6013 11.1733C18.7469 10.2697 17.3217 10.2298 16.4181 11.0842L14.6226 12.782C13.9381 13.4292 13.7492 14.404 14.0693 15.2315C14.089 15.2823 14.1102 15.3338 14.1316 15.3857L14.1316 15.3857C14.3046 15.8049 14.4897 16.2532 13.9526 16.6302C13.4614 16.9749 12.9888 16.7253 12.6777 16.0667C11.9839 14.5979 12.2728 12.7898 13.5173 11.6131L15.3128 9.91529ZM15.8833 17.9405L14.0878 19.6383C12.5386 21.1032 10.0952 21.0348 8.63036 19.4856C7.16549 17.9364 7.23385 15.493 8.78305 14.0281L10.5785 12.3304C11.2174 11.7263 12.0083 11.383 12.8199 11.2967C12.8006 11.3181 12.7802 11.3402 12.7586 11.3635C12.5906 11.5454 12.3532 11.8023 12.0608 12.3829C11.8242 12.8528 11.7623 13.1401 11.7137 13.3662L11.7137 13.3663C11.7036 13.4129 11.6942 13.4569 11.6838 13.4993L9.88835 15.1971C8.98473 16.0515 8.94486 17.4767 9.79929 18.3803C10.6537 19.2839 12.0789 19.3238 12.9825 18.4694L14.778 16.7716C15.5102 16.0793 15.6546 14.9764 15.3123 14.2718C15.1192 13.8745 14.9144 13.2877 15.4771 12.9455C16.0296 12.6096 16.4385 12.9358 16.6547 13.3496C17.4339 14.8416 17.1668 16.7269 15.8833 17.9405Z",fill:"currentColor"}),r[0]=t):t=r[0],r[1]!==e?(n=(0,k.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),r[1]=e,r[2]=n):n=r[2],n}],100375),e.s(["ImageGallerySmall",0,e=>{let t,n,r,i=(0,w.c)(4);return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.249 1.34375C22.3534 1.34396 23.249 2.23931 23.249 3.34375V14.6562C23.2488 15.7605 22.3532 16.656 21.249 16.6562H20.249V17.6562C20.2488 18.7605 19.3532 19.656 18.249 19.6562H17.249V20.6562C17.2488 21.7605 16.3532 22.656 15.249 22.6562H2.75098C1.64657 22.6562 0.751241 21.7606 0.750977 20.6562V9.34375C0.750977 8.23918 1.64641 7.34375 2.75098 7.34375H3.75098V6.34375C3.75098 5.23918 4.64641 4.34375 5.75098 4.34375H6.75098V3.34375C6.75098 2.23918 7.64641 1.34375 8.75098 1.34375H21.249ZM17.1885 8.86426C16.9737 7.99142 16.1881 7.34393 15.249 7.34375H11.1632C10.872 7.06995 10.4657 6.90039 9.9668 6.90039C9.43704 6.90039 9.11102 7.0698 8.81972 7.34375H5.25098V6.34375C5.27712 6.07447 5.45794 5.84375 5.75098 5.84375H18.249C18.4906 5.84394 18.6928 6.01532 18.7393 6.24316L18.7422 10.3291L17.3145 8.96582C17.2749 8.92803 17.2322 8.89429 17.1885 8.86426ZM20.1885 5.86523C19.9737 4.9922 19.1882 4.34393 18.249 4.34375H14.175C13.8838 4.06995 13.3979 3.90054 12.9668 3.90039C12.5354 3.90041 12.1155 4.0698 11.8242 4.34375H8.26074V3.24316C8.30729 3.01523 8.50929 2.84375 8.75098 2.84375H21.249C21.4906 2.84394 21.6928 3.01532 21.7393 3.24316L21.7422 7.3291C21.2418 6.85131 20.759
2036.25855 20.1885 5.86523ZM13.5869 15.6709C13.7355 15.5669 13.9296 15.5517 14.0928 15.6309L15.7441 16.4316L15.749 20.6562C15.7488 20.932 15.5248 21.156 15.249 21.1562H2.75098C2.475 21.1562 2.25124 20.9322 2.25098 20.6562V18.4443L3.85938 17.8066C4.02833 17.7397 4.22088 17.7695 4.36133 17.8848L4.71777 18.1777C5.30567 18.6608 6.16273 18.6274 6.71094 18.0996L7.49902 17.3408L8.49902 18.0088L8.5 18.0059L8.50853 18.0113L8.51403 18.0148C8.52464 18.0218 8.5354 18.0288 8.54688 18.0342L11.2617 19.3125C11.5112 19.4295 11.809 19.3223 11.9268 19.0732C12.0443 18.8236 11.937 18.525 11.6875 18.4072L9.22852 17.25L10.0576 16.3887L10.0996 16.4395C10.5995 17.0378 11.4751 17.1541 12.1133 16.7061L13.5869 15.6709ZM18.249 18.1562H17.249V12.7061L18.7441 13.4316L18.749 17.6562C18.7488 17.932 18.5248 18.156 18.249 18.1562ZM3.49121 16.877L3.05469 17.0498L4.76953 15.5195L6.64746 16.7725L6.01758 17.3799C5.83494 17.5555 5.54941 17.566 5.35352 17.4053L4.99707 17.1123C4.57557 16.7658 3.99846 16.6759 3.49121 16.877ZM2.25098 16.4268V9.34375C2.27712 9.07447 2.45794 8.84375 2.75098 8.84375H15.249C15.4906 8.84394 15.6928 9.01532 15.7393 9.24316L15.7422 13.3291L14.3145 11.9658C13.9163 11.5856 13.2853 11.5987 12.9033 11.9951L8.35938 16.7119L5.3252 14.6875C4.94627 14.4346 4.44345 14.4702 4.10352 14.7734L2.25098 16.4268ZM10.8672 15.7988L10.7549 15.665L13.624 12.6885L15.7432 14.7129V15.3193L14.5293 14.7305C14.0394 14.4929 13.4584 14.54 13.0127 14.8525L11.5391 15.8877C11.3264 16.037 11.0339 15.998 10.8672 15.7988ZM21.249 15.1562H20.249V9.70605L21.7441 10.4316L21.749 14.6562C21.7488 14.932 21.5248 15.156 21.249 15.1562ZM17.5293 11.7305C17.4389 11.6866 17.3443 11.6545 17.249 11.6299V10.2852L18.7432 11.7129V12.3193L17.5293 11.7305ZM20.5293 8.73047C20.4389 8.68663 20.3444 8.6551 20.249 8.63086V7.28516L21.7432 8.71289V9.31934L20.5293 8.73047Z",fill:"currentColor"}),n=(0,k.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.9668 9.90039C7.8655 9.9007 8.5945 10.6296 8.59473 11.5283C8.59446 12.427 7.86548 13.1559 6.9668 13.1562C6.06787 13.1562 5.33913 12.4272 5.33887 11.5283C5.3391 10.6294 6.06785 9.90042 6.9668 9.90039ZM6.33887 11.5283C6.3391 11.1817 6.62014 10.9004 6.9668 10.9004C7.31322 10.9007 7.5945 11.1819 7.59473 11.5283C7.59446 11.8747 7.3132 12.1559 6.9668 12.1562C6.62016 12.1562 6.33913 11.8749 6.33887 11.5283Z",fill:"currentColor"}),i[0]=t,i[1]=n):(t=i[0],n=i[1]),i[2]!==e?(r=(0,k.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t,n]}),i[2]=e,i[3]=r):r=i[3],r}],429307),e.s(["BlockMailboxSmall",0,e=>{let t,n,r=(0,w.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.1405 4.10733V14.9176C18.1405 15.2887 18.5305 15.5304 18.8628 15.3655L19.2479 15.1743C19.418 15.0899 19.5256 14.9163 19.5256 14.7264L19.5249 7.23625C19.5249 7.05424 19.6238 6.8866 19.7831 6.79857L22.2488 5.43608C22.4081 5.34806 22.507 5.18044 22.507 4.99845V2.50061C22.507 2.13292 22.1235 1.891 21.7916 2.04937L18.4251 3.65608C18.2512 3.73908 18.1405 3.91463 18.1405 4.10733ZM13.2665 5.20447L13.2658 5.20481L9.16584 7.18112C10.9757 7.42867 12.2115 8.34096 13.0005 9.50354C13.9051 10.8366 14.1943 12.4518 14.1943 13.6609V19.7119L20.874 16.5746V9.8999C20.874 9.43611 20.8228 8.90363 20.6975 8.35957C20.62 8.02319 20.8299 7.68772 21.1663 7.61026C21.5027 7.53281 21.8381 7.7427 21.9156 8.07908C22.0635 8.72117 22.124 9.34811 22.124 9.8999V16.654C22.124 17.0851 21.8776 17.4783 21.4897 17.6664L21.4828 17.6697L21.4828 17.6697L13.835 21.2617C13.7519 21.3007 13.6611 21.321 13.5693 21.321H11.8129C11.4677 21.321 11.1879 21.0412 11.1879 20.696C11.1879 20.3508 11.4677 20.071 11.8129 20.071H12.9443V18.4761L6.13761 21.6453C5.21494 22.0749 4.14744 21.5593 3.8857 20.6072L3.22811 20.87C2.16076 21.2966 1 20.5105 1 19.3611V13.6342C1 13.0109 1.35661 12.4424 1.91788 12.1712L9.49069 8.51114C9.09212 8.41656 8.64806 8.36444 8.15318 8.36444C7.22369 8.36444 6.45813 8.52476 5.82706 8.7905L5.40702 8.99297C4.84121 9.30264 4.40116 9.70358 4.05806 10.1421C3.84535 10.4139 3.45254 10.4619 3.18068 10.2492C2.90883 10.0365 2.86088 9.64367 3.07359 9.37181C3.52707 8.79224 4.10319 8.27899 4.82065 7.88892L4.82464 7.88675C4.97994 7.80248 5.14184 7.72398 5.31055 7.65182L12.7248 4.07797L12.7265 4.07714C13.6982 3.6124 14.7434 3.38306 16.0829 3.38306C16.2492 3.38306 16.4118 3.38805 16.5707 3.39786C16.9153 3.41914 17.1773 3.71568 17.156 4.0602C17.1347 4.40472 16.8382 4.66676 16.4937 4.64549C16.3611 4.6373 16.2242 4.63306 16.0829 4.63306C14.9016 4.63306 14.0456 4.83202 13.2665 5.20447ZM12.9443 13.9836V17.0972L5.61 20.5121C5.38343 20.6176 5.11901 20.4761 5.08106 20.229L4.27726 14.9961C4.25197 14.8314 4.33833 14.6698 4.48927 14.5993L12.3675 10.921C12.5404 11.297 12.6688 11.6895 12.7601 12.0787C12.747 12.094 12.7345 12.1101 12.7226 12.1269L10.2306 15.6673L5.96792 14.9839C5.62709 14.9293 5.30651 15.1613 5.25187 15.5021C5.19723 15.8429 5.42923 16.1635 5.77006 16.2182L10.4181 16.9633C10.6539 17.0011 10.8906 16.9012 11.0281 16.70
20359L12.9443 13.9836ZM10.9801 9.17961C11.2561 9.37907 11.4945 9.60675 11.7005 9.85293L3.96045 13.4667C3.30638 13.7721 2.93216 14.4723 3.04175 15.1858L3.68032 19.3431L2.76418 19.7093C2.51787 19.8077 2.25 19.6263 2.25 19.3611V13.6342C2.25 13.4904 2.3323 13.3592 2.46182 13.2966L10.9801 9.17961Z",fill:"currentColor"}),r[0]=t):t=r[0],r[1]!==e?(n=(0,k.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),r[1]=e,r[2]=n):n=r[2],n}],40797),e.s(["BlockPollSmall",0,e=>{let t,n,r=(0,w.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,k.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.64691 1.77699C2.64691 1.36278 2.31113 1.02699 1.89691 1.02699C1.4827 1.02699 1.14691 1.36278 1.14691 1.77699V22.6666C1.14691 23.0809 1.4827 23.4166 1.89691 23.4166C2.31113 23.4166 2.64691 23.0809 2.64691 22.6666V21.5114H17.7079C18.3292 21.5114 18.8329 21.0077 18.8329 20.3864V17.2267C18.8329 16.6054 18.3292 16.1017 17.7079 16.1017H2.64691V15.3808H21.6031C22.2244 15.3808 22.7281 14.8771 22.7281 14.2558V10.1879C22.7281 9.56656 22.2244 9.06288 21.6031 9.06288H2.64691V8.34218H11.8622C12.4835 8.34218 12.9872 7.8385 12.9872 7.21718V4.05751C12.9872 3.43619 12.4835 2.93251 11.8622 2.93251H2.64691V1.77699ZM21.4781 14.1308H2.64691V10.3129H21.4781V14.1308ZM2.64691 7.09218L2.64691 4.18251H11.7372V7.09218H2.64691ZM2.64691 20.2614L2.64691 17.3517H17.5829V20.2614H2.64691ZM11.0916 11.3764C11.2868 11.1811 11.2868 10.8646 11.0916 10.6693C10.8963 10.474 10.5797 10.474 10.3845 10.6693L7.9866 13.0671C7.79133 13.2624 7.79133 13.579 7.98659 13.7742C8.18186 13.9695 8.49844 13.9695 8.6937 13.7742L11.0916 11.3764ZM13.554 10.6693C13.7492 10.8646 13.7492 11.1811 13.554 11.3764L11.1561 13.7742C10.9608 13.9695 10.6443 13.9695 10.449 13.7742C10.2537 13.579 10.2537 13.2624 10.449 13.0671L12.8469 10.6693C13.0421 10.474 13.3587 10.474 13.554 10.6693ZM16.0163 11.3764C16.2116 11.1811 16.2116 10.8646 16.0163 10.6693C15.8211 10.474 15.5045 10.474 15.3092 10.6693L12.9113 13.0671C12.7161 13.2624 12.7161 13.579 12.9113 13.7742C13.1066 13.9695 13.4232 13.9695 13.6184 13.7742L16.0163 11.3764ZM18.4787 10.6693C18.674 10.8646 18.674 11.1811 18.4787 11.3764L16.0808 13.7742C15.8856 13.9695 15.569 13.9695 15.3737 13.7742C15.1785 13.579 15.1785 13.2624 15.3737 13.0671L17.7716 10.6693C17.9669 10.474 18.2835 10.474 18.4787 10.6693ZM20.9411 11.3764C21.1363 11.1811 21.1363 10.8646 20.9411 10.6693C20.7458 10.474 20.4292 10.474 20.234 10.6693L17.8361 13.0671C17.6408 13.2624 17.6408 13.579 17.8361 13.7742C18.0313 13.9695 18.3479 13.9695 18.5432 13.7742L20.9411 11.3764ZM21.0571 13.0156C21.2523 13.2109 21.2523 13.5275 21.0571 13.7228L21.0055 13.7743C20.8103 13.9695 20.4937 13.9695 20.2984 13.7743C20.1032 13.579 20.1032 13.2624 20.2984 13.0672L20.3499 13.0156C20.5452 12.8204 20.8618 12.8204 21.0571 13.0156ZM3.7045 11.3764C3.89978 11.1812 3.8998 10.8646 3.70455 10.6693C3.5093 10.474 3.19271 10.474 2.99744 10.6693L2.89055 10.7761C2.69527 10.9714 2.69525 11.288 2.8905 11.4833C3.08575 11.6785 3.40234 11.6785 3.59761 11.4833L3.7045 11.3764ZM6.16689 10.6693C6.36215 10.8646 6.36215 11.1811 6.16689 11.3764L3.76902 13.7742C3.57375 13.9695 3.25717 13.9695 3.06191 13.7742C2.86665 13.579 2.86665 13.2624 3.06191 13.0671L5.45978 10.6693C5.65505 10.474 5.97163 10.474 6.16689 10.6693ZM8.62923 11.3764C8.82449 11.1811 8.82449 10.8646 8.62923 10.6693C8.43397 10.474 8.11739 10.474 7.92212 10.6693L5.52426 13.0671C5.32899 13.2624 5.32899 13.579 5.52425 13.7742C5.71951 13.9695 6.0361 13.9695 6.23136 13.7742L8.62923 11.3764Z",fill:"currentColor"}),r[0]=t):t=r[0],r[1]!==e?(n=(0,k.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),r[1]=e,r[2]=n):n=r[2],n}],385691)},939904,e=>{"use strict";e.s(["blockTextSize",0,{p:"1em",h1:"2em",h2:"1.5em",h3:"1.25em",h4:"1.125em"}])},521771,e=>{"use strict";var t=e.i(762268);async function n(e,n,r,i){if(!r)return;let a=e.filter(e=>t.isTextBlock[e.type]);if(0===a.length)return;let o=async()=>{for(let e of a){if("heading"===n.style){await r.mutate.assertFact({entity:e.entityID,attribute:"block/heading-level",data:{type:"number",value:n.level}}),await r.mutate.assertFact({entity:e.entityID,attribute:"block/type",data:{type:"block-type-union",value:"heading"}});continue}await r.mutate.retractAttribute({entity:e.entityID,attribute:"block/heading-level"}),await r.mutate.assertFact({entity:e.entityID,attribute:"block/type",data:{type:"block-type-union",value:n.style}}),"text"===n.style&&("default"===n.size?await r.mutate.retractAttribute({entity:e.entityID,attribute:"block/text-size"}):await r.mutate.assertFact({entity:e.entityID,attribute:"block/text-size",data:{type:"text-size-union",value:n.size}}))}};i?await i.withUndoGroup(o):await o()}e.s(["setTextBlockStyle",0,n])},829971,e=>{"use strict";var t=e.i(593302);function n(e){let n=e.embed;if(t.AppBskyEmbedRecordWithMedia.isView(n)&&(n=n.media),t.AppBskyEmbedImages.isView(n)||t.AppBskyEmbedVideo.isView(n))return n}e.s(["getBskyPostMedia",0,n,"isBskyPostView",0,function(e){return"full"===e||"media"===e},"resolveBskyPostView",0,function(e,t){if("media"!==t)return{view:"full"};let r=n(e);return r?{view:"media",media:r}:{view:"full"}}])},425481,e=>{"use strict";function t(e){return e.displayName||e.handle||e.did}function n(e,t){return 0===e?"":e===t-1?t>2?", and ":" and ":", "}function r(e){return e.reduce((t,r,i)=>t+n(i,e.length)+r,"")}e.i(620196),e.s(["bylineName",0,t,"bylineSeparator",0,n,"formatBylineNames",0,r,"formatBylineProfiles",0,function(e){let n=e.map(t).filter(e=>!e.startsWith("did:"));return n.length>0?r(n):void 0},"getBylineDids",0,function(e,t){let n=e?.contributors;return n&&n.length>0?n.map(e=>e.did):[t]},"namedBylineProfiles",0,function(e){return(e??[]).filter(e=>e.displayName||e.handle)},"toBylineProfiles",0,function(e,t){return e.map(e=>{let n=t.get(e);return{did:e,handle:n?.handle??null,displayName:n?.displayName??null}})}])},858930,e=>{"use strict";var t=e.i(330612),n=e.i(774753);async function r(e,r){let i=await (0,t.getBlocksAsHTML)(e,r),a=[new ClipboardItem({"text/html":new Blob([i.join("\n")],{type:"text/html"}),"text/plain":new Blob([(0,n.htmlToMarkdown)(i.join("\n"))],{type:"text/plain"})})];await navigator.clipboard.write(a)}e.s(["copySelection",0,r])},553445,e=>{"use strict";e.s(["elementId",0,{block:e=>({text:`block/${e}/content`,container:`block/${e}/container`,input:`block/${e}/input`,pollInput:t=>`block/${e}/poll-input/${t}`}),page:e=>({container:`page/${e}/container`,canvasScrollArea:`page/${e}/canvasScrollArea`})}])},546296,e=>{"use strict";e.s(["ensureProtocol",0,function(e){return e.startsWith("http")||e.startsWith("mailto")||e.startsWith("tel:")?e:`https://${e}`}])},394191,267602,e=>{"use strict";var t=e.i(827121),n=e.i(813029),r=e.i(553445),i=e.i(988314),a=e.i(482448);let o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];var s=null!=window.mozInnerScreenX;function l(e,t){let n,r;if(document.caretPositionFromPoint){let i=document.caretPositionFromPoint(e,t);n=i?.offsetNode,r=i?.offset}else if(document.caretRangeFromPoint){let i=document.caretRangeFromPoint(e,t);n=i?.startContainer,r=i?.startOffset}return{textNode:n,offset:r}}e.s(["getCoordinatesInTextarea",0,function(e,t){var n=document.createElement("div");n.id="input-textarea-caret-position-mirror-div",document.body.appendChild(n);var r=n.style,i=window.getComputedStyle(e),a="INPUT"===e.nodeName;r.whiteSpace="pre-wrap",a||(r.wordWrap="break-word"),r.position="absolute",r.visibility="hidden",o.forEach(function(e){r[e]=i[e]}),s?e.scrollHeight>parseInt(i.height)&&(r.overflowY="scroll"):r.overflow="hidden",n.textContent=e.value.substring(0,t),a&&(n.textContent=n.textContent.replace(/\s/g,"Â "));var l=document.createElement("span");l.textContent=e.value.substring(t)||".",n.appendChild(l);var c={top:l.offsetTop+parseInt(i.borderTopWidth),left:l.offsetLeft+parseInt(i.borderLeftWidth),height:parseInt(i.lineHeight)};return document.body.removeChild(n),c},"getPosAtCoordinates",0,l],267602);var c=e.i(174080);function u(e,n){if(!e.view)return;let r=e.view.dom.getBoundingClientRect(),i=e.editor.tr,a=null;switch(n.type){case"end":a={pos:i.doc.content.size-1};break;case"start":a={pos:1};break;case"top":a=e.view.posAtCoords({top:r.top+12,left:Math.max(n.left,r.left)});break;case"bottom":a=e.view.posAtCoords({top:r.bottom-12,left:Math.max(n.left,r.left)});break;
203case"coord":a=e.view.posAtCoords({top:n.top,left:n.left});break;case"afterFootnote":i.doc.descendants((e,t)=>!a&&("footnote"===e.type.name&&e.attrs.footnoteEntityID===n.footnoteEntityID?(a={pos:t+e.nodeSize},!1):void 0))}e.view.dispatch(i.setSelection(t.TextSelection.create(i.doc,a?.pos||1))),e.view.focus()}e.s(["focusBlock",0,function(e,t){if((0,c.flushSync)(()=>{n.useUIState.getState().focusAndSelectBlock(e)}),(0,a.scrollIntoViewIfNeeded)(document.getElementById(r.elementId.block(e.entityID).container),!1),"math"===e.type||"code"===e.type){let n,i=document.getElementById(r.elementId.block(e.entityID).input);if("start"===t.type&&(n={offset:0}),"end"===t.type&&(n={offset:i.textContent?.length||0}),"top"===t.type||"bottom"===t.type){let e=i?.getBoundingClientRect();n=l(Math.max(t.left,e?.left||0),"top"===t.type?(e?.top||0)+10:(e?.bottom||0)-10)}n?.offset!==void 0&&requestAnimationFrame(()=>{i?.setSelectionRange(n.offset,n.offset)})}if("text"!==e.type&&"heading"!==e.type&&"blockquote"!==e.type)return!0;let o=e.entityID,s=i.useEditorStates.getState().editorStates[o];s&&s.view?u(s,t):function(e,t,n=30){let r=0,a=()=>{let o=i.useEditorStates.getState().editorStates[e];o?.view?u(o,t):++r>=n||requestAnimationFrame(a)};requestAnimationFrame(a)}(o,t)}],394191)},308054,e=>{"use strict";var t=e.i(813029);let n=(e,n)=>{let r=n.filter(e=>!t.useUIState.getState().foldedBlocks.includes(e));r.length>0&&e?.mutate.toggleCollapsedBlocks({collapse:r,ignoreUndo:!0})},r=(e,n)=>{let r=n.filter(e=>t.useUIState.getState().foldedBlocks.includes(e));r.length>0&&e?.mutate.toggleCollapsedBlocks({uncollapse:r,ignoreUndo:!0})};e.s(["foldBlocks",0,n,"toggleFold",0,(e,i)=>{t.useUIState.getState().foldedBlocks.includes(i)?r(e,[i]):n(e,[i])},"unfoldBlocks",0,r])},330612,e=>{"use strict";var t=e.i(843476),n=e.i(64572),r=e.i(68428),i=e.i(30552),a=e.i(641335),o=e.i(680016),s=e.i(716400),l=e.i(397587);async function c(e,t){let r=await (0,n.scanIndex)(e).eav(t,"block/footnote");if(0===r.length)return;let i={};for(let t of r){let[r]=await (0,n.scanIndex)(e).eav(t.data.value,"block/text");r&&(i[t.data.value]=(0,l.renderFootnoteDefHTML)(r.data.value))}return i}async function u(e,t){return e?.query(e=>d(t,e))}async function d(e,t){let n=[];for(let r of(0,a.parseBlocksToList)(e))if("block"===r.type)n.push(await f(r.block,t));else{let e=r.children[0]?.block.listData?.listStyle==="ordered"?"ol":"ul";n.push(`<${e}>${(await Promise.all(r.children.map(async e=>await h(e,t)))).join("\n")} 204 </${e}>`)}return n}async function h(e,t){let r=(await Promise.all(e.children.map(async e=>await h(e,t)))).join("\n"),[i]=await (0,n.scanIndex)(t).eav(e.block.entityID,"block/check-list"),a=e.children[0]?.block.listData?.listStyle==="ordered"?"ol":"ul";return`<li ${i?`data-checked=${i.data.value}`:""}>${await f(e.block,t)} ${e.children.length>0?` 205 <${a}>${r}</${a}> 206 `:""}</li>`}async function p(e,t){let r=await (0,n.scanIndex)(e).eav(t,""),i=(await Promise.all(r.map(t=>"reference"===t.data.type||"ordered-reference"===t.data.type||"spatial-reference"===t.data.type?p(e,t.data.value):[]))).flat();return[...r,...i]}let m={datetime:async()=>null,rsvp:async()=>null,mailbox:async()=>null,poll:async()=>null,embed:async()=>null,html:async()=>null,signup:async()=>null,"post-header":async()=>null,drawing:async()=>null,group:async(e,n)=>{let r=await p(n,e.entityID),i=await d((0,o.getBlocksWithTypeLocal)(r,e.entityID),n);return(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:i.join("\n")}})},"bluesky-post":async(e,r)=>{let[i]=await (0,n.scanIndex)(r).eav(e.entityID,"block/bluesky-post");if(!i)return null;let[a]=await (0,n.scanIndex)(r).eav(e.entityID,"bluesky-post/view");return(0,t.jsx)("div",{"data-type":"bluesky-post","data-bluesky-post":JSON.stringify(i.data.value),"data-view":a?.data.value})},"standard-site-post":async(e,r)=>{let[i]=await (0,n.scanIndex)(r).eav(e.entityID,"block/standard-site-post");return i?(0,t.jsx)("div",{"data-type":"standard-site-post","data-uri":i.data.value}):null},"standard-site-publication":async(e,r)=>{let[i]=await (0,n.scanIndex)(r).eav(e.entityID,"block/standard-site-publication");return i?(0,t.jsx)("div",{"data-type":"standard-site-publication","data-uri":i.data.value}):null},math:async(e,r,i)=>{let[a]=await (0,n.scanIndex)(r).eav(e.entityID,"block/math"),o=s.default.renderToString(a?.data.value||"",{displayMode:!0,throwOnError:!1,macros:{"\\f":"#1f(#2)"}}
206);return(0,t.jsx)("div",{"data-type":"math","data-tex":a?.data.value,"data-alignment":i,dangerouslySetInnerHTML:{__html:o}})},"horizontal-rule":async()=>(0,t.jsx)("hr",{}),"members-only-delimiter":async()=>null,image:async(e,r,i)=>{let[a]=await (0,n.scanIndex)(r).eav(e.entityID,"block/image");return a?(0,t.jsx)("img",{src:a.data.src,"data-alignment":i}):""},"image-gallery":async(e,r,i)=>{let a=(await (0,n.scanIndex)(r).eav(e.entityID,"gallery/image")).sort((e,t)=>e.data.position>t.data.position?1:-1),o=await Promise.all(a.map(async e=>{let[t]=await (0,n.scanIndex)(r).eav(e.data.value,"block/image"),[i]=await (0,n.scanIndex)(r).eav(e.data.value,"image/alt");return t?{src:t.data.src,alt:i?.data.value}:null}));return(0,t.jsx)("div",{"data-type":"image-gallery",children:o.map((e,n)=>e?(0,t.jsx)("img",{src:e.src,alt:e.alt},n):null)})},code:async(e,r,i)=>{let[a]=await (0,n.scanIndex)(r).eav(e.entityID,"block/code"),[o]=await (0,n.scanIndex)(r).eav(e.entityID,"block/code-language"),s=o?.data.value;return(0,t.jsx)("pre",{"data-lang":s,children:(0,t.jsx)("code",{className:s?`language-${s}`:void 0,children:a?.data.value||""})})},button:async(e,r,i)=>{let[a]=await (0,n.scanIndex)(r).eav(e.entityID,"button/text"),[o]=await (0,n.scanIndex)(r).eav(e.entityID,"button/url");return a&&o?(0,t.jsx)("a",{href:o.data.value,"data-type":"button","data-alignment":i,children:a.data.value}):""},blockquote:async(e,r,a)=>{let[o]=await (0,n.scanIndex)(r).eav(e.entityID,"block/text");return(0,t.jsx)(i.RenderYJSFragment,{value:o?.data.value,attrs:{"data-alignment":a},wrapper:"blockquote",renderComments:!1,footnoteDefs:await c(r,e.entityID)})},heading:async(e,r,a)=>{let[o]=await (0,n.scanIndex)(r).eav(e.entityID,"block/text"),[s]=await (0,n.scanIndex)(r).eav(e.entityID,"block/heading-level"),l="h"+(s?.data.value||1);return(0,t.jsx)(i.RenderYJSFragment,{value:o?.data.value,attrs:{"data-alignment":a},wrapper:l,renderComments:!1,footnoteDefs:await c(r,e.entityID)})},link:async(e,r,i)=>{let[a]=await (0,n.scanIndex)(r).eav(e.entityID,"link/url"),[o]=await (0,n.scanIndex)(r).eav(e.entityID,"link/title");return a?(0,t.jsx)("a",{href:a.data.value,target:"_blank",children:o.data.value}):""},card:async(e,r,i)=>{let[a]=await (0,n.scanIndex)(r).eav(e.entityID,"block/card");if(!a)return"";let[o]=await (0,n.scanIndex)(r).eav(e.entityID,"page-link/display"),s=await p(r,a.data.value);return(0,t.jsx)("div",{"data-type":"card","data-facts":JSON.stringify(s),"data-entityid":a.data.value,"data-display":o?.data.value})},"embedded-canvas":async(e,r)=>{let[i]=await (0,n.scanIndex)(r).eav(e.entityID,"block/card");if(!i)return"";let a=await p(r,i.data.value),[o]=await (0,n.scanIndex)(r).eav(e.entityID,"image/alt");return(0,t.jsx)("div",{"data-type":"embedded-canvas","data-facts":JSON.stringify(a),"data-entityid":i.data.value,"data-alt":o?.data.value||void 0})},text:async(e,r,a)=>{let[o]=await (0,n.scanIndex)(r).eav(e.entityID,"block/text"),[s]=await (0,n.scanIndex)(r).eav(e.entityID,"block/text-size");return(0,t.jsx)(i.RenderYJSFragment,{value:o?.data.value,attrs:{"data-alignment":a,"data-text-size":s?.data.value},wrapper:"p",renderComments:!1,footnoteDefs:await c(r,e.entityID)})},"posts-list":async()=>null,"recommended-pubs":async()=>null};async function f(e,t){let[i]=await (0,n.scanIndex)(t).eav(e.entityID,"block/text-alignment"),a=m[e.type],o=await a(e,t,i?.data.value);return(0,r.renderToStaticMarkup)(o)}e.s(["getBlocksAsHTML",0,u])},762268,e=>{"use strict";e.s(["isTextBlock",0,{text:!0,heading:!0,blockquote:!0}])},438424,e=>{"use strict";var t=/^(?:\w+:)?\/\/(\S+)$/,n=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,r=/^[^\s\.]+\.\S{2,}$/;
206e.s(["betterIsUrl",0,function(e){if("string"!=typeof e)return!1;var i=e.match(t);if(!i)return!1;var a=i[1];return!!a&&!!(n.test(a)||r.test(a))},"isUrl",0,function(e){return e.includes(".")}])},293297,e=>{"use strict";var t=e.i(308054),n=e.i(813029);async function r(e,r,i,a){if(!e.listData||(0,n.isZoomedBlockRoot)(e.entityID)||!r?.listData)return{success:!1};let o=e.listData.depth,s=r.listData.path.find(e=>e.depth===o);if(!s)return{success:!1};(0,t.unfoldBlocks)(i,[s.entity]);let l=s.entity,c=()=>i?.mutate.addLastBlock({parent:l,factID:e.factID,entity:e.entityID});return a?await a.withUndoGroup(c):await c(),{success:!0}}async function i(e,t,r){if(!e.listData)return;let i=e.listData;if((0,n.isZoomedBlockRoot)(e.entityID)||(0,n.isZoomedBlockRoot)(i.parent))return;let a=async()=>{await t?.mutate.assertFact({entity:e.entityID,attribute:"block/is-list",data:{type:"boolean",value:!1}});let n=i.path.find(e=>1===e.depth)?.entity;n&&n!==e.entityID&&await t?.mutate.moveBlock({block:e.entityID,oldParent:i.parent,newParent:e.parent,position:{type:"after",entity:n}}),await t?.mutate.moveChildren({oldParent:e.entityID,newParent:e.parent,after:e.entityID})};r?await r.withUndoGroup(a):await a()}async function a(e,r,i,a,o){if(!e.listData)return{success:!1};let s=e.listData;if((0,n.isZoomedBlockRoot)(e.entityID)||(0,n.isZoomedBlockRoot)(s.parent))return{success:!1};if(1===s.depth){let t=async()=>{await i?.mutate.assertFact({entity:e.entityID,attribute:"block/is-list",data:{type:"boolean",value:!1}}),await i?.mutate.moveChildren({oldParent:e.entityID,newParent:e.parent,after:e.entityID})};return o?await o.withUndoGroup(t):await t(),{success:!0}}{let n,r=s.path.find(e=>e.depth===s.depth-1)?.entity;return r?(n=2===s.depth?e.parent:s.path.find(e=>e.depth===s.depth-2)?.entity)?((0,t.unfoldBlocks)(i,[n]),await i?.mutate.outdentBlock({block:e.entityID,newParent:n,oldParent:s.parent,after:r,excludeFromSiblings:a}),{success:!0}):{success:!1}:{success:!1}}}async function o(e,t,n,i){let a=async()=>{for(let i=0;i<t.length;i++){let a=t[i];if(!e.find(e=>e.entityID===a.entityID)||e.find(e=>e.entityID===a.listData?.parent))continue;let o=1,s=t[i-1];for(;s&&e.find(e=>s.entityID===e.entityID);)o+=1,s=t[i-o];a.listData&&s?.listData&&await r(a,s,n)}};i?await i.withUndoGroup(a):await a()}async function s(e,t,n){if(!t||0===e.length)return;let r=e.every(e=>!!e.listData),a=async()=>{for(let n of e)r?await i(n,t):n.listData||await t.mutate.assertFact({entity:n.entityID,attribute:"block/is-list",data:{type:"boolean",value:!0}})};n?await n.withUndoGroup(a):await a()}async function l(e,t,n,r){if(!n)return;let i=async()=>{for(let r of e)"ordered"===t?r.listData&&n?.mutate.assertFact({entity:r.entityID,attribute:"block/list-style",data:{type:"list-style-union",value:"ordered"}}):r.listData&&n?.mutate.retractAttribute({entity:r.entityID,attribute:"block/list-style"})};r?await r.withUndoGroup(i):await i()}async function c(e,t,n){if(!t)return;let r=e.filter(e=>!!e.listData);if(0===r.length)return;let i=r.every(e=>e.listData?.checklist),a=async()=>{for(let e of r)i?await t.mutate.retractAttribute({entity:e.entityID,attribute:"block/check-list"}):e.listData?.checklist||await t.mutate.assertFact({entity:e.entityID,attribute:"block/check-list",data:{type:"boolean",value:!1}})};n?await n.withUndoGroup(a):await a()}async function u(e,t,n,r){if(!t[0]?.parent)return;let i=new Set(e.map(e=>e.entityID)),o=e.map(e=>e.entityID),s=e.every(e=>!e.listData||1===e.listData.depth),l=async()=>{if(s)for(let e=t.length-1;e>=0;e--){let r=t[e];i.has(r.entityID)&&r.listData&&await a(r,null,n,o)}else for(let e=t.length-1;e>=0;e--){let r=t[e];if(!i.has(r.entityID)||!r.listData||1===r.listData.depth)continue;let s=r.listData.parent;if(i.has(s)){let e=t.find(e=>e.entityID===s);if(e?.listData&&e.listData.depth>1)continue}await a(r,null,n,o)}};r?await r.withUndoGroup(l):await l()}e.s(["indent",0,r,"multiSelectIndent",0,o,"multiSelectOutdent",0,u,"outdent",0,a,"setListStyleForBlocks",0,l,"toggleChecklistForBlocks",0,c,"toggleListForBlocks",0,s])},134087,e=>{"use strict";e.s(["mergePreferences",0,function(e,t){return{showComments:e?.showComments??t?.showComments,showMentions:e?.showMentions??t?.showMentions,showRecommends:e?.showRecommends??t?.showRecommends,showPrevNext:t?.showPrevNext,
206showFirstLast:t?.showFirstLast,prevNextDirection:t?.prevNextDirection}},"resolvePrevNextDirection",0,function(e){return"ltr"===e?"ltr":"rtl"}])},898144,e=>{"use strict";var t=e.i(111733);e.s(["metaKey",0,()=>(0,t.isMac)()?"â":"Ctrl"])},762584,e=>{"use strict";var t=e.i(110383),n=e.i(901982),r=e.i(680016),i=e.i(813029),a=e.i(308054);let o=e=>e.listData?.parent??e.parent,s=(e,t)=>{let n=e[t].entityID,r=t;for(;r+1<e.length&&e[r+1].headingPath?.includes(n);)r++;return r},l=(e,t,n,r,i,a,o)=>{let l,c=n.slice(r,i+1).map(e=>e.entityID);if("up"===a){if(0===r)return;let e=n[r-1],t=e.headingPath?.find(e=>o.includes(e)),i=t?n.findIndex(e=>e.entityID===t):r-1;l=n[i-1]?.entityID??null}else{if(i===n.length-1)return;let e=n[i+1],t="heading"===e.type&&o.includes(e.entityID)?s(n,i+1):i+1;l=n[t].entityID}e.mutate.moveBlocks({parent:t,blocks:c,after:l})},c=(e,t,n)=>n===t?e.filter(e=>!e.listData||1===e.listData.depth):e.filter(e=>e.listData?.parent===n),u=async(e,t,n)=>{let a=i.useUIState.getState().foldedBlocks;if("heading"!==t.type||!a.includes(t.entityID))return!1;let o=c((0,r.getPageBlocks)(e,t.parent),t.parent,t.parent),u=o.findIndex(e=>e.entityID===t.entityID);if(-1===u)return!1;let d=s(o,u);return l(e,t.parent,o,u,d,n,a),!0},d=async(e,t,n)=>{let a=i.useUIState.getState().foldedBlocks,u=t[0].parent,d=o(t[0]);if(!t.every(e=>o(e)===d))return!1;let h=c((0,r.getPageBlocks)(e,u),u,d),p=new Set(t.map(e=>e.entityID)),m=h.map((e,t)=>p.has(e.entityID)?t:-1).filter(e=>e>=0);if(0===m.length)return!1;let f=m[0],g=m[m.length-1];for(let e=f;e<=g;e++){let t=h[e];"heading"===t.type&&a.includes(t.entityID)&&(g=Math.max(g,s(h,e)))}return l(e,d,h,f,g,n,a),!0},h=async e=>{let[t,r]=await (0,n.getSortedSelection)(e);if(t.length>1)return void await d(e,t,"up");let o=t[0];if(!o||(0,i.isZoomedBlockRoot)(o.entityID)||await u(e,o,"up"))return;let s=r?.[r.findIndex(e=>e.entityID===o.entityID)-1];if(s.entityID===o.listData?.parent&&(s=r?.[r.findIndex(e=>e.entityID===o.entityID)-2]),s?.listData&&o.listData&&o.listData.depth>1&&!s.listData.path.find(e=>e.entity===o.listData?.parent)){let t=o.listData.depth,n=s.listData.path.find(e=>e.depth===t-1);if(!n)return;(0,a.unfoldBlocks)(e,[n.entity]),e?.mutate.moveBlock({block:o.entityID,oldParent:o.listData?.parent,newParent:n.entity,position:{type:"end"}})}else e?.mutate.moveBlockUp({entityID:o.entityID,parent:o.listData?.parent||o.parent})},p=async(e,r)=>{let[o,s]=await (0,n.getSortedSelection)(e);if(o.length>1)return void await d(e,o,"down");let l=o[0];if(!l||(0,i.isZoomedBlockRoot)(l.entityID)||await u(e,l,"down"))return;let c=s.slice(s.findIndex(e=>e.entityID===l.entityID)+1).find(e=>e.listData&&l.listData&&!e.listData.path.find(e=>e.entity===l.entityID));if(c?.listData&&l.listData&&c.listData.depth===l.listData.depth-1)(0,a.unfoldBlocks)(e,[c.entityID]),e?.mutate.moveBlock({block:l.entityID,oldParent:l.listData?.parent,newParent:c.entityID,position:{type:"first"}});else{let n=s[s.findIndex(e=>e.entityID===l.entityID)+1];n?.type==="heading"&&(0,a.unfoldBlocks)(e,[n.entityID]),e?.mutate.moveBlockDown({entityID:l.entityID,parent:l.listData?.parent||l.parent,newBlock:{permission_set:r,entityID:(0,t.v7)(),factID:(0,t.v7)()}})}};e.s(["moveBlockDown",0,p,"moveBlockUp",0,h])},680396,e=>{"use strict";e.i(859041);var t=e.i(536116),n=e.i(974049),r=e.i(929495);function i(e,t){return n.PubLeafletPagesLinearDocument.isMain(e.block)?(e.block.blocks??[]).map((e,n)=>({block:e,index:[t,n]})):[{block:{$type:"pub.leaflet.pages.linearDocument#block",block:e.block,alignment:e.alignment},index:[t]}]}e.s(["canvasBlockBlocks",0,i,"pageBlocksInOrder",0,function(e){return t.PubLeafletPagesCanvas.isMain(e)?[...e.blocks??[]].sort(r.canvasBlockOrder).flatMap(i):(e.blocks??[]).map((e,t)=>({block:e,index:[t]}))}])},641335,e=>{"use strict";e.s(["parseBlocksToList",0,function(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(r.listData){let e=t[t.length-1];if(!e||"list"!==e.type||e.depth>r.listData.depth)t.push({type:"list",depth:r.listData.depth,children:[{type:"list",block:r,depth:r.listData.depth,children:[]}]});else{let t=r.listData.depth;if(t===e.depth)e.children.push({type:"list",block:r,depth:r.listData.depth,children:[]});else{let n=e.children[e.children.length-1];for(;t>1;)n.children[n.children.length-1]&&n.children[n.children.length-1].depth<r.listData.depth&&(n=n.children[n.children.length-1]),t-=1;n.children.push({type:"list",block:r,depth:r.listData.depth,children:[]})}}}else t.push({type:"block",block:r})}return t}])},358940,810545,e=>{"use strict";var t=e.i(428762),n=e.i(478802),r=e.i(110383),i=e.i(220511),a=e.i(616009),o=e.i(734582),s=e.i(868679),l=e.i(829971),c=e.i(69497);let u=["font-weight","font-style","text-decoration","text-decoration-line"],d=new Set(["P","DIV","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","PRE","UL","OL","LI","TABLE","IMG","HR","FIGURE"]),h="section[data-footnotes], section.footnotes, div.footnotes";function p(e){try{return decodeURIComponent(e)}catch{return e}}function m(e){for(;e.firstChild;){let t=e.firstChild;
206if(t.nodeType===Node.TEXT_NODE){let n=(t.textContent||"").replace(/^\s+/,"");if(n){t.textContent=n;return}e.removeChild(t);continue}if(t.nodeType===Node.ELEMENT_NODE&&!t.textContent?.trim()){e.removeChild(t);continue}return}}let f=t.DOMParser.fromSchema(c.schema),g=()=>({blocks:[],extraEntities:[],imageTasks:[]});function y(e,t){e.blocks.push(...t.blocks),e.extraEntities.push(...t.extraEntities),e.imageTasks.push(...t.imageTasks)}let b=t.DOMParser.fromSchema(c.multiBlockSchema);function v(e){let t=(0,i.prosemirrorToYDoc)(e,"prosemirror"),n=a.encodeStateAsUpdate(t);return t.destroy(),o.fromByteArray(n)}let x=new Set(["BLOCKQUOTE","P","PRE","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","HR"]),k=new Set(["A","SPAN","I","B","EM","STRONG","U","S","STRIKE","DEL","INS","SUP","SUB","CODE","MARK","SMALL","ABBR","CITE","Q","TIME","FONT","KBD","VAR","SAMP","BDI","BDO","DFN","BR","WBR"]);function w(e){let t=[],n=e=>!!e.getAttribute("data-entityid")||!!e.getAttribute("data-tex")||!!e.getAttribute("data-bluesky-post"),r=e=>"P"===e.tagName&&!n(e)&&!!e.querySelector("[data-tex], [data-entityid], [data-bluesky-post]")&&!Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim()!=="");return e.nodeType===Node.ELEMENT_NODE&&(x.has(e.tagName)||n(e))?[e]:(!function e(i,a){let o=[],s=()=>{if(0===o.length)return;let e=document.createElement("p"),n=e;for(let e of a){let t=e.cloneNode(!1);n.appendChild(t),n=t}for(let e of o)n.appendChild(e.cloneNode(!0));o=[],e.textContent&&""!==e.textContent.trim()&&t.push(e)};for(let l of Array.from(i.childNodes)){if(l.nodeType===Node.TEXT_NODE){o.push(l);continue}if(l.nodeType!==Node.ELEMENT_NODE)continue;let i="A"===l.tagName&&"button"===l.getAttribute("data-type");(n(l)||x.has(l.tagName)||i)&&!r(l)?(s(),t.push(l)):k.has(l.tagName)?l.querySelector(C)?(s(),e(l,[...a,l])):o.push(l):(s(),e(l,a))}s()}(e,[]),t)}let C=[...Array.from(x).map(e=>e.toLowerCase()),"div","table","[data-entityid]","[data-tex]","[data-bluesky-post]"].join(",");e.s(["buildBlocksFromElements",0,function(e,t){let i=g();for(let a of e)y(i,function e(t,i){let a,o,{parent:u,permission_set:d,listStyle:h}=i,p=g();if("UL"===t.tagName||"OL"===t.tagName){let n="OL"===t.tagName?"ordered":"unordered";for(let r of Array.from(t.children))y(p,e(r,{parent:u,permission_set:d,listStyle:n}));return p}let m=null;switch(t.tagName){case"BLOCKQUOTE":a="blockquote";break;case"LI":case"SPAN":case"P":a="text";break;case"PRE":a="code";break;case"H1":a="heading",m=1;break;case"H2":a="heading",m=2;break;case"H3":case"H4":case"H5":case"H6":a="heading",m=3;break;case"DIV":a="card";break;case"IMG":a="image";break;case"A":a="button"===t.getAttribute("data-type")&&t.getAttribute("href")?"button":null;break;case"HR":a="horizontal-rule";break;default:a=null}if(!a)return p;let x="DIV"===t.tagName&&!!t.getAttribute("data-tex"),k="DIV"===t.tagName&&!!t.getAttribute("data-bluesky-post"),C="DIV"===t.tagName&&!!t.getAttribute("data-entityid"),S=a;x?S="math":k?S="bluesky-post":C&&"embedded-canvas"===t.getAttribute("data-type")&&(S="embedded-canvas");let E=(0,r.v7)(),T=[];T.push({entity:E,attribute:"block/type",data:{type:"block-type-union",value:S}}),"heading"===S&&m&&T.push({entity:E,attribute:"block/heading-level",data:{type:"number",value:m}});let I=t.getAttribute("data-alignment");I&&["right","left","center"].includes(I)&&T.push({entity:E,attribute:"block/text-alignment",data:{type:"text-alignment-type-union",value:I}});let D=t.getAttribute("data-text-size");if(D&&["default","small","large"].includes(D)&&T.push({entity:E,attribute:"block/text-size",data:{type:"text-size-union",value:D}}),("text"===S||"heading"===S||"blockquote"===S)&&"PRE"!==t.tagName){let e=Array.from(t.querySelectorAll("span[data-footnote-def]")).filter(e=>{let n=e.closest("ul, ol");return!n||!t.contains(n)}),i=(0,n.generateNKeysBetween)(null,null,e.length);e.forEach((e,t)=>{let n=(0,r.v7)();e.className="footnote-ref",e.setAttribute("data-footnote-id",n),p.extraEntities.push({entityID:n,permission_set:d}),T.push({id:(0,r.v7)(),entity:E,attribute:"block/footnote",data:{type:"ordered-reference",value:n,position:i[t]}}),T.push({entity:n,attribute:"block/text",data:{type:"text",value:v(function(e){let t=document.createElement("div");t.innerHTML=e;let n=[];
206return b.parse(t).forEach(e=>{0!==e.content.size&&(n.length>0&&n.push({type:"hard_break"}),e.forEach(e=>n.push(e.toJSON())))}),c.schema.nodeFromJSON({type:"doc",content:[{type:"paragraph",content:n}]})}(e.getAttribute("data-footnote-def")))}})});let a=f.parse(t);o=a,T.push({entity:E,attribute:"block/text",data:{type:"text",value:v(a)}})}if("PRE"===t.tagName&&t.textContent){let e=t.getAttribute("data-lang");if(!e&&t.firstElementChild?.className){let n=t.firstElementChild.className.match(/language-([\w.+-]+)/);n&&(e=n[1])}e||(e=t.getAttribute("data-language")||"plaintext"),T.push({entity:E,attribute:"block/code-language",data:{type:"string",value:e}}),T.push({entity:E,attribute:"block/code",data:{type:"string",value:t.textContent.replace(/^\n+|\n+$/g,"")}})}if("button"===S&&(T.push({entity:E,attribute:"button/text",data:{type:"string",value:t.textContent||""}}),T.push({entity:E,attribute:"button/url",data:{type:"string",value:t.getAttribute("href")||""}})),"IMG"===t.tagName){let e=t.getAttribute("src");e&&p.imageTasks.push({url:e,entityID:E,attribute:"block/image"})}if(x){let e=t.getAttribute("data-tex");T.push({entity:E,attribute:"block/math",data:{type:"string",value:(e||"").trim()}})}if(k){let e=t.getAttribute("data-bluesky-post");if(e)try{T.push({entity:E,attribute:"block/bluesky-post",data:{type:"bluesky-post",value:JSON.parse(e)}})}catch{}let n=t.getAttribute("data-view");(0,l.isBskyPostView)(n)&&T.push({entity:E,attribute:"bluesky-post/view",data:{type:"bluesky-post-view-union",value:n}})}if(C){let e=t.getAttribute("data-entityid"),n=t.getAttribute("data-facts");if(n){let t=[];try{t=JSON.parse(n)}catch{t=[]}let i={},a=new Set;for(let e of t)if(!a.has(e.entity)){a.add(e.entity);let t=(0,r.v7)();i[e.entity]=t,p.extraEntities.push({entityID:t,permission_set:d})}for(let e of t){let t=i[e.entity];if(!t)continue;let n={...e.data};("ordered-reference"===n.type||"spatial-reference"===n.type||"reference"===n.type)&&(n.value=i[n.value]??n.value),"image"===n.type?p.imageTasks.push({url:n.src,entityID:t,attribute:e.attribute}):T.push({entity:t,attribute:e.attribute,data:n})}let o=i[e];o&&T.push({entity:E,attribute:"block/card",data:{type:"reference",value:o}})}let i=t.getAttribute("data-alt");i&&T.push({entity:E,attribute:"image/alt",data:{type:"string",value:i}});let a=t.getAttribute("data-display");(0,s.isPageLinkDisplay)(a)&&T.push({entity:E,attribute:"page-link/display",data:{type:"page-link-display-union",value:a}})}if("LI"===t.tagName){let i=Array.from(t.children).flatMap(e=>w(e)).find(e=>"UL"===e.tagName||"OL"===e.tagName),a=t.getAttribute("data-checked");if(null!==a&&T.push({entity:E,attribute:"block/check-list",data:{type:"boolean",value:"true"===a}}),T.push({entity:E,attribute:"block/is-list",data:{type:"boolean",value:!0}}),h&&T.push({entity:E,attribute:"block/list-style",data:{type:"list-style-union",value:h}}),i){let t=e(i,{parent:E,permission_set:d}),a=t.blocks.filter(e=>e.parent===E);if(a.length>0){let e=(0,n.generateNKeysBetween)(null,null,a.length);a.forEach((t,n)=>{T.push({id:(0,r.v7)(),entity:E,attribute:"card/block",data:{type:"ordered-reference",value:t.entityID,position:e[n]}})})}y(p,t)}}return p.blocks.unshift({entityID:E,parent:u,type:S,facts:T,parsedContent:o}),p}(a,t));return i},"parsePasteHTMLToElements",0,function(e){let t,n=new DOMParser().parseFromString(e,"text/html");for(let e of n.querySelectorAll("span.comment-anchor"))e.classList.remove("comment-anchor"),e.removeAttribute("data-comment-id");t=(r=n.body).ownerDocument,function(e){let t=e.ownerDocument,n=Array.from(e.querySelectorAll(h));if(0===n.length)return;let r=new Map;for(let e of n)for(let t of Array.from(e.querySelectorAll("li[id]")))r.set(t.id,t);for(let n of Array.from(e.querySelectorAll('a[href^="#"]'))){if(n.closest(h))continue;let e=p(n.getAttribute("href").slice(1)),i=r.get(e);if(!i)continue;let a=t.createElement("span");a.setAttribute("data-footnote-def",function(e,t){let n=e.ownerDocument,r=e.cloneNode(!0);for(let e of Array.from(r.querySelectorAll('[data-footnote-backref], .footnote-backref, .footnote-back, [role="doc-backlink"]'))){let t=e.previousSibling;
206t?.nodeType===Node.TEXT_NODE&&(t.textContent=t.textContent.replace(/\s+$/,"")),e.remove()}for(let e of Array.from(r.querySelectorAll('a[href^="#"]'))){let r=p(e.getAttribute("href").slice(1));t.has(r)&&e.replaceWith(n.createTextNode(e.textContent||""))}return r.innerHTML}(i,r)),a.textContent=n.textContent||"";let o=n.parentElement;o?.tagName==="SUP"&&1===o.childNodes.length?o.replaceWith(a):n.replaceWith(a)}for(let e of n)e.remove()}(r),function(e,t){for(let n of Array.from(t.querySelectorAll("style")))for(let t of function e(t){let n=t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/<!--|-->/g,""),r=[],i=0;for(;i<n.length;){let t=n.indexOf("{",i);if(-1===t)break;let a=n.slice(i,t).trim(),o=1,s=t+1;for(;s<n.length&&o>0;)"{"===n[s]?o++:"}"===n[s]&&o--,s++;let l=n.slice(t+1,s-1);a.startsWith("@")?/^@(media|supports|layer|scope)\b/i.test(a)&&r.push(...e(l)):a&&r.push({selector:a,decls:l}),i=s}return r}(n.textContent||"")){let n,r=function(e){let t=new Map;for(let n of e.split(";")){let e=n.indexOf(":");if(-1===e)continue;let r=n.slice(0,e).trim().toLowerCase(),i=n.slice(e+1).trim();r&&i&&t.set(r,i)}return t}(t.decls),i=u.filter(e=>r.has(e));if(0!==i.length){try{n=e.querySelectorAll(t.selector)}catch{continue}for(let e of Array.from(n)){let t=e.getAttribute("style")||"",n=i.filter(e=>!RegExp(`(^|;)\\s*${e}\\s*:`,"i").test(t)).map(e=>`${e}:${r.get(e)}`);0!==n.length&&e.setAttribute("style",n.join(";")+(t?";"+t:""))}}}}(r,t),t.querySelectorAll("style, script, noscript, template, link, meta, title, base").forEach(e=>e.remove()),function(e){for(let t of Array.from(e.getElementsByTagName("*")))"O:P"===t.tagName&&t.remove()}(r),function(e){let t=e.ownerDocument;for(let n of Array.from(e.querySelectorAll("p.MsoQuote, p.MsoIntenseQuote"))){let e=t.createElement("blockquote");for(;n.firstChild;)e.appendChild(n.firstChild);n.replaceWith(e)}}(r),function(e){let t=Array.from(e.querySelectorAll("p")).filter(e=>/mso-list\s*:\s*l\d+\s+level\d+/i.test(e.getAttribute("style")||""));if(0===t.length)return;let n=[];for(let e of t){let t=n[n.length-1],r=t?.[t.length-1];r&&r.parentNode===e.parentNode&&function(e,t){let n=e.nextSibling;for(;n;){if(n===t)return!0;if(!(n.nodeType===Node.COMMENT_NODE||n.nodeType===Node.TEXT_NODE&&!n.textContent?.trim()))break;n=n.nextSibling}return!1}(r,e)?t.push(e):n.push([e])}for(let e of n)!function(e){let t=e[0].ownerDocument,n=e[0].parentNode;if(!n)return;let r=e.map(e=>{let n=e.getAttribute("style")||"",r=parseInt(n.match(/level(\d+)/i)?.[1]||"1",10),i=function(e){let t="";for(let n of Array.from(e.querySelectorAll("[style]")))/mso-list\s*:\s*ignore/i.test(n.getAttribute("style")||"")&&(t+=n.textContent||"",n.remove());let n=[],r=!1;for(let i of Array.from(e.childNodes)){if(i.nodeType===Node.COMMENT_NODE){let e=i.textContent?.trim()||"";/^\[if\s+!supportLists\]$/i.test(e)?r=!0:/^\[endif\]$/i.test(e)&&(r=!1),n.push(i);continue}r&&(t+=i.textContent||"",n.push(i))}for(let e of n)e.parentNode?.removeChild(e);return t}(e),a=t.createElement("li");for(;e.firstChild;)a.appendChild(e.firstChild);return m(a),{level:r,ordered:/^[0-9]+[.)]|^[a-z][.)]|^[ivxlcdm]+[.)]/i.test(i.trim()),li:a}}),i=t.createElement(r[0].ordered?"ol":"ul"),a=[{level:r[0].level,list:i}],o=null;for(let e of r){for(;a.length>1&&e.level<a[a.length-1].level;)a.pop();if(e.level>a[a.length-1].level){let n=t.createElement(e.ordered?"ol":"ul");(o||a[a.length-1].list).appendChild(n),a.push({level:e.level,list:n})}a[a.length-1].list.appendChild(e.li),o=e.li}for(let t of(n.insertBefore(i,e[0]),e))t.remove()}(e)}(r),function(e){for(let t of Array.from(e.querySelectorAll("ul, ol"))){let e=t.parentElement;if(!e||"UL"!==e.tagName&&"OL"!==e.tagName)continue;let n=t.previousElementSibling;for(;n&&"LI"!==n.tagName;)n=n.previousElementSibling;n&&n.appendChild(t)}}(r),function(e){for(let t of Array.from(e.querySelectorAll("li"))){let e=t.querySelector("input[type=checkbox]");e&&e.closest("li")===t&&(t.setAttribute("data-checked",String(e.hasAttribute("checked"))),e.remove(),m(t))}}(r),function(e){let t=e.ownerDocument;for(let n of Array.from(e.querySelectorAll("blockquote")).reverse()){let e=Array.from(n.childNodes);if(e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&d.has(e.tagName)).length<2)continue;let r=[],i=[],a=()=>
206{if(i.some(e=>e.textContent?.trim())){let e=t.createElement("blockquote");for(let t of i)e.appendChild(t);r.push(e)}i=[]};for(let n of e){if(n.nodeType!==Node.ELEMENT_NODE||!d.has(n.tagName)){i.push(n);continue}if(a(),"P"===n.tagName||"BLOCKQUOTE"===n.tagName){let e=t.createElement("blockquote");for(;n.firstChild;)e.appendChild(n.firstChild);r.push(e)}else r.push(n)}a(),n.replaceWith(...r)}}(r),function(e){let t=e.ownerDocument;for(let n of Array.from(e.querySelectorAll("table")).reverse()){let e=t.createDocumentFragment();for(let r of Array.from(n.querySelectorAll("tr"))){let n=t.createElement("p");Array.from(r.children).filter(e=>"TD"===e.tagName||"TH"===e.tagName).forEach((e,r)=>{for(r>0&&n.appendChild(t.createTextNode(" | ")),function(e){let t=e.ownerDocument;for(let n of Array.from(e.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, blockquote, pre, ul, ol, li")).reverse()){let e=Array.from(n.childNodes);n.nextSibling&&e.push(t.createTextNode(" ")),n.replaceWith(...e)}}(e);e.firstChild;)n.appendChild(e.firstChild)}),e.appendChild(n)}n.replaceWith(e)}}(r);var r,i=w(n.body);let a=[];for(let e of i){let t=a[a.length-1];if(("UL"===e.tagName||"OL"===e.tagName)&&t&&t.tagName===e.tagName){for(;e.firstChild;)t.appendChild(e.firstChild);continue}a.push(e)}for(let e of a)("UL"===e.tagName||"OL"===e.tagName)&&function(e){let t=e.ownerDocument,n=Array.from(e.children).filter(e=>"LI"===e.tagName),r=n.map(e=>parseInt(e.getAttribute("aria-level")||e.getAttribute("data-aria-level")||"1",10));if(r.length<2||r.every(e=>e===r[0]))return;let i=[{level:r[0],list:e}],a=null;
206n.forEach((n,o)=>{let s=r[o];for(;i.length>1&&s<i[i.length-1].level;)i.pop();if(s>i[i.length-1].level){let n=t.createElement(e.tagName.toLowerCase());(a||i[i.length-1].list).appendChild(n),i.push({level:s,list:n})}i[i.length-1].list.appendChild(n),a=n})}(e);return a}],358940);let S="span.footnote-ref[data-footnote-id]";async function E(e,t){let n=e.flatMap(e=>{let t=Array.from(e.querySelectorAll(S));return e.matches?.(S)&&t.push(e),t});if(0===n.length)return;let r=new Map;for(let e of n){let n=e.getAttribute("data-footnote-id");!e.hasAttribute("data-footnote-def")&&(r.has(n)||r.set(n,await t(n)))}for(let e of n){let t=e.getAttribute("data-footnote-id");if(e.removeAttribute("data-footnote-id"),e.classList.remove("footnote-ref"),0===e.classList.length&&e.removeAttribute("class"),e.hasAttribute("data-footnote-def"))continue;let n=r.get(t);null==n?e.remove():e.setAttribute("data-footnote-def",n)}}e.s(["resolveCopiedFootnoteRefs",0,E],810545)},209195,e=>{"use strict";function t(e,t){let n=e.publishedAt?new Date(e.publishedAt).getTime():0,r=t.publishedAt?new Date(t.publishedAt).getTime():0;return n!==r?r-n:e.uri<t.uri?1:-1}e.s(["POSTS_LIST_PAGE_SIZE",0,20,"buildPostsListIndex",0,function(e,t){return e.map(e=>{let n=e.record.description||t?.(e)||void 0,r=e.commentsCount+e.mentionsCount+e.recommendsCount;return{uri:e.uri,text:[e.record.title,n].filter(Boolean).join(" ").toLowerCase().slice(0,280),...e.record.tags?.length&&{tags:e.record.tags},...e.record.publishedAt&&{publishedAt:e.record.publishedAt},...r>0&&{score:r}}})},"filterPostsByTags",0,function(e,t){return t&&0!==t.length?e.filter(e=>e.record.tags?.some(e=>t.includes(e))):e},"postsListFilterKey",0,function(e){return e&&e.length>0?[...e].sort().join(","):""},"readerControlledUris",0,function(e,n){let r=(n.search??"").toLowerCase().trim().split(/\s+/).filter(Boolean),i=n.tags??[];return[...e.filter(e=>(0===i.length||!!e.tags?.some(e=>i.includes(e)))&&function(e,t){if(0===t.length)return!0;let n=e.tags?.length?`${e.text} ${e.tags.join(" ").toLowerCase()}`:e.text;return t.every(e=>n.includes(e))}(e,r))].sort((e,r)=>{if("oldest"===n.sort)return-t(e,r);if("top"===n.sort){let t=(r.score??0)-(e.score??0);if(0!==t)return t}return t(e,r)}).map(e=>e.uri)},"resolvePostsListView",0,function(e){return"small"===e||"chapter"===e?e:"medium"},"resolveReaderControls",0,function(e){if(!e.readerControls)return;let t={search:e.readerSearch??!0,tagFilter:e.readerTagFilter??!0,sort:e.readerSort??!0};if(t.search||t.tagFilter||t.sort)return t},"sortPostsForList",0,function(e){return[...e].sort((e,n)=>t({uri:e.uri,publishedAt:e.record.publishedAt},{uri:n.uri,publishedAt:n.record.publishedAt}))},"tagCountsForIndex",0,function(e){let t=new Map;for(let n of e)for(let e of n.tags??[])t.set(e,(t.get(e)??0)+1);return Array.from(t,([e,t])=>({tag:e,count:t})).sort((e,t)=>t.count-e.count||e.tag.localeCompare(t.tag,void 0,{sensitivity:"base"}))}])},382548,e=>{"use strict";e.s(["findMarkRange",0,function(e,t,n,r){let i=n,a=r??n,o=e.resolve(i),s=e.resolve(a);for(;o.nodeBefore&&o.nodeBefore.marks.some(e=>e.type===t);)i-=o.nodeBefore.nodeSize,o=e.resolve(i);for(;s.nodeAfter&&s.nodeAfter.marks.some(e=>e.type===t);)a+=s.nodeAfter.nodeSize,s=e.resolve(a);return{start:i,end:a}}])},38168,e=>{"use strict";var t=e.i(172604);e.s(["formattingKeymap",0,function(e){return{"Meta-b":(0,t.toggleMark)(e.strong),"Ctrl-b":(0,t.toggleMark)(e.strong),"Meta-i":(0,t.toggleMark)(e.em),"Ctrl-i":(0,t.toggleMark)(e.em),"Meta-u":(0,t.toggleMark)(e.underline),"Ctrl-u":(0,t.toggleMark)(e.underline),"Ctrl-Meta-x":(0,t.toggleMark)(e.strikethrough)}}])},662498,e=>{"use strict";e.s(["rangeHasMark",0,function(e,t,n,r){let i=null,a=r-n;t.spec.inclusive||(a-=1);for(let r=1;r<=a;r++){let a=e.doc.resolve(n+r).marks().find(e=>e.type===t);if(i){if(!a||i!==a)return null}else{if(!a)return null;i=a}}return i}])},517770,e=>{"use strict";var t=e.i(620196),n=e.i(250209);function r(e){try{let t,n=e,r=e.indexOf("~");-1!==r&&(t=e.substring(0,r),n=e.substring(r+1));let i=n.match(/^([\d.]+)_(\d+)-([\d.]+)_(\d+)$/);if(!i)return null;let[,a,o,s,l]=i;return{...t&&{pageId:t},start:{block:a.split(".").map(e=>parseInt(e)),offset:parseInt(o,10)},end:{block:s.split(".").map(e=>parseInt(e)),offset:parseInt(l,10)}}}catch(e){return null}}e.s(["QUOTE_PARAM",0,"/l-quote/","decodeQuotePosition",0,r,"encodeQuotePosition",0,function(e){let{pageId:t,start:n,end:r}=e,i=`${n.block.join(".")}_${n.offset}-${r.block.join(".")}_${r.offset}`;return t?`${t}~${i}`:i},"getDocumentUrls",0,function(e,r,i){let a=[],o=new t.AtUri(r),s=(0,n.getDocumentURL)(e,r,i);if(s.startsWith("http")?a.push(s):a.push(`https://leaflet.pub${s}`),a.push(`https://leaflet.pub/p/${o.host}/${o.rkey}`),e.site&&e.site.startsWith("http")){let t=e.path||"/"+o.rkey;a.push(e.site+t)}return a},"matchDocumentUrl",0,function(e,t){try{let n=new URL(e),i=n.pathname.split("/l-quote/"),a=i[0],o=i[1],s=(n.origin+a).replace(/\/$/,"");for(let n of t){let t=n.replace(/\/$/,"");if(s===t)return{url:e,quotePosition:o?r(o):null}}}catch{}return null}])},397587,e=>{"use strict";var t=e.i(843476),n=e.i(68428),r=e.i(30552);e.s(["renderFootnoteDefHTML",0,function(e){let i=(0,n.renderToStaticMarkup)((0,t.jsx)(r.RenderYJSFragment,{value:e,wrapper:"p",renderComments:!1}));if(!i.includes("footnote-ref"))return i;let a=document.createElement("div");for(let e of(a.innerHTML=i,Array.from(a.querySelectorAll("span.footnote-ref"))))e.remove();return a.innerHTML}])},899719,e=>{"use strict";var t=e.i(482448);e.s(["scrollIntoView",0,function(e,n=.9){let r=document.getElementById(e);requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,t.scrollIntoViewIfNeeded)(r,!1,"smooth",n)})})}])},482448,e=>{"use strict";e.s(["scrollIntoViewIfNeeded",0,function(e,t=!0,n,r=1){if(!e)return;let i=e.closest(".editorScrollRoot"),a=i?.querySelector(".editorScrollStickyHeader")??null,o=a?.offsetHeight??0,s=new IntersectionObserver(function([i]){let a=i.intersectionRatio;if(a<r){let r=a<=0&&t?"center":"nearest",i=e.style.scrollMarginTop;o&&(e.style.scrollMarginTop=`${o}px`),e.scrollIntoView({block:r,inline:r,behavior:n||"auto"}),e.style.scrollMarginTop=i}s.disconnect()},{root:i,rootMargin:o?`-${o}px 0px 0px 0px`:void 0,threshold:[0,r]});s.observe(e)}])},489219,e=>{"use strict";e.s(["slugify",0,function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}])},364441,e=>{"use strict";e.s(["srcDocSandbox",0,"allow-scripts allow-popups allow-forms"])},207342,969202,e=>{"use strict";var t=e.i(110383),n=e.i(870370);async function r(e,r,i){if(!r.type.startsWith("image/"))return;let a=i.existingCoverEntity??(0,t.v7)();
206i.existingCoverEntity||await e.mutate.createEntity([{entityID:a,permission_set:i.permission_set}]),await (0,n.addImage)(r,e,{entityID:a,attribute:"block/image",ignoreUndo:!0}),i.existingCoverEntity||await e.mutate.assertFact({entity:i.rootEntity,attribute:"root/cover-image",data:{type:"reference",value:a},ignoreUndo:!0})}e.s(["uploadCoverImage",0,r],207342);var i=e.i(843476),a=e.i(500932);e.s(["CoverImageTiny",0,e=>{let t,n,r=(0,a.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)("path",{d:"M13.2607 1.375C14.7104 1.37513 15.8857 2.55033 15.8857 4V12C15.8857 13.4497 14.7104 14.6249 13.2607 14.625H2.73926C1.28951 14.625 0.114258 13.4497 0.114258 12V4C0.114258 2.55025 1.28951 1.375 2.73926 1.375H13.2607ZM1.36426 11.5703V12C1.36426 12.7594 1.97987 13.375 2.73926 13.375H13.2607C14.02 13.3749 14.6357 12.7593 14.6357 12V11.5703H1.36426ZM13.6191 7.64258C13.225 8.19281 12.5104 8.41168 11.876 8.17578L11.0352 7.8623C10.8967 7.81082 10.7427 7.82362 10.6143 7.89648L10.2803 8.08594C9.76222 8.37971 9.11865 8.33896 8.6416 7.98242L8.44727 7.83691L7.23828 9.19727C7.06777 9.38896 6.77924 9.42074 6.57129 9.27051L5.81055 8.7207L5.32812 9.25879C4.97974 9.64662 4.393 9.70556 3.97461 9.39453C3.97181 9.39267 3.96786 9.39206 3.96484 9.39355L3.31934 9.73828C2.79446 10.0188 2.15346 9.96246 1.68555 9.59473L1.36426 9.3418V10.3203H14.6357V7.14258L14.2324 6.78516L13.6191 7.64258ZM3.06934 7.65723L2.06934 8.62402L2.30371 8.80859C2.45969 8.93117 2.67368 8.94995 2.84863 8.85645L3.49316 8.51172C3.83756 8.32766 4.25779 8.35903 4.57129 8.5918C4.57518 8.59469 4.58072 8.5944 4.58398 8.59082L4.99609 8.13086L3.61328 7.13184L3.06934 7.65723ZM2.73926 2.625C1.97987 2.625 1.36426 3.24061 1.36426 4V7.91504L2.375 6.9375L2.91797 6.41309C3.26629 6.07667 3.80567 6.03773 4.19824 6.32129L6.79004 8.19434L10.7715 3.71973C11.1379 3.30825 11.7689 3.27057 12.1816 3.63574L14.6357 5.80762V4C14.6357 3.24069 14.02 2.62513 13.2607 2.625H2.73926ZM9.11426 7.08691L9.24121 7.18164C9.40019 7.30017 9.61459 7.31367 9.78711 7.21582L10.1211 7.02637C10.5064 6.80793 10.9686 6.77041 11.3838 6.9248L12.2246 7.23828C12.436 7.31687 12.6743 7.24389 12.8057 7.06055L13.4785 6.11914L11.5186 4.38477L9.11426 7.08691ZM6.06055 3.48535C6.81566 3.48535 7.42765 4.09745 7.42773 4.85254C7.42767 5.60765 6.81567 6.21973 6.06055 6.21973C5.3055 6.21964 4.69343 5.60759 4.69336 4.85254C4.69344 4.0975 5.30551 3.48544 6.06055 3.48535ZM6.06055 4.48535C5.85779 4.48544 5.69344 4.64978 5.69336 4.85254C5.69343 5.05531 5.85778 5.21964 6.06055 5.21973C6.26339 5.21973 6.42767 5.05536 6.42773 4.85254C6.42765 4.64973 6.26337 4.48535 6.06055 4.48535Z",fill:"currentColor"}),r[0]=t):t=r[0],r[1]!==e?(n=(0,i.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),r[1]=e,r[2]=n):n=r[2],n}],969202)},823035,e=>{"use strict";var t=e.i(174080),n=e.i(813029),r=e.i(680915),i=e.i(553445),a=e.i(482448);e.s(["zoomIntoBlock",0,function(e,o){(0,r.isBlockGroup)(e)||((0,t.flushSync)(()=>{n.useUIState.getState().zoomIntoBlock(e,o)}),(0,a.scrollIntoViewIfNeeded)(document.getElementById(i.elementId.block(o).container),!1))}])},473840,(e,t,n)=>{let r=[360,800,1200,2e3];t.exports={IMAGE_WIDTHS:r,snapToImageWidth:function(e){return r.find(t=>t>=e)??r[r.length-1]}}},896635,e=>{"use strict";var t=e.i(473840);e.s(["default",0,function({src:e,width:n,quality:r}){let i=e.startsWith("/")?e.slice(1):e;return`/api/resized_images?path=${encodeURIComponent(i)}&width=${(0,t.snapToImageWidth)(n)}`}])}]);
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.