setta 0.0.11.dev0__py3-none-any.whl → 0.0.11.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of setta might be problematic. Click here for more details.
- setta/__init__.py +1 -1
- setta/static/frontend/assets/{index-9d7cc515.js → index-8dbc1bf9.js} +1 -1
- setta/static/frontend/index.html +1 -1
- {setta-0.0.11.dev0.dist-info → setta-0.0.11.dev1.dist-info}/METADATA +1 -1
- {setta-0.0.11.dev0.dist-info → setta-0.0.11.dev1.dist-info}/RECORD +9 -9
- {setta-0.0.11.dev0.dist-info → setta-0.0.11.dev1.dist-info}/LICENSE +0 -0
- {setta-0.0.11.dev0.dist-info → setta-0.0.11.dev1.dist-info}/WHEEL +0 -0
- {setta-0.0.11.dev0.dist-info → setta-0.0.11.dev1.dist-info}/entry_points.txt +0 -0
- {setta-0.0.11.dev0.dist-info → setta-0.0.11.dev1.dist-info}/top_level.txt +0 -0
setta/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.0.11.
|
1
|
+
__version__ = "0.0.11.dev1"
|
@@ -676,4 +676,4 @@ l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
676
676
|
hover:text-setta-600 dark:text-setta-700 dark:hover:text-setta-400 [&>i]:focus-visible:!border-blue-500`,onClick:o,disabled:a||r,children:x.jsx("i",{className:"gg-add"})})]})}function y3t(t,e){return te(n=>{const r=ea(e,n).children;return E$({allCodeInfo:n.codeInfo,codeInfoChildren:r,startingId:t,additionalOutputCondition:i=>{var s;return((s=r[i.id])==null?void 0:s.length)===0}}).ids.length})}function b3t({objInfoId:t,paramInfoId:e,alreadySelected:n,forSectionId:r}){return te(i=>{const s=ea(r,i).children,{ids:o,pathMap:a}=Ey({allCodeInfo:i.codeInfo,codeInfoChildren:s,startingId:t,additionalOutputCondition:c=>{var u;return((u=s[c.id])==null?void 0:u.length)===0}}),l=[];for(const c of o){if(c!==e&&n.includes(c))continue;const u=T$(i.codeInfo,a,c);l.push({id:c,name:u})}return l},ae.isEqual)}function Yge({forSectionId:t,variantId:e,selectedItem:n,selectedItemIdx:r,alreadySelected:i}){function s(){l3t({variantId:e,selectedItemIdx:r,paramInfoId:null})}const o=y3t(n,t);return{onClickAddParam:s,disabled:i.length>=o}}var Gge={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ju,function(n){return function(r,i){if(i==null&&(i={fuzzy:!0}),/youtu\.?be/.test(r)){var s,o=[/youtu\.be\/([^#\&\?]{11})/,/\?v=([^#\&\?]{11})/,/\&v=([^#\&\?]{11})/,/embed\/([^#\&\?]{11})/,/\/v\/([^#\&\?]{11})/];for(s=0;s<o.length;++s)if(o[s].test(r))return o[s].exec(r)[1];if(i.fuzzy){var a=r.split(/[\/\&\?=#\.\s]/g);for(s=0;s<a.length;++s)if(/^[^#\&\?]{11}$/.test(a[s]))return a[s]}}return null}})})(Gge);var x3t=Gge.exports;const w3t=ia(x3t),S3t="_verified_lvyh0_1",ON={verified:S3t},_3t=()=>x.jsx("svg",{viewBox:"0 0 24 24","aria-label":"Verified account",role:"img",className:ON.verified,children:x.jsx("g",{children:x.jsx("path",{d:"M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.33 2.19c-1.4-.46-2.91-.2-3.92.81s-1.26 2.52-.8 3.91c-1.31.67-2.2 1.91-2.2 3.34s.89 2.67 2.2 3.34c-.46 1.39-.21 2.9.8 3.91s2.52 1.26 3.91.81c.67 1.31 1.91 2.19 3.34 2.19s2.68-.88 3.34-2.19c1.39.45 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z"})})}),k3t=()=>x.jsx("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img",className:ON.verified,children:x.jsxs("g",{children:[x.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"0-a",x1:"4.411",x2:"18.083",y1:"2.495",y2:"21.508",children:[x.jsx("stop",{offset:"0",stopColor:"#f4e72a"}),x.jsx("stop",{offset:".539",stopColor:"#cd8105"}),x.jsx("stop",{offset:".68",stopColor:"#cb7b00"}),x.jsx("stop",{offset:"1",stopColor:"#f4ec26"}),x.jsx("stop",{offset:"1",stopColor:"#f4e72a"})]}),x.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"0-b",x1:"5.355",x2:"16.361",y1:"3.395",y2:"19.133",children:[x.jsx("stop",{offset:"0",stopColor:"#f9e87f"}),x.jsx("stop",{offset:".406",stopColor:"#e2b719"}),x.jsx("stop",{offset:".989",stopColor:"#e2b719"})]}),x.jsxs("g",{clipRule:"evenodd",fillRule:"evenodd",children:[x.jsx("path",{d:"M13.324 3.848L11 1.6 8.676 3.848l-3.201-.453-.559 3.184L2.06 8.095 3.48 11l-1.42 2.904 2.856 1.516.559 3.184 3.201-.452L11 20.4l2.324-2.248 3.201.452.559-3.184 2.856-1.516L18.52 11l1.42-2.905-2.856-1.516-.559-3.184zm-7.09 7.575l3.428 3.428 5.683-6.206-1.347-1.247-4.4 4.795-2.072-2.072z",fill:"url(#0-a)"}),x.jsx("path",{d:"M13.101 4.533L11 2.5 8.899 4.533l-2.895-.41-.505 2.88-2.583 1.37L4.2 11l-1.284 2.627 2.583 1.37.505 2.88 2.895-.41L11 19.5l2.101-2.033 2.895.41.505-2.88 2.583-1.37L17.8 11l1.284-2.627-2.583-1.37-.505-2.88zm-6.868 6.89l3.429 3.428 5.683-6.206-1.347-1.247-4.4 4.795-2.072-2.072z",fill:"url(#0-b)"}),x.jsx("path",{d:"M6.233 11.423l3.429 3.428 5.65-6.17.038-.033-.005 1.398-5.683 6.206-3.429-3.429-.003-1.405.005.003z",fill:"#d18800"})]})]})}),C3t=()=>x.jsx("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img",className:ON.verified,children:x.jsx("g",{children:x.jsx("path",{clipRule:"evenodd",d:"M12.05 2.056c-.568-.608-1.532-.608-2.1 0l-1.393 1.49c-.284.303-.685.47-1.1.455L5.42 3.932c-.832-.028-1.514.654-1.486 1.486l.069 2.039c.014.415-.152.816-.456 1.1l-1.49 1.392c-.608.568-.608 1.533 0 2.101l1.49 1.393c.304.284.47.684.456 1.1l-.07 2.038c-.027.832.655 1.514 1.487 1.486l2.038-.069c.415-.014.816.152 1.1.455l1.392 1.49c.569.609 1.533.609 2.102 0l1.393-1.49c.283-.303.684-.47 1.099-.455l2.038.069c.832.028 1.515-.654 1.486-1.486L18 14.542c-.015-.415.152-.815.455-1.099l1.49-1.393c.608-.568.608-1.533 0-2.101l-1.49-1.393c-.303-.283-.47-.684-.455-1.1l.068-2.038c.029-.832-.654-1.514-1.486-1.486l-2.038.07c-.415.013-.816-.153-1.1-.456zm-5.817 9.367l3.429 3.428 5.683-6.206-1.347-1.247-4.4 4.795-2.072-2.072z",fillRule:"evenodd"})})});function Kge(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Kge(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function xf(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Kge(t))&&(r&&(r+=" "),r+=e);return r}const E3t="_root_98iqw_1",T3t="_article_98iqw_21",GY={root:E3t,article:T3t};const yN=({className:t,children:e})=>x.jsx("div",{className:xf("react-tweet-theme",GY.root,t),children:x.jsx("article",{className:GY.article,children:e})}),Jge=t=>x.jsx("img",{...t}),P3t="_header_nqq4j_1",A3t="_avatar_nqq4j_11",R3t="_avatarOverflow_nqq4j_16",$3t="_avatarSquare_nqq4j_23",M3t="_avatarShadow_nqq4j_26",I3t="_author_nqq4j_37",D3t="_authorLink_nqq4j_44",L3t="_authorVerified_nqq4j_53",N3t="_authorLinkText_nqq4j_56",Q3t="_authorMeta_nqq4j_63",j3t="_authorFollow_nqq4j_66",B3t="_username_nqq4j_69",z3t="_follow_nqq4j_74",F3t="_separator_nqq4j_82",W3t="_brand_nqq4j_86",V3t="_twitterIcon_nqq4j_90",gi={header:P3t,avatar:A3t,avatarOverflow:R3t,avatarSquare:$3t,avatarShadow:M3t,author:I3t,authorLink:D3t,authorVerified:L3t,authorLinkText:N3t,authorMeta:Q3t,authorFollow:j3t,username:B3t,follow:z3t,separator:F3t,brand:W3t,twitterIcon:V3t},U3t="_verifiedOld_lcna5_1",q3t="_verifiedBlue_lcna5_4",X3t="_verifiedGovernment_lcna5_7",qE={verifiedOld:U3t,verifiedBlue:q3t,verifiedGovernment:X3t},e1e=({user:t,className:e})=>{const n=t.verified||t.is_blue_verified||t.verified_type;let r=x.jsx(_3t,{}),i=qE.verifiedBlue;if(n)switch(t.is_blue_verified||(i=qE.verifiedOld),t.verified_type){case"Government":r=x.jsx(C3t,{}),i=qE.verifiedGovernment;break;case"Business":r=x.jsx(k3t,{}),i=null;break}return n?x.jsx("div",{className:xf(e,i),children:r}):null},H3t=({tweet:t,components:e})=>{var n;const r=(n=e==null?void 0:e.AvatarImg)!=null?n:Jge,{user:i}=t;return x.jsxs("div",{className:gi.header,children:[x.jsxs("a",{href:t.url,className:gi.avatar,target:"_blank",rel:"noopener noreferrer",children:[x.jsx("div",{className:xf(gi.avatarOverflow,i.profile_image_shape==="Square"&&gi.avatarSquare),children:x.jsx(r,{src:i.profile_image_url_https,alt:i.name,width:48,height:48})}),x.jsx("div",{className:gi.avatarOverflow,children:x.jsx("div",{className:gi.avatarShadow})})]}),x.jsxs("div",{className:gi.author,children:[x.jsxs("a",{href:t.url,className:gi.authorLink,target:"_blank",rel:"noopener noreferrer",children:[x.jsx("div",{className:gi.authorLinkText,children:x.jsx("span",{title:i.name,children:i.name})}),x.jsx(e1e,{user:i,className:gi.authorVerified})]}),x.jsxs("div",{className:gi.authorMeta,children:[x.jsx("a",{href:t.url,className:gi.username,target:"_blank",rel:"noopener noreferrer",children:x.jsxs("span",{title:`@${i.screen_name}`,children:["@",i.screen_name]})}),x.jsxs("div",{className:gi.authorFollow,children:[x.jsx("span",{className:gi.separator,children:"·"}),x.jsx("a",{href:i.follow_url,className:gi.follow,target:"_blank",rel:"noopener noreferrer",children:"Follow"})]})]})]}),x.jsx("a",{href:t.url,className:gi.brand,target:"_blank",rel:"noopener noreferrer","aria-label":"View on Twitter",children:x.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:gi.twitterIcon,children:x.jsx("g",{children:x.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})})})]})},Z3t="_root_1ec15_1",Y3t={root:Z3t},G3t=({tweet:t})=>x.jsxs("a",{href:t.in_reply_to_url,className:Y3t.root,target:"_blank",rel:"noopener noreferrer",children:["Replying to @",t.in_reply_to_screen_name]}),K3t="_root_eihfa_1",J3t={root:K3t},ekt=({href:t,children:e})=>x.jsx("a",{href:t,className:J3t.root,target:"_blank",rel:"noopener noreferrer nofollow",children:e}),tkt="_root_1xq52_1",nkt={root:tkt},rkt=({tweet:t})=>x.jsx("p",{className:nkt.root,children:t.entities.map((e,n)=>{switch(e.type){case"hashtag":case"mention":case"url":case"symbol":return x.jsx(ekt,{href:e.href,children:e.text},n);case"media":return;default:return x.jsx("span",{dangerouslySetInnerHTML:{__html:e.text}},n)}})}),KY=t=>`https://twitter.com/${t.user.screen_name}/status/${t.id_str}`,t1e=t=>`https://twitter.com/${typeof t=="string"?t:t.user.screen_name}`,ikt=t=>`https://twitter.com/intent/like?tweet_id=${t.id_str}`,skt=t=>`https://twitter.com/intent/tweet?in_reply_to=${t.id_str}`,okt=t=>`https://twitter.com/intent/follow?screen_name=${t.user.screen_name}`,akt=t=>`https://twitter.com/hashtag/${t.text}`,lkt=t=>`https://twitter.com/search?q=%24${t.text}`,ckt=t=>`https://twitter.com/${t.in_reply_to_screen_name}/status/${t.in_reply_to_status_id_str}`,n1e=(t,e)=>{const n=new URL(t.media_url_https),r=n.pathname.split(".").pop();return r?(n.pathname=n.pathname.replace(`.${r}`,""),n.searchParams.set("format",r),n.searchParams.set("name",e),n.toString()):t.media_url_https},ukt=t=>{const{variants:e}=t.video_info;return e.filter(r=>r.content_type==="video/mp4").sort((r,i)=>{var s,o;return((s=i.bitrate)!=null?s:0)-((o=r.bitrate)!=null?o:0)})},fkt=t=>{const e=ukt(t);return e.length>1?e[1]:e[0]},k9=t=>t>999999?`${(t/1e6).toFixed(1)}M`:t>999?`${(t/1e3).toFixed(1)}K`:t.toString();function JY(t){const e=Array.from(t.text),n=[{indices:t.display_text_range,type:"text"}];return u1(n,"hashtag",t.entities.hashtags),u1(n,"mention",t.entities.user_mentions),u1(n,"url",t.entities.urls),u1(n,"symbol",t.entities.symbols),t.entities.media&&u1(n,"media",t.entities.media),hkt(t,n),n.map(r=>{const i=e.slice(r.indices[0],r.indices[1]).join("");switch(r.type){case"hashtag":return Object.assign(r,{href:akt(r),text:i});case"mention":return Object.assign(r,{href:t1e(r.screen_name),text:i});case"url":case"media":return Object.assign(r,{href:r.expanded_url,text:r.display_url});case"symbol":return Object.assign(r,{href:lkt(r),text:i});default:return Object.assign(r,{text:i})}})}function u1(t,e,n){for(const r of n)for(const[i,s]of t.entries()){if(s.indices[0]>r.indices[0]||s.indices[1]<r.indices[1])continue;const o=[{...r,type:e}];s.indices[0]<r.indices[0]&&o.unshift({indices:[s.indices[0],r.indices[0]],type:"text"}),s.indices[1]>r.indices[1]&&o.push({indices:[r.indices[1],s.indices[1]],type:"text"}),t.splice(i,1,...o);break}}function hkt(t,e){t.entities.media&&t.entities.media[0].indices[0]<t.display_text_range[1]&&(t.display_text_range[1]=t.entities.media[0].indices[0]);const n=e.at(-1);n&&n.indices[1]>t.display_text_range[1]&&(n.indices[1]=t.display_text_range[1])}const dkt=t=>({...t,url:KY(t),user:{...t.user,url:t1e(t),follow_url:okt(t)},like_url:ikt(t),reply_url:skt(t),in_reply_to_url:t.in_reply_to_screen_name?ckt(t):void 0,entities:JY(t),quoted_tweet:t.quoted_tweet?{...t.quoted_tweet,url:KY(t.quoted_tweet),entities:JY(t.quoted_tweet)}:void 0}),pkt="_root_g9tkv_1",mkt="_rounded_g9tkv_6",gkt="_mediaWrapper_g9tkv_10",vkt="_grid2Columns_g9tkv_17",Okt="_grid3_g9tkv_20",ykt="_grid2x2_g9tkv_23",bkt="_mediaContainer_g9tkv_26",xkt="_mediaLink_g9tkv_34",wkt="_skeleton_g9tkv_38",Skt="_image_g9tkv_43",Js={root:pkt,rounded:mkt,mediaWrapper:gkt,grid2Columns:vkt,grid3:Okt,grid2x2:ykt,mediaContainer:bkt,mediaLink:xkt,skeleton:wkt,image:Skt},_kt="_anchor_fp31d_1",kkt="_videoButton_fp31d_17",Ckt="_videoButtonIcon_fp31d_35",Ekt="_watchOnTwitter_fp31d_44",Tkt="_viewReplies_fp31d_60",D0={anchor:_kt,videoButton:kkt,videoButtonIcon:Ckt,watchOnTwitter:Ekt,viewReplies:Tkt},Pkt=({tweet:t,media:e})=>{const[n,r]=_.useState(!0),[i,s]=_.useState(!1),[o,a]=_.useState(!1),l=fkt(e);let c=0;return x.jsxs(x.Fragment,{children:[x.jsx("video",{className:Js.image,poster:n1e(e,"small"),controls:!n,muted:!0,preload:"none",tabIndex:n?-1:0,onPlay:()=>{c&&window.clearTimeout(c),i||s(!0),o&&a(!1)},onPause:()=>{c&&window.clearTimeout(c),c=window.setTimeout(()=>{i&&s(!1),c=0},100)},onEnded:()=>{a(!0)},children:x.jsx("source",{src:l.url,type:l.content_type})}),n&&x.jsx("button",{type:"button",className:D0.videoButton,"aria-label":"View video on X",onClick:u=>{const f=u.currentTarget.previousSibling;u.preventDefault(),r(!1),s(!0),f.play(),f.focus()},children:x.jsx("svg",{viewBox:"0 0 24 24",className:D0.videoButtonIcon,"aria-hidden":"true",children:x.jsx("g",{children:x.jsx("path",{d:"M21 12L4 2v20l17-10z"})})})}),!i&&!o&&x.jsx("div",{className:D0.watchOnTwitter,children:x.jsx("a",{href:t.url,className:D0.anchor,target:"_blank",rel:"noopener noreferrer",children:n?"Watch on X":"Continue watching on X"})}),o&&x.jsx("a",{href:t.url,className:xf(D0.anchor,D0.viewReplies),target:"_blank",rel:"noopener noreferrer",children:"View replies"})]})},Akt=t=>x.jsx("img",{...t}),eG=(t,e)=>{let n=56.25;return e===1&&(n=100/t.original_info.width*t.original_info.height),e===2&&(n=n*2),{width:t.type==="photo"?void 0:"unset",paddingBottom:`${n}%`}},r1e=({tweet:t,components:e,quoted:n})=>{var r,i,s;const o=(s=(r=t.mediaDetails)==null?void 0:r.length)!=null?s:0;var a;const l=(a=e==null?void 0:e.MediaImg)!=null?a:Akt;return x.jsx("div",{className:xf(Js.root,!n&&Js.rounded),children:x.jsx("div",{className:xf(Js.mediaWrapper,o>1&&Js.grid2Columns,o===3&&Js.grid3,o>4&&Js.grid2x2),children:(i=t.mediaDetails)==null?void 0:i.map(c=>x.jsx(_.Fragment,{children:c.type==="photo"?x.jsxs("a",{href:t.url,className:xf(Js.mediaContainer,Js.mediaLink),target:"_blank",rel:"noopener noreferrer",children:[x.jsx("div",{className:Js.skeleton,style:eG(c,o)}),x.jsx(l,{src:n1e(c,"small"),alt:c.ext_alt_text||"Image",className:Js.image,draggable:!0})]},c.media_url_https):x.jsxs("div",{className:Js.mediaContainer,children:[x.jsx("div",{className:Js.skeleton,style:eG(c,o)}),x.jsx(Pkt,{tweet:t,media:c})]},c.media_url_https)},c.media_url_https))})})},Rkt={hour:"numeric",minute:"2-digit",hour12:!0,weekday:"short",month:"short",day:"numeric",year:"numeric"},$kt=new Intl.DateTimeFormat("en-US",Rkt),Mkt=t=>{const e={};for(const n of t)e[n.type]=n.value;return e},Ikt=t=>{const e=Mkt($kt.formatToParts(t)),n=`${e.hour}:${e.minute} ${e.dayPeriod}`,r=`${e.month} ${e.day}, ${e.year}`;return`${n} · ${r}`},Dkt="_root_i24yn_1",Lkt={root:Dkt},Nkt=({tweet:t})=>{const e=new Date(t.created_at),n=Ikt(e);return x.jsx("a",{className:Lkt.root,href:t.url,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:x.jsx("time",{dateTime:e.toISOString(),children:n})})},Qkt="_info_19qcj_1",jkt="_infoLink_19qcj_10",Bkt="_infoIcon_19qcj_30",XE={info:Qkt,infoLink:jkt,infoIcon:Bkt},zkt=({tweet:t})=>x.jsxs("div",{className:XE.info,children:[x.jsx(Nkt,{tweet:t}),x.jsx("a",{className:XE.infoLink,href:"https://help.twitter.com/en/twitter-for-websites-ads-info-and-privacy",target:"_blank",rel:"noopener noreferrer","aria-label":"Twitter for Websites, Ads Information and Privacy",children:x.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:XE.infoIcon,children:x.jsx("g",{children:x.jsx("path",{d:"M13.5 8.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5S11.17 7 12 7s1.5.67 1.5 1.5zM13 17v-5h-2v5h2zm-1 5.25c5.66 0 10.25-4.59 10.25-10.25S17.66 1.75 12 1.75 1.75 6.34 1.75 12 6.34 22.25 12 22.25zM20.25 12c0 4.56-3.69 8.25-8.25 8.25S3.75 16.56 3.75 12 7.44 3.75 12 3.75s8.25 3.69 8.25 8.25z"})})})})]}),Fkt="_actions_n2anf_1",Wkt="_like_n2anf_13",Vkt="_reply_n2anf_14",Ukt="_copy_n2anf_15",qkt="_likeIconWrapper_n2anf_27",Xkt="_likeCount_n2anf_30",Hkt="_replyIconWrapper_n2anf_35",Zkt="_copyIconWrapper_n2anf_36",Ykt="_likeIcon_n2anf_27",Gkt="_replyIcon_n2anf_35",Kkt="_copyIcon_n2anf_36",Jkt="_replyText_n2anf_56",eCt="_copyText_n2anf_57",ks={actions:Fkt,like:Wkt,reply:Vkt,copy:Ukt,likeIconWrapper:qkt,likeCount:Xkt,replyIconWrapper:Hkt,copyIconWrapper:Zkt,likeIcon:Ykt,replyIcon:Gkt,copyIcon:Kkt,replyText:Jkt,copyText:eCt},tCt=({tweet:t})=>{const[e,n]=_.useState(!1),[r,i]=_.useState(!1),s=()=>{navigator.clipboard.writeText(t.url),n(!0)};return _.useEffect(()=>{if(e){const o=setTimeout(()=>{n(!1),i(!0)},6e3);return()=>clearTimeout(o)}},[e]),x.jsxs("button",{type:"button",className:ks.copy,"aria-label":"Copy link",onClick:s,children:[x.jsx("div",{className:ks.copyIconWrapper,children:e?x.jsx("svg",{viewBox:"0 0 24 24",className:ks.copyIcon,"aria-hidden":"true",children:x.jsx("g",{children:x.jsx("path",{d:"M9.64 18.952l-5.55-4.861 1.317-1.504 3.951 3.459 8.459-10.948L19.4 6.32 9.64 18.952z"})})}):x.jsx("svg",{viewBox:"0 0 24 24",className:ks.copyIcon,"aria-hidden":"true",children:x.jsx("g",{children:x.jsx("path",{d:"M18.36 5.64c-1.95-1.96-5.11-1.96-7.07 0L9.88 7.05 8.46 5.64l1.42-1.42c2.73-2.73 7.16-2.73 9.9 0 2.73 2.74 2.73 7.17 0 9.9l-1.42 1.42-1.41-1.42 1.41-1.41c1.96-1.96 1.96-5.12 0-7.07zm-2.12 3.53l-7.07 7.07-1.41-1.41 7.07-7.07 1.41 1.41zm-12.02.71l1.42-1.42 1.41 1.42-1.41 1.41c-1.96 1.96-1.96 5.12 0 7.07 1.95 1.96 5.11 1.96 7.07 0l1.41-1.41 1.42 1.41-1.42 1.42c-2.73 2.73-7.16 2.73-9.9 0-2.73-2.74-2.73-7.17 0-9.9z"})})})}),x.jsx("span",{className:ks.copyText,children:e?"Copied!":r?"Copy link to Tweet":"Copy link"})]})},nCt=({tweet:t})=>{const e=k9(t.favorite_count);return x.jsxs("div",{className:ks.actions,children:[x.jsxs("a",{className:ks.like,href:t.like_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Like. This Tweet has ${e} likes`,children:[x.jsx("div",{className:ks.likeIconWrapper,children:x.jsx("svg",{viewBox:"0 0 24 24",className:ks.likeIcon,"aria-hidden":"true",children:x.jsx("g",{children:x.jsx("path",{d:"M20.884 13.19c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})})})}),x.jsx("span",{className:ks.likeCount,children:e})]}),x.jsxs("a",{className:ks.reply,href:t.reply_url,target:"_blank",rel:"noopener noreferrer","aria-label":"Reply to this Tweet on Twitter",children:[x.jsx("div",{className:ks.replyIconWrapper,children:x.jsx("svg",{viewBox:"0 0 24 24",className:ks.replyIcon,"aria-hidden":"true",children:x.jsx("g",{children:x.jsx("path",{d:"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01z"})})})}),x.jsx("span",{className:ks.replyText,children:"Reply"})]}),x.jsx(tCt,{tweet:t})]})},rCt="_replies_1cutb_1",iCt="_link_1cutb_4",sCt="_text_1cutb_23",HE={replies:rCt,link:iCt,text:sCt},oCt=({tweet:t})=>x.jsx("div",{className:HE.replies,children:x.jsx("a",{className:HE.link,href:t.url,target:"_blank",rel:"noopener noreferrer",children:x.jsx("span",{className:HE.text,children:t.conversation_count===0?"Read more on X":t.conversation_count===1?`Read ${k9(t.conversation_count)} reply`:`Read ${k9(t.conversation_count)} replies`})})}),aCt="_root_q5799_1",lCt="_article_q5799_16",tG={root:aCt,article:lCt},cCt=({tweet:t,children:e})=>x.jsx("div",{className:tG.root,onClick:n=>{n.preventDefault(),window.open(t.url,"_blank")},children:x.jsx("article",{className:tG.article,children:e})}),uCt="_header_r31i5_1",fCt="_avatar_r31i5_11",hCt="_avatarSquare_r31i5_17",dCt="_author_r31i5_21",pCt="_authorText_r31i5_26",mCt="_username_r31i5_33",_h={header:uCt,avatar:fCt,avatarSquare:hCt,author:dCt,authorText:pCt,username:mCt},gCt=({tweet:t})=>{const{user:e}=t;return x.jsxs("div",{className:_h.header,children:[x.jsx("a",{href:t.url,className:_h.avatar,target:"_blank",rel:"noopener noreferrer",children:x.jsx("div",{className:xf(_h.avatarOverflow,e.profile_image_shape==="Square"&&_h.avatarSquare),children:x.jsx(Jge,{src:e.profile_image_url_https,alt:e.name,width:20,height:20})})}),x.jsxs("div",{className:_h.author,children:[x.jsx("div",{className:_h.authorText,children:x.jsx("span",{title:e.name,children:e.name})}),x.jsx(e1e,{user:e}),x.jsx("div",{className:_h.username,children:x.jsxs("span",{title:`@${e.screen_name}`,children:["@",e.screen_name]})})]})]})},vCt="_root_175ot_1",OCt={root:vCt},yCt=({tweet:t})=>x.jsx("p",{className:OCt.root,children:t.entities.map((e,n)=>x.jsx("span",{dangerouslySetInnerHTML:{__html:e.text}},n))}),bCt=({tweet:t})=>{var e;return x.jsxs(cCt,{tweet:t,children:[x.jsx(gCt,{tweet:t}),x.jsx(yCt,{tweet:t}),(e=t.mediaDetails)!=null&&e.length?x.jsx(r1e,{quoted:!0,tweet:t}):null]})},xCt=({tweet:t,components:e})=>{var n;const r=_.useMemo(()=>dkt(t),[t]);return x.jsxs(yN,{children:[x.jsx(H3t,{tweet:r,components:e}),r.in_reply_to_status_id_str&&x.jsx(G3t,{tweet:r}),x.jsx(rkt,{tweet:r}),(n=r.mediaDetails)!=null&&n.length?x.jsx(r1e,{tweet:r,components:e}):null,r.quoted_tweet&&x.jsx(bCt,{tweet:r.quoted_tweet}),x.jsx(zkt,{tweet:r}),x.jsx(nCt,{tweet:r}),x.jsx(oCt,{tweet:r})]})},wCt="_root_16yxa_1",SCt={root:wCt},_Ct=t=>x.jsx(yN,{children:x.jsxs("div",{className:SCt.root,children:[x.jsx("h3",{children:"Tweet not found"}),x.jsx("p",{children:"The embedded tweet could not be found…"})]})}),kCt="_skeleton_oi7hr_1",CCt="_loading_oi7hr_1",ECt={skeleton:kCt,loading:CCt},fS=({style:t})=>x.jsx("span",{className:ECt.skeleton,style:t}),TCt="_root_17qqv_1",PCt={root:TCt},ACt=()=>x.jsxs(yN,{className:PCt.root,children:[x.jsx(fS,{style:{height:"3rem",marginBottom:"0.75rem"}}),x.jsx(fS,{style:{height:"6rem",margin:"0.5rem 0"}}),x.jsx("div",{style:{borderTop:"var(--tweet-border)",margin:"0.5rem 0"}}),x.jsx(fS,{style:{height:"2rem"}}),x.jsx(fS,{style:{height:"2rem",borderRadius:"9999px",marginTop:"0.5rem"}})]}),nf=()=>{},As=nf(),ZE=Object,hn=t=>t===As,pl=t=>typeof t=="function",Ff=(t,e)=>({...t,...e}),RCt=t=>pl(t.then),hS=new WeakMap;let $Ct=0;const ty=t=>{const e=typeof t,n=t&&t.constructor,r=n==Date;let i,s;if(ZE(t)===t&&!r&&n!=RegExp){if(i=hS.get(t),i)return i;if(i=++$Ct+"~",hS.set(t,i),n==Array){for(i="@",s=0;s<t.length;s++)i+=ty(t[s])+",";hS.set(t,i)}if(n==ZE){i="#";const o=ZE.keys(t).sort();for(;!hn(s=o.pop());)hn(t[s])||(i+=s+":"+ty(t[s])+",");hS.set(t,i)}}else i=r?t.toJSON():e=="symbol"?t.toString():e=="string"?JSON.stringify(t):""+t;return i},kc=new WeakMap,YE={},dS={},bN="undefined",Tk=typeof window!=bN,C9=typeof document!=bN,MCt=()=>Tk&&typeof window.requestAnimationFrame!=bN,i1e=(t,e)=>{const n=kc.get(t);return[()=>!hn(e)&&t.get(e)||YE,r=>{if(!hn(e)){const i=t.get(e);e in dS||(dS[e]=i),n[5](e,Ff(i,r),i||YE)}},n[6],()=>!hn(e)&&e in dS?dS[e]:!hn(e)&&t.get(e)||YE]};let E9=!0;const ICt=()=>E9,[T9,P9]=Tk&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[nf,nf],DCt=()=>{const t=C9&&document.visibilityState;return hn(t)||t!=="hidden"},LCt=t=>(C9&&document.addEventListener("visibilitychange",t),T9("focus",t),()=>{C9&&document.removeEventListener("visibilitychange",t),P9("focus",t)}),NCt=t=>{const e=()=>{E9=!0,t()},n=()=>{E9=!1};return T9("online",e),T9("offline",n),()=>{P9("online",e),P9("offline",n)}},QCt={isOnline:ICt,isVisible:DCt},jCt={initFocus:LCt,initReconnect:NCt},nG=!ke.useId,ny=!Tk||"Deno"in window,BCt=t=>MCt()?window.requestAnimationFrame(t):setTimeout(t,1),GE=ny?_.useEffect:_.useLayoutEffect,KE=typeof navigator<"u"&&navigator.connection,rG=!ny&&KE&&(["slow-2g","2g"].includes(KE.effectiveType)||KE.saveData),xN=t=>{if(pl(t))try{t=t()}catch{t=""}const e=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?ty(t):"",[t,e]};let zCt=0;const A9=()=>++zCt,s1e=0,o1e=1,a1e=2,FCt=3;var f1={__proto__:null,ERROR_REVALIDATE_EVENT:FCt,FOCUS_EVENT:s1e,MUTATE_EVENT:a1e,RECONNECT_EVENT:o1e};async function l1e(...t){const[e,n,r,i]=t,s=Ff({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let o=s.populateCache;const a=s.rollbackOnError;let l=s.optimisticData;const c=h=>typeof a=="function"?a(h):a!==!1,u=s.throwOnError;if(pl(n)){const h=n,d=[],p=e.keys();for(const g of p)!/^\$(inf|sub)\$/.test(g)&&h(e.get(g)._k)&&d.push(g);return Promise.all(d.map(f))}return f(n);async function f(h){const[d]=xN(h);if(!d)return;const[p,g]=i1e(e,d),[m,v,y,b]=kc.get(e),S=()=>{const z=m[d];return(pl(s.revalidate)?s.revalidate(p().data,h):s.revalidate!==!1)&&(delete y[d],delete b[d],z&&z[0])?z[0](a1e).then(()=>p().data):p().data};if(t.length<3)return S();let k=r,E;const T=A9();v[d]=[T,0];const C=!hn(l),A=p(),R=A.data,j=A._c,L=hn(j)?R:j;if(C&&(l=pl(l)?l(L,R):l,g({data:l,_c:L})),pl(k))try{k=k(L)}catch(z){E=z}if(k&&RCt(k))if(k=await k.catch(z=>{E=z}),T!==v[d][0]){if(E)throw E;return k}else E&&C&&c(E)&&(o=!0,g({data:L,_c:As}));if(o&&!E)if(pl(o)){const z=o(k,L);g({data:z,error:As,_c:As})}else g({data:k,error:As,_c:As});if(v[d][1]=A9(),Promise.resolve(S()).then(()=>{g({_c:As})}),E){if(u)throw E;return}return k}}const iG=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},WCt=(t,e)=>{if(!kc.has(t)){const n=Ff(jCt,e),r={},i=l1e.bind(As,t);let s=nf;const o={},a=(u,f)=>{const h=o[u]||[];return o[u]=h,h.push(f),()=>h.splice(h.indexOf(f),1)},l=(u,f,h)=>{t.set(u,f);const d=o[u];if(d)for(const p of d)p(f,h)},c=()=>{if(!kc.has(t)&&(kc.set(t,[r,{},{},{},i,l,a]),!ny)){const u=n.initFocus(setTimeout.bind(As,iG.bind(As,r,s1e))),f=n.initReconnect(setTimeout.bind(As,iG.bind(As,r,o1e)));s=()=>{u&&u(),f&&f(),kc.delete(t)}}};return c(),[t,i,c,s]}return[t,kc.get(t)[4]]},VCt=(t,e,n,r,i)=>{const s=n.errorRetryCount,o=i.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!hn(s)&&o>s||setTimeout(r,a,i)},UCt=(t,e)=>ty(t)==ty(e),[c1e,qCt]=WCt(new Map),XCt=Ff({onLoadingSlow:nf,onSuccess:nf,onError:nf,onErrorRetry:VCt,onDiscarded:nf,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:rG?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:rG?5e3:3e3,compare:UCt,isPaused:()=>!1,cache:c1e,mutate:qCt,fallback:{}},QCt),HCt=(t,e)=>{const n=Ff(t,e);if(e){const{use:r,fallback:i}=t,{use:s,fallback:o}=e;r&&s&&(n.use=r.concat(s)),i&&o&&(n.fallback=Ff(i,o))}return n},ZCt=_.createContext({}),YCt="$inf$",u1e=Tk&&window.__SWR_DEVTOOLS_USE__,GCt=u1e?window.__SWR_DEVTOOLS_USE__:[],KCt=()=>{u1e&&(window.__SWR_DEVTOOLS_REACT__=ke)},JCt=t=>pl(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],e6t=()=>Ff(XCt,_.useContext(ZCt)),t6t=t=>(e,n,r)=>t(e,n&&((...s)=>{const[o]=xN(e),[,,,a]=kc.get(c1e);if(o.startsWith(YCt))return n(...s);const l=a[o];return hn(l)?n(...s):(delete a[o],l)}),r),n6t=GCt.concat(t6t),r6t=t=>function(...n){const r=e6t(),[i,s,o]=JCt(n),a=HCt(r,o);let l=t;const{use:c}=a,u=(c||[]).concat(n6t);for(let f=u.length;f--;)l=u[f](l);return l(i,s||a.fetcher||null,a)},i6t=(t,e,n)=>{const r=e[t]||(e[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};KCt();const sG=ke.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),JE={dedupe:!0},s6t=(t,e,n)=>{const{cache:r,compare:i,suspense:s,fallbackData:o,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:f,keepPreviousData:h}=n,[d,p,g,m]=kc.get(r),[v,y]=xN(t),b=_.useRef(!1),S=_.useRef(!1),k=_.useRef(v),E=_.useRef(e),T=_.useRef(n),C=()=>T.current,A=()=>C().isVisible()&&C().isOnline(),[R,j,L,z]=i1e(r,v),B=_.useRef({}).current,q=hn(o)?n.fallback[v]:o,Y=(xe,je)=>{for(const He in B){const nt=He;if(nt==="data"){if(!i(xe[nt],je[nt])&&(!hn(xe[nt])||!i(fe,je[nt])))return!1}else if(je[nt]!==xe[nt])return!1}return!0},J=_.useMemo(()=>{const xe=(()=>!v||!e?!1:hn(a)?C().isPaused()||s?!1:hn(l)?!0:l:a)(),je=be=>{const Re=Ff(be);return delete Re._k,xe?{isValidating:!0,isLoading:!0,...Re}:Re},He=R(),nt=z(),xt=je(He),Ze=He===nt?xt:je(nt);let Oe=xt;return[()=>{const be=je(R());return Y(be,Oe)?(Oe.data=be.data,Oe.isLoading=be.isLoading,Oe.isValidating=be.isValidating,Oe.error=be.error,Oe):(Oe=be,be)},()=>Ze]},[r,v]),I=LJ.useSyncExternalStore(_.useCallback(xe=>L(v,(je,He)=>{Y(He,je)||xe()}),[r,v]),J[0],J[1]),Q=!b.current,M=d[v]&&d[v].length>0,X=I.data,se=hn(X)?q:X,H=I.error,de=_.useRef(se),fe=h?hn(X)?de.current:X:se,ve=(()=>M&&!hn(H)?!1:Q&&!hn(a)?a:C().isPaused()?!1:s?hn(se)?!1:l:hn(se)||l)(),F=!!(v&&e&&Q&&ve),oe=hn(I.isValidating)?F:I.isValidating,le=hn(I.isLoading)?F:I.isLoading,pe=_.useCallback(async xe=>{const je=E.current;if(!v||!je||S.current||C().isPaused())return!1;let He,nt,xt=!0;const Ze=xe||{},Oe=!g[v]||!Ze.dedupe,be=()=>nG?!S.current&&v===k.current&&b.current:v===k.current,Re={isValidating:!1,isLoading:!1},Ke=()=>{j(Re)},ze=()=>{const we=g[v];we&&we[1]===nt&&delete g[v]},Ye={isValidating:!0};hn(R().data)&&(Ye.isLoading=!0);try{if(Oe&&(j(Ye),n.loadingTimeout&&hn(R().data)&&setTimeout(()=>{xt&&be()&&C().onLoadingSlow(v,n)},n.loadingTimeout),g[v]=[je(y),A9()]),[He,nt]=g[v],He=await He,Oe&&setTimeout(ze,n.dedupingInterval),!g[v]||g[v][1]!==nt)return Oe&&be()&&C().onDiscarded(v),!1;Re.error=As;const we=p[v];if(!hn(we)&&(nt<=we[0]||nt<=we[1]||we[1]===0))return Ke(),Oe&&be()&&C().onDiscarded(v),!1;const Ce=R().data;Re.data=i(Ce,He)?Ce:He,Oe&&be()&&C().onSuccess(He,v,n)}catch(we){ze();const Ce=C(),{shouldRetryOnError:ue}=Ce;Ce.isPaused()||(Re.error=we,Oe&&be()&&(Ce.onError(we,v,Ce),(ue===!0||pl(ue)&&ue(we))&&(!C().revalidateOnFocus||!C().revalidateOnReconnect||A())&&Ce.onErrorRetry(we,v,Ce,Se=>{const Ae=d[v];Ae&&Ae[0]&&Ae[0](f1.ERROR_REVALIDATE_EVENT,Se)},{retryCount:(Ze.retryCount||0)+1,dedupe:!0})))}return xt=!1,Ke(),!0},[v,r]),De=_.useCallback((...xe)=>l1e(r,k.current,...xe),[]);if(GE(()=>{E.current=e,T.current=n,hn(X)||(de.current=X)}),GE(()=>{if(!v)return;const xe=pe.bind(As,JE);let je=0;const nt=i6t(v,d,(xt,Ze={})=>{if(xt==f1.FOCUS_EVENT){const Oe=Date.now();C().revalidateOnFocus&&Oe>je&&A()&&(je=Oe+C().focusThrottleInterval,xe())}else if(xt==f1.RECONNECT_EVENT)C().revalidateOnReconnect&&A()&&xe();else{if(xt==f1.MUTATE_EVENT)return pe();if(xt==f1.ERROR_REVALIDATE_EVENT)return pe(Ze)}});return S.current=!1,k.current=v,b.current=!0,j({_k:y}),ve&&(hn(se)||ny?xe():BCt(xe)),()=>{S.current=!0,nt()}},[v]),GE(()=>{let xe;function je(){const nt=pl(c)?c(R().data):c;nt&&xe!==-1&&(xe=setTimeout(He,nt))}function He(){!R().error&&(u||C().isVisible())&&(f||C().isOnline())?pe(JE).then(je):je()}return je(),()=>{xe&&(clearTimeout(xe),xe=-1)}},[c,u,f,v]),_.useDebugValue(fe),s&&hn(se)&&v){if(!nG&&ny)throw new Error("Fallback data is required when using suspense in SSR.");E.current=e,T.current=n,S.current=!1;const xe=m[v];if(!hn(xe)){const je=De(xe);sG(je)}if(hn(H)){const je=pe(JE);hn(fe)||(je.status="fulfilled",je.value=!0),sG(je)}else throw H}return{mutate:De,get data(){return B.data=!0,fe},get error(){return B.error=!0,H},get isValidating(){return B.isValidating=!0,oe},get isLoading(){return B.isLoading=!0,le}}},oG=r6t(s6t);class o6t extends Error{constructor({message:e,status:n,data:r}){super(e),this.name="TwitterApiError",this.status=n,this.data=r}}const a6t=oG.default||oG,l6t="https://react-tweet.vercel.app";async function c6t([t,e]){const n=await fetch(t,e),r=await n.json();if(n.ok)return r.data||null;throw new o6t({message:`Failed to fetch tweet at "${t}" with "${n.status}".`,data:r,status:n.status})}const u6t=(t,e,n)=>{const{isLoading:r,data:i,error:s}=a6t(()=>e||t?[e||t&&`${l6t}/api/tweet/${t}`,n]:null,c6t,{revalidateIfStale:!1,revalidateOnFocus:!1,shouldRetryOnError:!1});return{isLoading:!!(r||i===void 0&&!s),data:i,error:s}},f6t=({id:t,apiUrl:e,fallback:n=x.jsx(ACt,{}),components:r,fetchOptions:i,onError:s})=>{const{data:o,error:a,isLoading:l}=u6t(t,e,i);if(l)return n;if(a||!o){const c=(r==null?void 0:r.TweetNotFound)||_Ct;return x.jsx(c,{error:s?s(a):a})}return x.jsx(xCt,{tweet:o,components:r})};var h6t=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const d6t=ia(h6t);var R9={exports:{}},f1e;/**
|
677
677
|
* @link https://github.com/gajus/sister for the canonical source repository
|
678
678
|
* @license https://github.com/gajus/sister/blob/master/LICENSE BSD 3-Clause
|
679
|
-
*/f1e=function(){var t={},e={};return t.on=function(n,r){var i={name:n,handler:r};return e[n]=e[n]||[],e[n].unshift(i),i},t.off=function(n){var r=e[n.name].indexOf(n);r!==-1&&e[n.name].splice(r,1)},t.trigger=function(n,r){var i=e[n],s;if(i)for(s=i.length;s--;)i[s].handler(r)},t};var p6t=f1e,$9={exports:{}},m6t=function(e,n,r){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},s.type=n.type||"text/javascript",s.charset=n.charset||"utf8",s.async="async"in n?!!n.async:!0,s.src=e,n.attrs&&g6t(s,n.attrs),n.text&&(s.text=""+n.text);var o="onload"in s?aG:v6t;o(s,r),s.onload||aG(s,r),i.appendChild(s)};function g6t(t,e){for(var n in e)t.setAttribute(n,e[n])}function aG(t,e){t.onload=function(){this.onerror=this.onload=null,e(null,t)},t.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),t)}}function v6t(t,e){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,t))}}(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=m6t,r=i(n);function i(s){return s&&s.__esModule?s:{default:s}}e.default=function(s){var o=new Promise(function(a){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function){a(window.YT);return}else{var l=window.location.protocol==="http:"?"http:":"https:";(0,r.default)(l+"//www.youtube.com/iframe_api",function(u){u&&s.trigger("error",u)})}var c=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){c&&c(),a(window.YT)}});return o},t.exports=e.default})($9,$9.exports);var O6t=$9.exports,M9={exports:{}},I9={exports:{}},D9={exports:{}},ry=1e3,iy=ry*60,sy=iy*60,oy=sy*24,y6t=oy*365.25,b6t=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return x6t(t);if(n==="number"&&isNaN(t)===!1)return e.long?S6t(t):w6t(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function x6t(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*y6t;case"days":case"day":case"d":return n*oy;case"hours":case"hour":case"hrs":case"hr":case"h":return n*sy;case"minutes":case"minute":case"mins":case"min":case"m":return n*iy;case"seconds":case"second":case"secs":case"sec":case"s":return n*ry;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function w6t(t){return t>=oy?Math.round(t/oy)+"d":t>=sy?Math.round(t/sy)+"h":t>=iy?Math.round(t/iy)+"m":t>=ry?Math.round(t/ry)+"s":t+"ms"}function S6t(t){return pS(t,oy,"day")||pS(t,sy,"hour")||pS(t,iy,"minute")||pS(t,ry,"second")||t+" ms"}function pS(t,e,n){if(!(t<e))return t<e*1.5?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}(function(t,e){e=t.exports=i.debug=i.default=i,e.coerce=l,e.disable=o,e.enable=s,e.enabled=a,e.humanize=b6t,e.names=[],e.skips=[],e.formatters={};var n;function r(c){var u=0,f;for(f in c)u=(u<<5)-u+c.charCodeAt(f),u|=0;return e.colors[Math.abs(u)%e.colors.length]}function i(c){function u(){if(u.enabled){var f=u,h=+new Date,d=h-(n||h);f.diff=d,f.prev=n,f.curr=h,n=h;for(var p=new Array(arguments.length),g=0;g<p.length;g++)p[g]=arguments[g];p[0]=e.coerce(p[0]),typeof p[0]!="string"&&p.unshift("%O");var m=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,function(y,b){if(y==="%%")return y;m++;var S=e.formatters[b];if(typeof S=="function"){var k=p[m];y=S.call(f,k),p.splice(m,1),m--}return y}),e.formatArgs.call(f,p);var v=u.log||e.log||console.log.bind(console);v.apply(f,p)}}return u.namespace=c,u.enabled=e.enabled(c),u.useColors=e.useColors(),u.color=r(c),typeof e.init=="function"&&e.init(u),u}function s(c){e.save(c),e.names=[],e.skips=[];for(var u=(typeof c=="string"?c:"").split(/[\s,]+/),f=u.length,h=0;h<f;h++)u[h]&&(c=u[h].replace(/\*/g,".*?"),c[0]==="-"?e.skips.push(new RegExp("^"+c.substr(1)+"$")):e.names.push(new RegExp("^"+c+"$")))}function o(){e.enable("")}function a(c){var u,f;for(u=0,f=e.skips.length;u<f;u++)if(e.skips[u].test(c))return!1;for(u=0,f=e.names.length;u<f;u++)if(e.names[u].test(c))return!0;return!1}function l(c){return c instanceof Error?c.stack||c.message:c}})(D9,D9.exports);var _6t=D9.exports;(function(t,e){e=t.exports=_6t,e.log=i,e.formatArgs=r,e.save=s,e.load=o,e.useColors=n,e.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:a(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function n(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}e.formatters.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}};function r(l){var c=this.useColors;if(l[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+l[0]+(c?"%c ":" ")+"+"+e.humanize(this.diff),!!c){var u="color: "+this.color;l.splice(1,0,u,"color: inherit");var f=0,h=0;l[0].replace(/%[a-zA-Z%]/g,function(d){d!=="%%"&&(f++,d==="%c"&&(h=f))}),l.splice(h,0,u)}}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(l){try{l==null?e.storage.removeItem("debug"):e.storage.debug=l}catch{}}function o(){var l;try{l=e.storage.debug}catch{}return!l&&typeof process<"u"&&"env"in process&&(l={}.DEBUG),l}e.enable(o());function a(){try{return window.localStorage}catch{}}})(I9,I9.exports);var k6t=I9.exports,L9={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe"],t.exports=e.default})(L9,L9.exports);var C6t=L9.exports,N9={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],t.exports=e.default})(N9,N9.exports);var E6t=N9.exports,Q9={exports:{}},j9={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},t.exports=e.default})(j9,j9.exports);var T6t=j9.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=T6t,r=i(n);function i(s){return s&&s.__esModule?s:{default:s}}e.default={pauseVideo:{acceptableStates:[r.default.ENDED,r.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[r.default.ENDED,r.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[r.default.ENDED,r.default.PLAYING,r.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},t.exports=e.default})(Q9,Q9.exports);var P6t=Q9.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=k6t,r=u(n),i=C6t,s=u(i),o=E6t,a=u(o),l=P6t,c=u(l);function u(d){return d&&d.__esModule?d:{default:d}}var f=(0,r.default)("youtube-player"),h={};h.proxyEvents=function(d){var p={},g=function(T){var C="on"+T.slice(0,1).toUpperCase()+T.slice(1);p[C]=function(A){f('event "%s"',C,A),d.trigger(T,A)}},m=!0,v=!1,y=void 0;try{for(var b=a.default[Symbol.iterator](),S;!(m=(S=b.next()).done);m=!0){var k=S.value;g(k)}}catch(E){v=!0,y=E}finally{try{!m&&b.return&&b.return()}finally{if(v)throw y}}return p},h.promisifyPlayer=function(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g={},m=function(C){p&&c.default[C]?g[C]=function(){for(var A=arguments.length,R=Array(A),j=0;j<A;j++)R[j]=arguments[j];return d.then(function(L){var z=c.default[C],B=L.getPlayerState(),q=L[C].apply(L,R);return z.stateChangeRequired||Array.isArray(z.acceptableStates)&&z.acceptableStates.indexOf(B)===-1?new Promise(function(Y){var J=function I(){var Q=L.getPlayerState(),M=void 0;typeof z.timeout=="number"&&(M=setTimeout(function(){L.removeEventListener("onStateChange",I),Y()},z.timeout)),Array.isArray(z.acceptableStates)&&z.acceptableStates.indexOf(Q)!==-1&&(L.removeEventListener("onStateChange",I),clearTimeout(M),Y())};L.addEventListener("onStateChange",J)}).then(function(){return q}):q})}:g[C]=function(){for(var A=arguments.length,R=Array(A),j=0;j<A;j++)R[j]=arguments[j];return d.then(function(L){return L[C].apply(L,R)})}},v=!0,y=!1,b=void 0;try{for(var S=s.default[Symbol.iterator](),k;!(v=(k=S.next()).done);v=!0){var E=k.value;m(E)}}catch(T){y=!0,b=T}finally{try{!v&&S.return&&S.return()}finally{if(y)throw b}}return g},e.default=h,t.exports=e.default})(M9,M9.exports);var A6t=M9.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},r=p6t,i=c(r),s=O6t,o=c(s),a=A6t,l=c(a);function c(f){return f&&f.__esModule?f:{default:f}}var u=void 0;e.default=function(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=(0,i.default)();if(u||(u=(0,o.default)(p)),h.events)throw new Error("Event handlers cannot be overwritten.");if(typeof f=="string"&&!document.getElementById(f))throw new Error('Element "'+f+'" does not exist.');h.events=l.default.proxyEvents(p);var g=new Promise(function(v){if((typeof f>"u"?"undefined":n(f))==="object"&&f.playVideo instanceof Function){var y=f;v(y)}else u.then(function(b){var S=new b.Player(f,h);return p.on("ready",function(){v(S)}),null})}),m=l.default.promisifyPlayer(g,d);return m.on=p.on,m.off=p.off,m},t.exports=e.default})(R9,R9.exports);var R6t=R9.exports;const $6t=ia(R6t);var M6t=Object.defineProperty,I6t=Object.defineProperties,D6t=Object.getOwnPropertyDescriptors,lG=Object.getOwnPropertySymbols,L6t=Object.prototype.hasOwnProperty,N6t=Object.prototype.propertyIsEnumerable,cG=(t,e,n)=>e in t?M6t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B9=(t,e)=>{for(var n in e||(e={}))L6t.call(e,n)&&cG(t,n,e[n]);if(lG)for(var n of lG(e))N6t.call(e,n)&&cG(t,n,e[n]);return t},z9=(t,e)=>I6t(t,D6t(e)),Q6t=(t,e,n)=>new Promise((r,i)=>{var s=l=>{try{a(n.next(l))}catch(c){i(c)}},o=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,o);a((n=n.apply(t,e)).next())});function j6t(t,e){var n,r;if(t.videoId!==e.videoId)return!0;const i=((n=t.opts)==null?void 0:n.playerVars)||{},s=((r=e.opts)==null?void 0:r.playerVars)||{};return i.start!==s.start||i.end!==s.end}function uG(t={}){return z9(B9({},t),{height:0,width:0,playerVars:z9(B9({},t.playerVars),{autoplay:0,start:0,end:0})})}function B6t(t,e){return t.videoId!==e.videoId||!d6t(uG(t.opts),uG(e.opts))}function z6t(t,e){var n,r,i,s;return t.id!==e.id||t.className!==e.className||((n=t.opts)==null?void 0:n.width)!==((r=e.opts)==null?void 0:r.width)||((i=t.opts)==null?void 0:i.height)!==((s=e.opts)==null?void 0:s.height)||t.iframeClassName!==e.iframeClassName||t.title!==e.title}var F6t={videoId:"",id:"",className:"",iframeClassName:"",style:{},title:"",loading:void 0,opts:{},onReady:()=>{},onError:()=>{},onPlay:()=>{},onPause:()=>{},onEnd:()=>{},onStateChange:()=>{},onPlaybackRateChange:()=>{},onPlaybackQualityChange:()=>{}},W6t={videoId:Be.string,id:Be.string,className:Be.string,iframeClassName:Be.string,style:Be.object,title:Be.string,loading:Be.oneOf(["lazy","eager"]),opts:Be.objectOf(Be.any),onReady:Be.func,onError:Be.func,onPlay:Be.func,onPause:Be.func,onEnd:Be.func,onStateChange:Be.func,onPlaybackRateChange:Be.func,onPlaybackQualityChange:Be.func},x2=class extends ke.Component{constructor(t){super(t),this.destroyPlayerPromise=void 0,this.onPlayerReady=e=>{var n,r;return(r=(n=this.props).onReady)==null?void 0:r.call(n,e)},this.onPlayerError=e=>{var n,r;return(r=(n=this.props).onError)==null?void 0:r.call(n,e)},this.onPlayerStateChange=e=>{var n,r,i,s,o,a,l,c;switch((r=(n=this.props).onStateChange)==null||r.call(n,e),e.data){case x2.PlayerState.ENDED:(s=(i=this.props).onEnd)==null||s.call(i,e);break;case x2.PlayerState.PLAYING:(a=(o=this.props).onPlay)==null||a.call(o,e);break;case x2.PlayerState.PAUSED:(c=(l=this.props).onPause)==null||c.call(l,e);break}},this.onPlayerPlaybackRateChange=e=>{var n,r;return(r=(n=this.props).onPlaybackRateChange)==null?void 0:r.call(n,e)},this.onPlayerPlaybackQualityChange=e=>{var n,r;return(r=(n=this.props).onPlaybackQualityChange)==null?void 0:r.call(n,e)},this.destroyPlayer=()=>this.internalPlayer?(this.destroyPlayerPromise=this.internalPlayer.destroy().then(()=>this.destroyPlayerPromise=void 0),this.destroyPlayerPromise):Promise.resolve(),this.createPlayer=()=>{if(typeof document>"u")return;if(this.destroyPlayerPromise){this.destroyPlayerPromise.then(this.createPlayer);return}const e=z9(B9({},this.props.opts),{videoId:this.props.videoId});this.internalPlayer=$6t(this.container,e),this.internalPlayer.on("ready",this.onPlayerReady),this.internalPlayer.on("error",this.onPlayerError),this.internalPlayer.on("stateChange",this.onPlayerStateChange),this.internalPlayer.on("playbackRateChange",this.onPlayerPlaybackRateChange),this.internalPlayer.on("playbackQualityChange",this.onPlayerPlaybackQualityChange),(this.props.title||this.props.loading)&&this.internalPlayer.getIframe().then(n=>{this.props.title&&n.setAttribute("title",this.props.title),this.props.loading&&n.setAttribute("loading",this.props.loading)})},this.resetPlayer=()=>this.destroyPlayer().then(this.createPlayer),this.updatePlayer=()=>{var e;(e=this.internalPlayer)==null||e.getIframe().then(n=>{this.props.id?n.setAttribute("id",this.props.id):n.removeAttribute("id"),this.props.iframeClassName?n.setAttribute("class",this.props.iframeClassName):n.removeAttribute("class"),this.props.opts&&this.props.opts.width?n.setAttribute("width",this.props.opts.width.toString()):n.removeAttribute("width"),this.props.opts&&this.props.opts.height?n.setAttribute("height",this.props.opts.height.toString()):n.removeAttribute("height"),this.props.title?n.setAttribute("title",this.props.title):n.setAttribute("title","YouTube video player"),this.props.loading?n.setAttribute("loading",this.props.loading):n.removeAttribute("loading")})},this.getInternalPlayer=()=>this.internalPlayer,this.updateVideo=()=>{var e,n,r,i;if(typeof this.props.videoId>"u"||this.props.videoId===null){(e=this.internalPlayer)==null||e.stopVideo();return}let s=!1;const o={videoId:this.props.videoId};if((n=this.props.opts)!=null&&n.playerVars&&(s=this.props.opts.playerVars.autoplay===1,"start"in this.props.opts.playerVars&&(o.startSeconds=this.props.opts.playerVars.start),"end"in this.props.opts.playerVars&&(o.endSeconds=this.props.opts.playerVars.end)),s){(r=this.internalPlayer)==null||r.loadVideoById(o);return}(i=this.internalPlayer)==null||i.cueVideoById(o)},this.refContainer=e=>{this.container=e},this.container=null,this.internalPlayer=null}componentDidMount(){this.createPlayer()}componentDidUpdate(t){return Q6t(this,null,function*(){z6t(t,this.props)&&this.updatePlayer(),B6t(t,this.props)&&(yield this.resetPlayer()),j6t(t,this.props)&&this.updateVideo()})}componentWillUnmount(){this.destroyPlayer()}render(){return ke.createElement("div",{className:this.props.className,style:this.props.style},ke.createElement("div",{id:this.props.id,className:this.props.iframeClassName,ref:this.refContainer}))}},Pk=x2;Pk.propTypes=W6t;Pk.defaultProps=F6t;Pk.PlayerState={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5};var V6t=Pk;function U6t({sectionId:t}){const e=te(n=>n.x[t].social);if(rL(e))return x.jsx(X6t,{sectionId:t,url:e});if(iL(e))return x.jsx(H6t,{sectionId:t,url:e})}const q6t=ke.memo(U6t);function X6t({sectionId:t,url:e}){const n=w3t(e,{fuzzy:!1}),r=Kht(t),s=te(f=>f.x[t].resizeEvent)==="start"?"pointer-events-none":"",[o,a]=_.useState(!1),l=`https://img.youtube.com/vi/${n}/0.jpg`,c=()=>{a(!0)},u={...r,playerVars:{autoplay:1}};return x.jsx("div",{className:`section-w-full section-row-left-bottom flex ${s}`,children:o?x.jsx(V6t,{videoId:n,opts:u}):x.jsxs("div",{className:"relative w-full cursor-pointer",onClick:c,children:[x.jsx("img",{src:l,alt:"YouTube video thumbnail",className:"h-full w-full object-cover"}),x.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:x.jsx(Z6t,{})})]})})}function H6t({sectionId:t,url:e}){const n=ae.last(e.split("/")).split("?")[0],[r]=Ot.darkMode.hook();return Jht(t),n&&x.jsx("div",{"data-theme":r?"dark":"light",className:"section-key-value section-row-main flex items-start justify-center overflow-auto [&>div]:contents [&_.twitter-tweet]:!m-0 [&_.twitter-tweet]:h-full [&_.twitter-tweet]:w-full [&_.twitter-tweet]:overflow-hidden [&_.twitter-tweet]:rounded-xl [&_.twitter-tweet]:border [&_.twitter-tweet]:border-none [&_.twitter-tweet]:pt-2 [&_div:has(.twitter-tweet)]:contents",children:x.jsx(f6t,{id:n})})}function Z6t(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"external-icon h-20 w-20",viewBox:"0 0 28.57 20",focusable:"false",children:x.jsx("svg",{viewBox:"0 0 28.57 20",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:x.jsxs("g",{children:[x.jsx("path",{d:"M27.9727 3.12324C27.6435 1.89323 26.6768 0.926623 25.4468 0.597366C23.2197 2.24288e-07 14.285 0 14.285 0C14.285 0 5.35042 2.24288e-07 3.12323 0.597366C1.89323 0.926623 0.926623 1.89323 0.597366 3.12324C2.24288e-07 5.35042 0 10 0 10C0 10 2.24288e-07 14.6496 0.597366 16.8768C0.926623 18.1068 1.89323 19.0734 3.12323 19.4026C5.35042 20 14.285 20 14.285 20C14.285 20 23.2197 20 25.4468 19.4026C26.6768 19.0734 27.6435 18.1068 27.9727 16.8768C28.5701 14.6496 28.5701 10 28.5701 10C28.5701 10 28.5677 5.35042 27.9727 3.12324Z",fill:"#FF0000"}),x.jsx("path",{d:"M11.4253 14.2854L18.8477 10.0004L11.4253 5.71533V14.2854Z",fill:"white"})]})})})}function Y6t({width:t,height:e,setHasScrollbar:n}){const r=_.useRef(null),i=Vie();return _.useEffect(()=>{const s=new jie.Terminal({cursorBlink:!1,theme:Wie,disableStdin:!0});s.loadAddon(i),s.open(r.current);const o=new WebSocket(`${Yp.WEBSOCKET}${Z.ROUTE_IN_MEMORY_FN_STDOUT_WEBSOCKET}`),a=new zie.AttachAddon(o);s.loadAddon(a);const l=Uie(s,n);return()=>{qie(o,s),l()}},[]),_.useEffect(()=>{i.fit()},[t,e]),r}function G6t({sectionId:t}){const{size:{width:e,height:n},isReadOnlyTerminal:r}=te(o=>({size:o.x[t].size,isReadOnlyTerminal:o.x[t].isReadOnlyTerminal}),ae.isEqual),[i,s]=_.useState(!1);return r?x.jsx(J6t,{width:e,height:n,hasScrollbar:i,setHasScrollbar:s}):x.jsx(e7t,{sectionId:t,width:e,height:n,hasScrollbar:i,setHasScrollbar:s})}const K6t=ke.memo(G6t);function J6t({width:t,height:e,hasScrollbar:n,setHasScrollbar:r}){const i=Y6t({width:t,height:e,setHasScrollbar:r});return x.jsx(h1e,{width:t,height:e,hasScrollbar:n,terminalRef:i})}function e7t({sectionId:t,width:e,height:n,hasScrollbar:r,setHasScrollbar:i}){const s=iQe({sectionId:t,width:e,height:n,setHasScrollbar:i});return x.jsx(h1e,{width:e,height:n,hasScrollbar:r,terminalRef:s})}function h1e({width:t,height:e,hasScrollbar:n,terminalRef:r}){return x.jsx("div",{ref:r,className:`${n?"nowheel":""} nodrag section-row-search-gutter section-key-value`,style:{width:`${t-24}px`,height:`${e-32}px`}})}function t7t({sectionId:t,sectionTypeName:e,isActiveSection:n,isInOtherProjectConfigs:r,viewingEditingMode:i,positionAndSizeLocked:s}){const{isMinimized:o,isYouTube:a}=te(f=>({isMinimized:f.x[t].isMinimized,isYouTube:Vft(t,f)}),ae.isEqual),l=ooe(e),c=hht(e),u=o$e(i);return x.jsxs(tdt,{sectionId:t,bgColor:c,isYouTube:a,isActiveSection:n,positionAndSizeLocked:s,children:[x.jsx(Tdt,{sectionId:t,isActiveSection:n,sectionTypeName:e,isInOtherProjectConfigs:r,viewingEditingMode:i,isUserView:u,isRoot:l}),l&&x.jsx(g0e,{sectionId:t,isRoot:l}),!o&&x.jsx(n7t,{sectionId:t,sectionTypeName:e,bgColor:c,isUserView:u})]})}function n7t({sectionId:t,sectionTypeName:e,bgColor:n,isUserView:r}){switch(e){case Z.SECTION:return x.jsx(r3t,{sectionId:t,bgColor:n,isUserView:r});case Z.IMAGE:return x.jsx(H5t,{sectionId:t});case Z.CHART:return x.jsx(q1t,{sectionId:t});case Z.DRAW:return x.jsx(H4t,{sectionId:t});case Z.SOCIAL:return x.jsx(q6t,{sectionId:t});case Z.TEXT_BLOCK:return x.jsx(u4t,{sectionId:t});case Z.GLOBAL_VARIABLES:return x.jsx(F5t,{sectionId:t,bgColor:n,isUserView:r});case Z.CODE:return x.jsx(nrt,{sectionId:t});case Z.PARAM_SWEEP:return x.jsx(u3t,{sectionId:t});case Z.TERMINAL:return x.jsx(K6t,{sectionId:t});case Z.GLOBAL_PARAM_SWEEP:return x.jsx(t5t,{sectionId:t});case Z.IFRAME:return x.jsx(V5t,{sectionId:t});case Z.CHAT:return x.jsx(h4t,{sectionId:t});default:return null}}function r7t({sectionId:t,viewingEditingMode:e}){const{sectionTypeName:n,jsonSourceMissing:r,isInOtherProjectConfigs:i,positionAndSizeLocked:s}=te(f=>({sectionTypeName:fn(t,f),jsonSourceMissing:f.x[t].jsonSourceMissing,isInOtherProjectConfigs:f.x[t].isInOtherProjectConfigs,positionAndSizeLocked:f.x[t].positionAndSizeLocked}),ae.isEqual),o=sr(f=>f.ids.includes(t)),a=Jde(t,"selfOnly"),l=n===Z.GLOBAL_VARIABLES,c=s?"":o?"shadow-2xl dark:shadow-setta-925":"shadow-md dark:shadow-setta-900/30 [&:active:not(:has(button:active,:active.setta-prevent-section-active-css))]:shadow-2xl dark:[&:active:not(:has(button:active,:active.setta-prevent-section-active-css))]:shadow-[0_35px_60px_-15px_rgba(0,0,0,0.7)]",u=r0e({isActiveSection:o,isGlobalVariables:l,isInOtherProjectConfigs:i,jsonSourceMissing:r});return x.jsx("section",{className:`group/card-section transition-radius ${s?"rounded-sm border-setta-400/90 dark:border-setta-800":"rounded-xl border-white dark:border-setta-700"} border bg-white dark:bg-setta-925 ${c} dndline w-min outline outline-4 ${u} `,onClick:i0e(t,o),ref:a,children:x.jsx(t7t,{sectionId:t,sectionTypeName:n,isActiveSection:o,isInOtherProjectConfigs:i,viewingEditingMode:e,positionAndSizeLocked:s})})}const i7t=ke.memo(r7t,(t,e)=>t.viewingEditingMode===e.viewingEditingMode);function s7t({sectionId:t,isTopLevel:e,dragListeners:n}){const{visibility:r,viewingEditingMode:i,isGroup:s}=te(o=>{const{visibility:a,viewingEditingMode:l}=Kne(t,o);return{visibility:a,viewingEditingMode:l,isGroup:fn(t,o)===Z.GROUP}});return Gne(r,i)?x.jsxs(Cht,{isGroup:s,sectionId:t,dragListeners:n,isTopLevel:e,visibility:r,viewingEditingMode:i,children:[!s&&x.jsx(i7t,{sectionId:t,viewingEditingMode:i}),x.jsx(jht,{sectionId:t,isGroup:s})]}):null}const d1e=ke.memo(s7t,(t,e)=>ae.isEqual(t.dragListeners,e.dragListeners)),Lp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},o7t=({id:t,xPos:e,yPos:n,selected:r,style:i,isDraggable:s,isSelectable:o,isFocusable:a,resizeObserver:l,zIndex:c,visibility:u})=>{const f=_.useRef(null),h=te(m=>m.x[t].positionAndSizeLocked),d=s&&!h,p=o||d,g=m=>{PEe(m)||Mr.getState().isEnabled||m.target.classList.contains(JR)||d&&r&&Object.prototype.hasOwnProperty.call(Lp,m.key)&&Xde({x:Lp[m.key].x,y:Lp[m.key].y,isShiftPressed:m.shiftKey})};return _.useEffect(()=>{if(f.current){const m=f.current;return l==null||l.observe(m),()=>l==null?void 0:l.unobserve(m)}},[]),qde({nodeRef:f,disabled:!d,nodeId:t,isSelectable:o}),x.jsx("div",{className:qd(["react-flow__node",{[js]:d},{selectable:o}]),ref:f,style:{transform:`translate(${e}px,${n}px)`,pointerEvents:p?"all":"none",visibility:u,zIndex:c,...i},"data-id":t,"data-testid":`rf__node-${t}`,onKeyDown:a?g:void 0,tabIndex:a?0:void 0,role:a?"button":void 0,children:x.jsx(d1e,{sectionId:t,isTopLevel:!0})})},a7t=_.memo(o7t);function l7t({x:t,y:e,width:n,height:r}){const i=qe(l=>`translate(${l.transform[0]}px,${l.transform[1]}px) scale(${l.transform[2]})`),s=_.useRef(null);_.useEffect(()=>{var l;(l=s.current)==null||l.focus({preventScroll:!0})},[]),qde({nodeRef:s});const o=l=>{const c=sr.getState().ids,u=Xm().filter(f=>c.includes(f.id)).map(f=>f.id);yut(l,u)},a=l=>{Object.prototype.hasOwnProperty.call(Lp,l.key)&&Xde({x:Lp[l.key].x,y:Lp[l.key].y,isShiftPressed:l.shiftKey})};return x.jsx("div",{className:qd(["react-flow__nodesselection","react-flow__container",js]),style:{transform:i},children:x.jsx("div",{tabIndex:-1,ref:s,className:"react-flow__nodesselection-rect",onContextMenu:o,onKeyDown:a,style:{width:n,height:r,top:e,left:t}})})}function c7t(){const t=qe(e=>e.nodesSelectionDims,ae.isEqual);return t&&x.jsx(u7t,{...t})}const u7t=ke.memo(l7t),f7t=ke.memo(c7t),h7t=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function d7t(){const{userSelectionActive:t,userSelectionRect:e}=qe(h7t,Da);return t&&e?x.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}const p1e={position:"absolute",width:"100%",height:"100%",top:0,left:0};var j1=(t=>(t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal",t))(j1||{}),m1e=(t=>(t.Partial="partial",t.Full="full",t))(m1e||{});const fG=(t,e)=>n=>{n.target===e.current&&(t==null||t(n))},p7t=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,dragging:t.paneDragging}),g1e=_.memo(({isSelecting:t,panOnDrag:e,children:n})=>{const r=_.useRef(null),i=_.useRef(0),s=_.useRef(),{userSelectionActive:o,elementsSelectable:a}=qe(p7t,Da),l=()=>{qe.setState({userSelectionActive:!1,userSelectionRect:null}),i.current=0},c=m=>{if(qt.getState().mouseDownDrawArea){qt.setState({mouseDownDrawArea:!1});return}P_(),qt.setState({lastPaneClickLocation:qf({x:m.clientX,y:m.clientY})}),qe.setState({nodesSelectionDims:null})},u=m=>{if(Array.isArray(e)&&(e!=null&&e.includes(2))){m.preventDefault();return}Out(m)},f=m=>{const{domNode:v}=qe.getState();if(s.current=v==null?void 0:v.getBoundingClientRect(),!a||!t||m.button!==0||m.target!==r.current||!s.current)return;const{x:y,y:b}=o_(m,s.current);P_(),qe.setState({userSelectionRect:{width:0,height:0,startX:y,startY:b,x:y,y:b}})},h=m=>{const{userSelectionRect:v,transform:y}=qe.getState();if(!t||!s.current||!v)return;qe.setState({userSelectionActive:!0,nodesSelectionDims:null});const b=o_(m,s.current),S=v.startX??0,k=v.startY??0,E={...v,x:b.x<S?b.x:S,y:b.y<k?b.y:k,width:Math.abs(b.x-S),height:Math.abs(b.y-k)},T=$Ee(E,y,Ft.getState().gui.selectionMode===m1e.Partial,!0);i.current!==T.length&&(i.current=T.length,Vd(T)),qe.setState({userSelectionRect:E})},d=m=>{if(m.button!==0)return;const{userSelectionRect:v}=qe.getState();!o&&v&&m.target===r.current&&c(m),qe.getState().setNodesSelection(i.current,!0),l()},p=m=>{o&&qe.getState().setNodesSelection(i.current),l()},g=a&&(t||o);return x.jsxs("div",{className:"react-flow__pane",onClick:g?void 0:fG(c,r),onContextMenu:fG(u,r),onMouseDown:g?f:void 0,onMouseMove:g?h:void 0,onMouseUp:g?d:void 0,onMouseLeave:g?p:void 0,ref:r,style:p1e,children:[n,x.jsx(d7t,{})]})});g1e.displayName="Pane";const hG=t=>({x:t.x,y:t.y,zoom:t.k}),h1=(t,e)=>t.target.closest(`.${e}`),m7t=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),v1e=t=>{const e=t.ctrlKey&&Hh()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e},g7t=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler,userSelectionActive:t.userSelectionActive}),v7t=({zoomOnScroll:t=!0,zoomOnPinch:e=!0,panOnScroll:n=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=j1.Free,zoomOnDoubleClick:s=!0,elementsSelectable:o,panOnDrag:a=!0,panActivationKeyPressed:l,zoomActivationKeyPressed:c,translateExtent:u=Mee,preventScrolling:f=!0,children:h,wrapperDimensions:d})=>{const p=_.useRef(!1),g=_.useRef(!1),m=_.useRef(null),v=_.useRef({x:0,y:0,zoom:0}),{d3Zoom:y,d3Selection:b,d3ZoomHandler:S,userSelectionActive:k}=qe(g7t,Da),E=_.useRef(0),T=_.useRef(!1),C=_.useRef();return O7t(m,u),_.useEffect(()=>{b&&y&&(n&&!c&&!k?b.on("wheel.zoom",A=>{if(h1(A,Y1)&&!c&&!(A.ctrlKey&&e&&Hh())&&!(n&&T.current))return!1;A.preventDefault(),A.stopImmediatePropagation();const R=b.property("__zoom").k||1,j=Hh();if(A.ctrlKey&&e&&j){const q=Oa(A),Y=v1e(A),J=R*Math.pow(2,Y);y.scaleTo(b,J,q,A);return}const L=A.deltaMode===1?20:1;let z=i===j1.Vertical?0:A.deltaX*L,B=i===j1.Horizontal?0:A.deltaY*L;!j&&A.shiftKey&&i!==j1.Vertical&&(z=A.deltaY*L,B=0),y.translateBy(b,-(z/R)*r,-(B/R)*r,{internal:!0}),hG(b.property("__zoom")),clearTimeout(C.current),T.current||(qt.setState({isPanScrolling:!0}),T.current=!0),T.current&&(C.current=setTimeout(()=>{T.current=!1,qt.setState({isPanScrolling:!1})},150))},{passive:!1}):typeof S<"u"&&b.on("wheel.zoom",function(A,R){if(!f||h1(A,Y1)&&!c&&!(A.ctrlKey&&e&&Hh()))return null;A.preventDefault(),S.call(this,A,R)},{passive:!1}))},[k,n,i,b,y,S,c,e,f]),_.useEffect(()=>{y&&y.on("start",A=>{var j,L;if(!A.sourceEvent||A.sourceEvent.internal)return null;E.current=(j=A.sourceEvent)==null?void 0:j.button;const R=hG(A.transform);p.current=!0,v.current=R,((L=A.sourceEvent)==null?void 0:L.type)==="mousedown"&&qe.setState({paneDragging:!0}),_m()})},[y]),_.useEffect(()=>{y&&(k&&!p.current?y.on("zoom",null):k||y.on("zoom",A=>{qe.setState({transform:[A.transform.x,A.transform.y,A.transform.k]}),g.current=!!m7t(a,E.current??0)}))},[k,y,a]),_.useEffect(()=>{y&&y.on("end",A=>{if(!A.sourceEvent||A.sourceEvent.internal)return null;p.current=!1,qe.setState({paneDragging:!1}),g.current=!1})},[y,n,a]),_.useEffect(()=>{y&&y.filter(A=>{const R=c||t,j=e&&A.ctrlKey;if((a===!0||Array.isArray(a)&&a.includes(1))&&A.button===1&&A.type==="mousedown"&&h1(A,"react-flow__node"))return!0;if(!a&&!R&&!n&&!s&&!e||k||!s&&A.type==="dblclick"||h1(A,Y1)&&A.type==="wheel"&&!c&&!(A.ctrlKey&&e&&Hh())||h1(A,js)&&(A.type!=="wheel"||n&&A.type==="wheel"&&!c)||!e&&A.ctrlKey&&A.type==="wheel"||!R&&!n&&!j&&A.type==="wheel"||!a&&(A.type==="mousedown"||A.type==="touchstart")||Array.isArray(a)&&!a.includes(A.button)&&(A.type==="mousedown"||A.type==="touchstart")||cn.getState().isSorting||cn.getState().isMovingFree)return!1;const L=Array.isArray(a)&&a.includes(A.button)||!A.button||A.button<=1;return(!A.ctrlKey||A.type==="wheel")&&L})},[k,y,t,e,n,s,a,o,l,c]),x.jsx("div",{className:"react-flow__renderer",ref:m,style:{width:d.width,height:d.height,position:"absolute",top:0,left:0},children:h})};function O7t(t,e){_.useEffect(()=>{y7t({zoomPane:t,translateExtent:e,initialViewport:Eee()})},[])}function y7t({zoomPane:t,translateExtent:e,initialViewport:n}){if(t.current){const r=t.current.getBoundingClientRect(),{minZoom:i,maxZoom:s}=Ft.getState().gui,o=xee().interpolate(qR).scaleExtent([i,s]).translateExtent(e),a=Io(t.current).call(o),l=au.translate(n.x,n.y).scale(Zc(n.zoom,i,s)),c=[[0,0],[r.width,r.height]],u=o.constrain()(l,c,e);o.transform(a,u),o.wheelDelta(v1e),qe.setState({d3Zoom:o,d3Selection:a,d3ZoomHandler:a.on("wheel.zoom"),transform:[u.x,u.y,u.k],domNode:t.current.closest(".react-flow")})}}const O1e=({children:t,wrapperDimensions:e})=>{const{panActivationKeyPressed:n,zoomActivationKeyPressed:r,selectionKeyPressed:i}=qe(h=>({panActivationKeyPressed:h.panActivationKeyPressed,zoomActivationKeyPressed:h.zoomActivationKeyPressed,selectionKeyPressed:h.selectionKeyPressed}),ae.isEqual),{panOnDrag:s,panOnScroll:o,panOnScrollSpeed:a,panOnScrollMode:l,zoomOnScroll:c,zoomOnPinch:u,zoomOnDoubleClick:f}=Ft(h=>({panOnDrag:h.gui.panOnDrag,panOnScroll:h.gui.panOnScroll,panOnScrollSpeed:h.gui.panOnScrollSpeed,panOnScrollMode:h.gui.panOnScrollMode,zoomOnScroll:h.gui.zoomOnScroll,zoomOnPinch:h.gui.zoomOnPinch,zoomOnDoubleClick:h.gui.zoomOnDoubleClick}),ae.isEqual);return x.jsx(v7t,{zoomOnScroll:c,zoomOnPinch:u,panOnScroll:o,panOnScrollSpeed:a,panOnScrollMode:l,zoomOnDoubleClick:f,panOnDrag:!i&&s,panActivationKeyPressed:n,zoomActivationKeyPressed:r,wrapperDimensions:e,children:x.jsxs(g1e,{panOnDrag:s,isSelecting:!!i,children:[t,x.jsx(f7t,{})]})})};O1e.displayName="FlowRenderer";const b7t=_.memo(O1e),x7t=t=>({nodesDraggable:t.nodesDraggable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,panActivationKeyPressed:t.panActivationKeyPressed}),y1e=({})=>{const{nodesDraggable:t,nodesFocusable:e,elementsSelectable:n,panActivationKeyPressed:r}=qe(x7t,Da),i=ir(Xm,Da),s=qe(nM),o=_.useRef(),a=sr(c=>c.ids),l=_.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(u=>{const f=ore(u,!0);ire(f)});return o.current=c,c},[]);return _.useEffect(()=>()=>{var c;(c=o==null?void 0:o.current)==null||c.disconnect()},[]),x.jsx("div",{className:"react-flow__nodes",style:p1e,children:i.map(c=>{var g,m;const u=!!(!r&&(c.draggable||t&&typeof c.draggable>"u")),f=!!(!r&&(c.selectable||n&&typeof c.selectable>"u")),h=!!(c.focusable||e&&typeof c.focusable>"u"),d=((g=c.position)==null?void 0:g.x)??0,p=((m=c.position)==null?void 0:m.y)??0;return x.jsx(a7t,{id:c.id,style:c.style,xPos:d,yPos:p,selected:a.includes(c.id),isDraggable:u,isSelectable:f,isFocusable:h,resizeObserver:l,zIndex:c.tempZIndex,visibility:s?"visible":"hidden"},c.id)})})};y1e.displayName="NodeRenderer";const w7t=_.memo(y1e),S7t=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function _7t({children:t}){const e=qe(S7t);return x.jsx("div",{className:"react-flow__viewport react-flow__container",style:{transform:e},children:t})}const k7t={width:"100%",height:"100%",overflow:"hidden",position:"relative",userSelect:"none"},fl=5e3,b1e=()=>{const[t]=Ot.snapToGrid.hook(),e=Ft(a=>!!a.gui.showGridLines),n=_.useRef(),[r,i]=_.useState(!1),s=E7t(n);_.useEffect(()=>{n.current.scrollTop=fl,n.current.scrollLeft=fl,i(!0)},[]);const o=s.height>0&&s.width>0;return x.jsx("div",{style:k7t,className:"react-flow setta-light dark:setta-dark","data-testid":"rf__wrapper",ref:n,onScroll:a=>C7t(a,r),children:x.jsxs("div",{style:{position:"relative",height:`${fl}px`,width:`${fl}px`,top:`${fl}px`,left:`${fl}px`},children:[x.jsx(b7t,{wrapperDimensions:s,children:x.jsx(_7t,{children:o&&x.jsx(w7t,{})})}),t&&e&&x.jsx(Cft,{})]})})};function C7t(t,e){if(!e)return;const{d3Zoom:n,d3Selection:r,transform:i}=qe.getState();n.translateBy(r,-(t.target.scrollLeft-fl)/i[2],-(t.target.scrollTop-fl)/i[2]),t.target.scrollTop=fl,t.target.scrollLeft=fl}function E7t(t){const[e]=Ot.overviewTrueWidth.hook(),[n]=Ot.uiEditorTrueWidth.hook(),[r,i]=_.useState({width:0,height:0});return _.useEffect(()=>{let s;return t.current&&(s=new ResizeObserver(o=>{const{width:a,height:l}=o[0].contentRect;i({width:a,height:l}),qe.setState({width:a-e-n||500,height:l||500})}),s.observe(t.current)),()=>{s&&s.disconnect()}},[e,n]),r}b1e.displayName="ReactFlow";function T7t(){qt.setState({isSelectingParams:!0})}function P7t(){qt.setState({isSelectingParams:!1})}function A7t({sections:t,sectionVariants:e,uiTypeCols:n,uiTypes:r,codeInfoCols:i,codeInfo:s,relativePositions:o,topLevelIds:a,x:l,y:c,incrementVersion:u}){const f={};for(const d of a)f[d]={x:l+o[d].x,y:c+o[d].y,zIndex:o[d].zIndex};te.setState(d=>{W5({sections:t,sectionVariants:e,uiTypes:r,uiTypeCols:n,codeInfo:s,codeInfoCols:i,state:d})});const h=[];for(const[d,p]of Object.entries(f))h.push({id:d,position:{x:p.x,y:p.y},zIndex:p.zIndex,tempZIndex:p.zIndex});rM(h),dn(u)}async function dG(t){let e;try{e=JSON.parse(await navigator.clipboard.readText())}catch{return}e.copyType==="sections"&&R7t({data:e.data,...t})}async function R7t({data:t,asRef:e=!1}){let n;if(e)n=t;else{const r=await Dde(t);r.status===200&&(n=r.data)}if(n){n.sections=M7t(n);const r=$7t(n.sections,n.sectionVariants);A7t({...n,topLevelIds:r,...I7t(),incrementVersion:!0})}}function $7t(t,e){const n=new Set;for(const i of Object.values(e))for(const s of i.children)n.add(s);const r=[];for(const i of Object.keys(t))n.has(i)||r.push(i);return r}function M7t(t){const{sections:e,uiTypes:n}=t,{[Z.GLOBAL_VARIABLES]:r,[Z.GLOBAL_PARAM_SWEEP]:i}=te.getState().singletonSections;if(!r&&!i)return e;const s=[];for(const o of Object.values(e)){const a=n[o.uiTypeId].type;(r&&a===Z.GLOBAL_VARIABLES||i&&a===Z.GLOBAL_PARAM_SWEEP)&&(s.push(o.id),s.push(o.paramSweepSectionId),fs("Can't have more than 1 global section!"))}return ae.omit(e,s)}function I7t(){if(sr.getState().ids.length===0)return qt.getState().lastPaneClickLocation;const{x:t,y:e,width:n}=Aee();return{x:t+n,y:e}}function D7t(){const t=sr.getState().ids;if(t.length===1){const e=document.getElementById(`${t[0]}-args-filter`);e&&e.focus({preventScroll:!0});return}Dc.setState({mode:"find"}),requestAnimationFrame(()=>{const e=document.getElementById("ProjectPageSearchBar");e&&e.focus({preventScroll:!0})})}function L7t(){Dc.setState({mode:"advanced"}),requestAnimationFrame(()=>{const t=document.getElementById("ProjectPageSearchBar");t&&t.click()})}let ay=new Set,Ak=new Map,Cv=!1;function pG(){ay=new Set,Ak=new Map}function x1e(t){ay.delete(t),Ak.delete(t)}function N7t(t){ay.add(t),Ak.set(t,Date.now())}function Q7t(){const t=Date.now();for(const[e,n]of Ak)t-n>100&&x1e(e)}function Rk(t,e,n){return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}}function j7t(t){return Rk(document,"keydown",t)}function B7t(t){return Rk(document,"keyup",t)}const z7t={".":"Period",",":"Comma","/":"Slash","\\":"Backslash","'":"Quote",";":"Semicolon","[":"BracketLeft","]":"BracketRight","-":"Minus","=":"Equal","`":"Backquote",arrowright:"ArrowRight",arrowleft:"ArrowLeft",arrowup:"ArrowUp",arrowdown:"ArrowDown"},F7t=new Set(["MetaLeft","MetaRight","ControlLeft","ControlRight","AltLeft","AltRight","ShiftLeft","ShiftRight"]);function W7t(t){const e=t.split("+").map(r=>r.trim());let n=e.filter(r=>!["ctrl","shift","alt","mod"].includes(r));return n=new Set(n.map(r=>{const i=r.trim();return/^[a-zA-Z]$/.test(i)?`Key${i.toUpperCase()}`:/^[0-9]$/.test(i)?`Digit${i}`:z7t[i]??i[0].toUpperCase()+i.slice(1)})),{mod:e.includes("mod"),ctrl:e.includes("ctrl"),shift:e.includes("shift"),alt:e.includes("alt"),keys:n}}function B1(t,e,n){const{mod:r,ctrl:i,shift:s,alt:o,keys:a}=e;return n?t.metaKey===r&&t.ctrlKey===i&&t.shiftKey===s&&t.altKey===o&&ae.isEqual(ay,a):t.ctrlKey===(i||r)&&t.shiftKey===s&&t.altKey===o&&ae.isEqual(ay,a)}function mu(t,e){return ae.isEqual(t,new Set(e))}function Nr(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return(r||n)&&!i&&!s&&mu(o,e)}function kh(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return(r||n)&&i&&!s&&mu(o,e)}function uc(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return r&&!n&&!i&&!s&&mu(o,e)}function Ji(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return n&&!r&&!i&&!s&&mu(o,e)}function L0(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return n&&i&&!r&&!s&&mu(o,e)}function Ev(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return s&&!i&&!r&&!n&&mu(o,e)}function mG(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return s&&i&&!r&&!n&&mu(o,e)}function Es(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return i&&!s&&!r&&!n&&mu(o,e)}function V7t(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return n&&r&&!s&&!i&&mu(o,e)}function U7t(t){const{mod:e,ctrl:n,shift:r,alt:i,keys:s}=t;return!(!e&&!n&&!r&&!i||s.size===0||Nr(t,["KeyC"])||Nr(t,"KeyV")||Es(t,["Tab"]))}function q7t(t){return t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement||t.target.isContentEditable}function X7t(t){const{mod:e,shift:n,ctrl:r,alt:i}=t;return!e&&!n&&!r&&!i||Es(t,[])||Ji(t,[])||Ji(t,["KeyC"])||Ji(t,["KeyV"])||Ji(t,["KeyX"])||Ji(t,["KeyZ"])||L0(t,["KeyZ"])||Ji(t,["KeyA"])||Ji(t,["ArrowLeft"])||Ji(t,["ArrowRight"])||Ev(t,["ArrowLeft"])||Ev(t,["ArrowRight"])||Es(t,["ArrowLeft"])||Es(t,["ArrowRight"])||Es(t,["ArrowUp"])||Es(t,["ArrowDown"])||mG(t,["ArrowLeft"])||mG(t,["ArrowRight"])||L0(t,["ArrowLeft"])||L0(t,["ArrowRight"])||Ev(t,["Backspace"])||Ji(t,["Backspace"])||uc(t,["KeyA"])||uc(t,["KeyE"])||uc(t,["KeyF"])||uc(t,["KeyB"])||uc(t,["KeyN"])||uc(t,["KeyP"])||uc(t,["KeyD"])||uc(t,["KeyH"])||uc(t,["KeyT"])||V7t(t,["Space"])||L0(t,["KeyV"])||Ji(t,["ArrowUp"])||Ji(t,["ArrowDown"])||L0(t,["ArrowUp"])||L0(t,["ArrowDown"])||Ji(t,["KeyY"])||Ji(t,["KeyB"])||Ji(t,["KeyI"])}function H7t(t){const{mod:e,shift:n,ctrl:r,alt:i}=t;return!e&&!n&&!r&&!i||Es(t,[])||Ji(t,[])||Nr(t,["KeyA"])||Nr(t,["KeyC"])||Nr(t,["KeyV"])||Nr(t,["KeyX"])||Nr(t,["KeyZ"])||Nr(t,["KeyY"])||Nr(t,["ArrowLeft"])||Nr(t,["ArrowRight"])||Es(t,["ArrowLeft"])||Es(t,["ArrowRight"])||kh(t,["ArrowLeft"])||kh(t,["ArrowRight"])||Nr(t,["ArrowUp"])||Nr(t,["ArrowDown"])||kh(t,["ArrowUp"])||kh(t,["ArrowDown"])||Es(t,["ArrowUp"])||Es(t,["ArrowDown"])||Ev(t,["ArrowLeft"])||Ev(t,["ArrowRight"])||Nr(t,["KeyK"])||Es(t,["Home"])||Es(t,["End"])||Nr(t,["Home"])||Nr(t,["End"])||kh(t,["Home"])||kh(t,["End"])||Nr(t,["Backspace"])||Nr(t,["Delete"])||Es(t,["Enter"])||kh(t,["KeyV"])||Nr(t,["KeyB"])||Nr(t,["KeyI"])||Nr(t,["KeyU"])}function Z7t(t,e){return e?X7t(t):H7t(t)}function gG(t,e){var n,r;for(const i of e)i.wasPressed&&!((n=i.keepKeyDownCondition)!=null&&n.call(i,t))&&(i.wasPressed=!1,(r=i.keyUpAction)==null||r.call(i,t))}function Y7t(t,e){t.showTooltipShortcut.keepKeyDownCondition=n=>B1(n,t.showTooltipShortcut.parsedShortcut,e)||B1(n,t.incrementTooltipPageShortcut.parsedShortcut,e)||B1(n,t.decrementTooltipPageShortcut.parsedShortcut,e)||B1(n,t.copyTooltipTextShortcut.parsedShortcut,e)}function G7t(){const t=Ft.getState().shortcuts,e={};function n(l,c,u=null,f=!1){const h=[t[l],c,u,f,l];return e[l]=h,h}const r=[["tab",kW],["shift + tab",kW],[t.newCardShortcut,Iie],[t.newGroupShortcut,Die],[t.newTerminalShortcut,tQe],n("showTooltipShortcut",RQe,$Qe),[t.tooltipToPlaintextShortcut,qx(!1)],[t.tooltipToMarkdownShortcut,qx(!0)],[t.freezeTooltipShortcut,MQe],[t.frozenTooltipToPlaintextShortcut,qx(!1)],[t.frozenTooltipToMarkdownShortcut,qx(!0)],n("incrementTooltipPageShortcut",nse),n("decrementTooltipPageShortcut",rse),n("copyTooltipTextShortcut",ise),[t.frozenTooltipIncrementShortcut,IQe],[t.frozenTooltipDecrementShortcut,DQe],[t.frozenTooltipCopyShortcut,LQe],[t.undoShortcut,w$,null,!0],[t.redoShortcut,S$,null,!0],[t.groupShortcut,jut],[t.ungroupShortcut,But],[t.saveShortcut,z5],[t.loadShortcut,$te],[t.saveAsShortcut,Mte],[t.searchShortcut,D7t],[t.advancedSearchShortcut,L7t],[t.resetZoomShortcut,kee],[t.copyShortcut,Cut],[t.pasteShortcut,dG],[t.pasteAsRefShortcut,()=>dG({asRef:!0})],[t.runCodeShortcut,NQe],[t.runAllCodeShortcut,sse],[t.formatCode,DRe],[t.paramSelect,T7t,P7t],[t.fitViewShortcut,nre],[t.zoomToMouseShortcut,zXe],[t.deleteSectionShortcut,_ut],[t.selectTopLevelNonGroupSections,eQe],[t.selectAll,JNe],[t.showVersionsTabShortcut,pHe],[t.showParamUITypeTabShortcut,mHe],[t.showProjectOverviewTabShortcut,gHe],[t.zoomInShortcut,See,null,!0],[t.zoomOutShortcut,_ee,null,!0],[t.restartLanguageServerShortcut,Pie],[t.selectionKeyCode,eEt,tEt],[t.multiSelectionKeyCode,nEt,rEt],[t.panActivationKeyCode,iEt,sEt],[t.zoomActivationKeyCode,oEt,aEt],[t.moveSectionKeyCode,lEt,cEt],[t.sortingShortcut,cn.getState().activateSortingMode,cn.getState().deactivate],[t.movingFreeShortcut,cn.getState().activateMovingFreeMode,cn.getState().deactivate],["Escape",J7t]],i=[],s=[],o=Hh();for(const[l,c,u,f,h]of r){if(!l)continue;const d=l.toLowerCase(),p=W7t(d),g={parsedShortcut:p,wasPressed:!1,shouldPreventDefault:U7t(p),keyDownAction:c,keyUpAction:u,allowRepeat:f,ignoreWhenInInputField:Z7t(p,o)};s.push(g),e[h]&&(e[h]=g)}Y7t(e,o);let a=j7t(l=>{var u,f;Cv&&Q7t(),Cv=!1,F7t.has(l.code)||N7t(l.code);const c=q7t(l);for(const h of s)if(B1(l,h.parsedShortcut,o)){if(h.ignoreWhenInInputField&&c||(h.shouldPreventDefault&&l.preventDefault(),l.repeat&&!h.allowRepeat))continue;h.keyDownAction(l),h.wasPressed=!0,h.parsedShortcut.mod&&(Cv=!0)}else h.wasPressed&&!((u=h.keepKeyDownCondition)!=null&&u.call(h,l))&&((f=h.keyUpAction)==null||f.call(h,l),h.wasPressed=!1)});return i.push(a),a=B7t(l=>{o&&l.key==="Meta"?pG():x1e(l.code),gG(l,s)}),i.push(a),a=Rk(window,"blur",l=>{pG(),gG(l,s)}),i.push(a),o&&(a=K7t(s),a&&i.push(a)),()=>{i.forEach(l=>l())}}function K7t(t){const e=t.filter(n=>n.parsedShortcut.mod);if(e.length>0)return Rk(window,"mousemove",r=>{Cv&&!r.metaKey&&(e.forEach(i=>{var s;i.wasPressed&&((s=i.keyUpAction)==null||s.call(i,r),i.wasPressed=!1)}),Cv=!1)})}function J7t(){GFe()||P_(),tse()}function eEt(){qe.setState({selectionKeyPressed:!0})}function tEt(){qe.setState({selectionKeyPressed:!1})}function nEt(){qe.setState({multiSelectionActive:!0})}function rEt(){qe.setState({multiSelectionActive:!1})}function iEt(){qe.setState({panActivationKeyPressed:!0})}function sEt(){qe.setState({panActivationKeyPressed:!1})}function oEt(){qe.setState({zoomActivationKeyPressed:!0})}function aEt(){qe.setState({zoomActivationKeyPressed:!1})}function lEt(){qe.setState({moveSectionActivationKeyPressed:!0})}function cEt(){qe.setState({moveSectionActivationKeyPressed:!1})}function uEt(){const[t]=Ot.uiEditorTrueWidth.hook(),[e]=Ot.darkMode.hook();return x.jsx(fWe,{nodeStrokeColor:n=>{var r;return(r=n.style)!=null&&r.background?n.style.background:n.type==="input"?"#0041d0":n.type==="output"?"#ff0072":n.type==="default"?"#1a192b":"#e2e8f0"},nodeColor:n=>{var r;return(r=n.style)!=null&&r.background?n.style.background:e?"#2D384D":"#e2e8f0"},nodeBorderRadius:5,style:{transform:`translateX(-${t}px)`},className:"overflow-hidden rounded-md border border-solid border-[#ffffff00] shadow-md backdrop-blur-sm transition-transform",maskColor:e?"rgb(20, 22, 31, 0.5)":"rgb(51, 65, 85, 0.3)",maskStrokeColor:"",maskStrokeWidth:"1",pannable:!0,onClick:(n,{x:r,y:i})=>{n$(r,i,{zoom:qe.getState().transform[2]})}})}function fEt(){hEt(),dEt();const[t]=Ot.showMinimap.hook();return x.jsxs(Oft,{children:[x.jsx(b1e,{}),x.jsx(wut,{}),x.jsx(zut,{}),x.jsx(Fut,{}),t&&x.jsx(uEt,{}),x.jsx(Sft,{})]})}function hEt(){_.useEffect(()=>G7t(),[])}function dEt(){_.useEffect(()=>{const t=n=>{qt.setState({lastMouseDownLocation:{x:n.clientX,y:n.clientY}})},e=n=>{qt.setState({lastMouseUpLocation:{x:n.clientX,y:n.clientY}})};return document.addEventListener("pointerdown",t),document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerdown",t),document.removeEventListener("pointerup",e)}},[])}function pEt(){const[t,e]=$Fe();return QXe(t,e),BXe(),_.useEffect(()=>{if(t&&!e)return TM(),lQe(),UXe()},[t,e]),x.jsxs(x.Fragment,{children:[!t&&x.jsx(mEt,{}),t&&e?x.jsx(vut,{}):x.jsxs(x.Fragment,{children:[x.jsx(DHe,{}),x.jsx(fut,{}),x.jsx(poe,{children:t&&x.jsx(fEt,{})}),x.jsx(_Qe,{})]})]})}function mEt(){return x.jsxs("div",{className:"single-cell-container absolute h-full w-full",children:[x.jsx("div",{className:"single-cell-child inset-0 place-self-center bg-transparent bg-opacity-50",children:x.jsx("div",{className:"gg-spinner !scale-150 before:!border-t-blue-500 after:!border-blue-500"})}),x.jsx("div",{className:"relative z-10"})]})}const gEt={path:kf,element:x.jsx(hI,{children:x.jsxs(doe,{children:[x.jsx(Qse,{path:kf}),x.jsx(xoe,{children:x.jsx(xWe,{})})]})})},vEt={path:mEe,element:x.jsx(hI,{children:x.jsx(EWe,{})})},OEt={path:uT,element:x.jsx(hI,{children:x.jsxs(doe,{children:[x.jsx(Qse,{path:uT}),x.jsx(xoe,{children:x.jsx(pEt,{})})]})})},yEt=$Ne([vEt,gEt,OEt]);function bEt(){return x.jsx(_Ne,{router:yEt})}const xEt="modulepreload",wEt=function(t){return"/static/"+t},vG={},SEt=function(e,n,r){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=wEt(s),s in vG)return;vG[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":xEt,o||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),o)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},_Et=t=>{t&&t instanceof Function&&SEt(()=>import("./web-vitals-44a8e082.js"),[]).then(({getCLS:e,getFID:n,getFCP:r,getLCP:i,getTTFB:s})=>{e(t),n(t),r(t),i(t),s(t)})};dEe();T$e();Z3e();const kEt=document.getElementById("root"),CEt=RJ(kEt);CEt.render(x.jsx(_.StrictMode,{children:x.jsx(bEt,{})}));_Et();
|
679
|
+
*/f1e=function(){var t={},e={};return t.on=function(n,r){var i={name:n,handler:r};return e[n]=e[n]||[],e[n].unshift(i),i},t.off=function(n){var r=e[n.name].indexOf(n);r!==-1&&e[n.name].splice(r,1)},t.trigger=function(n,r){var i=e[n],s;if(i)for(s=i.length;s--;)i[s].handler(r)},t};var p6t=f1e,$9={exports:{}},m6t=function(e,n,r){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},s.type=n.type||"text/javascript",s.charset=n.charset||"utf8",s.async="async"in n?!!n.async:!0,s.src=e,n.attrs&&g6t(s,n.attrs),n.text&&(s.text=""+n.text);var o="onload"in s?aG:v6t;o(s,r),s.onload||aG(s,r),i.appendChild(s)};function g6t(t,e){for(var n in e)t.setAttribute(n,e[n])}function aG(t,e){t.onload=function(){this.onerror=this.onload=null,e(null,t)},t.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),t)}}function v6t(t,e){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,t))}}(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=m6t,r=i(n);function i(s){return s&&s.__esModule?s:{default:s}}e.default=function(s){var o=new Promise(function(a){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function){a(window.YT);return}else{var l=window.location.protocol==="http:"?"http:":"https:";(0,r.default)(l+"//www.youtube.com/iframe_api",function(u){u&&s.trigger("error",u)})}var c=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){c&&c(),a(window.YT)}});return o},t.exports=e.default})($9,$9.exports);var O6t=$9.exports,M9={exports:{}},I9={exports:{}},D9={exports:{}},ry=1e3,iy=ry*60,sy=iy*60,oy=sy*24,y6t=oy*365.25,b6t=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return x6t(t);if(n==="number"&&isNaN(t)===!1)return e.long?S6t(t):w6t(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function x6t(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*y6t;case"days":case"day":case"d":return n*oy;case"hours":case"hour":case"hrs":case"hr":case"h":return n*sy;case"minutes":case"minute":case"mins":case"min":case"m":return n*iy;case"seconds":case"second":case"secs":case"sec":case"s":return n*ry;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function w6t(t){return t>=oy?Math.round(t/oy)+"d":t>=sy?Math.round(t/sy)+"h":t>=iy?Math.round(t/iy)+"m":t>=ry?Math.round(t/ry)+"s":t+"ms"}function S6t(t){return pS(t,oy,"day")||pS(t,sy,"hour")||pS(t,iy,"minute")||pS(t,ry,"second")||t+" ms"}function pS(t,e,n){if(!(t<e))return t<e*1.5?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}(function(t,e){e=t.exports=i.debug=i.default=i,e.coerce=l,e.disable=o,e.enable=s,e.enabled=a,e.humanize=b6t,e.names=[],e.skips=[],e.formatters={};var n;function r(c){var u=0,f;for(f in c)u=(u<<5)-u+c.charCodeAt(f),u|=0;return e.colors[Math.abs(u)%e.colors.length]}function i(c){function u(){if(u.enabled){var f=u,h=+new Date,d=h-(n||h);f.diff=d,f.prev=n,f.curr=h,n=h;for(var p=new Array(arguments.length),g=0;g<p.length;g++)p[g]=arguments[g];p[0]=e.coerce(p[0]),typeof p[0]!="string"&&p.unshift("%O");var m=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,function(y,b){if(y==="%%")return y;m++;var S=e.formatters[b];if(typeof S=="function"){var k=p[m];y=S.call(f,k),p.splice(m,1),m--}return y}),e.formatArgs.call(f,p);var v=u.log||e.log||console.log.bind(console);v.apply(f,p)}}return u.namespace=c,u.enabled=e.enabled(c),u.useColors=e.useColors(),u.color=r(c),typeof e.init=="function"&&e.init(u),u}function s(c){e.save(c),e.names=[],e.skips=[];for(var u=(typeof c=="string"?c:"").split(/[\s,]+/),f=u.length,h=0;h<f;h++)u[h]&&(c=u[h].replace(/\*/g,".*?"),c[0]==="-"?e.skips.push(new RegExp("^"+c.substr(1)+"$")):e.names.push(new RegExp("^"+c+"$")))}function o(){e.enable("")}function a(c){var u,f;for(u=0,f=e.skips.length;u<f;u++)if(e.skips[u].test(c))return!1;for(u=0,f=e.names.length;u<f;u++)if(e.names[u].test(c))return!0;return!1}function l(c){return c instanceof Error?c.stack||c.message:c}})(D9,D9.exports);var _6t=D9.exports;(function(t,e){e=t.exports=_6t,e.log=i,e.formatArgs=r,e.save=s,e.load=o,e.useColors=n,e.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:a(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function n(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}e.formatters.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}};function r(l){var c=this.useColors;if(l[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+l[0]+(c?"%c ":" ")+"+"+e.humanize(this.diff),!!c){var u="color: "+this.color;l.splice(1,0,u,"color: inherit");var f=0,h=0;l[0].replace(/%[a-zA-Z%]/g,function(d){d!=="%%"&&(f++,d==="%c"&&(h=f))}),l.splice(h,0,u)}}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(l){try{l==null?e.storage.removeItem("debug"):e.storage.debug=l}catch{}}function o(){var l;try{l=e.storage.debug}catch{}return!l&&typeof process<"u"&&"env"in process&&(l={}.DEBUG),l}e.enable(o());function a(){try{return window.localStorage}catch{}}})(I9,I9.exports);var k6t=I9.exports,L9={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe"],t.exports=e.default})(L9,L9.exports);var C6t=L9.exports,N9={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],t.exports=e.default})(N9,N9.exports);var E6t=N9.exports,Q9={exports:{}},j9={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},t.exports=e.default})(j9,j9.exports);var T6t=j9.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=T6t,r=i(n);function i(s){return s&&s.__esModule?s:{default:s}}e.default={pauseVideo:{acceptableStates:[r.default.ENDED,r.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[r.default.ENDED,r.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[r.default.ENDED,r.default.PLAYING,r.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},t.exports=e.default})(Q9,Q9.exports);var P6t=Q9.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=k6t,r=u(n),i=C6t,s=u(i),o=E6t,a=u(o),l=P6t,c=u(l);function u(d){return d&&d.__esModule?d:{default:d}}var f=(0,r.default)("youtube-player"),h={};h.proxyEvents=function(d){var p={},g=function(T){var C="on"+T.slice(0,1).toUpperCase()+T.slice(1);p[C]=function(A){f('event "%s"',C,A),d.trigger(T,A)}},m=!0,v=!1,y=void 0;try{for(var b=a.default[Symbol.iterator](),S;!(m=(S=b.next()).done);m=!0){var k=S.value;g(k)}}catch(E){v=!0,y=E}finally{try{!m&&b.return&&b.return()}finally{if(v)throw y}}return p},h.promisifyPlayer=function(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g={},m=function(C){p&&c.default[C]?g[C]=function(){for(var A=arguments.length,R=Array(A),j=0;j<A;j++)R[j]=arguments[j];return d.then(function(L){var z=c.default[C],B=L.getPlayerState(),q=L[C].apply(L,R);return z.stateChangeRequired||Array.isArray(z.acceptableStates)&&z.acceptableStates.indexOf(B)===-1?new Promise(function(Y){var J=function I(){var Q=L.getPlayerState(),M=void 0;typeof z.timeout=="number"&&(M=setTimeout(function(){L.removeEventListener("onStateChange",I),Y()},z.timeout)),Array.isArray(z.acceptableStates)&&z.acceptableStates.indexOf(Q)!==-1&&(L.removeEventListener("onStateChange",I),clearTimeout(M),Y())};L.addEventListener("onStateChange",J)}).then(function(){return q}):q})}:g[C]=function(){for(var A=arguments.length,R=Array(A),j=0;j<A;j++)R[j]=arguments[j];return d.then(function(L){return L[C].apply(L,R)})}},v=!0,y=!1,b=void 0;try{for(var S=s.default[Symbol.iterator](),k;!(v=(k=S.next()).done);v=!0){var E=k.value;m(E)}}catch(T){y=!0,b=T}finally{try{!v&&S.return&&S.return()}finally{if(y)throw b}}return g},e.default=h,t.exports=e.default})(M9,M9.exports);var A6t=M9.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},r=p6t,i=c(r),s=O6t,o=c(s),a=A6t,l=c(a);function c(f){return f&&f.__esModule?f:{default:f}}var u=void 0;e.default=function(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=(0,i.default)();if(u||(u=(0,o.default)(p)),h.events)throw new Error("Event handlers cannot be overwritten.");if(typeof f=="string"&&!document.getElementById(f))throw new Error('Element "'+f+'" does not exist.');h.events=l.default.proxyEvents(p);var g=new Promise(function(v){if((typeof f>"u"?"undefined":n(f))==="object"&&f.playVideo instanceof Function){var y=f;v(y)}else u.then(function(b){var S=new b.Player(f,h);return p.on("ready",function(){v(S)}),null})}),m=l.default.promisifyPlayer(g,d);return m.on=p.on,m.off=p.off,m},t.exports=e.default})(R9,R9.exports);var R6t=R9.exports;const $6t=ia(R6t);var M6t=Object.defineProperty,I6t=Object.defineProperties,D6t=Object.getOwnPropertyDescriptors,lG=Object.getOwnPropertySymbols,L6t=Object.prototype.hasOwnProperty,N6t=Object.prototype.propertyIsEnumerable,cG=(t,e,n)=>e in t?M6t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B9=(t,e)=>{for(var n in e||(e={}))L6t.call(e,n)&&cG(t,n,e[n]);if(lG)for(var n of lG(e))N6t.call(e,n)&&cG(t,n,e[n]);return t},z9=(t,e)=>I6t(t,D6t(e)),Q6t=(t,e,n)=>new Promise((r,i)=>{var s=l=>{try{a(n.next(l))}catch(c){i(c)}},o=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,o);a((n=n.apply(t,e)).next())});function j6t(t,e){var n,r;if(t.videoId!==e.videoId)return!0;const i=((n=t.opts)==null?void 0:n.playerVars)||{},s=((r=e.opts)==null?void 0:r.playerVars)||{};return i.start!==s.start||i.end!==s.end}function uG(t={}){return z9(B9({},t),{height:0,width:0,playerVars:z9(B9({},t.playerVars),{autoplay:0,start:0,end:0})})}function B6t(t,e){return t.videoId!==e.videoId||!d6t(uG(t.opts),uG(e.opts))}function z6t(t,e){var n,r,i,s;return t.id!==e.id||t.className!==e.className||((n=t.opts)==null?void 0:n.width)!==((r=e.opts)==null?void 0:r.width)||((i=t.opts)==null?void 0:i.height)!==((s=e.opts)==null?void 0:s.height)||t.iframeClassName!==e.iframeClassName||t.title!==e.title}var F6t={videoId:"",id:"",className:"",iframeClassName:"",style:{},title:"",loading:void 0,opts:{},onReady:()=>{},onError:()=>{},onPlay:()=>{},onPause:()=>{},onEnd:()=>{},onStateChange:()=>{},onPlaybackRateChange:()=>{},onPlaybackQualityChange:()=>{}},W6t={videoId:Be.string,id:Be.string,className:Be.string,iframeClassName:Be.string,style:Be.object,title:Be.string,loading:Be.oneOf(["lazy","eager"]),opts:Be.objectOf(Be.any),onReady:Be.func,onError:Be.func,onPlay:Be.func,onPause:Be.func,onEnd:Be.func,onStateChange:Be.func,onPlaybackRateChange:Be.func,onPlaybackQualityChange:Be.func},x2=class extends ke.Component{constructor(t){super(t),this.destroyPlayerPromise=void 0,this.onPlayerReady=e=>{var n,r;return(r=(n=this.props).onReady)==null?void 0:r.call(n,e)},this.onPlayerError=e=>{var n,r;return(r=(n=this.props).onError)==null?void 0:r.call(n,e)},this.onPlayerStateChange=e=>{var n,r,i,s,o,a,l,c;switch((r=(n=this.props).onStateChange)==null||r.call(n,e),e.data){case x2.PlayerState.ENDED:(s=(i=this.props).onEnd)==null||s.call(i,e);break;case x2.PlayerState.PLAYING:(a=(o=this.props).onPlay)==null||a.call(o,e);break;case x2.PlayerState.PAUSED:(c=(l=this.props).onPause)==null||c.call(l,e);break}},this.onPlayerPlaybackRateChange=e=>{var n,r;return(r=(n=this.props).onPlaybackRateChange)==null?void 0:r.call(n,e)},this.onPlayerPlaybackQualityChange=e=>{var n,r;return(r=(n=this.props).onPlaybackQualityChange)==null?void 0:r.call(n,e)},this.destroyPlayer=()=>this.internalPlayer?(this.destroyPlayerPromise=this.internalPlayer.destroy().then(()=>this.destroyPlayerPromise=void 0),this.destroyPlayerPromise):Promise.resolve(),this.createPlayer=()=>{if(typeof document>"u")return;if(this.destroyPlayerPromise){this.destroyPlayerPromise.then(this.createPlayer);return}const e=z9(B9({},this.props.opts),{videoId:this.props.videoId});this.internalPlayer=$6t(this.container,e),this.internalPlayer.on("ready",this.onPlayerReady),this.internalPlayer.on("error",this.onPlayerError),this.internalPlayer.on("stateChange",this.onPlayerStateChange),this.internalPlayer.on("playbackRateChange",this.onPlayerPlaybackRateChange),this.internalPlayer.on("playbackQualityChange",this.onPlayerPlaybackQualityChange),(this.props.title||this.props.loading)&&this.internalPlayer.getIframe().then(n=>{this.props.title&&n.setAttribute("title",this.props.title),this.props.loading&&n.setAttribute("loading",this.props.loading)})},this.resetPlayer=()=>this.destroyPlayer().then(this.createPlayer),this.updatePlayer=()=>{var e;(e=this.internalPlayer)==null||e.getIframe().then(n=>{this.props.id?n.setAttribute("id",this.props.id):n.removeAttribute("id"),this.props.iframeClassName?n.setAttribute("class",this.props.iframeClassName):n.removeAttribute("class"),this.props.opts&&this.props.opts.width?n.setAttribute("width",this.props.opts.width.toString()):n.removeAttribute("width"),this.props.opts&&this.props.opts.height?n.setAttribute("height",this.props.opts.height.toString()):n.removeAttribute("height"),this.props.title?n.setAttribute("title",this.props.title):n.setAttribute("title","YouTube video player"),this.props.loading?n.setAttribute("loading",this.props.loading):n.removeAttribute("loading")})},this.getInternalPlayer=()=>this.internalPlayer,this.updateVideo=()=>{var e,n,r,i;if(typeof this.props.videoId>"u"||this.props.videoId===null){(e=this.internalPlayer)==null||e.stopVideo();return}let s=!1;const o={videoId:this.props.videoId};if((n=this.props.opts)!=null&&n.playerVars&&(s=this.props.opts.playerVars.autoplay===1,"start"in this.props.opts.playerVars&&(o.startSeconds=this.props.opts.playerVars.start),"end"in this.props.opts.playerVars&&(o.endSeconds=this.props.opts.playerVars.end)),s){(r=this.internalPlayer)==null||r.loadVideoById(o);return}(i=this.internalPlayer)==null||i.cueVideoById(o)},this.refContainer=e=>{this.container=e},this.container=null,this.internalPlayer=null}componentDidMount(){this.createPlayer()}componentDidUpdate(t){return Q6t(this,null,function*(){z6t(t,this.props)&&this.updatePlayer(),B6t(t,this.props)&&(yield this.resetPlayer()),j6t(t,this.props)&&this.updateVideo()})}componentWillUnmount(){this.destroyPlayer()}render(){return ke.createElement("div",{className:this.props.className,style:this.props.style},ke.createElement("div",{id:this.props.id,className:this.props.iframeClassName,ref:this.refContainer}))}},Pk=x2;Pk.propTypes=W6t;Pk.defaultProps=F6t;Pk.PlayerState={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5};var V6t=Pk;function U6t({sectionId:t}){const e=te(n=>n.x[t].social);if(rL(e))return x.jsx(X6t,{sectionId:t,url:e});if(iL(e))return x.jsx(H6t,{sectionId:t,url:e})}const q6t=ke.memo(U6t);function X6t({sectionId:t,url:e}){const n=w3t(e,{fuzzy:!1}),r=Kht(t),s=te(f=>f.x[t].resizeEvent)==="start"?"pointer-events-none":"",[o,a]=_.useState(!1),l=`https://img.youtube.com/vi/${n}/0.jpg`,c=()=>{a(!0)},u={...r,playerVars:{autoplay:1}};return x.jsx("div",{className:`section-w-full section-row-left-bottom flex ${s}`,children:o?x.jsx(V6t,{videoId:n,opts:u}):x.jsxs("div",{className:"relative w-full cursor-pointer",onClick:c,children:[x.jsx("img",{src:l,alt:"YouTube video thumbnail",className:"h-full w-full object-cover"}),x.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:x.jsx(Z6t,{})})]})})}function H6t({sectionId:t,url:e}){const n=ae.last(e.split("/")).split("?")[0],[r]=Ot.darkMode.hook();return Jht(t),n&&x.jsx("div",{"data-theme":r?"dark":"light",className:"section-key-value section-row-main flex items-start justify-center overflow-auto [&>div]:contents [&_.twitter-tweet]:!m-0 [&_.twitter-tweet]:h-full [&_.twitter-tweet]:w-full [&_.twitter-tweet]:overflow-hidden [&_.twitter-tweet]:rounded-xl [&_.twitter-tweet]:border [&_.twitter-tweet]:border-none [&_.twitter-tweet]:pt-2 [&_div:has(.twitter-tweet)]:contents",children:x.jsx(f6t,{id:n})})}function Z6t(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"external-icon h-20 w-20",viewBox:"0 0 28.57 20",focusable:"false",children:x.jsx("svg",{viewBox:"0 0 28.57 20",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:x.jsxs("g",{children:[x.jsx("path",{d:"M27.9727 3.12324C27.6435 1.89323 26.6768 0.926623 25.4468 0.597366C23.2197 2.24288e-07 14.285 0 14.285 0C14.285 0 5.35042 2.24288e-07 3.12323 0.597366C1.89323 0.926623 0.926623 1.89323 0.597366 3.12324C2.24288e-07 5.35042 0 10 0 10C0 10 2.24288e-07 14.6496 0.597366 16.8768C0.926623 18.1068 1.89323 19.0734 3.12323 19.4026C5.35042 20 14.285 20 14.285 20C14.285 20 23.2197 20 25.4468 19.4026C26.6768 19.0734 27.6435 18.1068 27.9727 16.8768C28.5701 14.6496 28.5701 10 28.5701 10C28.5701 10 28.5677 5.35042 27.9727 3.12324Z",fill:"#FF0000"}),x.jsx("path",{d:"M11.4253 14.2854L18.8477 10.0004L11.4253 5.71533V14.2854Z",fill:"white"})]})})})}function Y6t({width:t,height:e,setHasScrollbar:n}){const r=_.useRef(null),i=Vie();return _.useEffect(()=>{const s=new jie.Terminal({cursorBlink:!1,theme:Wie,disableStdin:!0});s.loadAddon(i),s.open(r.current);const o=new WebSocket(`${Yp.WEBSOCKET}${Z.ROUTE_IN_MEMORY_FN_STDOUT_WEBSOCKET}`),a=new zie.AttachAddon(o);s.loadAddon(a);const l=Uie(s,n);return()=>{qie(o,s),l()}},[]),_.useEffect(()=>{i.fit()},[t,e]),r}function G6t({sectionId:t}){const{size:{width:e,height:n},isReadOnlyTerminal:r}=te(o=>({size:o.x[t].size,isReadOnlyTerminal:o.x[t].isReadOnlyTerminal}),ae.isEqual),[i,s]=_.useState(!1);return r?x.jsx(J6t,{width:e,height:n,hasScrollbar:i,setHasScrollbar:s}):x.jsx(e7t,{sectionId:t,width:e,height:n,hasScrollbar:i,setHasScrollbar:s})}const K6t=ke.memo(G6t);function J6t({width:t,height:e,hasScrollbar:n,setHasScrollbar:r}){const i=Y6t({width:t,height:e,setHasScrollbar:r});return x.jsx(h1e,{width:t,height:e,hasScrollbar:n,terminalRef:i})}function e7t({sectionId:t,width:e,height:n,hasScrollbar:r,setHasScrollbar:i}){const s=iQe({sectionId:t,width:e,height:n,setHasScrollbar:i});return x.jsx(h1e,{width:e,height:n,hasScrollbar:r,terminalRef:s})}function h1e({width:t,height:e,hasScrollbar:n,terminalRef:r}){return x.jsx("div",{ref:r,className:`${n?"nowheel":""} nodrag section-row-search-gutter section-key-value`,style:{width:`${t-24}px`,height:`${e-32}px`}})}function t7t({sectionId:t,sectionTypeName:e,isActiveSection:n,isInOtherProjectConfigs:r,viewingEditingMode:i,positionAndSizeLocked:s}){const{isMinimized:o,isYouTube:a}=te(f=>({isMinimized:f.x[t].isMinimized,isYouTube:Vft(t,f)}),ae.isEqual),l=ooe(e),c=hht(e),u=o$e(i);return x.jsxs(tdt,{sectionId:t,bgColor:c,isYouTube:a,isActiveSection:n,positionAndSizeLocked:s,children:[x.jsx(Tdt,{sectionId:t,isActiveSection:n,sectionTypeName:e,isInOtherProjectConfigs:r,viewingEditingMode:i,isUserView:u,isRoot:l}),l&&x.jsx(g0e,{sectionId:t,isRoot:l}),!o&&x.jsx(n7t,{sectionId:t,sectionTypeName:e,bgColor:c,isUserView:u})]})}function n7t({sectionId:t,sectionTypeName:e,bgColor:n,isUserView:r}){switch(e){case Z.SECTION:return x.jsx(r3t,{sectionId:t,bgColor:n,isUserView:r});case Z.IMAGE:return x.jsx(H5t,{sectionId:t});case Z.CHART:return x.jsx(q1t,{sectionId:t});case Z.DRAW:return x.jsx(H4t,{sectionId:t});case Z.SOCIAL:return x.jsx(q6t,{sectionId:t});case Z.TEXT_BLOCK:return x.jsx(u4t,{sectionId:t});case Z.GLOBAL_VARIABLES:return x.jsx(F5t,{sectionId:t,bgColor:n,isUserView:r});case Z.CODE:return x.jsx(nrt,{sectionId:t});case Z.PARAM_SWEEP:return x.jsx(u3t,{sectionId:t});case Z.TERMINAL:return x.jsx(K6t,{sectionId:t});case Z.GLOBAL_PARAM_SWEEP:return x.jsx(t5t,{sectionId:t});case Z.IFRAME:return x.jsx(V5t,{sectionId:t});case Z.CHAT:return x.jsx(h4t,{sectionId:t});default:return null}}function r7t({sectionId:t,viewingEditingMode:e}){const{sectionTypeName:n,jsonSourceMissing:r,isInOtherProjectConfigs:i,positionAndSizeLocked:s}=te(f=>({sectionTypeName:fn(t,f),jsonSourceMissing:f.x[t].jsonSourceMissing,isInOtherProjectConfigs:f.x[t].isInOtherProjectConfigs,positionAndSizeLocked:f.x[t].positionAndSizeLocked}),ae.isEqual),o=sr(f=>f.ids.includes(t)),a=Jde(t,"selfOnly"),l=n===Z.GLOBAL_VARIABLES,c=s?"":"shadow-md dark:shadow-setta-900/30",u=r0e({isActiveSection:o,isGlobalVariables:l,isInOtherProjectConfigs:i,jsonSourceMissing:r});return x.jsx("section",{className:`group/card-section transition-radius ${s?"rounded-sm border-setta-400/90 dark:border-setta-800":"rounded-xl border-white dark:border-setta-700"} border bg-white dark:bg-setta-925 ${c} dndline w-min outline outline-4 ${u} `,onClick:i0e(t,o),ref:a,children:x.jsx(t7t,{sectionId:t,sectionTypeName:n,isActiveSection:o,isInOtherProjectConfigs:i,viewingEditingMode:e,positionAndSizeLocked:s})})}const i7t=ke.memo(r7t,(t,e)=>t.viewingEditingMode===e.viewingEditingMode);function s7t({sectionId:t,isTopLevel:e,dragListeners:n}){const{visibility:r,viewingEditingMode:i,isGroup:s}=te(o=>{const{visibility:a,viewingEditingMode:l}=Kne(t,o);return{visibility:a,viewingEditingMode:l,isGroup:fn(t,o)===Z.GROUP}});return Gne(r,i)?x.jsxs(Cht,{isGroup:s,sectionId:t,dragListeners:n,isTopLevel:e,visibility:r,viewingEditingMode:i,children:[!s&&x.jsx(i7t,{sectionId:t,viewingEditingMode:i}),x.jsx(jht,{sectionId:t,isGroup:s})]}):null}const d1e=ke.memo(s7t,(t,e)=>ae.isEqual(t.dragListeners,e.dragListeners)),Lp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},o7t=({id:t,xPos:e,yPos:n,selected:r,style:i,isDraggable:s,isSelectable:o,isFocusable:a,resizeObserver:l,zIndex:c,visibility:u})=>{const f=_.useRef(null),h=te(m=>m.x[t].positionAndSizeLocked),d=s&&!h,p=o||d,g=m=>{PEe(m)||Mr.getState().isEnabled||m.target.classList.contains(JR)||d&&r&&Object.prototype.hasOwnProperty.call(Lp,m.key)&&Xde({x:Lp[m.key].x,y:Lp[m.key].y,isShiftPressed:m.shiftKey})};return _.useEffect(()=>{if(f.current){const m=f.current;return l==null||l.observe(m),()=>l==null?void 0:l.unobserve(m)}},[]),qde({nodeRef:f,disabled:!d,nodeId:t,isSelectable:o}),x.jsx("div",{className:qd(["react-flow__node",{[js]:d},{selectable:o}]),ref:f,style:{transform:`translate(${e}px,${n}px)`,pointerEvents:p?"all":"none",visibility:u,zIndex:c,...i},"data-id":t,"data-testid":`rf__node-${t}`,onKeyDown:a?g:void 0,tabIndex:a?0:void 0,role:a?"button":void 0,children:x.jsx(d1e,{sectionId:t,isTopLevel:!0})})},a7t=_.memo(o7t);function l7t({x:t,y:e,width:n,height:r}){const i=qe(l=>`translate(${l.transform[0]}px,${l.transform[1]}px) scale(${l.transform[2]})`),s=_.useRef(null);_.useEffect(()=>{var l;(l=s.current)==null||l.focus({preventScroll:!0})},[]),qde({nodeRef:s});const o=l=>{const c=sr.getState().ids,u=Xm().filter(f=>c.includes(f.id)).map(f=>f.id);yut(l,u)},a=l=>{Object.prototype.hasOwnProperty.call(Lp,l.key)&&Xde({x:Lp[l.key].x,y:Lp[l.key].y,isShiftPressed:l.shiftKey})};return x.jsx("div",{className:qd(["react-flow__nodesselection","react-flow__container",js]),style:{transform:i},children:x.jsx("div",{tabIndex:-1,ref:s,className:"react-flow__nodesselection-rect",onContextMenu:o,onKeyDown:a,style:{width:n,height:r,top:e,left:t}})})}function c7t(){const t=qe(e=>e.nodesSelectionDims,ae.isEqual);return t&&x.jsx(u7t,{...t})}const u7t=ke.memo(l7t),f7t=ke.memo(c7t),h7t=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function d7t(){const{userSelectionActive:t,userSelectionRect:e}=qe(h7t,Da);return t&&e?x.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}const p1e={position:"absolute",width:"100%",height:"100%",top:0,left:0};var j1=(t=>(t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal",t))(j1||{}),m1e=(t=>(t.Partial="partial",t.Full="full",t))(m1e||{});const fG=(t,e)=>n=>{n.target===e.current&&(t==null||t(n))},p7t=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,dragging:t.paneDragging}),g1e=_.memo(({isSelecting:t,panOnDrag:e,children:n})=>{const r=_.useRef(null),i=_.useRef(0),s=_.useRef(),{userSelectionActive:o,elementsSelectable:a}=qe(p7t,Da),l=()=>{qe.setState({userSelectionActive:!1,userSelectionRect:null}),i.current=0},c=m=>{if(qt.getState().mouseDownDrawArea){qt.setState({mouseDownDrawArea:!1});return}P_(),qt.setState({lastPaneClickLocation:qf({x:m.clientX,y:m.clientY})}),qe.setState({nodesSelectionDims:null})},u=m=>{if(Array.isArray(e)&&(e!=null&&e.includes(2))){m.preventDefault();return}Out(m)},f=m=>{const{domNode:v}=qe.getState();if(s.current=v==null?void 0:v.getBoundingClientRect(),!a||!t||m.button!==0||m.target!==r.current||!s.current)return;const{x:y,y:b}=o_(m,s.current);P_(),qe.setState({userSelectionRect:{width:0,height:0,startX:y,startY:b,x:y,y:b}})},h=m=>{const{userSelectionRect:v,transform:y}=qe.getState();if(!t||!s.current||!v)return;qe.setState({userSelectionActive:!0,nodesSelectionDims:null});const b=o_(m,s.current),S=v.startX??0,k=v.startY??0,E={...v,x:b.x<S?b.x:S,y:b.y<k?b.y:k,width:Math.abs(b.x-S),height:Math.abs(b.y-k)},T=$Ee(E,y,Ft.getState().gui.selectionMode===m1e.Partial,!0);i.current!==T.length&&(i.current=T.length,Vd(T)),qe.setState({userSelectionRect:E})},d=m=>{if(m.button!==0)return;const{userSelectionRect:v}=qe.getState();!o&&v&&m.target===r.current&&c(m),qe.getState().setNodesSelection(i.current,!0),l()},p=m=>{o&&qe.getState().setNodesSelection(i.current),l()},g=a&&(t||o);return x.jsxs("div",{className:"react-flow__pane",onClick:g?void 0:fG(c,r),onContextMenu:fG(u,r),onMouseDown:g?f:void 0,onMouseMove:g?h:void 0,onMouseUp:g?d:void 0,onMouseLeave:g?p:void 0,ref:r,style:p1e,children:[n,x.jsx(d7t,{})]})});g1e.displayName="Pane";const hG=t=>({x:t.x,y:t.y,zoom:t.k}),h1=(t,e)=>t.target.closest(`.${e}`),m7t=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),v1e=t=>{const e=t.ctrlKey&&Hh()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e},g7t=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler,userSelectionActive:t.userSelectionActive}),v7t=({zoomOnScroll:t=!0,zoomOnPinch:e=!0,panOnScroll:n=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=j1.Free,zoomOnDoubleClick:s=!0,elementsSelectable:o,panOnDrag:a=!0,panActivationKeyPressed:l,zoomActivationKeyPressed:c,translateExtent:u=Mee,preventScrolling:f=!0,children:h,wrapperDimensions:d})=>{const p=_.useRef(!1),g=_.useRef(!1),m=_.useRef(null),v=_.useRef({x:0,y:0,zoom:0}),{d3Zoom:y,d3Selection:b,d3ZoomHandler:S,userSelectionActive:k}=qe(g7t,Da),E=_.useRef(0),T=_.useRef(!1),C=_.useRef();return O7t(m,u),_.useEffect(()=>{b&&y&&(n&&!c&&!k?b.on("wheel.zoom",A=>{if(h1(A,Y1)&&!c&&!(A.ctrlKey&&e&&Hh())&&!(n&&T.current))return!1;A.preventDefault(),A.stopImmediatePropagation();const R=b.property("__zoom").k||1,j=Hh();if(A.ctrlKey&&e&&j){const q=Oa(A),Y=v1e(A),J=R*Math.pow(2,Y);y.scaleTo(b,J,q,A);return}const L=A.deltaMode===1?20:1;let z=i===j1.Vertical?0:A.deltaX*L,B=i===j1.Horizontal?0:A.deltaY*L;!j&&A.shiftKey&&i!==j1.Vertical&&(z=A.deltaY*L,B=0),y.translateBy(b,-(z/R)*r,-(B/R)*r,{internal:!0}),hG(b.property("__zoom")),clearTimeout(C.current),T.current||(qt.setState({isPanScrolling:!0}),T.current=!0),T.current&&(C.current=setTimeout(()=>{T.current=!1,qt.setState({isPanScrolling:!1})},150))},{passive:!1}):typeof S<"u"&&b.on("wheel.zoom",function(A,R){if(!f||h1(A,Y1)&&!c&&!(A.ctrlKey&&e&&Hh()))return null;A.preventDefault(),S.call(this,A,R)},{passive:!1}))},[k,n,i,b,y,S,c,e,f]),_.useEffect(()=>{y&&y.on("start",A=>{var j,L;if(!A.sourceEvent||A.sourceEvent.internal)return null;E.current=(j=A.sourceEvent)==null?void 0:j.button;const R=hG(A.transform);p.current=!0,v.current=R,((L=A.sourceEvent)==null?void 0:L.type)==="mousedown"&&qe.setState({paneDragging:!0}),_m()})},[y]),_.useEffect(()=>{y&&(k&&!p.current?y.on("zoom",null):k||y.on("zoom",A=>{qe.setState({transform:[A.transform.x,A.transform.y,A.transform.k]}),g.current=!!m7t(a,E.current??0)}))},[k,y,a]),_.useEffect(()=>{y&&y.on("end",A=>{if(!A.sourceEvent||A.sourceEvent.internal)return null;p.current=!1,qe.setState({paneDragging:!1}),g.current=!1})},[y,n,a]),_.useEffect(()=>{y&&y.filter(A=>{const R=c||t,j=e&&A.ctrlKey;if((a===!0||Array.isArray(a)&&a.includes(1))&&A.button===1&&A.type==="mousedown"&&h1(A,"react-flow__node"))return!0;if(!a&&!R&&!n&&!s&&!e||k||!s&&A.type==="dblclick"||h1(A,Y1)&&A.type==="wheel"&&!c&&!(A.ctrlKey&&e&&Hh())||h1(A,js)&&(A.type!=="wheel"||n&&A.type==="wheel"&&!c)||!e&&A.ctrlKey&&A.type==="wheel"||!R&&!n&&!j&&A.type==="wheel"||!a&&(A.type==="mousedown"||A.type==="touchstart")||Array.isArray(a)&&!a.includes(A.button)&&(A.type==="mousedown"||A.type==="touchstart")||cn.getState().isSorting||cn.getState().isMovingFree)return!1;const L=Array.isArray(a)&&a.includes(A.button)||!A.button||A.button<=1;return(!A.ctrlKey||A.type==="wheel")&&L})},[k,y,t,e,n,s,a,o,l,c]),x.jsx("div",{className:"react-flow__renderer",ref:m,style:{width:d.width,height:d.height,position:"absolute",top:0,left:0},children:h})};function O7t(t,e){_.useEffect(()=>{y7t({zoomPane:t,translateExtent:e,initialViewport:Eee()})},[])}function y7t({zoomPane:t,translateExtent:e,initialViewport:n}){if(t.current){const r=t.current.getBoundingClientRect(),{minZoom:i,maxZoom:s}=Ft.getState().gui,o=xee().interpolate(qR).scaleExtent([i,s]).translateExtent(e),a=Io(t.current).call(o),l=au.translate(n.x,n.y).scale(Zc(n.zoom,i,s)),c=[[0,0],[r.width,r.height]],u=o.constrain()(l,c,e);o.transform(a,u),o.wheelDelta(v1e),qe.setState({d3Zoom:o,d3Selection:a,d3ZoomHandler:a.on("wheel.zoom"),transform:[u.x,u.y,u.k],domNode:t.current.closest(".react-flow")})}}const O1e=({children:t,wrapperDimensions:e})=>{const{panActivationKeyPressed:n,zoomActivationKeyPressed:r,selectionKeyPressed:i}=qe(h=>({panActivationKeyPressed:h.panActivationKeyPressed,zoomActivationKeyPressed:h.zoomActivationKeyPressed,selectionKeyPressed:h.selectionKeyPressed}),ae.isEqual),{panOnDrag:s,panOnScroll:o,panOnScrollSpeed:a,panOnScrollMode:l,zoomOnScroll:c,zoomOnPinch:u,zoomOnDoubleClick:f}=Ft(h=>({panOnDrag:h.gui.panOnDrag,panOnScroll:h.gui.panOnScroll,panOnScrollSpeed:h.gui.panOnScrollSpeed,panOnScrollMode:h.gui.panOnScrollMode,zoomOnScroll:h.gui.zoomOnScroll,zoomOnPinch:h.gui.zoomOnPinch,zoomOnDoubleClick:h.gui.zoomOnDoubleClick}),ae.isEqual);return x.jsx(v7t,{zoomOnScroll:c,zoomOnPinch:u,panOnScroll:o,panOnScrollSpeed:a,panOnScrollMode:l,zoomOnDoubleClick:f,panOnDrag:!i&&s,panActivationKeyPressed:n,zoomActivationKeyPressed:r,wrapperDimensions:e,children:x.jsxs(g1e,{panOnDrag:s,isSelecting:!!i,children:[t,x.jsx(f7t,{})]})})};O1e.displayName="FlowRenderer";const b7t=_.memo(O1e),x7t=t=>({nodesDraggable:t.nodesDraggable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,panActivationKeyPressed:t.panActivationKeyPressed}),y1e=({})=>{const{nodesDraggable:t,nodesFocusable:e,elementsSelectable:n,panActivationKeyPressed:r}=qe(x7t,Da),i=ir(Xm,Da),s=qe(nM),o=_.useRef(),a=sr(c=>c.ids),l=_.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(u=>{const f=ore(u,!0);ire(f)});return o.current=c,c},[]);return _.useEffect(()=>()=>{var c;(c=o==null?void 0:o.current)==null||c.disconnect()},[]),x.jsx("div",{className:"react-flow__nodes",style:p1e,children:i.map(c=>{var g,m;const u=!!(!r&&(c.draggable||t&&typeof c.draggable>"u")),f=!!(!r&&(c.selectable||n&&typeof c.selectable>"u")),h=!!(c.focusable||e&&typeof c.focusable>"u"),d=((g=c.position)==null?void 0:g.x)??0,p=((m=c.position)==null?void 0:m.y)??0;return x.jsx(a7t,{id:c.id,style:c.style,xPos:d,yPos:p,selected:a.includes(c.id),isDraggable:u,isSelectable:f,isFocusable:h,resizeObserver:l,zIndex:c.tempZIndex,visibility:s?"visible":"hidden"},c.id)})})};y1e.displayName="NodeRenderer";const w7t=_.memo(y1e),S7t=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function _7t({children:t}){const e=qe(S7t);return x.jsx("div",{className:"react-flow__viewport react-flow__container",style:{transform:e},children:t})}const k7t={width:"100%",height:"100%",overflow:"hidden",position:"relative",userSelect:"none"},fl=5e3,b1e=()=>{const[t]=Ot.snapToGrid.hook(),e=Ft(a=>!!a.gui.showGridLines),n=_.useRef(),[r,i]=_.useState(!1),s=E7t(n);_.useEffect(()=>{n.current.scrollTop=fl,n.current.scrollLeft=fl,i(!0)},[]);const o=s.height>0&&s.width>0;return x.jsx("div",{style:k7t,className:"react-flow setta-light dark:setta-dark","data-testid":"rf__wrapper",ref:n,onScroll:a=>C7t(a,r),children:x.jsxs("div",{style:{position:"relative",height:`${fl}px`,width:`${fl}px`,top:`${fl}px`,left:`${fl}px`},children:[x.jsx(b7t,{wrapperDimensions:s,children:x.jsx(_7t,{children:o&&x.jsx(w7t,{})})}),t&&e&&x.jsx(Cft,{})]})})};function C7t(t,e){if(!e)return;const{d3Zoom:n,d3Selection:r,transform:i}=qe.getState();n.translateBy(r,-(t.target.scrollLeft-fl)/i[2],-(t.target.scrollTop-fl)/i[2]),t.target.scrollTop=fl,t.target.scrollLeft=fl}function E7t(t){const[e]=Ot.overviewTrueWidth.hook(),[n]=Ot.uiEditorTrueWidth.hook(),[r,i]=_.useState({width:0,height:0});return _.useEffect(()=>{let s;return t.current&&(s=new ResizeObserver(o=>{const{width:a,height:l}=o[0].contentRect;i({width:a,height:l}),qe.setState({width:a-e-n||500,height:l||500})}),s.observe(t.current)),()=>{s&&s.disconnect()}},[e,n]),r}b1e.displayName="ReactFlow";function T7t(){qt.setState({isSelectingParams:!0})}function P7t(){qt.setState({isSelectingParams:!1})}function A7t({sections:t,sectionVariants:e,uiTypeCols:n,uiTypes:r,codeInfoCols:i,codeInfo:s,relativePositions:o,topLevelIds:a,x:l,y:c,incrementVersion:u}){const f={};for(const d of a)f[d]={x:l+o[d].x,y:c+o[d].y,zIndex:o[d].zIndex};te.setState(d=>{W5({sections:t,sectionVariants:e,uiTypes:r,uiTypeCols:n,codeInfo:s,codeInfoCols:i,state:d})});const h=[];for(const[d,p]of Object.entries(f))h.push({id:d,position:{x:p.x,y:p.y},zIndex:p.zIndex,tempZIndex:p.zIndex});rM(h),dn(u)}async function dG(t){let e;try{e=JSON.parse(await navigator.clipboard.readText())}catch{return}e.copyType==="sections"&&R7t({data:e.data,...t})}async function R7t({data:t,asRef:e=!1}){let n;if(e)n=t;else{const r=await Dde(t);r.status===200&&(n=r.data)}if(n){n.sections=M7t(n);const r=$7t(n.sections,n.sectionVariants);A7t({...n,topLevelIds:r,...I7t(),incrementVersion:!0})}}function $7t(t,e){const n=new Set;for(const i of Object.values(e))for(const s of i.children)n.add(s);const r=[];for(const i of Object.keys(t))n.has(i)||r.push(i);return r}function M7t(t){const{sections:e,uiTypes:n}=t,{[Z.GLOBAL_VARIABLES]:r,[Z.GLOBAL_PARAM_SWEEP]:i}=te.getState().singletonSections;if(!r&&!i)return e;const s=[];for(const o of Object.values(e)){const a=n[o.uiTypeId].type;(r&&a===Z.GLOBAL_VARIABLES||i&&a===Z.GLOBAL_PARAM_SWEEP)&&(s.push(o.id),s.push(o.paramSweepSectionId),fs("Can't have more than 1 global section!"))}return ae.omit(e,s)}function I7t(){if(sr.getState().ids.length===0)return qt.getState().lastPaneClickLocation;const{x:t,y:e,width:n}=Aee();return{x:t+n,y:e}}function D7t(){const t=sr.getState().ids;if(t.length===1){const e=document.getElementById(`${t[0]}-args-filter`);e&&e.focus({preventScroll:!0});return}Dc.setState({mode:"find"}),requestAnimationFrame(()=>{const e=document.getElementById("ProjectPageSearchBar");e&&e.focus({preventScroll:!0})})}function L7t(){Dc.setState({mode:"advanced"}),requestAnimationFrame(()=>{const t=document.getElementById("ProjectPageSearchBar");t&&t.click()})}let ay=new Set,Ak=new Map,Cv=!1;function pG(){ay=new Set,Ak=new Map}function x1e(t){ay.delete(t),Ak.delete(t)}function N7t(t){ay.add(t),Ak.set(t,Date.now())}function Q7t(){const t=Date.now();for(const[e,n]of Ak)t-n>100&&x1e(e)}function Rk(t,e,n){return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}}function j7t(t){return Rk(document,"keydown",t)}function B7t(t){return Rk(document,"keyup",t)}const z7t={".":"Period",",":"Comma","/":"Slash","\\":"Backslash","'":"Quote",";":"Semicolon","[":"BracketLeft","]":"BracketRight","-":"Minus","=":"Equal","`":"Backquote",arrowright:"ArrowRight",arrowleft:"ArrowLeft",arrowup:"ArrowUp",arrowdown:"ArrowDown"},F7t=new Set(["MetaLeft","MetaRight","ControlLeft","ControlRight","AltLeft","AltRight","ShiftLeft","ShiftRight"]);function W7t(t){const e=t.split("+").map(r=>r.trim());let n=e.filter(r=>!["ctrl","shift","alt","mod"].includes(r));return n=new Set(n.map(r=>{const i=r.trim();return/^[a-zA-Z]$/.test(i)?`Key${i.toUpperCase()}`:/^[0-9]$/.test(i)?`Digit${i}`:z7t[i]??i[0].toUpperCase()+i.slice(1)})),{mod:e.includes("mod"),ctrl:e.includes("ctrl"),shift:e.includes("shift"),alt:e.includes("alt"),keys:n}}function B1(t,e,n){const{mod:r,ctrl:i,shift:s,alt:o,keys:a}=e;return n?t.metaKey===r&&t.ctrlKey===i&&t.shiftKey===s&&t.altKey===o&&ae.isEqual(ay,a):t.ctrlKey===(i||r)&&t.shiftKey===s&&t.altKey===o&&ae.isEqual(ay,a)}function mu(t,e){return ae.isEqual(t,new Set(e))}function Nr(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return(r||n)&&!i&&!s&&mu(o,e)}function kh(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return(r||n)&&i&&!s&&mu(o,e)}function uc(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return r&&!n&&!i&&!s&&mu(o,e)}function Ji(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return n&&!r&&!i&&!s&&mu(o,e)}function L0(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return n&&i&&!r&&!s&&mu(o,e)}function Ev(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return s&&!i&&!r&&!n&&mu(o,e)}function mG(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return s&&i&&!r&&!n&&mu(o,e)}function Es(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return i&&!s&&!r&&!n&&mu(o,e)}function V7t(t,e){const{mod:n,ctrl:r,shift:i,alt:s,keys:o}=t;return n&&r&&!s&&!i&&mu(o,e)}function U7t(t){const{mod:e,ctrl:n,shift:r,alt:i,keys:s}=t;return!(!e&&!n&&!r&&!i||s.size===0||Nr(t,["KeyC"])||Nr(t,"KeyV")||Es(t,["Tab"]))}function q7t(t){return t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement||t.target.isContentEditable}function X7t(t){const{mod:e,shift:n,ctrl:r,alt:i}=t;return!e&&!n&&!r&&!i||Es(t,[])||Ji(t,[])||Ji(t,["KeyC"])||Ji(t,["KeyV"])||Ji(t,["KeyX"])||Ji(t,["KeyZ"])||L0(t,["KeyZ"])||Ji(t,["KeyA"])||Ji(t,["ArrowLeft"])||Ji(t,["ArrowRight"])||Ev(t,["ArrowLeft"])||Ev(t,["ArrowRight"])||Es(t,["ArrowLeft"])||Es(t,["ArrowRight"])||Es(t,["ArrowUp"])||Es(t,["ArrowDown"])||mG(t,["ArrowLeft"])||mG(t,["ArrowRight"])||L0(t,["ArrowLeft"])||L0(t,["ArrowRight"])||Ev(t,["Backspace"])||Ji(t,["Backspace"])||uc(t,["KeyA"])||uc(t,["KeyE"])||uc(t,["KeyF"])||uc(t,["KeyB"])||uc(t,["KeyN"])||uc(t,["KeyP"])||uc(t,["KeyD"])||uc(t,["KeyH"])||uc(t,["KeyT"])||V7t(t,["Space"])||L0(t,["KeyV"])||Ji(t,["ArrowUp"])||Ji(t,["ArrowDown"])||L0(t,["ArrowUp"])||L0(t,["ArrowDown"])||Ji(t,["KeyY"])||Ji(t,["KeyB"])||Ji(t,["KeyI"])}function H7t(t){const{mod:e,shift:n,ctrl:r,alt:i}=t;return!e&&!n&&!r&&!i||Es(t,[])||Ji(t,[])||Nr(t,["KeyA"])||Nr(t,["KeyC"])||Nr(t,["KeyV"])||Nr(t,["KeyX"])||Nr(t,["KeyZ"])||Nr(t,["KeyY"])||Nr(t,["ArrowLeft"])||Nr(t,["ArrowRight"])||Es(t,["ArrowLeft"])||Es(t,["ArrowRight"])||kh(t,["ArrowLeft"])||kh(t,["ArrowRight"])||Nr(t,["ArrowUp"])||Nr(t,["ArrowDown"])||kh(t,["ArrowUp"])||kh(t,["ArrowDown"])||Es(t,["ArrowUp"])||Es(t,["ArrowDown"])||Ev(t,["ArrowLeft"])||Ev(t,["ArrowRight"])||Nr(t,["KeyK"])||Es(t,["Home"])||Es(t,["End"])||Nr(t,["Home"])||Nr(t,["End"])||kh(t,["Home"])||kh(t,["End"])||Nr(t,["Backspace"])||Nr(t,["Delete"])||Es(t,["Enter"])||kh(t,["KeyV"])||Nr(t,["KeyB"])||Nr(t,["KeyI"])||Nr(t,["KeyU"])}function Z7t(t,e){return e?X7t(t):H7t(t)}function gG(t,e){var n,r;for(const i of e)i.wasPressed&&!((n=i.keepKeyDownCondition)!=null&&n.call(i,t))&&(i.wasPressed=!1,(r=i.keyUpAction)==null||r.call(i,t))}function Y7t(t,e){t.showTooltipShortcut.keepKeyDownCondition=n=>B1(n,t.showTooltipShortcut.parsedShortcut,e)||B1(n,t.incrementTooltipPageShortcut.parsedShortcut,e)||B1(n,t.decrementTooltipPageShortcut.parsedShortcut,e)||B1(n,t.copyTooltipTextShortcut.parsedShortcut,e)}function G7t(){const t=Ft.getState().shortcuts,e={};function n(l,c,u=null,f=!1){const h=[t[l],c,u,f,l];return e[l]=h,h}const r=[["tab",kW],["shift + tab",kW],[t.newCardShortcut,Iie],[t.newGroupShortcut,Die],[t.newTerminalShortcut,tQe],n("showTooltipShortcut",RQe,$Qe),[t.tooltipToPlaintextShortcut,qx(!1)],[t.tooltipToMarkdownShortcut,qx(!0)],[t.freezeTooltipShortcut,MQe],[t.frozenTooltipToPlaintextShortcut,qx(!1)],[t.frozenTooltipToMarkdownShortcut,qx(!0)],n("incrementTooltipPageShortcut",nse),n("decrementTooltipPageShortcut",rse),n("copyTooltipTextShortcut",ise),[t.frozenTooltipIncrementShortcut,IQe],[t.frozenTooltipDecrementShortcut,DQe],[t.frozenTooltipCopyShortcut,LQe],[t.undoShortcut,w$,null,!0],[t.redoShortcut,S$,null,!0],[t.groupShortcut,jut],[t.ungroupShortcut,But],[t.saveShortcut,z5],[t.loadShortcut,$te],[t.saveAsShortcut,Mte],[t.searchShortcut,D7t],[t.advancedSearchShortcut,L7t],[t.resetZoomShortcut,kee],[t.copyShortcut,Cut],[t.pasteShortcut,dG],[t.pasteAsRefShortcut,()=>dG({asRef:!0})],[t.runCodeShortcut,NQe],[t.runAllCodeShortcut,sse],[t.formatCode,DRe],[t.paramSelect,T7t,P7t],[t.fitViewShortcut,nre],[t.zoomToMouseShortcut,zXe],[t.deleteSectionShortcut,_ut],[t.selectTopLevelNonGroupSections,eQe],[t.selectAll,JNe],[t.showVersionsTabShortcut,pHe],[t.showParamUITypeTabShortcut,mHe],[t.showProjectOverviewTabShortcut,gHe],[t.zoomInShortcut,See,null,!0],[t.zoomOutShortcut,_ee,null,!0],[t.restartLanguageServerShortcut,Pie],[t.selectionKeyCode,eEt,tEt],[t.multiSelectionKeyCode,nEt,rEt],[t.panActivationKeyCode,iEt,sEt],[t.zoomActivationKeyCode,oEt,aEt],[t.moveSectionKeyCode,lEt,cEt],[t.sortingShortcut,cn.getState().activateSortingMode,cn.getState().deactivate],[t.movingFreeShortcut,cn.getState().activateMovingFreeMode,cn.getState().deactivate],["Escape",J7t]],i=[],s=[],o=Hh();for(const[l,c,u,f,h]of r){if(!l)continue;const d=l.toLowerCase(),p=W7t(d),g={parsedShortcut:p,wasPressed:!1,shouldPreventDefault:U7t(p),keyDownAction:c,keyUpAction:u,allowRepeat:f,ignoreWhenInInputField:Z7t(p,o)};s.push(g),e[h]&&(e[h]=g)}Y7t(e,o);let a=j7t(l=>{var u,f;Cv&&Q7t(),Cv=!1,F7t.has(l.code)||N7t(l.code);const c=q7t(l);for(const h of s)if(B1(l,h.parsedShortcut,o)){if(h.ignoreWhenInInputField&&c||(h.shouldPreventDefault&&l.preventDefault(),l.repeat&&!h.allowRepeat))continue;h.keyDownAction(l),h.wasPressed=!0,h.parsedShortcut.mod&&(Cv=!0)}else h.wasPressed&&!((u=h.keepKeyDownCondition)!=null&&u.call(h,l))&&((f=h.keyUpAction)==null||f.call(h,l),h.wasPressed=!1)});return i.push(a),a=B7t(l=>{o&&l.key==="Meta"?pG():x1e(l.code),gG(l,s)}),i.push(a),a=Rk(window,"blur",l=>{pG(),gG(l,s)}),i.push(a),o&&(a=K7t(s),a&&i.push(a)),()=>{i.forEach(l=>l())}}function K7t(t){const e=t.filter(n=>n.parsedShortcut.mod);if(e.length>0)return Rk(window,"mousemove",r=>{Cv&&!r.metaKey&&(e.forEach(i=>{var s;i.wasPressed&&((s=i.keyUpAction)==null||s.call(i,r),i.wasPressed=!1)}),Cv=!1)})}function J7t(){GFe()||P_(),tse()}function eEt(){qe.setState({selectionKeyPressed:!0})}function tEt(){qe.setState({selectionKeyPressed:!1})}function nEt(){qe.setState({multiSelectionActive:!0})}function rEt(){qe.setState({multiSelectionActive:!1})}function iEt(){qe.setState({panActivationKeyPressed:!0})}function sEt(){qe.setState({panActivationKeyPressed:!1})}function oEt(){qe.setState({zoomActivationKeyPressed:!0})}function aEt(){qe.setState({zoomActivationKeyPressed:!1})}function lEt(){qe.setState({moveSectionActivationKeyPressed:!0})}function cEt(){qe.setState({moveSectionActivationKeyPressed:!1})}function uEt(){const[t]=Ot.uiEditorTrueWidth.hook(),[e]=Ot.darkMode.hook();return x.jsx(fWe,{nodeStrokeColor:n=>{var r;return(r=n.style)!=null&&r.background?n.style.background:n.type==="input"?"#0041d0":n.type==="output"?"#ff0072":n.type==="default"?"#1a192b":"#e2e8f0"},nodeColor:n=>{var r;return(r=n.style)!=null&&r.background?n.style.background:e?"#2D384D":"#e2e8f0"},nodeBorderRadius:5,style:{transform:`translateX(-${t}px)`},className:"overflow-hidden rounded-md border border-solid border-[#ffffff00] shadow-md backdrop-blur-sm transition-transform",maskColor:e?"rgb(20, 22, 31, 0.5)":"rgb(51, 65, 85, 0.3)",maskStrokeColor:"",maskStrokeWidth:"1",pannable:!0,onClick:(n,{x:r,y:i})=>{n$(r,i,{zoom:qe.getState().transform[2]})}})}function fEt(){hEt(),dEt();const[t]=Ot.showMinimap.hook();return x.jsxs(Oft,{children:[x.jsx(b1e,{}),x.jsx(wut,{}),x.jsx(zut,{}),x.jsx(Fut,{}),t&&x.jsx(uEt,{}),x.jsx(Sft,{})]})}function hEt(){_.useEffect(()=>G7t(),[])}function dEt(){_.useEffect(()=>{const t=n=>{qt.setState({lastMouseDownLocation:{x:n.clientX,y:n.clientY}})},e=n=>{qt.setState({lastMouseUpLocation:{x:n.clientX,y:n.clientY}})};return document.addEventListener("pointerdown",t),document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerdown",t),document.removeEventListener("pointerup",e)}},[])}function pEt(){const[t,e]=$Fe();return QXe(t,e),BXe(),_.useEffect(()=>{if(t&&!e)return TM(),lQe(),UXe()},[t,e]),x.jsxs(x.Fragment,{children:[!t&&x.jsx(mEt,{}),t&&e?x.jsx(vut,{}):x.jsxs(x.Fragment,{children:[x.jsx(DHe,{}),x.jsx(fut,{}),x.jsx(poe,{children:t&&x.jsx(fEt,{})}),x.jsx(_Qe,{})]})]})}function mEt(){return x.jsxs("div",{className:"single-cell-container absolute h-full w-full",children:[x.jsx("div",{className:"single-cell-child inset-0 place-self-center bg-transparent bg-opacity-50",children:x.jsx("div",{className:"gg-spinner !scale-150 before:!border-t-blue-500 after:!border-blue-500"})}),x.jsx("div",{className:"relative z-10"})]})}const gEt={path:kf,element:x.jsx(hI,{children:x.jsxs(doe,{children:[x.jsx(Qse,{path:kf}),x.jsx(xoe,{children:x.jsx(xWe,{})})]})})},vEt={path:mEe,element:x.jsx(hI,{children:x.jsx(EWe,{})})},OEt={path:uT,element:x.jsx(hI,{children:x.jsxs(doe,{children:[x.jsx(Qse,{path:uT}),x.jsx(xoe,{children:x.jsx(pEt,{})})]})})},yEt=$Ne([vEt,gEt,OEt]);function bEt(){return x.jsx(_Ne,{router:yEt})}const xEt="modulepreload",wEt=function(t){return"/static/"+t},vG={},SEt=function(e,n,r){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=wEt(s),s in vG)return;vG[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":xEt,o||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),o)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},_Et=t=>{t&&t instanceof Function&&SEt(()=>import("./web-vitals-44a8e082.js"),[]).then(({getCLS:e,getFID:n,getFCP:r,getLCP:i,getTTFB:s})=>{e(t),n(t),r(t),i(t),s(t)})};dEe();T$e();Z3e();const kEt=document.getElementById("root"),CEt=RJ(kEt);CEt.render(x.jsx(_.StrictMode,{children:x.jsx(bEt,{})}));_Et();
|
setta/static/frontend/index.html
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
|
17
17
|
<title>setta.dev</title>
|
18
|
-
<script type="module" crossorigin src="/static/assets/index-
|
18
|
+
<script type="module" crossorigin src="/static/assets/index-8dbc1bf9.js"></script>
|
19
19
|
<link rel="stylesheet" href="/static/assets/index-030463f6.css">
|
20
20
|
</head>
|
21
21
|
<body>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
setta/__init__.py,sha256=
|
1
|
+
setta/__init__.py,sha256=n3Yhg-0Sfn7d5zXllzjrxMJIZ5uyUFqawEZCvH3mzdA,28
|
2
2
|
setta/server.py,sha256=q4w9WG7SuLxwYtgXUCQyLt7t_HLmQV4y5abqvm7-uEA,4861
|
3
3
|
setta/start.py,sha256=5sMZ7WH3KV9Q0v186PsaYqsWOz7hebyrpXbBOp9wQww,3589
|
4
4
|
setta/cli/__init__.py,sha256=UxZG_VOMuF6lEBT3teUgTS9ulsK3wt3Gu3BbAQiAmt8,47
|
@@ -109,7 +109,7 @@ setta/static/frontend/browserconfig.xml,sha256=w0iw1t89kA7-965LTfyLYrFzewTQnUWE_
|
|
109
109
|
setta/static/frontend/favicon-16x16.png,sha256=q67Crpy8s3wryu7Y3kffPeysN99Lt4XeFygXhPKize8,740
|
110
110
|
setta/static/frontend/favicon-32x32.png,sha256=4NKXYticYdMrRHmVveHjxqnBU1HWgBT5JyJG8lx3BNE,1027
|
111
111
|
setta/static/frontend/favicon.ico,sha256=02qhEBLsvsgBTZX6dcZElMyivlvrR7Yr6wB8ItEZFsc,15086
|
112
|
-
setta/static/frontend/index.html,sha256=
|
112
|
+
setta/static/frontend/index.html,sha256=gTZj5McGPnc4wk_UgvVfisauyq5T8OCU03qVemsU0kM,1296
|
113
113
|
setta/static/frontend/manifest.json,sha256=ULPYw5A68_eNhxuUVXqxT045yhkurKPSz6hjyGcnmhQ,492
|
114
114
|
setta/static/frontend/mstile-144x144.png,sha256=wQqckmRWre2NCCevevI3rv4j0tcduVMkpYr2tPj73cs,2692
|
115
115
|
setta/static/frontend/mstile-150x150.png,sha256=FUwy6PipTofnhmJB5CdXWYgwy-2inq_sIOdOwdDklcY,2674
|
@@ -186,7 +186,7 @@ setta/static/frontend/assets/cormorant-garamond-latin-ext-700-italic-525738e0.wo
|
|
186
186
|
setta/static/frontend/assets/cormorant-garamond-vietnamese-700-italic-99563037.woff2,sha256=mVYwN54qI0RLXqyrDGPUNpBHWSJDKjgUyBRWa2FJ_ao,5248
|
187
187
|
setta/static/frontend/assets/erase-5e0448ea.svg,sha256=XgRI6pChr392LJ-pGbwqqkN8OWcJMEtRGX-Gv-90qjw,872
|
188
188
|
setta/static/frontend/assets/index-030463f6.css,sha256=AwRj9uHjIVw1WPHMWkZ9QnDmJzGJ0S143q9aIuhd2I8,236399
|
189
|
-
setta/static/frontend/assets/index-
|
189
|
+
setta/static/frontend/assets/index-8dbc1bf9.js,sha256=lrrcqdfo5wltqqAe1EK9pyzsx4VwXeNmwGlcQO6MzaY,2860641
|
190
190
|
setta/static/frontend/assets/inter-all-400-normal-054f12d0.woff,sha256=BU8S0GmcIMyYte4ESEdQJO-WvL2Rb-38m1n0ujdbYxI,128624
|
191
191
|
setta/static/frontend/assets/inter-all-600-normal-c03769e5.woff,sha256=wDdp5VNyQL_IbxcPThD2qI-ETg_QKj7AmCwMCjqDfLE,139072
|
192
192
|
setta/static/frontend/assets/inter-all-800-normal-15dc6e4b.woff,sha256=FdxuS9xuVumB5nbVcCXyt3IWqzS4Z75qiRz_0FV5al0,139120
|
@@ -255,9 +255,9 @@ setta/utils/generate_new_filename.py,sha256=KBLX6paDmTvXR-027TpqQkfijIXc7mCfhen-
|
|
255
255
|
setta/utils/section_contents.py,sha256=V2HQPik6DfSXw4j7IalbP5AZ3OEGCbtL5ub3xL-Q_Qo,4141
|
256
256
|
setta/utils/utils.py,sha256=KjzcvgM3Ab3IcE8vaWYtgBpwzPLKg0LmblnHLoYZJHM,9164
|
257
257
|
setta/utils/websocket_manager.py,sha256=MBIMI8xxOFQF4lT3on4pupi1ttEWXdWPV4fI2YP_UJU,3925
|
258
|
-
setta-0.0.11.
|
259
|
-
setta-0.0.11.
|
260
|
-
setta-0.0.11.
|
261
|
-
setta-0.0.11.
|
262
|
-
setta-0.0.11.
|
263
|
-
setta-0.0.11.
|
258
|
+
setta-0.0.11.dev1.dist-info/LICENSE,sha256=us9fuCq9wmiZVzayjKxNZ2iJYF6dROe0Qp57ToCO7XU,11361
|
259
|
+
setta-0.0.11.dev1.dist-info/METADATA,sha256=D4MNlwjSZCqx_OzeykCTDyzLbFh73oVoH4-iTKCqRno,6808
|
260
|
+
setta-0.0.11.dev1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
261
|
+
setta-0.0.11.dev1.dist-info/entry_points.txt,sha256=P0qCESy9fWF2q1EQ9JufGldCSnPHplDPn8J6Bgk5hB0,42
|
262
|
+
setta-0.0.11.dev1.dist-info/top_level.txt,sha256=8G4lmRzVOnJ11_DescPVHE6MQZH-o06A0nGsDDV2ngY,6
|
263
|
+
setta-0.0.11.dev1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|