@nexus-cross/dapp-ui 1.4.0-beta.8 → 1.4.0

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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- function _d(e){try{return import.meta.env?.[e]}catch{return}}function Gd(e){if(!(typeof process>"u"))return process.env?.[e]}function nt(e){if(e)return Hd(e);let t=_d("VITE_CROSSX_ENVIRONMENT")??_d("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Gd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Gd("CROSSX_ENVIRONMENT");return Hd(t)}function Hd(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}import*as un from"react";var bh={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",production:"https://contents.crosstoken.io/frontend/common/app-launcher"},wh=3e3;function Pr(e,t){if(e!=null)return typeof e=="object"&&!Array.isArray(e)&&("dev"in e||"stage"in e||"production"in e)?e[t]:e}var Zs=new Map;function io(e,t){let r=`${bh[t]}/${e}`,n=Zs.get(r);return n||(n=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),wh);try{let i=await fetch(r,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Zs.delete(r),o)),Zs.set(r,n)),n}function yh(e){return typeof e=="string"&&e.startsWith("https://")}async function Me(e,t){let r=await io("endpoints.json",t),n=Pr(r?.apis?.[e],t);if(!yh(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}function ri(e,t){let r=Pr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var ni="chains.json";async function xh(e,t){return(await io(ni,t))?.chains?.[String(e)]??{}}function ia(e,t){let[r,n]=un.useState({});return un.useEffect(()=>{if(e==null){n({});return}let o=!0;return io(ni,t).then(a=>{o&&n(a?.chains?.[String(e)]??{})}),()=>{o=!1}},[e,t]),r}function vh(e){let[t,r]=un.useState({});return un.useEffect(()=>{let n=!0;return io(ni,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function rr(e,t,r){let[n,o]=un.useState(void 0),a=un.useRef(r);return a.current=r,un.useEffect(()=>{let i=!0;return io(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),n}var so="1.4.0-beta.8";var oi="__nexusCrossAppLauncherRuntime";function kh(){if(typeof window>"u")return null;let e=window;return e[oi]??(e[oi]={mode:"dapp-ui"}),e[oi]}function Rh(e){if(e.scheduled)return;e.scheduled=!0;let t=()=>{if(e.scheduled=!1,e.loggedMode!==e.mode){if(e.mode==="connect-kit-react"){let r=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${r} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${so}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${so} \uCD08\uAE30\uD654 \uC644\uB8CC (\uC0AC\uC6A9 \uBAA8\uB4DC: dapp-ui only)`);e.loggedMode=e.mode}};typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)}function Xs(e){let t=kh();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),Rh(t))}import{BrowserClient as Sh,Scope as Ch,defaultStackParser as Nh,linkedErrorsIntegration as Th,makeFetchTransport as Ih}from"@sentry/react";var Eh="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Mh=`dapp-ui@${so}`,Eo=null,Qd=.1;function Vd(){return Qd}function Ah(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function sa(e){if(Eo)return Eo;if(typeof window>"u")return null;let t=Ah(nt(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Qd=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new Sh({dsn:e?.dsn??Eh,transport:Ih,stackParser:Nh,integrations:[Th()],environment:t,release:Mh,enabled:e?.enabled??t==="prod"}),n=new Ch;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),Eo=n,Eo}function ai(){return Eo}function ii(e,t){let r=Eo??sa();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}import{Component as Lh}from"react";var si=class extends Lh{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){ii(r,{componentStack:n.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function ve(...e){return e.filter(Boolean).join(" ")}var Dh=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Mo(){return typeof window>"u"?!1:Dh.test(window.navigator.userAgent)}var qd="__nexus_dapp_ui_uid",Js=null;function Ph(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function $s(){if(Js)return Js;let e=null;try{e=window.localStorage.getItem(qd)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Ph()}`;try{window.localStorage.setItem(qd,e)}catch{}}return Js=e,e}async function Yd(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),r=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Oh(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Xd(){return{host:window.location.hostname,device_type:Oh(),is_cross_inapp:String(Mo())}}var Kd=!1;function el(){if(typeof window>"u")return null;let e=ai()??sa();return e?(Kd||(Kd=!0,e.setUser({id:$s()})),e):null}function Jd(){return Math.random()>=Vd()}var Zd=0;function Ao(e){let t=el();if(!t)return;let r=++Zd;if(!e){t.setUser({id:$s()});return}Yd(e).then(n=>{n&&r===Zd&&t.setUser({id:n})})}function li(e,t,r){let n=el();!n||Jd()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Xd(),feature:e,action:t,...r}}})}function qe(e,t,r){let n=el();if(!n||Jd())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Xd(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function Nr(e){let t=e,r=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(r)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(r)?"insufficient-gas":/timeout|timed out|deadline/i.test(r)?"timeout":/revert|execution failed/i.test(r)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(r)?"network":"unknown"}import{useCallback as Bh}from"react";import{jsx as zh}from"react/jsx-runtime";function ye({feature:e,children:t}){let r=Bh(n=>{let o=n.nativeEvent;if(o.__dappUiTracked)return;let i=n.target?.closest?.("[data-track]");if(!i)return;let s=i.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=i.getAttribute("data-track-id");li(e,s,l?{item_id:l}:void 0)},[e]);return zh("div",{style:{display:"contents"},onClick:r,children:t})}import*as Po from"react";import*as ec from"@radix-ui/react-popover";import{Drawer as Vh}from"vaul";import{createContext as Fh,useContext as Uh}from"react";var tl=Fh(null);function di(){let e=Uh(tl);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}import*as pi from"react";var jh="__dappUiOverlay",lo=[],Lo=0,nl=0,ci=!1,rl=!1;function $d(){if(nl>0){nl-=1;return}Lo=Math.max(0,Lo-1),lo.pop()?.close(),ol()}function Wh(){ci||(window.addEventListener("popstate",$d),ci=!0)}function ol(){lo.length>0||!ci||(window.removeEventListener("popstate",$d),ci=!1)}function _h(){rl||(rl=!0,queueMicrotask(()=>{rl=!1;let e=Lo-lo.length;if(e<=0){ol();return}Lo-=e,nl+=1,window.history.go(-e),ol()}))}function On(e,t){let r=pi.useRef(t);r.current=t,pi.useEffect(()=>{if(!(!e||typeof window>"u"))return Gh(()=>r.current())},[e])}function Gh(e){let t={close:e};return lo.push(t),Lo<lo.length&&(window.history.pushState({[jh]:!0},""),Lo+=1),Wh(),()=>{let r=lo.lastIndexOf(t);r!==-1&&(lo.splice(r,1),_h())}}import{useState as Hh,useEffect as Qh}from"react";function Do(e){let[t,r]=Hh(!1);return Qh(()=>{let n=window.matchMedia(e);r(n.matches);let o=a=>r(a.matches);return n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[e]),t}function ce(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}ce(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #422a1f);--al-badge-text: var(--ds-accent-primary-default, #f0640d);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #fff5ee);--al-badge-text: var(--ds-accent-primary-default, #ff8438);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
1
+ function _d(e){try{return import.meta.env?.[e]}catch{return}}function Gd(e){if(!(typeof process>"u"))return process.env?.[e]}function nt(e){if(e)return Hd(e);let t=_d("VITE_CROSSX_ENVIRONMENT")??_d("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Gd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Gd("CROSSX_ENVIRONMENT");return Hd(t)}function Hd(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}import*as un from"react";var bh={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",production:"https://contents.crosstoken.io/frontend/common/app-launcher"},wh=3e3;function Pr(e,t){if(e!=null)return typeof e=="object"&&!Array.isArray(e)&&("dev"in e||"stage"in e||"production"in e)?e[t]:e}var Zs=new Map;function io(e,t){let r=`${bh[t]}/${e}`,n=Zs.get(r);return n||(n=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),wh);try{let i=await fetch(r,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Zs.delete(r),o)),Zs.set(r,n)),n}function yh(e){return typeof e=="string"&&e.startsWith("https://")}async function Me(e,t){let r=await io("endpoints.json",t),n=Pr(r?.apis?.[e],t);if(!yh(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}function ri(e,t){let r=Pr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var ni="chains.json";async function xh(e,t){return(await io(ni,t))?.chains?.[String(e)]??{}}function ia(e,t){let[r,n]=un.useState({});return un.useEffect(()=>{if(e==null){n({});return}let o=!0;return io(ni,t).then(a=>{o&&n(a?.chains?.[String(e)]??{})}),()=>{o=!1}},[e,t]),r}function vh(e){let[t,r]=un.useState({});return un.useEffect(()=>{let n=!0;return io(ni,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function rr(e,t,r){let[n,o]=un.useState(void 0),a=un.useRef(r);return a.current=r,un.useEffect(()=>{let i=!0;return io(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),n}var so="1.4.0";var oi="__nexusCrossAppLauncherRuntime";function kh(){if(typeof window>"u")return null;let e=window;return e[oi]??(e[oi]={mode:"dapp-ui"}),e[oi]}function Rh(e){if(e.scheduled)return;e.scheduled=!0;let t=()=>{if(e.scheduled=!1,e.loggedMode!==e.mode){if(e.mode==="connect-kit-react"){let r=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${r} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${so}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${so} \uCD08\uAE30\uD654 \uC644\uB8CC (\uC0AC\uC6A9 \uBAA8\uB4DC: dapp-ui only)`);e.loggedMode=e.mode}};typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)}function Xs(e){let t=kh();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),Rh(t))}import{BrowserClient as Sh,Scope as Ch,defaultStackParser as Nh,linkedErrorsIntegration as Th,makeFetchTransport as Ih}from"@sentry/react";var Eh="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Mh=`dapp-ui@${so}`,Eo=null,Qd=.1;function Vd(){return Qd}function Ah(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function sa(e){if(Eo)return Eo;if(typeof window>"u")return null;let t=Ah(nt(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Qd=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new Sh({dsn:e?.dsn??Eh,transport:Ih,stackParser:Nh,integrations:[Th()],environment:t,release:Mh,enabled:e?.enabled??t==="prod"}),n=new Ch;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),Eo=n,Eo}function ai(){return Eo}function ii(e,t){let r=Eo??sa();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}import{Component as Lh}from"react";var si=class extends Lh{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){ii(r,{componentStack:n.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function ve(...e){return e.filter(Boolean).join(" ")}var Dh=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Mo(){return typeof window>"u"?!1:Dh.test(window.navigator.userAgent)}var qd="__nexus_dapp_ui_uid",Js=null;function Ph(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function $s(){if(Js)return Js;let e=null;try{e=window.localStorage.getItem(qd)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Ph()}`;try{window.localStorage.setItem(qd,e)}catch{}}return Js=e,e}async function Yd(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),r=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Oh(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Xd(){return{host:window.location.hostname,device_type:Oh(),is_cross_inapp:String(Mo())}}var Kd=!1;function el(){if(typeof window>"u")return null;let e=ai()??sa();return e?(Kd||(Kd=!0,e.setUser({id:$s()})),e):null}function Jd(){return Math.random()>=Vd()}var Zd=0;function Ao(e){let t=el();if(!t)return;let r=++Zd;if(!e){t.setUser({id:$s()});return}Yd(e).then(n=>{n&&r===Zd&&t.setUser({id:n})})}function li(e,t,r){let n=el();!n||Jd()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Xd(),feature:e,action:t,...r}}})}function qe(e,t,r){let n=el();if(!n||Jd())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Xd(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function Nr(e){let t=e,r=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(r)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(r)?"insufficient-gas":/timeout|timed out|deadline/i.test(r)?"timeout":/revert|execution failed/i.test(r)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(r)?"network":"unknown"}import{useCallback as Bh}from"react";import{jsx as zh}from"react/jsx-runtime";function ye({feature:e,children:t}){let r=Bh(n=>{let o=n.nativeEvent;if(o.__dappUiTracked)return;let i=n.target?.closest?.("[data-track]");if(!i)return;let s=i.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=i.getAttribute("data-track-id");li(e,s,l?{item_id:l}:void 0)},[e]);return zh("div",{style:{display:"contents"},onClick:r,children:t})}import*as Po from"react";import*as ec from"@radix-ui/react-popover";import{Drawer as Vh}from"vaul";import{createContext as Fh,useContext as Uh}from"react";var tl=Fh(null);function di(){let e=Uh(tl);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}import*as pi from"react";var jh="__dappUiOverlay",lo=[],Lo=0,nl=0,ci=!1,rl=!1;function $d(){if(nl>0){nl-=1;return}Lo=Math.max(0,Lo-1),lo.pop()?.close(),ol()}function Wh(){ci||(window.addEventListener("popstate",$d),ci=!0)}function ol(){lo.length>0||!ci||(window.removeEventListener("popstate",$d),ci=!1)}function _h(){rl||(rl=!0,queueMicrotask(()=>{rl=!1;let e=Lo-lo.length;if(e<=0){ol();return}Lo-=e,nl+=1,window.history.go(-e),ol()}))}function On(e,t){let r=pi.useRef(t);r.current=t,pi.useEffect(()=>{if(!(!e||typeof window>"u"))return Gh(()=>r.current())},[e])}function Gh(e){let t={close:e};return lo.push(t),Lo<lo.length&&(window.history.pushState({[jh]:!0},""),Lo+=1),Wh(),()=>{let r=lo.lastIndexOf(t);r!==-1&&(lo.splice(r,1),_h())}}import{useState as Hh,useEffect as Qh}from"react";function Do(e){let[t,r]=Hh(!1);return Qh(()=>{let n=window.matchMedia(e);r(n.matches);let o=a=>r(a.matches);return n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[e]),t}function ce(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}ce(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #422a1f);--al-badge-text: var(--ds-accent-primary-default, #f0640d);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #fff5ee);--al-badge-text: var(--ds-accent-primary-default, #ff8438);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
2
2
  `);ce(`.al-trigger-btn{--at-bg: transparent;--at-bg-hover: #eaedf1;--at-color: var(--ds-content-high, rgba(0, 0, 0, .85));--at-border: none;--at-border-radius: 8px;--at-size: 36px;--at-padding: 0;--at-press-scale: .95;--at-transition: background-color .15s ease;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--at-size);height:var(--at-size);padding:var(--at-padding);border:var(--at-border);background:var(--at-bg);border-radius:var(--at-border-radius);color:var(--at-color);cursor:pointer;transition:var(--at-transition)}.al-trigger-btn:hover,.al-trigger-btn[data-state=open]{background:var(--at-bg-hover)}.al-trigger-btn:active:not(:disabled){background:var(--at-bg-hover);transform:scale(var(--at-press-scale))}.al-trigger-btn[data-theme=dark]{--at-color: var(--ds-content-high, rgba(255, 255, 255, .85));--at-bg-hover: #252b39}.al-trigger-btn[data-theme=light]{--at-color: var(--ds-content-high, rgba(0, 0, 0, .85))}
3
3
  `);ce(`@keyframes al-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
4
4
  `);ce(`.al-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;border-radius:24px;background:var(--al-bg);border:1px solid var(--al-popover-border, var(--al-border));box-shadow:var(--al-popover-shadow, var(--al-shadow));animation:al-fade-in .15s ease-out;max-height:80vh;overflow-x:hidden;overflow-y:auto;padding:20px 4px;box-sizing:border-box}.al-popover-content .al-menu{display:flex;flex-direction:column;width:424px;max-width:calc(100vw - 32px);padding:0 12px;box-sizing:border-box}.al-popover-content .al-grid{display:grid;grid-template-columns:repeat(4,100px);row-gap:12px;column-gap:0;justify-content:center;align-items:start}.al-popover-content .al-grid-item{position:relative;flex-direction:column;justify-content:flex-start;align-items:center;gap:6px;padding:12px 0;width:100px;min-width:0;border-radius:10px}.al-popover-content .al-grid-item-left{flex-direction:column;align-items:center;gap:8px;width:100%;overflow:visible}.al-popover-content .al-grid-item-icon{width:50px;height:50px;border-radius:10.125px;overflow:visible}.al-popover-content .al-grid-item-icon img{object-fit:cover}.al-popover-content .al-grid-item-label{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:1.1;letter-spacing:0;text-align:center;color:var(--al-text);max-width:100%;white-space:normal;overflow-wrap:anywhere}.al-popover-content .al-grid-item-text{flex-direction:column;align-items:center;justify-content:center;gap:2px;max-width:100%;min-height:26px}.al-popover-content .al-grid-item-status-text{font-size:10px;line-height:1.1}.al-popover-content .al-badge-list{display:none}.al-drawer-overlay{position:fixed;inset:0;z-index:100000;background:var(--al-drawer-overlay)}.al-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;background:var(--al-bg);overflow-x:hidden;overflow-y:hidden;display:flex;flex-direction:column;box-sizing:border-box}.al-drawer-body{flex:1;overflow-y:auto;overscroll-behavior-y:contain;min-height:0}.al-drawer-content .al-menu{display:flex;flex-direction:column;min-height:0}.al-drawer-content .al-grid{display:flex;flex-direction:column;grid-template-columns:none;max-width:100%;overflow:hidden;flex-shrink:0;gap:0;row-gap:0;column-gap:0;padding:8px 16px}.al-drawer-content .al-grid-item{width:100%;max-width:100%;gap:8px;padding:16px 12px;border-radius:8px;overflow:hidden;background:transparent}.al-drawer-content .al-grid-item:hover,.al-drawer-content .al-grid-item[data-active=true]{background:var(--al-bg-hover)}.al-drawer-content .al-grid-item-left{gap:8px;flex:1 1 auto;min-width:0;overflow:visible}.al-drawer-content .al-grid-item-icon{width:32px;height:32px;border-radius:6.75px;overflow:visible}.al-drawer-content .al-grid-item-icon img{width:100%;height:100%;object-fit:cover;border-radius:6.75px}.al-drawer-content .al-grid-item-label{font-size:16px;line-height:1.35;letter-spacing:0;font-weight:400}.al-drawer-content .al-grid-item[data-active=true] .al-grid-item-label{font-weight:500}.al-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px;flex-shrink:0}.al-drawer-title{font-family:Inter,sans-serif;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--al-text);margin:0}.al-drawer-close{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;border-radius:4px;cursor:pointer;color:var(--al-text-secondary);transition:opacity .15s ease}.al-drawer-close:hover{opacity:.7}.al-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px;padding:8px}.al-grid-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:16px 12px;border:none;background:var(--al-bg);border-radius:8px;cursor:pointer;transition:none;color:var(--al-text);text-align:left;font-family:Inter,sans-serif;flex-shrink:0}.al-grid-item:hover,.al-grid-item[data-active=true]{background:var(--al-bg-hover)!important}.al-grid-item-left{display:flex;align-items:center;gap:8px;min-width:0;overflow:visible}.al-grid-item-text{display:flex;flex-direction:column;align-items:flex-start;gap:1px;max-width:100%;min-width:0}.al-grid-item-icon{display:flex;align-items:center;justify-content:center;position:relative;width:24px;height:24px;overflow:visible;border-radius:5px;flex-shrink:0}.al-grid-item-icon img{width:100%;height:100%;object-fit:contain;border-radius:inherit}.al-grid-item-label{font-family:Inter,sans-serif;font-size:16px;font-weight:500;line-height:150%;letter-spacing:0;color:var(--al-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.al-grid-item-status-text{font-family:Inter,sans-serif;font-size:12px;font-weight:400;line-height:1.15;letter-spacing:0;color:var(--al-text);white-space:nowrap}.al-status-ribbon{position:absolute;top:-6px;right:-6px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;box-sizing:border-box;border-radius:999px;color:#fff;font-family:Pretendard,Inter,sans-serif;font-size:12px;font-weight:800;line-height:1;pointer-events:none;box-shadow:0 1px 3px #0000002e}.al-status-ribbon-new{background:var(--al-new-ribbon-bg)}.al-badge{display:flex;padding:1px 4px 2px;justify-content:center;align-items:center;gap:2px;border-radius:3px;background:var(--al-badge-bg);color:var(--al-badge-text);font-family:Pretendard,Inter,sans-serif;font-size:10px;font-weight:600;line-height:150%;letter-spacing:0;white-space:nowrap;flex-shrink:0}