PageSourceSearch

https://dataskeptic.com/assets/Tabbed-awX44NaL.js

js dataskeptic.com collected 2026-09-24 08:49:23 UTC 10,793 bytes, 1 lines download raw bytes

1import{d as Z,b as ne,u as ee,r as h,Y as R,j as e,P as S,S as m,bG as F,H as V,W as q,an as ae}from"./index-Ba9Uy_0B.js";import se from"./Dashboard-Bx3GJBHe.js";import ie from"./ObjectExplorer-KDRtuDX1.js";import{S as le}from"./Streams-DQCVWequ.js";import ce from"./Parallax-lVQ6_7Yo.js";import{J as Y,K as pe}from"./Parameter-CIU04DnV.js";import{M as Q}from"./index-B_UEhZpz.js";import{P as de}from"./Popup-swQNg5XR.js";import"./outputActions-jNwelCTN.js";import"./AppWebsiteV2-D-DyA8jx.js";import"./Support-Dp9OY2CK.js";import"./types-0x_1vaZr.js";import"./useAudioPosition-BKhzL7Ul.js";import"./sanitizeCss-DDeV3a_4.js";import"./ThemeEditor-Ftxe5o6k.js";import"./types-C-48g5o1.js";import"./useCredentialReports-1XJ2ggYp.js";import"./applications-BVr2fXrH.js";import"./ParameterBuilder-BTwXZ-eo.js";import"./index-CHs69FEm.js";import"./ace-CsNAEGat.js";import"./SelectOptions-Cr9sZBzB.js";import"./StreamSelectorV2-BvfpNmF8.js";import"./Card-DSQpm4Zo.js";import"./ValidationsEditor-DIZOObhf.js";import"./Dashboard-CmZunZWn.js";import"./AppMenu-C2wOi_5e.js";import"./Placeholder-BDdAiu3I.js";import"./PlusScriptView-ZjAchy6f.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./style-D1FZ9Fq9.js";import"./StreamTriggerDataHandler-CqG8FtI2.js";import"./Parameter-DhrCHhkN.js";import"./ApplicationContext-BPOmyv3K.js";import"./useDebounce-CfmHqTym.js";import"./useMobile-Buw0TmOj.js";import"./SplitPaneLayout-BpcAu9GL.js";import"./index-CR0ZZmCe.js";import"./motion-Do0TwJaM.js";import"./ItemActionButtonsRunner-DEC8hvgv.js";import"./SpreadsheetViewer-Dq0hDFNa.js";import"./ReceiptViewerModal-DSKAJxcz.js";import"./JobViewerModal-BIre6rNC.js";import"./JobDetailView-G5BL_KDr.js";import"./mode-json-DGKgiNOd.js";import"./mode-text-owca_3Io.js";import"./CustomTemplateModal-D8OmoLwI.js";import"./mode-css-ZyOVlraq.js";import"./useNavigationBlocker-1k5TnLfB.js";import"./StreamViewer-DCsztOU-.js";import"./StreamEChart-UMogpeU2.js";import"./ReactECharts-Dm1uMdFf.js";import"./FileViewer-CZgTJCIz.js";import"./Tab-BEOnIEuN.js";import"./JSONViewer-41NJKPjX.js";import"./papaparse.min-DP-rE8ZQ.js";import"./leaflet-CNnEvCsP.js";import"./index-BpoLgcEt.js";import"./prism-0gegvp5-.js";import"./toConsumableArray-B9rchDtj.js";import"./ActionRunnerMain-CV6USzP8.js";import"./ActionInfo-BJu3O9fs.js";import"./vis-network-BHjj1H0E.js";import"./theme-monokai-KobNCr1x.js";import"./YouTube.esm-BhhMLP13.js";/* empty css                  */import"./ParallaxEngine-BVxatVZg.js";import"./use-transform-C0QPqT9n.js";import"./AudioRecordingPublic-CCtAJy5q.js";import"./PodcastLatestEpisode-C7YYK5rU.js";import"./imageResize-BSgDhDs_.js";import"./MailingList-CrqGUsIU.js";import"./Playlist-C5OVUuvE.js";const me=["http://","https://","mailto:","/","#","./"];function ue(n){if(typeof n!="string")return null;const a=n.replace(/[\t\n\r]/g,"").replace(/^[\u0000-\u0020\u007f]+/,"").trim();if(!a)return null;const u=a.toLowerCase();return me.some(j=>u.startsWith(j))?a.replace(/"/g,"&quot;").replace(/'/g,"&#39;"):null}function te(n){if(!n)return"";let a=n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/^### (.+)$/gm,"<h3>$1</h3>").replace(/^## (.+)$/gm,"<h2>$1</h2>").replace(/^# (.+)$/gm,"<h1>$1</h1>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,(u,j,I)=>{const k=ue(I);return k===null?j:'<a href="'.concat(k,'" target="_blank" rel="noopener noreferrer">').concat(j,"</a>")}).replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br />");return"<p>".concat(a,"</p>")}ae("useandom26T198340PX75pxJACKVERYMINDBUSHWOLFGQZbfghjklqvwyzrict",5);function be({application:n,loading:a=!1,parentAppObjectId:u}){var j;const I=Z(),{username:k}=ee(),{admin_params:W=[],admin_settings:G=new Map}=n??{},c=(j=G.get("file_key"))==null?void 0:j.sval,[p,f]=h.useState(null),[D,s]=h.useState(null),[L,U]=h.useState(!1);h.useEffect(()=>{(async()=>{if(!(!c||!u)){U(!0),s(null);try{const E=await I.getEmbeddedContent(c,u);f(E)}catch(E){console.error("[FileViewer] Error fetching embedded content:",E),s(E.message||"Failed to load embedded content")}finally{U(!1)}}})()},[c,u]);const P=c?c.slice(c.lastIndexOf(".")+1).toLowerCase():"";return a||L?e.jsx(m,{children:e.jsx(m,{placeholder:!0,children:e.jsxs(V,{icon:!0,children:[e.jsx(S,{loading:!0,name:"spinner"}),"Loading File"]})})}):D?e.jsx(m,{children:e.jsxs(m,{placeholder:!0,children:[e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"exclamation triangle"}),"Error loading file"]}),e.jsx("p",{children:D})]})}):c?p!==null?P==="md"||P==="markdown"?e.jsx(m,{style:{overflow:"auto",maxHeight:"70vh"},children:e.jsx("div",{className:"markdown-content",dangerouslySetInnerHTML:{__html:te(p)}})}):e.jsx(m,{style:{overflow:"auto",maxHeight:"70vh"},children:e.jsx("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:p})}):e.jsx(m,{children:e.jsx(m,{placeholder:!0,children:e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"file outline"}),"No content available"]})})}):e.jsx(m,{children:e.jsx(m,{placeholder:!0,children:e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"exclamation triangle"}),"File not found"]}
1)})})}function Vt({application:n,refreshApps:a,onAddedApp:u,className:j,id:I}){var k,W;const G=Z(),{hostname:c}=ne(),{username:p}=ee(),[f,D]=h.useState(0),[s,L]=h.useState(n),[U,P]=h.useState(!1),[B,E]=h.useState(new Set([0]));h.useEffect(()=>{n&&L(n)},[n]);const{admin_params:he=[],admin_settings:z=new Map}=s??{},K=((k=z.get("footer_markdown"))==null?void 0:k.sval)||"";h.useEffect(()=>{(async()=>{if(!c||!p||!(n!=null&&n.object_id))return;const r=n.object_id.split("."),b=r[r.length-1];if(b)try{const l=await G.checkAndUpgradeApp(c,p,b);if(console.log("[TabbedApp] Upgrade check result:",l),l.upgraded&&l.app){console.log("[TabbedApp] Upgraded from ".concat(l.from_version," to ").concat(l.to_version));const w=F.fromObject(l.app);L(w),a&&a(!0)}}catch(l){console.error("[TabbedApp] Upgrade check failed:",l)}})()},[c,p,n==null?void 0:n.object_id]);const A=(W=z.get("tabs"))==null?void 0:W.vals,M=h.useMemo(()=>A&&A.length>0?A.map(o=>{var r,b,l,w,C;const{vmap:x}=o,$=(r=x.get("group"))==null?void 0:r.sval,_=(b=x.get("label"))==null?void 0:b.sval,O=(l=x.get("icon"))==null?void 0:l.sval,g=(w=x.get("hover_desc"))==null?void 0:w.sval;let i=(C=x.get("nested"))==null?void 0:C.vmap;if(i&&!(i instanceof Map)){console.warn("[TabbedApp] nestedVals is not a Map, converting:",typeof i,Object.keys(i));try{i=new Map(Object.entries(i).map(([t,y])=>[t,R.fromObject(y)]))}catch(t){console.error("[TabbedApp] Failed to convert nestedVals:",t),i=new Map}}return{group:$,label:_,icon:O,description:g,nestedVals:i}}):[],[A]);h.useEffect(()=>{var o;((o=M[f])==null?void 0:o.group)==="dashboard"&&E(r=>{if(r.has(f))return r;const b=new Set(r);return b.add(f),b})},[f,M]);const J=o=>{if(!o||!p)return!1;const r=/^[^/]+\/([^/]+)\//.exec(o);return r?r[1]!==p:!1},oe=(()=>{var o,r,b,l,w,C,x,$;if(!A||A.length===0)return null;const _=[];M.forEach((g,i)=>{var t;if(g.group!=="dashboard"||!B.has(i))return;const{nestedVals:y}=g,v=((t=y==null?void 0:y.get("dashboard_id"))==null?void 0:t.sval)||"";if(!v){_.push(e.jsx("div",{style:{display:i===f?"block":"none",height:"100%"},children:e.jsxs(m,{placeholder:!0,children:[e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"setting"}),'No Dashboard configured for "',g.label||"this tab",'"']}),e.jsx("p",{style:{textAlign:"center",color:"#888",maxWidth:"500px",margin:"0.5rem auto"},children:'Open the Web Builder, go to Applications, select this Tabbed App, and choose a Dashboard for this tab using "Select Existing" or "New Dashboard".'})]})},"dashboard-container-unconfigured-".concat(i)));return}const d=new F({admin_params:[],admin_settings:y});_.push(e.jsx("div",{style:{display:i===f?"block":"none",height:"100%"},children:e.jsx(se,{application:d,refreshApps:a,onAddedApp:u,embedded:!0,parentAppObjectId:s==null?void 0:s.object_id},"dashboard-".concat(v))},"dashboard-container-".concat(v)))});const O=M[f];if(O&&O.group!=="dashboard"){const{group:g,label:i,nestedVals:t}=O,y=new F({admin_params:[],admin_settings:t});if(g==="collection"){const v=(o=t==null?void 0:t.get("collections_app_type"))==null?void 0:o.sval;let d=(r=t==null?void 0:t.get("collection_id"))==null?void 0:r.sval;const T=v||(d?Y.MyCollection:void 0);if(T===Y.UserCollection&&p){const X=(b=t==null?void 0:t.get("collection_slug"))==null?void 0:b.sval;X&&(d="".concat(c,"/").concat(p,"/collection.").concat(X))}const H=J(d),N=t instanceof Map?new Map(t):new Map;N.set("collection_id",R.fromObject({ptype:q.STRING,sval:d})),(T&&!N.has("collections_app_type")||T&&((l=N.get("collections_app_type"))==null?void 0:l.sval)!==T)&&N.set("collections_app_type",R.fromObject({ptype:q.STRING,sval:T}));const re=new F({admin_params:[],admin_settings:N});_.push(e.jsx(ie,{application:re,refreshApps:a,onAddedApp:u,embedded:H,parentAppObjectId:H?s==null?void 0:s.object_id:void 0},"collection-".concat(d)))}if(g==="stream"){const v=(w=t==null?void 0:t.get("streams_app_type"))==null?void 0:w.sval;let d=(C=t==null?void 0:t.get("stream_id"))==null?void 0:C.sval;if(v===pe.UserStream&&p){const H=(x=t==null?void 0:t.get("stream_slug"))==null?void 0:x.sval;H&&(d="".concat(c,"/").concat(p,"/stream.").concat(H))}console.log("[TabbedApp] Stream tab resolved:",{streamId:d,streamsAppType:v,tabLabel:i,appObjectId:s==null?void 0:s.object_id}),J(d);const T=new F({admin_params:[],admin_settings:new Map(t).set("stream_id",R.fromObject({ptype:q.STRING,sval:d}))});_.push(e.jsx(le,{application:T,refreshApps:a,onAddedApp:u,embedded:!0,parentAppObjectId:s==null?void 0:s.object_id},"stream-".concat(d)))}if(g==="file"){const v=(($=t==null?void 0:t.get("file_key"))==null?void 0:$.sval)||"";_.push(e.jsx(be,{application:y,refreshApps:a,onAddedApp:u,parentAppObjectId:s==null?void 0:s.object_id},"file-".concat(v)))}g==="parallax"&&_.push(e.jsx(ce,{application:y,refreshApps:a,onAddedApp:u},"parallax-".concat(f)))}return _})();return e.jsxs("main",{className:"tabbed-app plus-app-tabs",id:"tabbed-app",children:[e.jsx(Q,{attached:"top",tabular:!0,children:M.map((o,r)=>
1e.jsxs(Q.Item,{name:o.label,active:r===f,onClick:()=>D(r),children:[o.icon&&e.jsx(S,{name:o.icon}),o.description&&o.description.trim()?e.jsx(de,{wide:"very",trigger:e.jsx("span",{children:o.label}),children:o.description}):e.jsx("span",{children:o.label})]},r))}),e.jsx(m,{attached:"bottom",className:"tabview",id:I,children:oe}),K&&K.trim()&&!U&&e.jsxs(m,{className:"tabbed-app-footer",style:{marginTop:"1rem",position:"relative",textAlign:"center"},children:[e.jsx(S,{name:"close",link:!0,style:{position:"absolute",top:"0.5rem",right:"0.5rem",opacity:.5,cursor:"pointer"},onClick:()=>P(!0),title:"Hide footer"}),e.jsx("div",{className:"markdown-content footer-content",dangerouslySetInnerHTML:{__html:te(K)}})]})]})}export{Vt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.