PageSourceSearch

https://devkhullar-starfinder.hf.space/assets/RenderHTML-DwhMAd9l.js

js devkhullar-starfinder.hf.space collected 2026-10-04 16:49:50 UTC 6,097 bytes, 1 lines download raw bytes

vendor: 6,097 bytes, line 1
1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,l as n,r}from"./useEvent-xfs0Sn4r.js";import{t as i}from"./react-CBDbhulC.js";import{Rr as a,co as o,gt as s,lo as c,m as l,qr as u}from"./cells-Cp-G34Rz.js";import{t as d}from"./compiler-runtime-CYIjoINj.js";import{c as f}from"./utils-D5Ywm7-q.js";import{g as p}from"./useEventListener-92uWqz-P.js";import{E as m}from"./config-BlNM0caL.js";import{t as h}from"./jsx-runtime-B74pBk57.js";import{t as g}from"./tooltip-BUtPzKB4.js";import{U as _}from"./input-DEbY281O.js";import{r as v}from"./useDebounce-DgpSQhrP.js";import{t as y}from"./copy-icon-z8fuTE3w.js";import{t as b}from"./useRunCells-CX7oW5zy.js";var x=d(),S=e(i(),1),C=h(),w=e=>{let t=(0,x.c)(16),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({href:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,S.useRef)(null),o;t[4]===r?o=t[5]:(o=()=>{let e=new URL(globalThis.location.href);e.hash=r,globalThis.history.pushState({},``,e.toString()),globalThis.dispatchEvent(new HashChangeEvent(`hashchange`));let t=r.slice(1),n=document.getElementById(t);n&&n.scrollIntoView({behavior:`smooth`,block:`start`})},t[4]=r,t[5]=o);let s=o,c;t[6]===s?c=t[7]:(c={onPress:()=>{s()}},t[6]=s,t[7]=c);let{pressProps:l}=_(c),u;t[8]===s?u=t[9]:(u=e=>{e.preventDefault(),s()},t[8]=s,t[9]=u);let d=u,f;return t[10]!==n||t[11]!==d||t[12]!==r||t[13]!==l||t[14]!==i?(f=(0,C.jsx)(`a`,{ref:a,href:r,...l,onClick:d,...i,children:n}),t[10]=n,t[11]=d,t[12]=r,t[13]=l,t[14]=i,t[15]=f):f=t[15],f};async function T(e){let t=l().inOrderIds.at(0);if(t)try{let n=await a.request({document:e,cellId:t});if(!n||n.options.length===0)return;let i=e.split(`.`).pop()??e,o=n.options[0],s=n.options.find(e=>e.name===i)??o;s?.completion_info&&r.set(u,{documentation:s.completion_info})}catch(t){p.debug(`Doc lookup failed for "${e}"`,t)}}var E=e=>{let t=(0,x.c)(8),{qualifiedName:n,children:r}=e,i;t[0]===n?i=t[1]:(i=()=>{T(n)},t[0]=n,t[1]=i);let a=v(i,100),o;t[2]===a?o=t[3]:(o=()=>a.cancel(),t[2]=a,t[3]=o);let s;return t[4]!==r||t[5]!==a||t[6]!==o?(s=(0,C.jsx)(`span`,{onMouseEnter:a,onMouseLeave:o,children:r}),t[4]=r,t[5]=a,t[6]=o,t[7]=s):s=t[7],s};function D(e){if(typeof e!=`object`||!e)return!1;let t=e;return!(t.trusted!==!0||t.notebookCode!==void 0&&typeof t.notebookCode!=`string`)}function O(){let e=window?.__MARIMO_EXPORT_CONTEXT__;return D(e)?e:void 0}function k(){return O()?.trusted===!0}function A(){if(r.get(b)||k()||r.get(f))return!0;try{if(m()===`read`)return!0}catch{}return!1}var j=t(e=>{let t=e(b),n=e(f);if(t||n||k())return!1;let r=!0;try{r=m()===`read`}catch{return!0}return!r});function M(){return n(j)}var N=[],P=e=>{if(e instanceof c.Element&&!/^[A-Za-z][\w-]*$/.test(e.name))return S.createElement(S.Fragment)},F=(e,t)=>{if(t instanceof c.Element&&t.name===`body`){if((0,S.isValidElement)(e)&&`props`in e){let t=e.props.children;return(0,C.jsx)(C.Fragment,{children:t})}return}},I=(e,t)=>{if(t instanceof c.Element&&t.name===`html`){if((0,S.isValidElement)(e)&&`props`in e){let t=e.props.children;return(0,C.jsx)(C.Fragment,{children:t})}return}},L=e=>{if(e instanceof c.Element&&e.attribs&&e.name===`iframe`){let t=document.createElement(`iframe`);return Object.entries(e.attribs).forEach(([e,n])=>{e.startsWith(`"`)&&e.endsWith(`"`)&&(e=e.slice(1,-1)),t.setAttribute(e,n)}),(0,C.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t.outerHTML}})}},R=e=>{if(e instanceof c.Element&&e.name===`script`){let t=e.attribs.src;if(!t)return;if(!A())return p.warn(`[RenderHTML] refusing <script src> in untrusted context: ${t}`),(0,C.jsx)(C.Fragment,{});if(![...document.querySelectorAll(`script[src]`)].some(e=>e.getAttribute(`src`)===t)){let e=document.createElement(`script`);e.src=t,document.head.append(e)}return(0,C.jsx)(C.Fragment,{})}},z=(e,t)=>{if(t instanceof c.Element&&t.name===`a`){let n=t.attribs.href;if(n?.startsWith(`#`)&&!n.startsWith(`#code/`)){let r=null;return(0,S.isValidElement)(e)&&`props`in e&&(r=e.props.children),(0,C.jsx)(w,{href:n,...t.attribs,children:r})}}},B=(e,t,n)=>{if(t instanceof c.Element&&t.name===`div`&&t.attribs?.class?.includes(`codehilite`))return(0,C.jsx)(G,{children:e},n)},V=(e,t,n)=>{if(!(t instanceof c.Element)||t.name!==`img`)return;let r=t.attribs?.src;if(!(!r||!(0,S.isValidElement)(e))&&!/^data:/i.test(r))return(0,S.cloneElement)(e,{key:`${r}-${n}`})},H=(e,t,n)=>{if(!(t instanceof c.Element)||t.name!==`input`||t.attribs?.type!==`checkbox`||!(0,S.isValidElement)(e))return;let r=`checked`in t.attribs;return(0,S.cloneElement)(e,{key:`checkbox-${n}-${r}`})},U=(e,t)=>{if(t instanceof c.Element&&t.attribs?.[`data-marimo-doc`]){let n=t.attribs[`data-marimo-doc`];return(0,C.jsx)(E,{qualifiedName:n,children:e})}},W=(e,t)=>{if(t instanceof c.Element&&t.attribs?.[`data-tooltip`]){if((t.name?.toLowerCase()??``).startsWith(`marimo-`))return;let n=t.attribs[`data-tooltip`];return(0,C.jsx)(g,{content:n,children:e})}},G=e=>{let t=(0,x.c)(3),{children:n}=e,r=(0,S.useRef)(null),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,C.jsx)(`div`,{className:`absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity`,children:(0,C.jsx)(y,{tooltip:!1,className:`p-1`,value:()=>{let e=r.current?.firstChild;return e&&e.textContent||``}})}),t[0]=i):i=t[0];let a;return t[1]===n?a=t[2]:(a=(0,C.jsxs)(`div`,{className:`relative group codehilite-wrapper`,ref:r,children:[n,i]}),t[1]=n,t[2]=a),a},K=({html:e,additionalReplacements:t=N,alwaysSanitizeHtml:n=!0})=>(0,C.jsx)(q,{html:e,alwaysSanitizeHtml:n,additionalReplacements:t}),q=e=>{let t=(0,x.c)(5),{html:n,additionalReplacements:r,alwaysSanitizeHtml:i}=e,a=r===void 0?N:r,o=M(),c;bb0:{if(i||o){let e;t[0]===n?e=t[1]:(e=s(n),t[0]=n,t[1]=e),c=e;break bb0}c=n}let l=c,u;return t[2]!==a||t[3]!==l?(u=J({html:l,additionalReplacements:a}),t[2]=a,t[3]=l,t[4]=u):u=t[4],u};function J({html:e,additionalReplacements:t=N}){let n=[P,L,R,...t],r=[B,z,U,W,F,I],i=[V,H];return o(e,{replace:(e,t)=>{for(let r of n){let n=r(e,t);if(n)return n}return e},transform:(e,t,n)=>{let a=e;for(let e of r){let r=e(a,t,n);if(r){a=r;break}}for(let e of i){let r=e(a,t,n);r&&(a=r)}return a}})}export{k as n,K as t};

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.