PageSourceSearch

https://host.hn/assets/useRenderElement-YvmFQZQL.js

js host.hn collected 2026-10-02 18:32:59 UTC 8,976 bytes, 1 lines download raw bytes

1import{D as e,S as t}from"./reactQuery-Bwgpc3BK.js";var n=e(t(),1);function r(){return typeof window<`u`}function i(e){return s(e)?(e.nodeName||``).toLowerCase():`#document`}function a(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function o(e){return((s(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function s(e){return r()?e instanceof Node||e instanceof a(e).Node:!1}function c(e){return r()?e instanceof Element||e instanceof a(e).Element:!1}function l(e){return r()?e instanceof HTMLElement||e instanceof a(e).HTMLElement:!1}function u(e){return!r()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof a(e).ShadowRoot}function d(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=b(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function f(e){return/^(table|td|th)$/.test(i(e))}function p(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var m=/transform|translate|scale|rotate|perspective|filter/,ee=/paint|layout|strict|content/,h=e=>!!e&&e!==`none`,g;function _(e){let t=c(e)?b(e):e;return h(t.transform)||h(t.translate)||h(t.scale)||h(t.rotate)||h(t.perspective)||!v()&&(h(t.backdropFilter)||h(t.filter))||m.test(t.willChange||``)||ee.test(t.contain||``)}function te(e){let t=x(e);for(;l(t)&&!y(t);){if(_(t))return t;if(p(t))return null;t=x(t)}return null}function v(){return g??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),g}function y(e){return/^(html|body|#document)$/.test(i(e))}function b(e){return a(e).getComputedStyle(e)}function ne(e){return c(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function x(e){if(i(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||u(e)&&e.host||o(e);return u(t)?t.host:t}function S(e){let t=x(e);return y(t)?e.ownerDocument?e.ownerDocument.body:e.body:l(t)&&d(t)?t:S(t)}function C(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=S(e),i=r===e.ownerDocument?.body,o=a(r);if(i){let e=w(o);return t.concat(o,o.visualViewport||[],d(r)?r:[],e&&n?C(e):[])}else return t.concat(r,C(r,[],n))}function w(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var T={...n},E={};function D(e,t){let r=n.useRef(E);return r.current===E&&(r.current=e(t)),r}var O=T.useInsertionEffect,re=O&&O!==T.useLayoutEffect?O:e=>e();function k(e){let t=D(ie).current;return t.next=e,re(t.effect),t.trampoline}function ie(){let e={next:void 0,callback:ae,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function ae(){}var A=typeof document<`u`?n.useLayoutEffect:()=>{};function j(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var M={};function N(e,t,n,r,i){if(!n&&!r&&!i&&!e)return P(t);let a=P(e);return t&&(a=F(a,t)),n&&(a=F(a,n)),r&&(a=F(a,r)),i&&(a=F(a,i)),a}function oe(e){if(e.length===0)return M;if(e.length===1)return P(e[0]);let t=P(e[0]);for(let n=1;n<e.length;n+=1)t=F(t,e[n]);return t}function P(e){return L(e)?{...R(e,M)}:se(e)}function F(e,t){return L(t)?R(t,e):ce(e,t)}function se(e){let t={...e};for(let e in t){let n=t[e];I(e,n)&&(t[e]=z(n))}return t}function ce(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=j(e.style,r);break;case`className`:e[n]=V(e.className,r);break;default:I(n,r)?e[n]=le(e[n],r):e[n]=r}}return e}function I(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function L(e){return typeof e==`function`}function R(e,t){return L(e)?e(t):e??M}function le(e,t){return t?e?(...n)=>{let r=n[0];if(H(r)){let i=r;B(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:z(t):e}function z(e){return e&&((...t)=>{let n=t[0];return H(n)&&B(n),e(...t)})}function B(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function V(e,t){return t?e?t+` `+e:t:e}function H(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function ue(e,t){return function(n,...r){let i=new URL(e);
1return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var U=ue(`https://base-ui.com/production-error`,`Base UI`),W=n.createContext(void 0);function G(e=!1){let t=n.useContext(W);if(t===void 0&&!e)throw Error(U(16));return t}function de(e){let{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:a=0,isNativeButton:o}=e,s=i&&t!==!1,c=i&&t===!1;return{props:n.useMemo(()=>{let e={onKeyDown(e){r&&t&&e.key!==`Tab`&&e.preventDefault()}};return i||(e.tabIndex=a,!o&&r&&(e.tabIndex=t?a:-1)),(o&&(t||s)||!o&&r)&&(e[`aria-disabled`]=r),o&&(!t||c)&&(e.disabled=r),e},[i,r,t,s,c,o,a])}}function fe(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:a=!0,composite:o}=e,s=n.useRef(null),c=G(!0),l=o??c!==void 0,{props:u}=de({focusableWhenDisabled:r,disabled:t,composite:l,tabIndex:i,isNativeButton:a}),d=n.useCallback(()=>{let e=s.current;K(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return A(d,[d]),{getButtonProps:n.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:o,onPointerDown:s,...c}=e;return N({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(B(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,s=K(i),c=!a&&pe(i),u=r&&(a?s:!c),d=e.key===`Enter`,f=e.key===` `,p=i.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||a&&s?(i.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!a&&(f||d)&&e.preventDefault(),!a&&d&&n?.(e))},onKeyUp(e){if(!t){if(B(e),i?.(e),e.target===e.currentTarget&&a&&l&&K(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!a&&!l&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},a?{type:`button`}:{role:`button`},u,c)},[t,u,l,a]),buttonRef:k(e=>{s.current=e,d()})}}function K(e){return l(e)&&e.tagName===`BUTTON`}function pe(e){return!!(e?.tagName===`A`&&e?.href)}function q(e,t,n,r){let i=D(J).current;return he(i,e,t,n,r)&&Y(i,[e,t,n,r]),i.callback}function me(e){let t=D(J).current;return ge(t,e)&&Y(t,e),t.callback}function J(){return{callback:null,cleanup:null,refs:[]}}function he(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function ge(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Y(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var _e=18;function X(e){return _e>=e}function Z(e){if(!n.isValidElement(e))return null;let t=e,r=t.props;return(X(19)?r?.ref:t.ref)??null}function ve(){}var ye=Object.freeze([]),Q=Object.freeze({});function be(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function xe(e,t){return typeof e==`function`?e(t):e}function $(e,t){return typeof e==`function`?e(t):e}function Se(e,t,n={}){let r=t.render,i=Ce(t,n);return n.enabled===!1?null:Ee(e,r,i,n.state??Q)}function Ce(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Q,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?xe(n,a):void 0,d=l?$(r,a):void 0,f=l?be(a,c):Q,p=l&&s?we(s):void 0,m=l?j(f,p)??{}:Q;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=me([m.ref,Z(i),...o]):m.ref=q(m.ref,Z(i),o):q(null,null)),l?(u!==void 0&&(m.className=V(m.className,u)),d!==void 0&&(m.style=j(m.style,d)),m):Q}function we(e){return Array.isArray(e)?oe(e):N(void 0,e)}var Te=Symbol.for(`react.lazy`);
1function Ee(e,t,r,i){if(t){if(typeof t==`function`)return t(r,i);let e=N(r,t.props);e.ref=r.ref;let a=t;return a?.$$typeof===Te&&(a=n.Children.toArray(t)[0]),n.cloneElement(a,e)}if(e&&typeof e==`string`)return De(e,r);throw Error(U(8))}function De(e,t){return e===`button`?(0,n.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,n.createElement)(`img`,{alt:``,...t,key:t.key}):n.createElement(e,t)}export{s as A,C,c as D,_ as E,v as F,u as M,f as N,l as O,p as P,ne as S,a as T,b as _,ve as a,w as b,fe as c,U as d,N as f,T as g,D as h,Q as i,d as j,y as k,W as l,k as m,$ as n,X as o,A as p,ye as r,q as s,Se as t,G as u,te as v,x as w,i as x,o as y};

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.