@inntechcorp/it-design 4.0.0-beta.5 → 4.0.0-beta.7
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/CHANGELOG.md +71 -0
- package/MIGRATION.md +16 -1
- package/dist/cjs/_bundled/@radix-ui/primitive/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-context/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-id/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
- package/dist/cjs/back-top/index.js +1 -1
- package/dist/cjs/blocks/auth-complete/index.js +1 -0
- package/dist/cjs/blocks/auth-page/index.js +1 -0
- package/dist/cjs/blocks/banner/index.js +1 -1
- package/dist/cjs/blocks/casino-featured/index.js +1 -1
- package/dist/cjs/blocks/game-box/index.js +1 -1
- package/dist/cjs/blocks/game-carousel/index.js +1 -1
- package/dist/cjs/blocks/game-providers/logos.js +1 -1
- package/dist/cjs/blocks/game-shell/useDrawerChrome.js +1 -1
- package/dist/cjs/blocks/header/index.js +1 -1
- package/dist/cjs/blocks/login/index.js +1 -0
- package/dist/cjs/blocks/mega-menu/index.js +1 -1
- package/dist/cjs/blocks/multiple-jackpots/index.js +1 -1
- package/dist/cjs/blocks/signup/index.js +1 -0
- package/dist/cjs/blocks/slider/index.js +1 -1
- package/dist/cjs/blocks/tournaments/index.js +1 -1
- package/dist/cjs/blocks/user-hub/bonus.js +1 -1
- package/dist/cjs/blocks/user-hub/profile.js +1 -1
- package/dist/cjs/blocks/user-hub/table.js +1 -1
- package/dist/cjs/context/PortalDocumentContext.js +1 -1
- package/dist/cjs/context-menu/ContextMenu.js +1 -1
- package/dist/cjs/dialog/Dialog.js +1 -1
- package/dist/cjs/dropdown-menu/CheckIcon.js +1 -1
- package/dist/cjs/dropdown-menu/processChildren.js +1 -1
- package/dist/cjs/dropdown-menu/useMenuItemChrome.js +1 -1
- package/dist/cjs/dropdown-menu/useSubMenuRegistry.js +1 -1
- package/dist/cjs/floating/createFloatingTrigger.js +1 -1
- package/dist/cjs/helpers/phone/usePhoneCountry.js +1 -1
- package/dist/cjs/helpers/theme/createTheme.js +1 -1
- package/dist/cjs/helpers/theme/importShadcnTheme.js +1 -1
- package/dist/cjs/hooks/useFocusTrap.js +1 -1
- package/dist/cjs/hooks/useLoadMoreSentinel.js +1 -1
- package/dist/cjs/hooks/useOnESCKeyDown.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/modal/container/ModalContainer.js +1 -1
- package/dist/cjs/modal/index.js +1 -1
- package/dist/cjs/router/ITDLink.js +1 -1
- package/dist/cjs/router/context.js +1 -1
- package/dist/cjs/router/matchActive.js +1 -1
- package/dist/cjs/toast/index.js +1 -1
- package/dist/css/accordion.css +2 -2
- package/dist/css/alert.css +1 -1
- package/dist/css/announcement-bar.css +1 -1
- package/dist/css/auth-page.css +3 -3
- package/dist/css/avatar.css +1 -1
- package/dist/css/back-top.css +1 -1
- package/dist/css/badge.css +85 -81
- package/dist/css/base.css +22 -16
- package/dist/css/block-form.css +5 -3
- package/dist/css/blocks-shared.css +8 -6
- package/dist/css/button-group.css +1 -1
- package/dist/css/button.css +8 -6
- package/dist/css/calendar.css +1 -1
- package/dist/css/card.css +1 -1
- package/dist/css/casino-featured.css +1 -1
- package/dist/css/chart.css +1 -1
- package/dist/css/checkbox.css +2 -2
- package/dist/css/code-input.css +5 -5
- package/dist/css/color-input.css +1 -1
- package/dist/css/coming-soon.css +1 -1
- package/dist/css/common.css +1 -1
- package/dist/css/components.css +1 -1
- package/dist/css/cropper.css +10 -6
- package/dist/css/datepicker.css +1 -1
- package/dist/css/default-avatar.css +1 -1
- package/dist/css/dialog.css +1 -1
- package/dist/css/dropdown-menu.css +1 -1
- package/dist/css/field.css +1 -1
- package/dist/css/filter-tabs.css +1 -1
- package/dist/css/flex.css +1 -1
- package/dist/css/floating.css +1 -1
- package/dist/css/footer.css +1 -1
- package/dist/css/form.css +1 -1
- package/dist/css/game-box.css +3 -3
- package/dist/css/game-carousel.css +1 -1
- package/dist/css/game-categories.css +1 -1
- package/dist/css/game-filter.css +1 -1
- package/dist/css/game-navigator.css +1 -1
- package/dist/css/game-providers.css +1 -1
- package/dist/css/game-search.css +1 -1
- package/dist/css/game-shell.css +3 -1
- package/dist/css/header.css +3 -3
- package/dist/css/help.css +1 -1
- package/dist/css/home-sections.css +1 -1
- package/dist/css/hovercard.css +1 -1
- package/dist/css/hstrip.css +1 -1
- package/dist/css/html-header.css +1 -1
- package/dist/css/image.css +1 -1
- package/dist/css/input.css +1 -1
- package/dist/css/label.css +1 -1
- package/dist/css/last-winners.css +1 -1
- package/dist/css/login.css +1 -1
- package/dist/css/mega-menu.css +3 -1
- package/dist/css/min-width-gate.css +1 -1
- package/dist/css/mobile-bottom-nav.css +1 -1
- package/dist/css/modal.css +8 -8
- package/dist/css/multiple-jackpots.css +3 -1
- package/dist/css/notifications-panel.css +2 -2
- package/dist/css/page.css +2 -2
- package/dist/css/popover.css +1 -1
- package/dist/css/post-viewer.css +1 -1
- package/dist/css/progress.css +1 -1
- package/dist/css/promotions-grid.css +3 -3
- package/dist/css/properties.css +1 -1
- package/dist/css/radio.css +1 -1
- package/dist/css/raffle.css +1 -1
- package/dist/css/rangepicker.css +1 -1
- package/dist/css/reset.css +2 -2
- package/dist/css/result.css +1 -1
- package/dist/css/select.css +1 -1
- package/dist/css/separator.css +1 -1
- package/dist/css/sheet.css +1 -1
- package/dist/css/signup.css +1 -1
- package/dist/css/skeleton.css +2 -2
- package/dist/css/slider.css +1 -1
- package/dist/css/spin.css +1 -1
- package/dist/css/stat-card.css +1 -1
- package/dist/css/sub-page-header.css +1 -1
- package/dist/css/svg-loader.css +1 -1
- package/dist/css/switch.css +1 -1
- package/dist/css/table.css +6 -4
- package/dist/css/tabs.css +1 -1
- package/dist/css/textarea.css +1 -1
- package/dist/css/toggle-group.css +1 -1
- package/dist/css/tooltip.css +1 -1
- package/dist/css/tournaments.css +8 -7
- package/dist/css/upload.css +1 -1
- package/dist/css/user-hub.css +2 -2
- package/dist/css/utilities.css +1 -1
- package/dist/css/vendor.css +4 -1
- package/dist/es/_bundled/@radix-ui/primitive/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-context/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-id/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
- package/dist/es/back-top/index.js +1 -1
- package/dist/es/blocks/auth-complete/index.js +1 -0
- package/dist/es/blocks/auth-page/index.js +1 -0
- package/dist/es/blocks/banner/index.js +1 -1
- package/dist/es/blocks/casino-featured/index.js +1 -1
- package/dist/es/blocks/game-box/index.js +1 -1
- package/dist/es/blocks/game-carousel/index.js +1 -1
- package/dist/es/blocks/game-providers/logos.js +1 -1
- package/dist/es/blocks/game-shell/useDrawerChrome.js +1 -1
- package/dist/es/blocks/header/index.js +1 -1
- package/dist/es/blocks/login/index.js +1 -0
- package/dist/es/blocks/mega-menu/index.js +1 -1
- package/dist/es/blocks/multiple-jackpots/index.js +1 -1
- package/dist/es/blocks/signup/index.js +1 -0
- package/dist/es/blocks/slider/index.js +1 -1
- package/dist/es/blocks/tournaments/index.js +1 -1
- package/dist/es/blocks/user-hub/bonus.js +1 -1
- package/dist/es/blocks/user-hub/cashier.js +1 -1
- package/dist/es/blocks/user-hub/history.js +1 -1
- package/dist/es/blocks/user-hub/profile.js +1 -1
- package/dist/es/blocks/user-hub/raffles.js +1 -1
- package/dist/es/blocks/user-hub/table.js +1 -1
- package/dist/es/context/ITDContext.js +1 -1
- package/dist/es/context/PortalDocumentContext.js +1 -1
- package/dist/es/context-menu/ContextMenu.js +1 -1
- package/dist/es/dialog/Dialog.js +1 -1
- package/dist/es/dropdown-menu/CheckIcon.js +1 -1
- package/dist/es/dropdown-menu/processChildren.js +1 -1
- package/dist/es/dropdown-menu/useMenuItemChrome.js +1 -1
- package/dist/es/dropdown-menu/useSubMenuRegistry.js +1 -1
- package/dist/es/floating/createFloatingTrigger.js +1 -1
- package/dist/es/helpers/phone/usePhoneCountry.js +1 -1
- package/dist/es/helpers/theme/createTheme.js +1 -1
- package/dist/es/helpers/theme/importShadcnTheme.js +1 -1
- package/dist/es/hooks/useFocusTrap.js +1 -1
- package/dist/es/hooks/useLoadMoreSentinel.js +1 -1
- package/dist/es/hooks/useOnESCKeyDown.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/modal/container/ModalContainer.js +1 -1
- package/dist/es/modal/index.js +1 -1
- package/dist/es/page/blocks.js +1 -1
- package/dist/es/page/blocks.query.js +1 -1
- package/dist/es/page/editor/theme.js +1 -1
- package/dist/es/router/ITDLink.js +1 -1
- package/dist/es/router/context.js +1 -1
- package/dist/es/router/matchActive.js +1 -1
- package/dist/es/toast/index.js +1 -1
- package/dist/global.css +187 -155
- package/dist/index.d.ts +667 -186
- package/dist/types/blocks/auth-complete/index.d.ts +2 -0
- package/dist/types/blocks/auth-page/index.d.ts +2 -0
- package/dist/types/blocks/banner/index.d.ts +2 -0
- package/dist/types/blocks/box-title/index.d.ts +2 -0
- package/dist/types/blocks/casino-featured/index.d.ts +8 -0
- package/dist/types/blocks/default-avatar/index.d.ts +1 -0
- package/dist/types/blocks/featured-games/index.d.ts +2 -0
- package/dist/types/blocks/filter-tabs/index.d.ts +2 -0
- package/dist/types/blocks/footer/index.d.ts +2 -0
- package/dist/types/blocks/game-box/index.d.ts +21 -0
- package/dist/types/blocks/game-carousel/index.d.ts +2 -0
- package/dist/types/blocks/game-categories/index.d.ts +2 -0
- package/dist/types/blocks/game-filter/index.d.ts +2 -0
- package/dist/types/blocks/game-navigator/index.d.ts +2 -0
- package/dist/types/blocks/game-providers/index.d.ts +2 -0
- package/dist/types/blocks/game-search/index.d.ts +4 -0
- package/dist/types/blocks/game-shell/index.d.ts +2 -0
- package/dist/types/blocks/games-grid/index.d.ts +2 -0
- package/dist/types/blocks/header/index.d.ts +2 -0
- package/dist/types/blocks/help/index.d.ts +2 -0
- package/dist/types/blocks/last-winners/index.d.ts +2 -0
- package/dist/types/blocks/layout-boxes/index.d.ts +2 -0
- package/dist/types/blocks/login/index.d.ts +6 -0
- package/dist/types/blocks/mega-menu/index.d.ts +4 -0
- package/dist/types/blocks/min-width-gate/index.d.ts +2 -0
- package/dist/types/blocks/mobile-bottom-nav/index.d.ts +2 -0
- package/dist/types/blocks/multiple-jackpots/index.d.ts +2 -0
- package/dist/types/blocks/notifications/index.d.ts +2 -0
- package/dist/types/blocks/post-viewer/index.d.ts +2 -0
- package/dist/types/blocks/promotions-grid/index.d.ts +186 -0
- package/dist/types/blocks/raffle/index.d.ts +2 -0
- package/dist/types/blocks/signup/index.d.ts +2 -0
- package/dist/types/blocks/slider/index.d.ts +2 -0
- package/dist/types/blocks/slider-double/index.d.ts +2 -0
- package/dist/types/blocks/spacer/index.d.ts +36 -0
- package/dist/types/blocks/sub-page-header/index.d.ts +2 -0
- package/dist/types/blocks/tournaments/index.d.ts +2 -0
- package/dist/types/blocks/user-hub/index.d.ts +2 -0
- package/package.json +29 -35
- package/dist/cjs/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
- package/dist/es/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),n=require("../../form/index.js"),l=require("../../field/index.js"),s=require("../../input/index.js"),t=require("../../code-input/index.js"),a=require("../../checkbox/index.js"),r=require("../../button/index.js"),d=require("../../tabs/Tabs.js"),o=require("../../tabs/TabsList.js"),c=require("../../tabs/TabsTrigger.js");require("../../tabs/TabsContent.js");var u=require("../../types/InputProps.js"),h=require("../../helpers/phone/usePhoneCountry.js"),m=require("../../helpers/phone/index.js"),g=require("../../form/group/Group.js"),p=require("../../form/control/Control.js");const x=i.forwardRef(({identifier:x="username",identifiers:j,onIdentifierChange:f,country:b,logo:v,banner:C,onClose:y,closeLabel:w="Kapat",channel:k=null,allowPassword:N=!1,step:S="credentials",username:q="",cooldownUntil:T=null,loading:z=!1,codeLength:I=6,codeError:P,identifierIcon:M,passwordIcon:F,alternates:L,onAlternate:E,variant:D="form",onPasskey:H,onChangeMethod:B,onCreateAccount:A,texts:V,onSubmitCredentials:R,onSubmitCode:O,onResend:W,onChangeIdentifier:_,onForgotPassword:G,onContactSupport:K,className:U=""},X)=>{const J=!!j&&j.length>1,[Q,Y]=i.useState(()=>J&&!j.includes(x)?j[0]:x),Z=J?Q:x,$=h.usePhoneCountry("phone"===Z?b:null),ee=i.useRef(null),[ie,ne]=i.useState(!1),[le,se]=i.useState(""),[te,ae]=i.useState(""),[re,de]=i.useState(""),oe=(e=>{const n=e?new Date(e).getTime():0,[l,s]=i.useState(()=>Date.now());i.useEffect(()=>{if(!n||n<=Date.now())return;s(Date.now());const e=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(e)},[n]);const t=Math.max(0,n-l),a=Math.ceil(t/1e3),r=e=>String(e).padStart(2,"0");return{active:t>0,label:r(Math.floor(a/60))+":"+r(a%60)}})(T),ce="code"===S,ue="link-sent"===S,he="passkey"===D&&!ce&&!ue,me=N&&!!q&&!ce&&!ue,ge=!ce&&!ue&&(null===k||N),pe="phone"===Z;i.useEffect(()=>{ce||se("")},[ce]),i.useEffect(()=>{P&&ee.current?.setError?.(P)},[P]);const xe=ce?V.submitVerify??V.submit:ge?V.submit:V.submitContinue??V.submit,je=!!me||(pe?m.isPhoneComplete($,te):te.trim().length>0),fe=ce?le.length!==I||z:!ie||!je||ge&&0===re.length||z,be=i.useMemo(()=>V.welcomeBack&&q?V.welcomeBack.replace("{username}",q).replace("{{username}}",q):null,[V.welcomeBack,q]),ve=V.identifierPlaceholders?.[Z]??V.identifier,Ce=pe?e.jsx(l.Field,{name:"username",rules:[{required:!0},{validator:e=>m.isPhoneComplete($,String(e??""))}],children:e.jsx(s.default,{type:u.InputTypes.TEL,size:"x-large",inputMode:"numeric",autoComplete:"tel-national",mask:$?.mask??null,placeholder:ve,onChange:e=>ae(String(e??"")),addonBefore:M,prefix:e.jsx("span",{className:"itd-login-dial",children:$?.code})})},Z):e.jsx(l.Field,{name:"username",rules:[{required:!0}],children:e.jsx(s.default,{type:"email"===Z?u.InputTypes.EMAIL:u.InputTypes.TEXT,size:"x-large",autoComplete:"email"===Z?"email":"username",placeholder:ve,addonBefore:M,onChange:e=>ae(String(e??""))})},Z),ye=L&&L.length>0&&!ce&&!ue?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"itd-login-or",role:"separator",children:V.orDivider?e.jsx("span",{children:V.orDivider}):null}),e.jsx("div",{className:"itd-login-alternates",children:L.map(i=>e.jsxs(r.default,{variant:"solid",size:"large",disabled:z,onClick:()=>E?.(i.id),children:[i.icon,i.label]},i.id))})]}):null;return e.jsxs("div",{className:"itd-login"+(U?" "+U:""),children:[v||y?e.jsxs("div",{className:"itd-login-topbar",children:[e.jsx("span",{className:"itd-login-logo",children:v}),y?e.jsx(r.default,{variant:"ghost",size:"icon",className:"itd-login-close","aria-label":w,onClick:y,children:e.jsx("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}):null]}):null,C?e.jsx("div",{className:"itd-login-banner",children:C}):null,e.jsxs("div",{className:"itd-login-body"+(ce?" itd-login-verify":""),children:[e.jsxs("div",{className:"itd-login-intro",children:[ce||ue?be?e.jsx("span",{className:"itd-login-eyebrow",children:be}):null:V.description?e.jsx("span",{className:"itd-login-eyebrow",children:V.description}):null,e.jsx("span",{className:"itd-login-title",children:ce?V.titleVerify??V.title:ue?V.titleLinkSent??V.title:V.title})]}),e.jsx("div",{className:"itd-login-rule"}),ce&&V.codeHint?e.jsx("p",{className:"itd-login-hint",children:V.codeHint}):null,ue&&V.linkSentHint?e.jsx("p",{className:"itd-login-hint",children:V.linkSentHint}):null,he?e.jsxs(e.Fragment,{children:[V.passkeyHint?e.jsx("p",{className:"itd-login-hint",children:V.passkeyHint}):null,e.jsx(r.default,{type:"button",size:"x-large",loading:z,onClick:H,style:{width:"100%"},children:V.passkeyCta??V.submit}),ye]}):ue?null:ce?e.jsxs("div",{className:"itd-login-code",children:[e.jsx(t.default,{ref:ee,size:"x-large",length:I,value:le,onChange:se,autoFocus:!0,"aria-label":V.titleVerify??V.title}),e.jsx(r.default,{type:"button",size:"x-large",loading:z,disabled:fe,onClick:()=>{le.length!==I||z||O?.(le)},style:{width:"100%"},children:xe})]}):e.jsxs(e.Fragment,{children:[J&&!me?e.jsx(d.Tabs,{value:Z,onValueChange:e=>(e=>{e!==Q&&(Y(e),ae(""),f?.(e))})(e),variant:"filled",className:"itd-login-tabs",children:e.jsx(o.TabsList,{"aria-label":V.title,children:j.map(i=>e.jsx(c.TabsTrigger,{value:i,children:V.identifierTabs?.[i]??i},i))})}):null,e.jsxs(n.default,{name:"sign-in",ref:X,onFinish:e=>{const i=String(e.username??(me?q:""));R?.({username:pe&&!me?m.toE164($,i):i,...ge?{password:String(e.password??"")}:{},remember:!!e.remember})},onValidated:ne,children:[e.jsxs(g.default,{gap:12,children:[me?e.jsxs("div",{className:"itd-login-identity",children:[e.jsx("span",{className:"itd-login-identity-value",children:q}),V.changeIdentifier?e.jsx(r.default,{variant:"ghost",size:"small",onClick:_,disabled:z,children:V.changeIdentifier}):null]}):Ce,ge?e.jsx(l.Field,{name:"password",rules:[{required:!0}],children:e.jsx(s.default,{type:u.InputTypes.PASSWORD,size:"x-large",autoComplete:"current-password",placeholder:V.password,addonBefore:F,onChange:e=>de(String(e??""))})}):null,V.rememberMe?e.jsx(l.Field,{name:"remember",children:e.jsx(a.default,{children:V.rememberMe})}):null]}),e.jsx(p.default,{children:e.jsx(r.default,{type:"submit",size:"x-large",loading:z,disabled:fe,style:{width:"100%"},children:xe})})]}),ye]}),e.jsx("div",{className:"itd-login-actions",children:ce||ue?e.jsxs(e.Fragment,{children:[oe.active?e.jsx("span",{className:"itd-login-countdown",children:oe.label}):V.resendCode?e.jsx(r.default,{variant:"filled",size:"medium",onClick:W,disabled:z,children:V.resendCode}):null,ue&&V.changeMethod?e.jsx(r.default,{variant:"ghost",size:"medium",onClick:B,disabled:z,children:V.changeMethod}):null,!ue&&V.changeIdentifier?e.jsx(r.default,{variant:"ghost",size:"medium",onClick:_,disabled:z,children:V.changeIdentifier}):null]}):!he&&V.forgotPassword?e.jsx(r.default,{variant:"ghost",size:"medium",onClick:G,children:V.forgotPassword}):null}),!V.newHere||!V.createAccount||ce||ue||me||he?null:e.jsxs("div",{className:"itd-login-footer",children:[e.jsx("span",{className:"itd-login-footer-note",children:V.newHere}),e.jsx(r.default,{variant:"ghost",size:"medium",onClick:A,disabled:z,children:V.createAccount})]}),V.support?e.jsx("div",{className:"itd-login-support",children:e.jsx(r.default,{variant:"solid",size:"large",onClick:K,style:{width:"100%"},children:V.support})}):null]})]})});x.displayName="LoginPanel",exports.LoginPanel=x,exports.default=x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react"),a=require("../../select/index.js"),m=require("../../select/SelectItem.js");const l=({icon:n})=>n?e.jsx("span",{className:"itd-mega-menu-icon inn-mega-menu-icon inn-mobile-mega-menu-item-icon",children:n}):null,t=({link:n,className:i,trailing:a})=>{const m=e.jsxs(e.Fragment,{children:[e.jsx(l,{icon:n.icon}),e.jsx("span",{className:"itd-mega-menu-label inn-mega-menu-label",children:n.label}),null!=n.badge&&e.jsx("span",{className:"itd-mega-menu-badge inn-mega-menu-badge",children:n.badge}),a]}),t={className:(i+(n.active?" is-active":"")).trim(),"data-active":n.active?"true":void 0};return n.href?e.jsx("a",{...t,href:n.href,onClick:n.onClick,children:m}):e.jsx("button",{type:"button",...t,onClick:n.onClick,children:m})},s=({entries:l=[],className:s=""})=>{const[u,c]=n.useState(()=>new Set(l.filter(e=>"accordion"===e.kind&&e.defaultOpen).map(e=>e.id)));return e.jsx("nav",{className:("itd-mega-menu inn-mega-menu "+s).trim(),"aria-label":"Menü",children:l.map(n=>{if("accordion"===n.kind){const a=u.has(n.id);return e.jsxs("div",{className:"itd-mega-menu-item itd-mega-menu-item--accordion inn-mega-menu-item inn-mobile-mega-menu-group","data-open":a?"true":"false",children:[e.jsxs("div",{className:"itd-mega-menu-head inn-mega-menu-item-head inn-mobile-mega-menu-item",children:[e.jsx(t,{link:{label:n.label,icon:n.icon,href:n.href,onClick:n.onClick,active:n.active},className:"itd-mega-menu-head-main inn-mega-menu-item-link"}),e.jsx("button",{type:"button",className:"itd-mega-menu-toggle inn-mega-menu-item-toggle","aria-expanded":a,"aria-label":a?"Kapat":"Aç",onClick:()=>{return e=n.id,c(n=>{const i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i});var e},children:e.jsx("span",{className:"itd-mega-menu-toggle-icon","aria-hidden":!0,children:e.jsx(i.ChevronDown,{})})})]}),e.jsx("div",{className:"itd-mega-menu-collapse inn-mega-menu-sub",children:e.jsx("div",{className:"itd-mega-menu-collapse-inner",children:n.items.map(n=>e.jsx(t,{link:n,className:"itd-mega-menu-subitem inn-mega-menu-sub-item inn-mobile-mega-menu-sub-menu-item"},n.id))})})]},n.id)}return"group"===n.kind?e.jsx("div",{className:"itd-mega-menu-item itd-mega-menu-item--group inn-mega-menu-item inn-mega-menu-group inn-mobile-mega-menu-group",children:n.items.map(n=>e.jsx(t,{link:n,className:"itd-mega-menu-groupitem inn-mega-menu-group-item inn-mobile-mega-menu-sub-menu-item"},n.id))},n.id):"select"===n.kind?e.jsx("div",{className:"itd-mega-menu-item itd-mega-menu-item--select inn-mega-menu-item",children:e.jsx(a.default,{size:"large",className:"itd-mega-menu-select"+(n.arrowWell?" itd-mega-menu-select--well":""),defaultValue:n.defaultValue,onChange:e=>n.onChange?.(e),"aria-label":n.ariaLabel,children:n.options.map(n=>e.jsx(m.SelectItem,{value:n.value,image:n.image,children:n.label},n.value))})},n.id):e.jsx("div",{className:"itd-mega-menu-item itd-mega-menu-item--link inn-mega-menu-item inn-mobile-mega-menu-group",children:e.jsx(t,{link:{label:n.label,icon:n.icon,href:n.href,onClick:n.onClick,active:n.active,badge:n.badge},className:"itd-mega-menu-link inn-mega-menu-link inn-mobile-mega-menu-item",trailing:e.jsx("span",{className:"itd-mega-menu-chevron inn-mega-menu-chevron","aria-hidden":!0,children:e.jsx(i.ChevronRight,{})})})},n.id)})})};exports.MegaMenu=s,exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),t=require("../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js"),s=require("../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js"),n=require("lucide-react"),i=require("../../button/index.js"),l=require("../../image/index.js"),o=require("../../skeleton/index.js"),r=require("../../modal/index.js"),c=require("../../modal/useModalContent.js"),m=require("../game-box/index.js"),u=require("../../helpers/classname/GetClassNameByPlatform.js"),d=require("../../helpers/platform/index.js"),p=require("../embla/useEmblaState.js"),j=require("./TierCarousel.js");const k=e=>new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),x=({amount:t,format:s,className:n})=>{const i=(e=>{const[t,s]=a.useState(0),n=a.useRef(0);return a.useEffect(()=>{const a=performance.now(),t=i=>{const l=Math.min((i-a)/750,1);s(e*l),l<1&&(n.current=requestAnimationFrame(t))};return n.current=requestAnimationFrame(t),()=>cancelAnimationFrame(n.current)},[e]),t})(t);return e.jsx("span",{className:n,children:s(i)})},h=({stats:a,format:t,labels:s})=>{const i=(a,s,i)=>e.jsxs("div",{className:"itd-jackpot-win-box",children:[e.jsxs("span",{className:"itd-jackpot-win-box-title",children:[a,s]}),e.jsx(x,{amount:i?.amount??0,format:t,className:"itd-jackpot-win-box-amount"}),e.jsxs("span",{className:"itd-jackpot-win-box-meta",children:[e.jsxs("span",{children:[e.jsx(n.Calendar,{"aria-hidden":!0}),i?.date??"--/--/---- 00:00"]}),e.jsxs("span",{children:[e.jsx(n.User,{"aria-hidden":!0}),i?.username??"--"]})]})]});return e.jsxs("div",{className:"itd-jackpot-winners-modal inn-jackpot-winners-modal",children:[i(e.jsx(n.Medal,{"aria-hidden":!0}),s?.maxWin??"Max Win",a?.maxWin),e.jsx("hr",{className:"itd-jackpot-winners-separator"}),i(e.jsx(n.Trophy,{"aria-hidden":!0}),s?.lastWin??"Last Win",a?.lastWin),e.jsxs("div",{className:"itd-jackpot-total-wins",children:[(s?.totalWins??"Total Wins")+":"," ",e.jsx("b",{children:a?.totalWins??0})]})]})},b=({games:a,onOpen:t})=>{const{hideCurrentModal:s}=c.useModalContent();return e.jsx("div",{className:"itd-jackpot-games-modal",children:a.map(a=>e.jsx(m.default,{slug:a.slug,image:a.image,name:a.name,background:!1,outline:!1,ratio:"440/310",onPlay:e=>{s?.(),t(e)}},a.id))})};exports.default=({id:c,jackpots:m,loading:N,wordmark:g,texture:f,showWinners:w=!0,showGames:v=!0,autoplay:y=4e3,formatAmount:C=k,onGameOpen:q,labels:W,className:M})=>{const O=u.GetClassNameByPlatform,{showModal:P}=r.useModal(),T=a.useMemo(()=>({axis:"y"}),[]),B=a.useMemo(()=>!1===y?[]:[s.default({delay:y})],[y]),[A,F]=t.default(T,B),{selected:G,canPrev:z,canNext:J}=p.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),t=require("../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js"),s=require("../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js"),n=require("lucide-react"),i=require("../../button/index.js"),l=require("../../image/index.js"),o=require("../../skeleton/index.js"),r=require("../../modal/index.js"),c=require("../../modal/useModalContent.js"),m=require("../game-box/index.js"),u=require("../../helpers/classname/GetClassNameByPlatform.js"),d=require("../../helpers/platform/index.js"),p=require("../embla/useEmblaState.js"),j=require("./TierCarousel.js");const k=e=>new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),x=({amount:t,format:s,className:n})=>{const i=(e=>{const[t,s]=a.useState(0),n=a.useRef(0);return a.useEffect(()=>{const a=performance.now(),t=i=>{const l=Math.min((i-a)/750,1);s(e*l),l<1&&(n.current=requestAnimationFrame(t))};return n.current=requestAnimationFrame(t),()=>cancelAnimationFrame(n.current)},[e]),t})(t);return e.jsx("span",{className:n,children:s(i)})},h=({stats:a,format:t,labels:s})=>{const i=(a,s,i)=>e.jsxs("div",{className:"itd-jackpot-win-box",children:[e.jsxs("span",{className:"itd-jackpot-win-box-title",children:[a,s]}),e.jsx(x,{amount:i?.amount??0,format:t,className:"itd-jackpot-win-box-amount"}),e.jsxs("span",{className:"itd-jackpot-win-box-meta",children:[e.jsxs("span",{children:[e.jsx(n.Calendar,{"aria-hidden":!0}),i?.date??"--/--/---- 00:00"]}),e.jsxs("span",{children:[e.jsx(n.User,{"aria-hidden":!0}),i?.username??"--"]})]})]});return e.jsxs("div",{className:"itd-jackpot-winners-modal inn-jackpot-winners-modal",children:[i(e.jsx(n.Medal,{"aria-hidden":!0}),s?.maxWin??"Max Win",a?.maxWin),e.jsx("hr",{className:"itd-jackpot-winners-separator"}),i(e.jsx(n.Trophy,{"aria-hidden":!0}),s?.lastWin??"Last Win",a?.lastWin),e.jsxs("div",{className:"itd-jackpot-total-wins",children:[(s?.totalWins??"Total Wins")+":"," ",e.jsx("b",{children:a?.totalWins??0})]})]})},b=({games:a,onOpen:t})=>{const{hideCurrentModal:s}=c.useModalContent();return e.jsx("div",{className:"itd-jackpot-games-modal",children:a.map(a=>e.jsx(m.default,{slug:a.slug,image:a.image,name:a.name,background:!1,outline:!1,ratio:"440/310",onPlay:e=>{s?.(),t(e)}},a.id))})};exports.default=({id:c,jackpots:m,loading:N,wordmark:g,texture:f,showWinners:w=!0,showGames:v=!0,autoplay:y=4e3,formatAmount:C=k,onGameOpen:q,labels:W,className:M})=>{const O=u.GetClassNameByPlatform,{showModal:P}=r.useModal(),T=a.useMemo(()=>({axis:"y"}),[]),B=a.useMemo(()=>!1===y?[]:[s.default({delay:y})],[y]),[A,F]=t.default(T,B),{selected:G,canPrev:z,canNext:J}=p.default(F),L=m??[],H=L[G]??L[0],I=e=>{F&&(F.plugins().autoplay?.stop(),"prev"===e?F.scrollPrev():F.scrollNext())},S=()=>{const a=H?.games??[];P({title:W?.gamesTitle??"Jackpot Oyunları",className:"jackpot-games-modal",width:d.GetPlatform()===u.PlatformTypes.MOBILE?"100%":"61.875rem",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:e.jsx(b,{games:a,onOpen:e=>q?.(e)})})},_=a=>w||v?e.jsxs("span",{className:"itd-jackpot-tier-buttons "+O("inn-multiple-jackpots-carousel-multiple-tier-buttons"),children:[w&&e.jsx(i.default,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs "+O("inn-multiple-jackpots-carousel-button")+" "+O("inn-multiple-jackpots-carousel-button--winners"),"aria-label":W?.winners??"Kazananlar",onClick:()=>(a=>{P({className:"itd-jackpot-winners-host jackpot-winners-modal",width:"25rem",contentPadding:"0",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:e.jsx(h,{stats:a,format:C,labels:W})})})(a),children:e.jsx(n.Trophy,{})}),v&&e.jsx(i.default,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs itd-jackpot-tier-games "+O("inn-multiple-jackpots-carousel-button")+" "+O("inn-multiple-jackpots-carousel-button--games"),"aria-label":W?.games??"Jackpot Oyunları",onClick:S,children:e.jsx(n.Gamepad2,{})})]}):null,D=e=>e.name.toUpperCase()+(W?.tierSuffix??" JACKPOT"),E=f?{"--itd-jackpot-texture":`url("${f}")`}:void 0;return e.jsx("div",{id:c??O("inn-multiple-jackpots-component"),className:("itd-jackpots "+(M??"")).trim(),style:E,children:N?e.jsxs("div",{className:"itd-jackpot-loading",children:[e.jsx(o.default,{height:"5rem",width:"16.3125rem",count:1}),e.jsx(o.default,{height:"5rem",width:"16.3125rem",count:1})]}):0===L.length?e.jsx("div",{className:"itd-jackpot-empty "+O("inn-multiple-jackpots-not-found"),children:e.jsx("span",{children:W?.empty??"Jackpot bulunamadı!"})}):e.jsxs("section",{className:"itd-jackpot-carousel "+O("inn-multiple-jackpots-carousel"),children:[e.jsx("div",{className:"itd-jackpot-viewport "+O("inn-multiple-jackpots-carousel-viewport"),ref:A,children:e.jsx("div",{className:"itd-jackpot-container "+O("inn-multiple-jackpots-carousel-container"),children:L.map(a=>{const t=1===a.tiers.length;return e.jsxs("div",{className:"itd-jackpot-slide "+O("inn-multiple-jackpots-carousel-slide"),children:[e.jsxs("span",{className:"itd-jackpot-brand "+O("inn-multiple-jackpots-carousel-title-and-provider"),children:[null!=a.providerLogo&&e.jsx(l.default,{className:O("inn-multiple-jackpots-carousel-provider-icon"),src:a.providerLogo,alt:a.name,brokenWidth:66,brokenHeight:33}),null!=g&&e.jsx(l.default,{className:O("inn-multiple-jackpots-carousel-jackpot-text"),src:g,alt:"jackpot",brokenWidth:48,brokenHeight:12})]}),e.jsx("span",{className:"itd-jackpot-separator "+O("inn-multiple-jackpots-carousel-separator")}),e.jsx("span",{className:"itd-jackpot-art",children:null!=a.gameArt&&e.jsx(l.default,{className:O("inn-multiple-jackpots-carousel-jackpot-icon"),src:a.gameArt,alt:a.name,brokenWidth:55,brokenHeight:55})}),e.jsx("span",{className:"itd-jackpot-spacer "+O("inn-multiple-jackpots-carousel-spacer")}),t?e.jsxs("span",{className:"itd-jackpot-single "+O("inn-multiple-jackpots-carousel-single-tier"),children:[e.jsx("span",{className:"itd-jackpot-tier-name "+O("inn-multiple-jackpots-carousel-single-tier-name"),children:D(a.tiers[0])}),e.jsx(x,{amount:a.tiers[0].amount,format:C,className:"itd-jackpot-single-amount "+O("inn-multiple-jackpots-carousel-single-tier-amount")}),_(a.tiers[0].stats)]}):e.jsx(j.default,{children:a.tiers.map(a=>e.jsx(j.TierItem,{itemId:a.id,children:e.jsxs("span",{className:"itd-jackpot-tier "+O("inn-multiple-jackpots-carousel-multiple-tier"),children:[null!=a.symbol&&e.jsx(l.default,{className:"itd-jackpot-tier-symbol "+O("inn-multiple-jackpots-carousel-multiple-tier-content-tier-image"),src:a.symbol,alt:a.name,brokenWidth:36,brokenHeight:36}),e.jsxs("span",{className:"itd-jackpot-tier-text "+O("inn-multiple-jackpots-carousel-multiple-tier-content"),children:[e.jsx("span",{className:"itd-jackpot-tier-name "+O("inn-multiple-jackpots-carousel-multiple-tier-content-name"),children:D(a)}),e.jsx(x,{amount:a.amount,format:C,className:"itd-jackpot-tier-amount "+O("inn-multiple-jackpots-carousel-multiple-tier-content-amount")+" "+a.name.toLowerCase()})]}),_(a.stats)]})},a.id))}),e.jsx("span",{className:"itd-jackpot-spacer "+O("inn-multiple-jackpots-carousel-spacer")})]},a.id)})})}),e.jsxs("span",{className:"itd-jackpot-controls "+O("inn-multiple-jackpots-carousel-controls"),children:[v&&e.jsxs(e.Fragment,{children:[e.jsx(i.default,{size:"icon",variant:"solid",className:"itd-jackpot-round "+O("inn-multiple-jackpots-carousel-controls-games-button"),"aria-label":W?.games??"Jackpot Oyunları",onClick:S,children:e.jsx(n.Gamepad2,{})}),e.jsx("span",{className:"itd-jackpot-separator itd-jackpot-separator--controls"})]}),e.jsxs("span",{className:"itd-jackpot-arrows "+O("inn-multiple-jackpots-carousel-buttons"),children:[e.jsx(i.default,{size:"icon",variant:"solid",className:"itd-jackpot-round "+O("inn-multiple-jackpots-carousel-button--prev"),"aria-label":W?.prev??"Önceki jackpot",disabled:!z,onClick:()=>I("prev"),children:e.jsx(n.ChevronUp,{})}),e.jsx(i.default,{size:"icon",variant:"solid",className:"itd-jackpot-round "+O("inn-multiple-jackpots-carousel-button--next"),"aria-label":W?.next??"Sonraki jackpot",disabled:!J,onClick:()=>I("next"),children:e.jsx(n.ChevronDown,{})})]})]})]})})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),i=require("../../form/index.js"),s=require("../../field/index.js"),l=require("../../input/index.js"),a=require("../../code-input/index.js"),t=require("../../checkbox/index.js"),r=require("../../button/index.js"),d=require("../../datepicker/index.js"),o=require("../../select/index.js"),u=require("../../types/InputProps.js"),c=require("../../helpers/phone/usePhoneCountry.js"),m=require("../../helpers/phone/index.js"),p=require("../../form/control/Control.js"),g=require("../../select/SelectItem.js");const h={phone:"identity",email:"identity",username:"credentials",password:"credentials",text:"profile",date:"profile",select:"profile",consent:"profile"},x=["identity","verify","credentials","profile"],f=e=>e.step??h[e.kind],j=(e,n)=>x.filter(i=>"verify"===i?n:e.some(e=>f(e)===i)),v=n.forwardRef(({fields:h,layout:x="single",wide:v=!1,verify:y=!1,verificationTiming:b="post_signup",step:N,completedSteps:C=[],country:S,logo:w,banner:k,onClose:q,closeLabel:z="Kapat",loading:I=!1,codeLength:F=6,cooldownUntil:T=null,codeError:P,maskedIdentity:M,suggestedUsername:B,texts:D,onSubmitStep:E,onSubmit:A,onVerifyCode:L,onResend:R,onEditIdentity:_,onSuggestUsername:H,onSignIn:V,className:O=""},W)=>{const U=c.usePhoneCountry(S),K=n.useRef(null),[G,J]=n.useState(!1),[Q,X]=n.useState(""),[Y,Z]=n.useState({}),$=n.useRef({}),[,ee]=n.useState(0),ne=(e=>{const i=e?new Date(e).getTime():0,[s,l]=n.useState(()=>Date.now());n.useEffect(()=>{if(!i||i<=Date.now())return;l(Date.now());const e=setInterval(()=>l(Date.now()),1e3);return()=>clearInterval(e)},[i]);const a=Math.max(0,i-s),t=Math.ceil(a/1e3),r=e=>String(e).padStart(2,"0");return{active:a>0,label:r(Math.floor(t/60))+":"+r(t%60)}})(T),ie=n.useMemo(()=>j(h,y),[h,y]),se="steps"===x,le=se?N??ie[0]:"identity",ae=se&&"verify"===le,te=!se&&y&&"in_form"===b;n.useEffect(()=>{P&&K.current?.setError?.(P)},[P]);const re=n.useMemo(()=>se?h.filter(e=>f(e)===le):h,[h,se,le]),de=e=>n=>{$.current[e]=String(n??""),ee(e=>e+1)},oe=re.every(e=>{if(!e.required||e.readonly||e.collapsed&&!Y[e.name])return!0;const n=$.current[e.name]??"";return"phone"===e.kind?m.isPhoneComplete(U,n):"consent"===e.kind?"true"===n:"password"===e.kind&&e.confirm?n.length>0&&$.current[e.name+"_confirm"]===n:n.length>0}),ue=ae?Q.length!==F||I:!G||!oe||!!te&&Q.length!==F||I,ce=se&&ie.length>1?e.jsx("ol",{className:"itd-signup-steps",children:ie.map((n,i)=>{const s=C.includes(n),l=n===le;return e.jsxs("li",{className:"itd-signup-step"+(l?" itd-signup-step-active":"")+(s?" itd-signup-step-done":""),"aria-current":l?"step":void 0,children:[e.jsx("span",{className:"itd-signup-step-mark",children:s?"✓":i+1}),D.stepLabels?.[n]??n]},n)})}):null,me=se?D.stepTitles?.[le]:null;return e.jsxs("div",{className:"itd-login itd-signup"+(!se&&v?" itd-signup-wide":"")+(O?" "+O:""),children:[w||q?e.jsxs("div",{className:"itd-login-topbar",children:[e.jsx("span",{className:"itd-login-logo",children:w}),q?e.jsx(r.default,{variant:"ghost",size:"icon",className:"itd-login-close","aria-label":z,onClick:q,children:e.jsx("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}):null]}):null,k?e.jsx("div",{className:"itd-login-banner",children:k}):null,e.jsxs("div",{className:"itd-login-body",children:[e.jsxs("div",{className:"itd-login-intro",children:[D.description?e.jsx("span",{className:"itd-login-eyebrow",children:D.description}):null,e.jsx("span",{className:"itd-login-title",children:D.title})]}),e.jsx("div",{className:"itd-login-rule"}),ce,me?e.jsx("span",{className:"itd-signup-step-title",children:me}):null,ae?e.jsxs(e.Fragment,{children:[D.codeHint||M?e.jsxs("p",{className:"itd-login-hint",children:[D.codeHint,M?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{className:"itd-signup-masked",children:M}),D.editIdentity?e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"itd-signup-edit",onClick:_,children:D.editIdentity})]}):null]}):null]}):null,e.jsxs("div",{className:"itd-login-code",children:[e.jsx(a.default,{ref:K,size:"x-large",length:F,value:Q,onChange:X,autoFocus:!0,"aria-label":me??D.title}),e.jsx(r.default,{type:"button",size:"x-large",loading:I,disabled:ue,onClick:()=>{Q.length!==F||I||L?.(Q)},style:{width:"100%"},children:D.verifySubmit??D.continue??D.submit})]}),e.jsx("div",{className:"itd-login-actions",children:ne.active?e.jsx("span",{className:"itd-login-countdown",children:ne.label}):D.resendCode?e.jsx(r.default,{variant:"filled",size:"medium",onClick:R,disabled:I,children:D.resendCode}):null})]}):e.jsxs(i.default,{name:"sign-up",ref:W,onFinish:e=>{const n={},i=se?h.filter(e=>f(e)===le):h;for(const s of i){if(s.readonly){void 0!==s.value&&(n[s.name]=s.value);continue}if(!(s.name in e)&&!(s.name in $.current))continue;const i=e[s.name]??$.current[s.name];n[s.name]="phone"===s.kind?m.toE164(U,String(i??"")):"consent"===s.kind?!0===i||"true"===i:i}te&&(n.code=Q),se?E?.(le,n):A?.(n)},onValidated:J,children:[e.jsx("div",{className:"itd-signup-fields"+(!se&&v?" itd-signup-fields-grid":""),children:re.map(n=>{if(n.readonly){const i=null!=n.value?String(n.value):void 0,s=n.span?"itd-signup-span":void 0;if("select"===n.kind){const l=n.options?.length||!i?n.options??[]:[{value:i,label:i}];return e.jsx(o.default,{size:"x-large",value:i,disabled:!0,className:s,"aria-label":"string"==typeof n.label?n.label:void 0,children:l.map(n=>e.jsx(g.SelectItem,{value:n.value,children:n.label},n.value))},n.name)}return e.jsx(l.default,{size:"x-large",value:i,disabled:!0,className:s,addonBefore:n.icon,"aria-label":"string"==typeof n.label?n.label:void 0},n.name)}if(n.collapsed&&!Y[n.name])return e.jsx(r.default,{variant:"ghost",size:"medium",className:"itd-signup-reveal itd-signup-span",onClick:()=>Z(e=>({...e,[n.name]:!0})),children:n.label},n.name);const i=[...n.required?[{required:!0}]:[],...n.rules??[]],a="string"==typeof n.label?n.label:void 0,c=n.span?"itd-signup-span":void 0;switch(n.kind){case"phone":return e.jsx(s.Field,{name:n.name,className:c,rules:[...i,{validator:e=>!n.required&&!String(e??"").length||m.isPhoneComplete(U,String(e??""))}],children:e.jsx(l.default,{type:u.InputTypes.TEL,size:"x-large",inputMode:"numeric",autoComplete:"tel-national",mask:U?.mask??null,placeholder:a,addonBefore:n.icon,onChange:de(n.name),prefix:e.jsx("span",{className:"itd-login-dial",children:U?.code})})},n.name);case"email":return e.jsx(s.Field,{name:n.name,className:c,rules:i,children:e.jsx(l.default,{type:u.InputTypes.EMAIL,size:"x-large",autoComplete:"email",placeholder:a,addonBefore:n.icon,onChange:de(n.name)})},n.name);case"username":return e.jsxs("div",{className:"itd-signup-suggested itd-signup-span",children:[e.jsxs("div",{className:"itd-signup-suggested-row",children:[e.jsx(s.Field,{name:n.name,rules:i,children:e.jsx(l.default,{size:"x-large",autoComplete:"username",placeholder:a,defaultValue:B,addonBefore:n.icon,onChange:de(n.name)})},B??""),D.newSuggestion&&H?e.jsx(r.default,{variant:"solid",size:"x-large",onClick:H,disabled:I,children:D.newSuggestion}):null]}),D.suggestedHint&&B?e.jsx("span",{className:"itd-signup-note",children:D.suggestedHint}):null]},n.name);case"password":return n.confirm?e.jsxs("div",{className:"itd-signup-pair itd-signup-span",children:[e.jsx(s.Field,{name:n.name,rules:i,children:e.jsx(l.default,{type:u.InputTypes.PASSWORD,size:"x-large",autoComplete:"new-password",placeholder:a,addonBefore:n.icon,onChange:de(n.name)})}),e.jsx(s.Field,{name:n.name+"_confirm",rules:[...n.required?[{required:!0}]:[],{validator:e=>String(e??"")===($.current[n.name]??"")}],children:e.jsx(l.default,{type:u.InputTypes.PASSWORD,size:"x-large",autoComplete:"new-password",placeholder:n.confirmLabel,addonBefore:n.icon,onChange:de(n.name+"_confirm")})})]},n.name):e.jsx(s.Field,{name:n.name,rules:i,children:e.jsx(l.default,{type:u.InputTypes.PASSWORD,size:"x-large",autoComplete:"new-password",placeholder:a,addonBefore:n.icon,onChange:de(n.name)})},n.name);case"date":return e.jsx(s.Field,{name:n.name,className:c,rules:i,children:e.jsx(d.default,{size:"x-large",placeholder:a,onChange:de(n.name)})},n.name);case"select":return e.jsx(s.Field,{name:n.name,className:c,rules:i,children:e.jsx(o.default,{size:"x-large",placeholder:a,onChange:de(n.name),children:(n.options??[]).map(n=>e.jsx(g.SelectItem,{value:n.value,children:n.label},n.value))})},n.name);case"consent":return e.jsx(s.Field,{name:n.name,className:"itd-signup-span",rules:n.required?[{validator:e=>!0===e||"true"===e}]:[],children:e.jsx(t.default,{onChange:e=>de(n.name)(String(!!e?.checked)),children:n.label})},n.name);default:return e.jsx(s.Field,{name:n.name,className:c,rules:i,children:e.jsx(l.default,{size:"x-large",placeholder:a,addonBefore:n.icon,onChange:de(n.name)})},n.name)}})}),te?e.jsxs("div",{className:"itd-signup-inline-verify",children:[D.inFormVerifyTitle?e.jsx("span",{className:"itd-signup-step-title",children:D.inFormVerifyTitle}):null,D.codeHint?e.jsx("p",{className:"itd-login-hint",children:D.codeHint}):null,e.jsx(a.default,{ref:K,size:"x-large",length:F,value:Q,onChange:X,disabled:!oe,"aria-label":D.inFormVerifyTitle??D.title}),e.jsx("div",{className:"itd-login-actions",children:ne.active?e.jsx("span",{className:"itd-login-countdown",children:ne.label}):D.resendCode?e.jsx(r.default,{variant:"filled",size:"medium",onClick:R,disabled:I,children:D.resendCode}):null})]}):null,e.jsx(p.default,{children:e.jsx(r.default,{type:"submit",size:"x-large",loading:I,disabled:ue,style:{width:"100%"},children:se&&le!==ie[ie.length-1]?D.continue??D.submit:D.submit})})]}),D.haveAccount||D.signIn?e.jsxs("div",{className:"itd-signup-footer",children:[D.haveAccount?e.jsx("span",{className:"itd-signup-footer-note",children:D.haveAccount}):null,D.signIn?e.jsx(r.default,{variant:"ghost",size:"medium",onClick:V,children:D.signIn}):null]}):null]})]})});v.displayName="SignupPanel",exports.SignupPanel=v,exports.default=v,exports.deriveSteps=j,exports.stepOf=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),l=require("../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js"),i=require("../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js"),d=require("../../helpers/classname/GetClassNameByPlatform.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),l=require("../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js"),i=require("../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js"),d=require("../../helpers/classname/GetClassNameByPlatform.js"),r=require("../embla/useEmblaState.js");exports.default=({id:a,slides:t,autoplay:n=4e3,loop:o=!0,dots:c=!0,slideSize:u,slideSpacing:m,dotLabel:b=e=>"Slide "+(e+1),hideBackground:p=!1,className:j})=>{const h=s.useMemo(()=>({loop:o}),[o]),v=s.useMemo(()=>!1===n?[]:[i.default({delay:n})],[n]),[x,N]=l.default(h,v),{selected:g}=r.default(N),y=d.GetClassNameByPlatform,f={...u?{"--itd-slider-slide-size":u}:null,...m?{"--itd-slider-spacing":m}:null};return e.jsx("section",{id:a??y("inn-slider-component"),className:"itd-slider-block"+(j?" "+j:""),style:f,"data-background":String(!p),"data-has-slides":String(t.length>0),children:e.jsxs("div",{className:y("inn-slider")+" itd-slider",children:[e.jsx("div",{ref:x,className:y("inn-slider-viewport")+" itd-slider-viewport",children:e.jsx("div",{className:y("inn-slider-container")+" itd-slider-container",children:t.map((s,l)=>e.jsx("div",{className:y("inn-slider-slide")+" itd-slider-slide","data-background":String(!p),children:e.jsx("div",{className:y("inn-slider-slide-number"),children:s})},l))})}),c&&t.length>1&&e.jsx("div",{className:y("inn-slider-controls")+" itd-slider-controls",children:e.jsx("div",{className:y("inn-slider-dots")+" itd-slider-dots",children:t.map((s,l)=>e.jsx("button",{type:"button","aria-label":b(l),"aria-current":l===g||void 0,className:y("inn-slider-dot")+" itd-slider-dot"+(l===g?" "+y("inn-slider-dot")+"-selected":""),onClick:()=>N?.scrollTo(l)},l))})})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("lucide-react"),n=require("../../button/index.js"),s=require("../../image/index.js"),r=require("../../skeleton/index.js"),i=require("../../spin/index.js"),l=require("../game-box/index.js"),d=require("../post-viewer/index.js"),o=require("../default-avatar/index.js"),m=require("../filter-tabs/index.js"),u=require("../../hovercard/HoverCard.js"),c=require("../../hovercard/HoverCardTrigger.js"),h=require("../../hovercard/HoverCardContent.js"),x=require("../../enums/enum.js"),p=require("../../helpers/platform/index.js"),j=require("../../helpers/classname/GetClassNameByPlatform.js"),v=require("../../hooks/useLoadMoreSentinel.js");const g=[{value:"all",label:"Tümü"},{value:"registration",label:"Yaklaşan"},{value:"competition",label:"Canlı"},{value:"ended",label:"Sona Erdi"}],b={registration:"Yaklaşan",competition:"Canlı",ended:"Sona Erdi"},N=()=>p.GetPlatform()===j.PlatformTypes.MOBILE,f=e=>e?Math.max(0,new Date(e).getTime()-Date.now()):0,y=(e,a=!0)=>{const[n,s]=t.useState(()=>f(e));t.useEffect(()=>{if(!a||!e)return;s(f(e));const t=setInterval(()=>s(f(e)),1e3);return()=>clearInterval(t)},[e,a]);const r=Math.floor(n/1e3);return{ms:n,days:Math.floor(r/86400),hours:Math.floor(r%86400/3600),minutes:Math.floor(r%3600/60),seconds:r%60}},k=e=>String(e).padStart(2,"0"),w=({status:t})=>e.jsx("span",{className:"itd-tournament-status","data-status":t,children:b[t]}),z=({tournament:t,onOpen:a})=>{const n=t,r="ended"!==n.status,i="registration"===n.status?n.registerEndsAt??n.startsAt:n.endsAt,d=y(i,r),o=n.providers??[],m=(n.games??[]).slice(0,4),p=Math.max(0,(n.gamesCount??n.games?.length??0)-m.length),j=d.days>0?`${d.days} gün ${k(d.hours)}:${k(d.minutes)}:${k(d.seconds)}`:`${k(d.hours)}:${k(d.minutes)}:${k(d.seconds)}`;return e.jsxs("div",{className:"tournament-card itd-tournament-card",onClick:a?()=>a(n.id):void 0,onKeyDown:a?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a(n.id))}:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,children:[e.jsxs("div",{className:"tournament-card-cover itd-tournament-card-cover",children:[e.jsx("span",{className:"tournament-card-status itd-tournament-card-status",children:e.jsx(w,{status:n.status})}),e.jsx(s.default,{src:n.image??"",alt:n.name})]}),e.jsxs("div",{className:"tournament-card-body itd-tournament-card-body",children:[e.jsx("h3",{className:"tournament-card-name itd-tournament-card-name",children:n.name}),e.jsxs("div",{className:"tournament-card-meta itd-tournament-card-meta",children:[e.jsxs("div",{className:"tournament-card-prize itd-tournament-card-prize",children:[e.jsx("span",{className:"itd-tournament-meta-label",children:"Ödül Tutarı"}),e.jsx("span",{className:"itd-tournament-prize-value",children:n.prize})]}),r&&e.jsxs("div",{className:"tournament-card-countdown itd-tournament-card-countdown",children:[e.jsx("span",{className:"itd-tournament-meta-label",children:"Kalan Süre"}),e.jsx("span",{className:"itd-tournament-countdown-value",children:j})]})]}),m.length>0&&e.jsxs("div",{className:"tournament-card-games itd-tournament-card-games",children:[e.jsx("span",{className:"tournament-card-games-title itd-tournament-meta-label",children:"Oyunlar"}),e.jsxs("div",{className:"tournament-card-games-row itd-tournament-card-games-row",children:[m.map(t=>e.jsx("span",{className:"tournament-card-games-cell itd-tournament-card-games-cell",children:e.jsx(l.default,{name:"",slug:t.slug??t.id,image:t.image,ratio:"440/310"})},t.id)),p>0&&e.jsx("span",{className:"tournament-card-games-more itd-tournament-card-games-more",children:e.jsxs("span",{children:["+",p]})})]})]}),e.jsxs("div",{className:"tournament-card-footer itd-tournament-card-footer",children:[e.jsxs("span",{className:"tournament-card-participants",children:[n.participantCount," katılımcı"]}),o.length>0&&e.jsx("div",{className:"tournament-card-providers itd-tournament-card-providers"+(o.length>1?" is-interactive":""),onClick:e=>o.length>1&&e.stopPropagation(),children:o.length>1?e.jsxs(u.HoverCard,{children:[e.jsx(c.HoverCardTrigger,{asChild:!0,children:e.jsxs("span",{className:"tournament-card-providers-label",children:[o[0],e.jsxs("em",{className:"tournament-card-providers-more",children:["+",o.length-1]})]})}),e.jsx(h.HoverCardContent,{placement:x.ComponentYPositions.TOP,variant:"filled",maxWidth:240,children:e.jsx("div",{className:"itd-tournament-providers-card",children:o.map(t=>e.jsx("span",{children:t},t))})})]}):e.jsx("span",{className:"tournament-card-providers-label",children:o[0]})})]})]})]})},C=[{value:"prizes",label:"Ödüller"},{value:"leaderboard",label:"Puan Tablosu"},{value:"rules",label:"Kurallar"}];exports.TournamentCard=z,exports.TournamentDetail=({tournament:r,onBack:u,backText:c="Turnuvalara Dön",onJoin:h,onPlayGame:x,gamesStep:p,standingsHasMore:j=!1,standingsLoading:g=!1,onStandingsMore:b})=>{const f=r,z=N(),S="ended"!==f.status,T="registration"===f.status?f.registerEndsAt??f.startsAt:f.endsAt,q=y(T,S),M=p??15,[P,K]=t.useState(M),[L,A]=t.useState("prizes"),[E,O]=t.useState("site"),D=f.games??[],G=D.slice(0,P),H=D.length-G.length,B="registration"===f.status?"Kayıt bitişine kalan süre":"Turnuva bitişine kalan süre",$=t.useMemo(()=>Array.isArray(f.rules)&&f.rules.length>0?e.jsx(d.default,{blocks:f.rules}):"string"==typeof f.rules&&""!==f.rules.trim()?e.jsx("div",{className:"itd-tournament-rules-text",children:f.rules}):e.jsx("span",{className:"itd-tournament-panel-empty",children:"Kural bilgisi bulunmuyor."}),[f.rules]),F=t.useRef(null),[R,I]=t.useState({prev:!1,next:!1});t.useEffect(()=>{const e=F.current;if(!e)return;const t=()=>I({prev:e.scrollLeft>4,next:e.scrollLeft<e.scrollWidth-e.clientWidth-4});t();const a=new ResizeObserver(t);return a.observe(e),e.addEventListener("scroll",t,{passive:!0}),()=>{a.disconnect(),e.removeEventListener("scroll",t)}},[f.stats]);const W=e=>{const t=F.current;t&&t.scrollBy({left:e*t.clientWidth*.85,behavior:"smooth"})},Y="ended"===f.status?"Kazananlar":"Puan Tablosu",J=(f.globalStandings?.length??0)>0,_="global"===E&&J?f.globalStandings:f.standings??[],Q="site"===E,U=v.useLoadMoreSentinel(Q&&j&&!g,b),V=e.jsxs("div",{className:"tournament-prizes itd-tournament-panel itd-tournament-prizes",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Ödüller"}),f.prizeRows&&f.prizeRows.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"tournament-prizes-header itd-tournament-panel-header",children:[e.jsx("span",{children:"Sıra"}),e.jsx("span",{children:"Ödül"})]}),e.jsx("div",{className:"itd-tournament-panel-list",children:f.prizeRows.map(t=>e.jsxs("div",{className:"tournament-prize-row itd-tournament-prize-row",children:[e.jsx("b",{children:t.rank}),e.jsx("span",{children:t.value})]},t.rank))})]}):e.jsx("span",{className:"itd-tournament-panel-empty",children:"Ödül bilgisi bulunmuyor."})]}),X=e.jsxs("div",{className:"tournament-standings itd-tournament-panel itd-tournament-standings",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:Y}),J&&e.jsx("div",{className:"tournament-standings-scope itd-tournament-scope",children:e.jsx(m.default,{grow:!0,options:[{value:"site",label:"Site"},{value:"global",label:"Global"}],value:E,onChange:e=>O(e),"aria-label":"Sıralama kapsamı"})}),_.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"tournament-standings-header itd-tournament-panel-header itd-tournament-standings-header",children:[e.jsx("span",{children:"#"}),e.jsx("span",{children:"Kullanıcı"}),e.jsx("span",{children:"ended"===f.status?"Ödül":"Puan"})]}),e.jsxs("div",{className:"itd-tournament-panel-list",children:[_.map(t=>e.jsxs("div",{className:"tournament-standings-row itd-tournament-standings-row"+(t.highlight?" is-highlight":""),"data-top":t.position<=3?"":void 0,children:[e.jsx("b",{className:"itd-tournament-rank",children:t.position}),e.jsx("span",{className:"itd-tournament-standings-photo",children:t.photo?e.jsx("img",{src:t.photo,alt:""}):e.jsx(o.default,{})}),e.jsx("span",{className:"itd-tournament-standings-user",children:t.username??"—"}),e.jsx("span",{className:"itd-tournament-standings-value",children:t.value})]},t.position)),Q&&(j||g)&&e.jsx("div",{className:"itd-tournament-board-sentinel",ref:U,children:g&&e.jsx(i.default,{})})]})]}):e.jsx("span",{className:"itd-tournament-panel-empty",children:"site"===E&&J?"Bu sitede sıralama oluşmadı — Global sekmesine bakabilirsiniz.":"ended"===f.status?"Kazanan bilgisi henüz yayınlanmadı.":"Puan tablosu henüz oluşmadı."})]}),Z=e.jsxs("div",{className:"tournament-rules itd-tournament-panel itd-tournament-rules",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Kurallar"}),e.jsx("div",{className:"tournament-rules-scroll itd-tournament-rules-scroll",children:$})]});return e.jsxs("div",{className:"tournament-detail itd-tournament-detail",children:[e.jsxs("div",{className:"tournament-detail-backbar itd-tournament-backbar",children:[e.jsxs(n.default,{variant:"filled",size:"medium",onClick:u,children:[e.jsx(a.ChevronLeft,{size:16}),c]}),e.jsx("div",{className:"tournament-detail-backbar-actions itd-tournament-backbar-actions",children:f.autoJoin?e.jsxs("span",{className:"tournament-detail-auto-badge itd-tournament-auto-badge",children:[e.jsx(a.CheckCircle2,{size:15}),"Otomatik Katılım"]}):S&&h&&e.jsx(n.default,{className:"inn-tournament-participate itd-tournament-participate",variant:f.joined?"statable":"default",state:f.joined?"reject":void 0,size:"medium",onClick:h,children:f.joined?"Katılımdan Ayrıl":"Hemen Katıl"})})]}),e.jsxs("div",{className:"tournament-cover itd-tournament-cover",children:[e.jsx("div",{className:"tournament-cover-image itd-tournament-cover-image",children:e.jsx(s.default,{src:f.cover??f.image??"",alt:f.name})}),e.jsx("div",{className:"tournament-cover-overlay itd-tournament-cover-overlay",children:e.jsxs("div",{className:"tournament-cover-panel itd-tournament-cover-panel",children:[e.jsx(w,{status:f.status}),e.jsxs("div",{className:"itd-tournament-cover-prize",children:[e.jsx("span",{className:"itd-tournament-meta-label",children:"Ödül Tutarı"}),e.jsx("b",{className:"itd-tournament-cover-amount",children:f.prize})]}),S&&e.jsxs("div",{className:"itd-tournament-cover-countdown",children:[e.jsx("span",{className:"itd-tournament-cover-caption",children:B}),e.jsx("div",{className:"itd-tournament-timer",children:[[q.days,"Gün"],[q.hours,"Saat"],[q.minutes,"Dakika"],[q.seconds,"Saniye"]].map(([t,a])=>e.jsxs("span",{className:"tournament-cover-countdown-box itd-tournament-timer-box",children:[e.jsx("b",{children:k(t)}),e.jsx("span",{children:a})]},a))})]})]})})]}),(f.description||f.name)&&e.jsxs("div",{className:"tournament-detail-description-box itd-tournament-description",children:[e.jsx("h3",{children:f.name}),f.description&&e.jsx("div",{children:f.description})]}),f.stats&&f.stats.length>0&&e.jsxs("div",{className:"tournament-stats itd-tournament-stats",children:[R.prev&&e.jsx("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow","data-dir":"prev","aria-label":"Geri",onClick:()=>W(-1),children:e.jsx(a.ChevronLeft,{size:16})}),e.jsx("div",{className:"tournament-stats-track itd-tournament-stats-track",ref:F,children:f.stats.map(t=>e.jsxs("div",{className:"tournament-stats-box itd-tournament-stats-box",children:[e.jsx("span",{className:"itd-tournament-box-caption",children:t.title}),e.jsx("div",{className:"itd-tournament-stats-rows",children:t.rows.map(t=>e.jsxs("div",{className:"itd-tournament-stats-row",children:[e.jsx("span",{children:t.label}),e.jsx("span",{"data-tone":t.tone,children:t.value})]},t.label))})]},t.title))}),R.next&&e.jsx("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow","data-dir":"next","aria-label":"İleri",onClick:()=>W(1),children:e.jsx(a.ChevronRight,{size:16})})]}),f.providers&&f.providers.length>0&&e.jsxs("div",{className:"itd-tournament-section",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Sağlayıcılar"}),e.jsx("div",{className:"itd-tournament-provider-chips",children:f.providers.map(t=>e.jsx("span",{className:"tournament-detail-provider-chip itd-tournament-provider-chip",children:t},t))})]}),e.jsxs("div",{className:"itd-tournament-section",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Turnuva Oyunları"}),D.length>0?e.jsxs("div",{className:"tournament-games-grid itd-tournament-games-grid",children:[G.map(t=>e.jsx(l.default,{name:z?"":t.name,slug:t.slug??t.id,image:t.image,ratio:"440/310",onPlay:x?e=>x(e):void 0},t.id)),H>0&&e.jsx("button",{type:"button",className:"tournament-games-more itd-tournament-games-more",onClick:()=>K(e=>e+M),children:e.jsxs("span",{children:["+",H]})})]}):e.jsx("div",{className:"tournament-games-empty itd-tournament-games-empty",children:e.jsx("span",{children:"Bu turnuvaya tanımlı oyun bulunmuyor."})})]}),z?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"tournament-detail-tabs itd-tournament-tabs",children:e.jsx(m.default,{grow:!0,options:C.map(e=>({value:e.value,label:"leaderboard"===e.value?Y:e.label})),value:L,onChange:e=>A(e),"aria-label":"Turnuva panelleri"})}),"prizes"===L&&V,"leaderboard"===L&&X,"rules"===L&&Z]}):e.jsxs("div",{className:"tournament-detail-panels itd-tournament-panels",children:[V,X,Z]})]})},exports.TournamentList=({tournaments:t,loading:a=!1,filters:s=g,filter:l="all",onFilterChange:d,onOpen:o,hasMore:u=!1,loadingMore:c=!1,onLoadMore:h,emptyTitle:x="Turnuva bulunamadı",emptyText:p="Bu filtreye uyan bir turnuva yok. Diğer sekmelere göz atabilirsiniz."})=>{const j=N()?4:8;return e.jsxs("div",{className:"tournament-list itd-tournament-list",children:[e.jsx("div",{className:"tournament-list-filters itd-tournament-filters",children:e.jsx(m.default,{options:s,value:l,onChange:d,"aria-label":"Turnuva durumu"})}),a?e.jsx("div",{className:"tournament-list-skeleton-grid itd-tournament-grid",children:Array.from({length:j},(t,a)=>e.jsxs("div",{className:"tournament-list-skeleton-box itd-tournament-skeleton-box",children:[e.jsx("span",{className:"tournament-list-skeleton-cover itd-tournament-skeleton-cover",children:e.jsx(r.default,{width:"100%",height:"100%"})}),e.jsxs("span",{className:"tournament-list-skeleton-body itd-tournament-skeleton-body",children:[e.jsx(r.default,{width:"65%",height:"1rem"}),e.jsx(r.default,{width:"40%",height:"0.75rem"}),e.jsx(r.default,{width:"50%",height:"0.75rem"})]})]},a))}):0===t.length?e.jsxs("div",{className:"tournament-list-empty itd-tournament-empty",children:[e.jsx("h3",{children:x}),e.jsx("span",{children:p})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"tournament-list-grid itd-tournament-grid",children:t.map(t=>e.jsx(z,{tournament:t,onOpen:o},t.id))}),u&&e.jsx("div",{className:"tournament-list-load-more itd-tournament-load-more",children:c?e.jsx(i.default,{}):e.jsx(n.default,{variant:"outline-accent",size:"medium",onClick:h,children:"Daha Fazla Göster"})})]})]})},exports.default=({title:t,children:a,className:n})=>{const s=N(),r=s?"inn-mobile-tournament":"inn-tournament";return e.jsxs("div",{id:r+"-component",className:(s?"inn-mobile-tournament":"inn-tournament")+" itd-tournaments"+(n?" "+n:""),children:[t&&e.jsx("div",{id:r+"-title",className:"tournament-title itd-tournaments-title",children:t}),e.jsx("div",{className:"tournament-content-wrapper itd-tournaments-content",children:a})]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("lucide-react"),n=require("../../button/index.js"),s=require("../../image/index.js"),r=require("../../skeleton/index.js"),i=require("../../spin/index.js"),l=require("../game-box/index.js"),o=require("../post-viewer/index.js"),d=require("../default-avatar/index.js"),m=require("../filter-tabs/index.js"),u=require("../../hovercard/HoverCard.js"),c=require("../../hovercard/HoverCardTrigger.js"),h=require("../../hovercard/HoverCardContent.js"),p=require("../../enums/enum.js"),x=require("../../helpers/platform/index.js"),v=require("../../helpers/classname/GetClassNameByPlatform.js"),j=require("../../hooks/useLoadMoreSentinel.js");const g=[{value:"all",label:"Tümü"},{value:"registration",label:"Yaklaşan"},{value:"competition",label:"Canlı"},{value:"ended",label:"Sona Erdi"}],b={registration:"Yaklaşan",competition:"Canlı",ended:"Sona Erdi"},N=()=>x.GetPlatform()===v.PlatformTypes.MOBILE,f=e=>e?Math.max(0,new Date(e).getTime()-Date.now()):0,y=(e,a=!0)=>{const[n,s]=t.useState(()=>f(e));t.useEffect(()=>{if(!a||!e)return;s(f(e));const t=setInterval(()=>s(f(e)),1e3);return()=>clearInterval(t)},[e,a]);const r=Math.floor(n/1e3);return{ms:n,days:Math.floor(r/86400),hours:Math.floor(r%86400/3600),minutes:Math.floor(r%3600/60),seconds:r%60}},k=e=>String(e).padStart(2,"0"),w=({status:t})=>e.jsx("span",{className:"itd-tournament-status","data-status":t,children:b[t]}),z=({tournament:t,onOpen:a})=>{const n=t,r="ended"!==n.status,i="registration"===n.status?n.registerEndsAt??n.startsAt:n.endsAt,o=y(i,r),d=n.providers??[],m=(n.games??[]).slice(0,4),x=Math.max(0,(n.gamesCount??n.games?.length??0)-m.length),v=o.days>0?`${o.days} gün ${k(o.hours)}:${k(o.minutes)}:${k(o.seconds)}`:`${k(o.hours)}:${k(o.minutes)}:${k(o.seconds)}`;return e.jsxs("div",{className:"tournament-card itd-tournament-card",onClick:a?()=>a(n.id):void 0,onKeyDown:a?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a(n.id))}:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,children:[e.jsxs("div",{className:"tournament-card-cover itd-tournament-card-cover",children:[e.jsx("span",{className:"tournament-card-status itd-tournament-card-status",children:e.jsx(w,{status:n.status})}),e.jsx(s.default,{src:n.image??"",alt:n.name})]}),e.jsxs("div",{className:"tournament-card-body itd-tournament-card-body",children:[e.jsx("h3",{className:"tournament-card-name itd-tournament-card-name",children:n.name}),e.jsxs("div",{className:"tournament-card-meta itd-tournament-card-meta",children:[e.jsxs("div",{className:"tournament-card-prize itd-tournament-card-prize",children:[e.jsx("span",{className:"itd-tournament-meta-label tournament-card-prize-label",children:"Ödül Tutarı"}),e.jsx("span",{className:"itd-tournament-prize-value tournament-card-prize-value",children:n.prize})]}),r&&e.jsxs("div",{className:"tournament-card-countdown itd-tournament-card-countdown",children:[e.jsx("span",{className:"itd-tournament-meta-label tournament-card-countdown-label",children:"Kalan Süre"}),e.jsx("span",{className:"itd-tournament-countdown-value tournament-card-countdown-value",children:v})]})]}),m.length>0&&e.jsxs("div",{className:"tournament-card-games itd-tournament-card-games",children:[e.jsx("span",{className:"tournament-card-games-title itd-tournament-meta-label",children:"Oyunlar"}),e.jsxs("div",{className:"tournament-card-games-row itd-tournament-card-games-row",children:[m.map(t=>e.jsx("span",{className:"tournament-card-games-cell itd-tournament-card-games-cell",children:e.jsx(l.default,{name:"",slug:t.slug??t.id,image:t.image,ratio:"440/310"})},t.id)),x>0&&e.jsx("span",{className:"tournament-card-games-more itd-tournament-card-games-more",children:e.jsxs("span",{children:["+",x]})})]})]}),e.jsxs("div",{className:"tournament-card-footer itd-tournament-card-footer",children:[e.jsxs("span",{className:"tournament-card-participants",children:[n.participantCount," katılımcı"]}),d.length>0&&e.jsx("div",{className:"tournament-card-providers itd-tournament-card-providers"+(d.length>1?" is-interactive":""),onClick:e=>d.length>1&&e.stopPropagation(),children:d.length>1?e.jsxs(u.HoverCard,{children:[e.jsx(c.HoverCardTrigger,{asChild:!0,children:e.jsxs("span",{className:"tournament-card-providers-label",children:[d[0],e.jsxs("em",{className:"tournament-card-providers-more",children:["+",d.length-1]})]})}),e.jsx(h.HoverCardContent,{placement:p.ComponentYPositions.TOP,variant:"filled",maxWidth:240,children:e.jsx("div",{className:"itd-tournament-providers-card",children:d.map(t=>e.jsx("span",{children:t},t))})})]}):e.jsx("span",{className:"tournament-card-providers-label",children:d[0]})})]})]})]})},C=[{value:"prizes",label:"Ödüller"},{value:"leaderboard",label:"Puan Tablosu"},{value:"rules",label:"Kurallar"}];exports.TournamentCard=z,exports.TournamentDetail=({tournament:r,onBack:u,backText:c="Turnuvalara Dön",onJoin:h,onPlayGame:p,gamesStep:x,standingsHasMore:v=!1,standingsLoading:g=!1,onStandingsMore:b})=>{const f=r,z=N(),S="ended"!==f.status,T="registration"===f.status?f.registerEndsAt??f.startsAt:f.endsAt,q=y(T,S),M=x??15,[P,K]=t.useState(M),[L,A]=t.useState("prizes"),[E,O]=t.useState("site"),D=f.games??[],G=D.slice(0,P),H=D.length-G.length,B="registration"===f.status?"Kayıt bitişine kalan süre":"Turnuva bitişine kalan süre",$=t.useMemo(()=>Array.isArray(f.rules)&&f.rules.length>0?e.jsx(o.default,{blocks:f.rules}):"string"==typeof f.rules&&""!==f.rules.trim()?e.jsx("div",{className:"itd-tournament-rules-text tournament-rules-content",children:f.rules}):e.jsx("span",{className:"itd-tournament-panel-empty tournament-rules-empty",children:"Kural bilgisi bulunmuyor."}),[f.rules]),F=t.useRef(null),[R,I]=t.useState({prev:!1,next:!1});t.useEffect(()=>{const e=F.current;if(!e)return;const t=()=>I({prev:e.scrollLeft>4,next:e.scrollLeft<e.scrollWidth-e.clientWidth-4});t();const a=new ResizeObserver(t);return a.observe(e),e.addEventListener("scroll",t,{passive:!0}),()=>{a.disconnect(),e.removeEventListener("scroll",t)}},[f.stats]);const W=e=>{const t=F.current;t&&t.scrollBy({left:e*t.clientWidth*.85,behavior:"smooth"})},Y="ended"===f.status?"Kazananlar":"Puan Tablosu",J=(f.globalStandings?.length??0)>0,_="global"===E&&J?f.globalStandings:f.standings??[],Q="site"===E,U=j.useLoadMoreSentinel(Q&&v&&!g,b),V=e.jsxs("div",{className:"tournament-prizes itd-tournament-panel itd-tournament-prizes",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Ödüller"}),f.prizeRows&&f.prizeRows.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"tournament-prizes-header itd-tournament-panel-header",children:[e.jsx("span",{children:"Sıra"}),e.jsx("span",{children:"Ödül"})]}),e.jsx("div",{className:"itd-tournament-panel-list tournament-prizes-list",children:f.prizeRows.map(t=>e.jsxs("div",{className:"tournament-prize-row itd-tournament-prize-row",children:[e.jsx("b",{className:"tournament-prizes-place",children:t.rank}),e.jsx("span",{className:"tournament-prizes-payout",children:t.value})]},t.rank))})]}):e.jsx("span",{className:"itd-tournament-panel-empty tournament-prizes-empty",children:"Ödül bilgisi bulunmuyor."})]}),X=e.jsxs("div",{className:"tournament-standings itd-tournament-panel itd-tournament-standings tournament-leaderboard",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:Y}),J&&e.jsx("div",{className:"tournament-standings-scope itd-tournament-scope",children:e.jsx(m.default,{grow:!0,options:[{value:"site",label:"Site"},{value:"global",label:"Global"}],value:E,onChange:e=>O(e),"aria-label":"Sıralama kapsamı"})}),_.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"tournament-standings-header itd-tournament-panel-header itd-tournament-standings-header",children:[e.jsx("span",{className:"pos tournament-standings-header-pos",children:"#"}),e.jsx("span",{className:"user tournament-standings-header-user",children:"Kullanıcı"}),e.jsx("span",{className:"tournament-standings-header-score",children:"ended"===f.status?"Ödül":"Puan"})]}),e.jsxs("div",{className:"itd-tournament-panel-list tournament-standings-list"+("ended"===f.status?" tournament-standings-list--winners":" tournament-standings-list--leaderboard"),children:[_.map(t=>e.jsxs("div",{className:"tournament-standings-row itd-tournament-standings-row"+(t.highlight?" is-highlight":""),"data-top":t.position<=3?"":void 0,children:[e.jsx("b",{className:"itd-tournament-rank tournament-standings-position",children:t.position}),e.jsx("span",{className:"itd-tournament-standings-photo tournament-standings-photo",children:t.photo?e.jsx("img",{src:t.photo,alt:""}):e.jsx(d.default,{})}),e.jsx("span",{className:"itd-tournament-standings-user tournament-standings-user",children:t.username??"—"}),e.jsx("span",{className:"itd-tournament-standings-value tournament-standings-score",children:t.value})]},t.position)),Q&&(v||g)&&e.jsx("div",{className:"itd-tournament-board-sentinel",ref:U,children:g&&e.jsx(i.default,{})})]})]}):e.jsx("span",{className:"itd-tournament-panel-empty tournament-standings-empty"+("ended"===f.status?" tournament-standings-empty--winners":" tournament-standings-empty--leaderboard"),children:"site"===E&&J?"Bu sitede sıralama oluşmadı — Global sekmesine bakabilirsiniz.":"ended"===f.status?"Kazanan bilgisi henüz yayınlanmadı.":"Puan tablosu henüz oluşmadı."})]}),Z=e.jsxs("div",{className:"tournament-rules itd-tournament-panel itd-tournament-rules",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Kurallar"}),e.jsx("div",{className:"tournament-rules-scroll itd-tournament-rules-scroll",children:$})]});return e.jsxs("div",{className:"tournament-detail itd-tournament-detail",children:[e.jsxs("div",{className:"tournament-detail-backbar itd-tournament-backbar",children:[e.jsxs(n.default,{variant:"filled",size:"medium",onClick:u,children:[e.jsx(a.ChevronLeft,{size:16}),c]}),e.jsx("div",{className:"tournament-detail-backbar-actions itd-tournament-backbar-actions",children:f.autoJoin?e.jsxs("span",{className:"tournament-detail-auto-badge itd-tournament-auto-badge",children:[e.jsx(a.CheckCircle2,{size:15}),"Otomatik Katılım"]}):S&&h&&e.jsx(n.default,{className:"inn-tournament-participate itd-tournament-participate",variant:f.joined?"statable":"default",state:f.joined?"reject":void 0,size:"medium",onClick:h,children:f.joined?"Katılımdan Ayrıl":"Hemen Katıl"})})]}),e.jsxs("div",{className:"tournament-cover itd-tournament-cover",children:[e.jsx("div",{className:"tournament-cover-image itd-tournament-cover-image",children:e.jsx(s.default,{src:f.cover??f.image??"",alt:f.name})}),e.jsx("div",{className:"tournament-cover-overlay itd-tournament-cover-overlay",children:e.jsxs("div",{className:"tournament-cover-panel itd-tournament-cover-panel",children:[e.jsx(w,{status:f.status}),e.jsxs("div",{className:"itd-tournament-cover-prize tournament-cover-prize",children:[e.jsx("span",{className:"itd-tournament-meta-label tournament-cover-prize-label",children:"Ödül Tutarı"}),e.jsx("b",{className:"itd-tournament-cover-amount tournament-cover-prize-amount",children:f.prize})]}),S&&e.jsxs("div",{className:"itd-tournament-cover-countdown tournament-cover-countdown",children:[e.jsx("span",{className:"itd-tournament-cover-caption tournament-cover-countdown-caption",children:B}),e.jsx("div",{className:"itd-tournament-timer tournament-cover-countdown-timer",children:[[q.days,"Gün"],[q.hours,"Saat"],[q.minutes,"Dakika"],[q.seconds,"Saniye"]].map(([t,a])=>e.jsxs("span",{className:"tournament-cover-countdown-box itd-tournament-timer-box",children:[e.jsx("b",{children:k(t)}),e.jsx("span",{children:a})]},a))})]})]})})]}),(f.description||f.name)&&e.jsxs("div",{className:"tournament-detail-description-box itd-tournament-description",children:[e.jsx("h3",{className:"tournament-detail-description-title",children:f.name}),f.description&&e.jsx("div",{className:"tournament-detail-description",children:f.description})]}),f.stats&&f.stats.length>0&&e.jsxs("div",{className:"tournament-stats itd-tournament-stats",children:[R.prev&&e.jsx("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow tournament-stats-arrow--prev","data-dir":"prev","aria-label":"Geri",onClick:()=>W(-1),children:e.jsx(a.ChevronLeft,{size:16})}),e.jsx("div",{className:"tournament-stats-track itd-tournament-stats-track",ref:F,children:f.stats.map(t=>e.jsxs("div",{className:"tournament-stats-box itd-tournament-stats-box",children:[e.jsx("span",{className:"itd-tournament-box-caption tournament-stats-box-title",children:t.title}),e.jsx("div",{className:"itd-tournament-stats-rows tournament-stats-rows",children:t.rows.map(t=>e.jsxs("div",{className:"itd-tournament-stats-row tournament-stats-row",children:[e.jsx("span",{children:t.label}),e.jsx("span",{"data-tone":t.tone,children:t.value})]},t.label))})]},t.title))}),R.next&&e.jsx("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow tournament-stats-arrow--next","data-dir":"next","aria-label":"İleri",onClick:()=>W(1),children:e.jsx(a.ChevronRight,{size:16})})]}),f.providers&&f.providers.length>0&&e.jsxs("div",{className:"itd-tournament-section tournament-detail-section tournament-detail-section--providers",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Sağlayıcılar"}),e.jsx("div",{className:"itd-tournament-provider-chips tournament-detail-providers",children:f.providers.map(t=>e.jsx("span",{className:"tournament-detail-provider-chip itd-tournament-provider-chip",children:t},t))})]}),e.jsxs("div",{className:"itd-tournament-section tournament-detail-section tournament-detail-section--games",children:[e.jsx("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Turnuva Oyunları"}),D.length>0?e.jsxs("div",{className:"tournament-games-grid itd-tournament-games-grid",children:[G.map(t=>e.jsx(l.default,{className:"tournament-game-item",name:z?"":t.name,slug:t.slug??t.id,image:t.image,ratio:"440/310",onPlay:p?e=>p(e):void 0},t.id)),H>0&&e.jsx("button",{type:"button",className:"tournament-games-more itd-tournament-games-more",onClick:()=>K(e=>e+M),children:e.jsxs("span",{children:["+",H]})})]}):e.jsx("div",{className:"tournament-games-empty itd-tournament-games-empty",children:e.jsx("span",{children:"Bu turnuvaya tanımlı oyun bulunmuyor."})})]}),z?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"tournament-detail-tabs itd-tournament-tabs",children:e.jsx(m.default,{grow:!0,className:"tournament-detail-tabs-list",options:C.map(e=>({value:e.value,label:"leaderboard"===e.value?Y:e.label})),value:L,onChange:e=>A(e),"aria-label":"Turnuva panelleri"})}),"prizes"===L&&V,"leaderboard"===L&&X,"rules"===L&&Z]}):e.jsxs("div",{className:"tournament-detail-panels itd-tournament-panels",children:[V,X,Z]})]})},exports.TournamentList=({tournaments:t,loading:a=!1,filters:s=g,filter:l="all",onFilterChange:o,onOpen:d,hasMore:u=!1,loadingMore:c=!1,onLoadMore:h,emptyTitle:p="Turnuva bulunamadı",emptyText:x="Bu filtreye uyan bir turnuva yok. Diğer sekmelere göz atabilirsiniz."})=>{const v=N()?4:8;return e.jsxs("div",{className:"tournament-list itd-tournament-list",children:[e.jsx("div",{className:"tournament-list-filters itd-tournament-filters",children:e.jsx(m.default,{className:"tournament-list-filters-list",options:s,value:l,onChange:o,"aria-label":"Turnuva durumu"})}),a?e.jsx("div",{className:"tournament-list-skeleton-grid itd-tournament-grid",children:Array.from({length:v},(t,a)=>e.jsxs("div",{className:"tournament-list-skeleton-box itd-tournament-skeleton-box",children:[e.jsx("span",{className:"tournament-list-skeleton-cover itd-tournament-skeleton-cover",children:e.jsx(r.default,{width:"100%",height:"100%"})}),e.jsxs("span",{className:"tournament-list-skeleton-body itd-tournament-skeleton-body",children:[e.jsx(r.default,{width:"65%",height:"1rem"}),e.jsx(r.default,{width:"40%",height:"0.75rem"}),e.jsx(r.default,{width:"50%",height:"0.75rem"})]})]},a))}):0===t.length?e.jsxs("div",{className:"tournament-list-empty itd-tournament-empty",children:[e.jsx("h3",{children:p}),e.jsx("span",{children:x})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"tournament-list-grid itd-tournament-grid",children:t.map(t=>e.jsx(z,{tournament:t,onOpen:d},t.id))}),u&&e.jsx("div",{className:"tournament-list-load-more itd-tournament-load-more",children:c?e.jsx(i.default,{}):e.jsx(n.default,{variant:"outline-accent",size:"medium",onClick:h,children:"Daha Fazla Göster"})})]})]})},exports.default=({title:t,children:a,className:n})=>{const s=N(),r=s?"inn-mobile-tournament":"inn-tournament";return e.jsxs("div",{id:r+"-component",className:(s?"inn-mobile-tournament":"inn-tournament")+" itd-tournaments"+(n?" "+n:""),children:[t&&e.jsx("div",{id:r+"-title",className:"tournament-title itd-tournaments-title",children:t}),e.jsx("div",{className:"tournament-content-wrapper itd-tournaments-content",children:a})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),a=require("react"),s=require("lucide-react"),t=require("../../button/index.js"),i=require("../../progress/index.js"),l=require("../../select/index.js"),n=require("../../alert/index.js"),r=require("../../tooltip/Tooltip.js"),d=require("../../tooltip/TooltipTrigger.js"),u=require("../../tooltip/TooltipContent.js"),c=require("./cashier.js"),h=require("./table.js"),o=require("../../
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),a=require("react"),s=require("lucide-react"),t=require("../../button/index.js"),i=require("../../progress/index.js"),l=require("../../select/index.js"),n=require("../../alert/index.js"),r=require("../../tooltip/Tooltip.js"),d=require("../../tooltip/TooltipTrigger.js"),u=require("../../tooltip/TooltipContent.js"),c=require("./cashier.js"),h=require("./table.js"),o=require("../../alert/Description.js"),m=require("../../select/SelectItem.js");const b=({kind:a,name:s,dateLabel:t,date:i,action:l,fields:n,children:r})=>e.jsxs("section",{className:"hub__status-card",children:[e.jsxs("div",{className:"hub__status-head",children:[e.jsxs("div",{className:"hub__status-title",children:[e.jsx("span",{className:"hub__status-kind",children:a}),e.jsx("span",{className:"hub__status-name",children:s})]}),e.jsxs("div",{className:"hub__status-side",children:[e.jsxs("div",{className:"hub__status-date",children:[e.jsx("span",{children:t}),e.jsx("span",{className:"hub__status-dateval",children:i})]}),l]})]}),e.jsx("div",{className:"hub__status-grid",children:n.map(([a,s],t)=>e.jsxs("div",{children:[e.jsx("span",{className:"hub__status-label",children:a}),e.jsx("span",{className:"hub__status-value",children:s})]},t))}),r]});exports.HubActiveBonus=({bonus:a,intro:s,onCancel:l,kindLabel:r="AKTİF BONUS",applyDateLabel:d="Başvuru Tarihi",cancelLabel:u="Bonusu İptal Et",wagerTitle:c="Bonus Çevrim Bilgisi",validLabel:h="Geçerlilik"})=>e.jsxs(e.Fragment,{children:[s&&e.jsx(n.default,{type:"info",variant:"filled",children:e.jsx(o.AlertDescription,{children:s})}),e.jsx(b,{kind:r,name:a.name,dateLabel:d,date:a.applyDate,action:e.jsx(t.default,{variant:"statable",state:"reject",size:"medium",onClick:l,children:u}),fields:a.fields,children:e.jsxs("div",{className:"hub__wager",children:[e.jsxs("div",{className:"hub__wager-head",children:[e.jsx("span",{className:"hub__wager-title",children:c}),e.jsxs("div",{className:"hub__status-date hub__wager-until",children:[e.jsx("span",{children:h}),e.jsx("span",{className:"hub__status-dateval",children:a.validUntil})]})]}),a.wagerings.map((a,s)=>e.jsxs("div",{className:"hub__wager-row",children:[e.jsx("span",{className:"hub__wager-label",children:a.label}),e.jsxs("div",{className:"hub__wager-bar",children:[e.jsx(i.default,{percent:a.percent,showInfo:!1}),e.jsx("span",{className:"hub__wager-amt",children:a.done+" / "+a.total})]})]},s))]})})]}),exports.HubBonusActivation=({data:a,intro:i,onAccept:l,onReject:r,marker:d={desktop:"inn-bonus-activation-table",list:"inn-mobile-bonus-activation-list",methods:"inn-mobile-bonus-activation-list-items",item:"inn-mobile-bonus-activation-list-method-item"},idTitle:u="Id",nameTitle:c="Bonus İsmi",catTitle:m="Kategori",amountTitle:b="Miktar",acceptLabel:x="Kabul Et",rejectLabel:p="Reddet"})=>{const j=[{key:"id",dataIndex:"key",title:u,width:50,render:(a,s)=>e.jsx(h.HubCopyBtn,{value:s.key,compact:!0})},{key:"name",dataIndex:"name",title:c,maxWidth:300,render:(a,s)=>e.jsx(h.HubHistName,{name:s.name})},{key:"cat",dataIndex:"cat",title:m,width:150},{key:"amount",dataIndex:"amount",title:b,width:200,render:a=>e.jsx("span",{className:"hub__hist-amount",children:String(a)})},{key:"actions",dataIndex:"key",title:"",width:240,render:(a,i)=>e.jsxs("span",{className:"hub__pay-actions",children:[e.jsxs(t.default,{variant:"default",size:"medium",onClick:()=>l?.(i),children:[e.jsx(s.Gift,{size:14}),x]}),e.jsxs(t.default,{variant:"statable",state:"reject",size:"medium",onClick:()=>r?.(i),children:[e.jsx(s.Trash2,{size:14}),p]})]})}];return e.jsxs(e.Fragment,{children:[i&&e.jsx(n.default,{type:"info",variant:"filled",children:e.jsx(o.AlertDescription,{children:i})}),e.jsx(h.HubTable,{columns:j,data:a,cellHeight:"74px",marker:d})]})},exports.HubBonusRequest=({data:n,cats:o,types:b,statuses:x,wagering:p,applies:j,onRequest:_,onCancel:v,marker:g={desktop:"inn-bonus-request-table",list:"inn-mobile-bonus-request-list",methods:"inn-mobile-bonus-request-list-methods",item:"inn-mobile-bonus-request-list-method-item"},nameTitle:k="İsim",catTitle:y="Kategori",typeTitle:N="Tip",wageringTitle:f="Çevrimli",statusTitle:T="Durum",percentTitle:w="Hak Ediş Yüzdesi",infoLabel:q="Bonus bilgisi",applyDatePrefix:I="Başvuru Tarihi: ",requestLabel:z="Talep Et",reRequestLabel:H="Tekrar Talep Et",cancelLabel:B="Talebi İptal Et",unavailableLabel:C="Talep Edilemez",openStatus:L="Açık",unavailableStatus:D="Talep Edilemez"})=>{const[S,E]=a.useState(o[0]?.value??"all"),A=[{key:"name",dataIndex:"name",title:k,maxWidth:220,render:(a,t)=>e.jsxs("span",{className:"hub__pay-name hub__hist-nm",children:[e.jsxs("span",{className:"hub__bonus-name",children:[e.jsx("span",{className:"hub__bonus-title",children:t.name}),e.jsxs(r.Tooltip,{children:[e.jsx(d.TooltipTrigger,{asChild:!0,children:e.jsx("i",{className:"hub__hist-creator","aria-label":q,children:e.jsx(s.Info,{size:14})})}),e.jsx(u.TooltipContent,{placement:"top",children:t.desc})]})]}),t.applyDate&&e.jsx("span",{className:"hub__pay-desc",children:I+t.applyDate})]})},{key:"cat",dataIndex:"cat",title:y,width:90},{key:"type",dataIndex:"type",title:N,width:110},{key:"wagering",dataIndex:"wagering",title:f,width:90},{key:"status",dataIndex:"status",title:T,width:150,render:a=>e.jsx(h.HubStatusBadge,{s:String(a)})},{key:"percent",dataIndex:"percent",title:w,width:170,render:a=>e.jsx("span",{className:"hub__bonus-progress",children:e.jsx(i.default,{percent:Number(a)})})},{key:"actions",dataIndex:"key",title:"",width:180,render:(a,i)=>e.jsx("span",{className:"hub__pay-actions hub__pay-actions--full",children:i.status===L?e.jsx(t.default,{variant:"statable",state:"reject",size:"medium",onClick:()=>v?.(i),children:B}):i.status===D?e.jsx(t.default,{variant:"filled",size:"medium",disabled:!0,children:C}):e.jsxs(t.default,{variant:"default",size:"medium",onClick:()=>_?.(i),children:[e.jsx(s.Gift,{size:14}),i.applyDate?H:z]})})}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hub__hist-cats--wide",children:e.jsx(c.HubPayFilter,{options:o,value:S,onChange:E,idPrefix:"brq"})}),e.jsx("div",{className:"hub__hist-filters hub__hist-filters--2",children:[b,x,p,j].map((a,s)=>e.jsx(l.default,{size:"x-large",defaultValue:a[0],children:a.map(a=>e.jsx(m.SelectItem,{value:a,children:a},a))},s))}),e.jsx(h.HubTable,{columns:A,data:n,cellHeight:"84px",marker:g})]})},exports.HubStatusCard=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),a=require("react"),s=require("lucide-react"),l=require("../../button/index.js"),i=require("../../progress/index.js"),r=require("../../select/index.js"),n=require("../../table/index.js"),d=require("../../avatar/index.js"),t=require("../../hovercard/HoverCard.js"),c=require("../../hovercard/HoverCardTrigger.js"),h=require("../../hovercard/HoverCardContent.js"),m=require("../../dialog/Dialog.js"),o=require("../../select/SelectItem.js");const u=({Icon:a})=>e.jsx("span",{className:"hub__medal-shape","aria-hidden":!0,children:e.jsxs("span",{className:"hub__medal-hexwrap",children:[e.jsxs("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[e.jsx("stop",{offset:"0",stopColor:"#ffd54d"}),e.jsx("stop",{offset:"0.55",stopColor:"#f1ab00"}),e.jsx("stop",{offset:"1",stopColor:"#d98e00"})]})}),e.jsx("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),e.jsx("span",{className:"hub__medal-glyph",children:e.jsx(a,{})})]})}),x=({medal:a,onOpen:l})=>e.jsxs("button",{type:"button",className:"hub__medal"+(a.locked?" hub__medal--locked":""),onClick:()=>l(a),children:[e.jsx("span",{className:"hub__medal-visual",children:e.jsx(u,{Icon:a.Icon})}),e.jsxs("span",{className:"hub__medal-bottom",children:[e.jsx("span",{className:"hub__medal-name",children:a.name}),e.jsx("span",{className:"hub__medal-countwrap",children:e.jsxs("span",{className:"hub__medal-count",children:[e.jsx(s.User,{"aria-hidden":!0}),a.count]})})]})]}),_=({marker:a,icon:s,title:l,titleExtra:i,action:r,children:n})=>e.jsxs("section",{className:a?a+" hub__box":"hub__box",children:[e.jsxs("div",{className:"inn-sub-page-header hub__box-head",children:[e.jsxs("span",{className:"hub__box-title",children:[s,l,i]}),r]}),e.jsx("hr",{className:"hub__hairline"}),n]}),b=({stats:a})=>e.jsx("div",{className:"hub__stats",children:a.map((a,s)=>e.jsxs("div",{className:"hub__stat",children:[e.jsx("div",{className:"hub__stat-label",children:a.label}),e.jsx("div",{className:"hub__stat-value",children:a.value})]},s))}),j=({label:a,onClick:i})=>e.jsxs(l.default,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[a,e.jsx(s.ChevronRight,{"aria-hidden":!0})]}),p=({tips:a,unitLabel:s="madalya:",winLabel:l="ödül kazan"})=>e.jsx("div",{className:"hub__reward-tips",children:a.map(([a,i],r)=>e.jsxs("span",{className:"hub__reward-tip",children:[a," ",s," ",e.jsx("b",{children:i})," ",l]},r))}),v=({tips:a,sheetTitle:l,unitLabel:i,winLabel:r})=>e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"hub__reward-info hub__reward-info--hover",children:e.jsxs(t.HoverCard,{children:[e.jsx(c.HoverCardTrigger,{children:e.jsx(s.Info,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),e.jsx(h.HoverCardContent,{variant:"filled",children:e.jsx(p,{tips:a,unitLabel:i,winLabel:r})})]})}),e.jsx("span",{className:"hub__reward-info hub__reward-info--sheet",children:e.jsxs(m.Sheet,{children:[e.jsx(m.SheetTrigger,{asChild:!0,children:e.jsx("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof l?l:void 0,children:e.jsx(s.Info,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e.jsxs(m.SheetContent,{side:"bottom",children:[e.jsx(m.SheetHeader,{children:e.jsx(m.SheetTitle,{children:l})}),e.jsx(p,{tips:a,unitLabel:i,winLabel:r})]})]})})]}),g=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},N="__all__",f=(e,a)=>{const s=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===s.length)return[N];const l=a.includes(N),i=s.includes(N);return i&&!l?[N]:i&&s.length>1?s.filter(e=>e!==N):s};exports.HubMedalButton=x,exports.HubMedalDetail=({medal:a,durationLabel:s="Süre",quantityLabel:l="Miktar",earnersLabel:i="Hakeden Sayısı"})=>e.jsxs("div",{className:"hub__medal-detail",children:[e.jsx("span",{className:"hub__medal-visual",children:e.jsx(u,{Icon:a.Icon})}),e.jsx("div",{className:"hub__medal-detail-name",children:a.name}),e.jsx("p",{className:"hub__medal-detail-desc",children:a.description}),e.jsxs("dl",{className:"hub__medal-detail-rows",children:[e.jsxs("div",{children:[e.jsx("dt",{children:s}),e.jsx("dd",{children:a.duration})]}),e.jsxs("div",{children:[e.jsx("dt",{children:l}),e.jsx("dd",{children:a.quantity})]}),e.jsxs("div",{children:[e.jsx("dt",{children:i}),e.jsx("dd",{children:a.count})]})]})]}),exports.HubMedals=({medals:a,rewardTiers:l,rewardTips:r,rewardPercent:n=10,onMedalOpen:d,rewardsTitle:t="Ödüller",rewardsSheetTitle:c="Ödül Detayları",rewardUnitLabel:h="madalya:",rewardWinLabel:m="ödül kazan",earnedTitle:o="Kazançlarınız",earnedCountText:u="2 / 20 Hakedildi",awaitingTitle:b="Kilidi Açılması Bekleyenler"})=>e.jsxs(e.Fragment,{children:[e.jsxs(_,{icon:e.jsx(s.Trophy,{"aria-hidden":!0}),title:t,titleExtra:e.jsx(v,{tips:r,sheetTitle:c,unitLabel:h,winLabel:m}),children:[e.jsx("div",{className:"hub__rewards",children:l.map(({label:a,emoji:s,lockable:l})=>e.jsxs("div",{className:"hub__reward"+(l?" hub__reward--lockable":""),...l?{onClick:g}:{},children:[e.jsx("span",{className:"hub__reward-art","aria-hidden":!0,children:s}),e.jsx("span",{className:"hub__reward-label",children:a})]},a))}),e.jsx("div",{className:"hub__rewards-progress",children:e.jsx(i.default,{percent:n,showInfo:!1,status:"success"})})]}),e.jsx(_,{marker:"inn-completed-medals",icon:e.jsx(s.Medal,{"aria-hidden":!0}),title:o,action:e.jsx("span",{className:"hub__box-count",children:u}),children:e.jsx("div",{className:"hub__medals hub__medals--wrap",children:a.filter(e=>!e.locked).map(a=>e.jsx(x,{medal:a,onOpen:d},a.name))})}),e.jsx(_,{marker:"inn-awaiting-unlocking-medals",icon:e.jsx(s.Medal,{"aria-hidden":!0}),title:b,children:e.jsx("div",{className:"hub__medals hub__medals--wrap",children:a.filter(e=>e.locked).map(a=>e.jsx(x,{medal:a,onOpen:d},a.name))})})]}),exports.HubProfileSummary=({user:a,vip:r,medals:n,stats:t,topSlots:c,onMedalOpen:h,onVipClub:m,onMedalsDetail:o,onStatsDetail:u,vipClubLabel:p="VIP Klübü",medalsTitle:v="Madalyalar",statsTitle:g="İstatistikler",topSlotsTitle:N="En Çok Oynadığınız Slot Oyunları",liveTitle:f="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:y="Detaylar",cevrimLabel:w="Çevrim",noDataLabel:k="Veri Yok"})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[a.avatar??e.jsx(d.Avatar,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e.jsxs("div",{children:[e.jsx("div",{className:"hub__username",children:a.username}),null!=a.fullname&&e.jsx("div",{className:"hub__fullname",children:a.fullname})]})]}),e.jsxs("section",{className:"inn-vip-level-summary hub__vip",children:[e.jsxs("div",{className:"hub__vip-head",children:[e.jsxs("div",{className:"hub__vip-meta",children:[e.jsx("div",{className:"inn-vip-level-title hub__vip-title",children:r.title}),e.jsx("span",{className:"hub__vip-dp",children:r.dp})]}),e.jsxs(l.default,{size:"small",className:"hub__vip-btn",onClick:m,children:[e.jsx(s.Crown,{"aria-hidden":!0}),p]})]}),e.jsxs("div",{className:"inn-vip-level-progress hub__vip-progress",children:[e.jsx(i.default,{percent:r.percent,showInfo:!1,status:"success"}),e.jsx("span",{className:"hub__vip-next",children:r.nextText})]})]}),e.jsx(_,{marker:"inn-medals-summary-box",icon:e.jsx(s.Medal,{"aria-hidden":!0}),title:v,action:e.jsx(j,{label:y,onClick:o}),children:e.jsx("div",{className:"inn-medals-summary hub__medals",children:n.slice(0,8).map(a=>e.jsx(x,{medal:a,onOpen:h},a.name))})}),e.jsx(_,{icon:e.jsx(s.TrendingUp,{"aria-hidden":!0}),title:g,action:e.jsx(j,{label:y,onClick:u}),children:e.jsx(b,{stats:t})}),e.jsx(_,{marker:"inn-favorite-casino-games-summary-box",icon:e.jsx(s.Gamepad2,{"aria-hidden":!0}),title:N,children:e.jsx("div",{className:"inn-favorite-casino-games-summary hub__games",children:c.map(a=>e.jsxs("div",{className:"hub__game",children:[e.jsx("span",{className:"hub__game-art hub__game-art--"+a.art,"aria-hidden":!0,children:a.emoji}),e.jsxs("div",{className:"hub__game-info",children:[e.jsx("div",{className:"hub__game-name",children:a.name}),e.jsxs("div",{children:[e.jsx("div",{className:"hub__game-amount",children:a.amount}),e.jsx("div",{className:"hub__game-cur",children:w})]})]})]},a.name))})}),e.jsx(_,{marker:"inn-favorite-live-casino-games-summary-box",icon:e.jsx(s.Gamepad2,{"aria-hidden":!0}),title:f,children:e.jsx("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(a=>e.jsxs("div",{className:"hub__game hub__game--empty",children:[e.jsx(s.Folder,{"aria-hidden":!0}),e.jsx("span",{className:"hub__empty-text",children:k})]},a))})})]}),exports.HubStatistics=({gameStats:l,categories:i,providers:d,stats:t,gameTitle:c="Oyun",winTitle:h="Kazanma",betTitle:m="Bahis",wageredTitle:u="Çevrim",statsTitle:x="İstatistikler",categoryPlaceholder:j="Tüm Kategoriler",providerPlaceholder:p="Tüm Sağlayıcılar",gamePlaceholder:v="Tüm Oyunlar",selectionLabel:g="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[S,C]=a.useState(""),[L,T]=a.useState([N]),[I,q]=a.useState([N]),H=l.filter(e=>(!S||e.category===S)&&(L.includes(N)||L.includes(e.provider))&&(I.includes(N)||I.includes(e.game))),z=e=>k?.({category:S,providers:L,games:I,...e}),O=[{dataIndex:"game",key:"game",title:c,render:(a,s)=>e.jsxs("span",{className:"hub__cell-game",children:[e.jsx("span",{className:"hub__cell-big",children:String(a)}),e.jsx("span",{className:"hub__cell-sub",children:s.category+" / "+s.provider})]})},{dataIndex:"win",key:"win",title:h,render:a=>e.jsx("span",{className:"hub__cell-big",children:String(a)})},{dataIndex:"bet",key:"bet",title:m,render:a=>e.jsx("span",{className:"hub__cell-big",children:String(a)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:a=>e.jsx("span",{className:"hub__cell-big hub__cell-cur",children:String(a)})}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hub__filterbar",children:[e.jsxs(r.default,{size:"x-large",placeholder:j,value:S,onChange:e=>{const a=e?String(e):"";C(a),z({category:a})},"aria-label":"Kategori",children:[e.jsx(o.SelectItem,{value:"",children:j}),i.map(a=>e.jsx(o.SelectItem,{value:a,children:"Casino"===a?y:a},a))]}),e.jsxs(r.default,{size:"x-large",multi:!0,placeholder:p,"aria-label":"Sağlayıcı",value:L,label:L.includes(N)?void 0:g+" ("+L.length+")",onChange:e=>{const a=f(e,L);T(a),z({providers:a})},children:[e.jsx(o.SelectItem,{value:N,children:p}),d.map(a=>e.jsx(o.SelectItem,{value:a,children:a},a))]}),e.jsxs(r.default,{size:"x-large",multi:!0,placeholder:v,"aria-label":"Oyun",value:I,label:I.includes(N)?void 0:g+" ("+I.length+")",onChange:e=>{const a=f(e,I);q(a),z({games:a})},children:[e.jsx(o.SelectItem,{value:N,children:v}),l.map(a=>e.jsx(o.SelectItem,{value:a.game,children:a.game},a.key))]})]}),e.jsx(_,{icon:e.jsx(s.TrendingUp,{"aria-hidden":!0}),title:x,children:e.jsx(b,{stats:t})}),e.jsx("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:H.length>0?e.jsx(n.default,{columns:O,data:H,size:"medium",headerBg:!1}):e.jsxs("div",{className:"hub__nodata",children:[e.jsx(s.FileQuestion,{"aria-hidden":!0}),e.jsx("span",{className:"hub__empty-text",children:w})]})})]})};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),a=require("react"),s=require("lucide-react"),l=require("../../button/index.js"),i=require("../../progress/index.js"),r=require("../../select/index.js"),n=require("../../table/index.js"),d=require("../../avatar/index.js"),t=require("../../hovercard/HoverCard.js"),c=require("../../hovercard/HoverCardTrigger.js"),h=require("../../hovercard/HoverCardContent.js"),m=require("../../dialog/Dialog.js"),o=require("../../select/SelectItem.js");const u=({Icon:a})=>e.jsx("span",{className:"hub__medal-shape","aria-hidden":!0,children:e.jsxs("span",{className:"hub__medal-hexwrap",children:[e.jsxs("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[e.jsx("stop",{offset:"0",stopColor:"#ffd54d"}),e.jsx("stop",{offset:"0.55",stopColor:"#f1ab00"}),e.jsx("stop",{offset:"1",stopColor:"#d98e00"})]})}),e.jsx("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),e.jsx("span",{className:"hub__medal-glyph",children:e.jsx(a,{})})]})}),x=({medal:a,onOpen:l})=>e.jsxs("button",{type:"button",className:"hub__medal"+(a.locked?" hub__medal--locked":""),onClick:()=>l(a),children:[e.jsx("span",{className:"hub__medal-visual",children:e.jsx(u,{Icon:a.Icon})}),e.jsxs("span",{className:"hub__medal-bottom",children:[e.jsx("span",{className:"hub__medal-name",children:a.name}),e.jsx("span",{className:"hub__medal-countwrap",children:e.jsxs("span",{className:"hub__medal-count",children:[e.jsx(s.User,{"aria-hidden":!0}),a.count]})})]})]}),_=({marker:a,icon:s,title:l,titleExtra:i,action:r,children:n})=>e.jsxs("section",{className:a?a+" hub__box":"hub__box",children:[e.jsxs("div",{className:"inn-sub-page-header hub__box-head",children:[e.jsxs("span",{className:"hub__box-title",children:[s,l,i]}),r]}),e.jsx("hr",{className:"hub__hairline"}),n]}),b=({stats:a})=>e.jsx("div",{className:"hub__stats inn-statistics-summary",children:a.map((a,s)=>e.jsxs("div",{className:"hub__stat",children:[e.jsx("div",{className:"hub__stat-label",children:a.label}),e.jsx("div",{className:"hub__stat-value",children:a.value})]},s))}),j=({label:a,onClick:i})=>e.jsxs(l.default,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[a,e.jsx(s.ChevronRight,{"aria-hidden":!0})]}),p=({tips:a,unitLabel:s="madalya:",winLabel:l="ödül kazan"})=>e.jsx("div",{className:"hub__reward-tips",children:a.map(([a,i],r)=>e.jsxs("span",{className:"hub__reward-tip",children:[a," ",s," ",e.jsx("b",{children:i})," ",l]},r))}),v=({tips:a,sheetTitle:l,unitLabel:i,winLabel:r})=>e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"hub__reward-info hub__reward-info--hover",children:e.jsxs(t.HoverCard,{children:[e.jsx(c.HoverCardTrigger,{children:e.jsx(s.Info,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),e.jsx(h.HoverCardContent,{variant:"filled",children:e.jsx(p,{tips:a,unitLabel:i,winLabel:r})})]})}),e.jsx("span",{className:"hub__reward-info hub__reward-info--sheet",children:e.jsxs(m.Sheet,{children:[e.jsx(m.SheetTrigger,{asChild:!0,children:e.jsx("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof l?l:void 0,children:e.jsx(s.Info,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e.jsxs(m.SheetContent,{side:"bottom",children:[e.jsx(m.SheetHeader,{children:e.jsx(m.SheetTitle,{children:l})}),e.jsx(p,{tips:a,unitLabel:i,winLabel:r})]})]})})]}),g=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},N="__all__",f=(e,a)=>{const s=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===s.length)return[N];const l=a.includes(N),i=s.includes(N);return i&&!l?[N]:i&&s.length>1?s.filter(e=>e!==N):s};exports.HubMedalButton=x,exports.HubMedalDetail=({medal:a,durationLabel:s="Süre",quantityLabel:l="Miktar",earnersLabel:i="Hakeden Sayısı"})=>e.jsxs("div",{className:"hub__medal-detail",children:[e.jsx("span",{className:"hub__medal-visual",children:e.jsx(u,{Icon:a.Icon})}),e.jsx("div",{className:"hub__medal-detail-name",children:a.name}),e.jsx("p",{className:"hub__medal-detail-desc",children:a.description}),e.jsxs("dl",{className:"hub__medal-detail-rows",children:[e.jsxs("div",{children:[e.jsx("dt",{children:s}),e.jsx("dd",{children:a.duration})]}),e.jsxs("div",{children:[e.jsx("dt",{children:l}),e.jsx("dd",{children:a.quantity})]}),e.jsxs("div",{children:[e.jsx("dt",{children:i}),e.jsx("dd",{children:a.count})]})]})]}),exports.HubMedals=({medals:a,rewardTiers:l,rewardTips:r,rewardPercent:n=10,onMedalOpen:d,rewardsTitle:t="Ödüller",rewardsSheetTitle:c="Ödül Detayları",rewardUnitLabel:h="madalya:",rewardWinLabel:m="ödül kazan",earnedTitle:o="Kazançlarınız",earnedCountText:u="2 / 20 Hakedildi",awaitingTitle:b="Kilidi Açılması Bekleyenler"})=>e.jsxs(e.Fragment,{children:[e.jsxs(_,{icon:e.jsx(s.Trophy,{"aria-hidden":!0}),title:t,titleExtra:e.jsx(v,{tips:r,sheetTitle:c,unitLabel:h,winLabel:m}),children:[e.jsx("div",{className:"hub__rewards",children:l.map(({label:a,emoji:s,lockable:l})=>e.jsxs("div",{className:"hub__reward"+(l?" hub__reward--lockable":""),...l?{onClick:g}:{},children:[e.jsx("span",{className:"hub__reward-art","aria-hidden":!0,children:s}),e.jsx("span",{className:"hub__reward-label",children:a})]},a))}),e.jsx("div",{className:"hub__rewards-progress",children:e.jsx(i.default,{percent:n,showInfo:!1,status:"success"})})]}),e.jsx(_,{marker:"inn-completed-medals",icon:e.jsx(s.Medal,{"aria-hidden":!0}),title:o,action:e.jsx("span",{className:"hub__box-count",children:u}),children:e.jsx("div",{className:"hub__medals hub__medals--wrap",children:a.filter(e=>!e.locked).map(a=>e.jsx(x,{medal:a,onOpen:d},a.name))})}),e.jsx(_,{marker:"inn-awaiting-unlocking-medals",icon:e.jsx(s.Medal,{"aria-hidden":!0}),title:b,children:e.jsx("div",{className:"hub__medals hub__medals--wrap",children:a.filter(e=>e.locked).map(a=>e.jsx(x,{medal:a,onOpen:d},a.name))})})]}),exports.HubProfileSummary=({user:a,vip:r,medals:n,stats:t,topSlots:c,onMedalOpen:h,onVipClub:m,onMedalsDetail:o,onStatsDetail:u,vipClubLabel:p="VIP Klübü",medalsTitle:v="Madalyalar",statsTitle:g="İstatistikler",topSlotsTitle:N="En Çok Oynadığınız Slot Oyunları",liveTitle:f="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:y="Detaylar",cevrimLabel:w="Çevrim",noDataLabel:k="Veri Yok"})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[a.avatar??e.jsx(d.Avatar,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e.jsxs("div",{children:[e.jsx("div",{className:"hub__username",children:a.username}),null!=a.fullname&&e.jsx("div",{className:"hub__fullname",children:a.fullname})]})]}),e.jsxs("section",{className:"inn-vip-level-summary hub__vip",children:[e.jsxs("div",{className:"hub__vip-head",children:[e.jsxs("div",{className:"hub__vip-meta",children:[e.jsx("div",{className:"inn-vip-level-title hub__vip-title",children:r.title}),e.jsx("span",{className:"hub__vip-dp",children:r.dp})]}),e.jsxs(l.default,{size:"small",className:"hub__vip-btn",onClick:m,children:[e.jsx(s.Crown,{"aria-hidden":!0}),p]})]}),e.jsxs("div",{className:"inn-vip-level-progress hub__vip-progress",children:[e.jsx(i.default,{percent:r.percent,showInfo:!1,status:"success"}),e.jsx("span",{className:"hub__vip-next",children:r.nextText})]})]}),e.jsx(_,{marker:"inn-medals-summary-box",icon:e.jsx(s.Medal,{"aria-hidden":!0}),title:v,action:e.jsx(j,{label:y,onClick:o}),children:e.jsx("div",{className:"inn-medals-summary hub__medals",children:n.slice(0,8).map(a=>e.jsx(x,{medal:a,onOpen:h},a.name))})}),e.jsx(_,{icon:e.jsx(s.TrendingUp,{"aria-hidden":!0}),title:g,action:e.jsx(j,{label:y,onClick:u}),children:e.jsx(b,{stats:t})}),e.jsx(_,{marker:"inn-favorite-casino-games-summary-box",icon:e.jsx(s.Gamepad2,{"aria-hidden":!0}),title:N,children:e.jsx("div",{className:"inn-favorite-casino-games-summary hub__games",children:c.map(a=>e.jsxs("div",{className:"hub__game",children:[e.jsx("span",{className:"hub__game-art hub__game-art--"+a.art,"aria-hidden":!0,children:a.emoji}),e.jsxs("div",{className:"hub__game-info",children:[e.jsx("div",{className:"hub__game-name",children:a.name}),e.jsxs("div",{children:[e.jsx("div",{className:"hub__game-amount",children:a.amount}),e.jsx("div",{className:"hub__game-cur",children:w})]})]})]},a.name))})}),e.jsx(_,{marker:"inn-favorite-live-casino-games-summary-box",icon:e.jsx(s.Gamepad2,{"aria-hidden":!0}),title:f,children:e.jsx("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(a=>e.jsxs("div",{className:"hub__game hub__game--empty",children:[e.jsx(s.Folder,{"aria-hidden":!0}),e.jsx("span",{className:"hub__empty-text",children:k})]},a))})})]}),exports.HubStatistics=({gameStats:l,categories:i,providers:d,stats:t,gameTitle:c="Oyun",winTitle:h="Kazanma",betTitle:m="Bahis",wageredTitle:u="Çevrim",statsTitle:x="İstatistikler",categoryPlaceholder:j="Tüm Kategoriler",providerPlaceholder:p="Tüm Sağlayıcılar",gamePlaceholder:v="Tüm Oyunlar",selectionLabel:g="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[S,C]=a.useState(""),[L,T]=a.useState([N]),[I,q]=a.useState([N]),H=l.filter(e=>(!S||e.category===S)&&(L.includes(N)||L.includes(e.provider))&&(I.includes(N)||I.includes(e.game))),z=e=>k?.({category:S,providers:L,games:I,...e}),O=[{dataIndex:"game",key:"game",title:c,render:(a,s)=>e.jsxs("span",{className:"hub__cell-game",children:[e.jsx("span",{className:"hub__cell-big",children:String(a)}),e.jsx("span",{className:"hub__cell-sub",children:s.category+" / "+s.provider})]})},{dataIndex:"win",key:"win",title:h,render:a=>e.jsx("span",{className:"hub__cell-big",children:String(a)})},{dataIndex:"bet",key:"bet",title:m,render:a=>e.jsx("span",{className:"hub__cell-big",children:String(a)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:a=>e.jsx("span",{className:"hub__cell-big hub__cell-cur",children:String(a)})}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hub__filterbar",children:[e.jsxs(r.default,{size:"x-large",placeholder:j,value:S,onChange:e=>{const a=e?String(e):"";C(a),z({category:a})},"aria-label":"Kategori",children:[e.jsx(o.SelectItem,{value:"",children:j}),i.map(a=>e.jsx(o.SelectItem,{value:a,children:"Casino"===a?y:a},a))]}),e.jsxs(r.default,{size:"x-large",multi:!0,placeholder:p,"aria-label":"Sağlayıcı",value:L,label:L.includes(N)?void 0:g+" ("+L.length+")",onChange:e=>{const a=f(e,L);T(a),z({providers:a})},children:[e.jsx(o.SelectItem,{value:N,children:p}),d.map(a=>e.jsx(o.SelectItem,{value:a,children:a},a))]}),e.jsxs(r.default,{size:"x-large",multi:!0,placeholder:v,"aria-label":"Oyun",value:I,label:I.includes(N)?void 0:g+" ("+I.length+")",onChange:e=>{const a=f(e,I);q(a),z({games:a})},children:[e.jsx(o.SelectItem,{value:N,children:v}),l.map(a=>e.jsx(o.SelectItem,{value:a.game,children:a.game},a.key))]})]}),e.jsx(_,{icon:e.jsx(s.TrendingUp,{"aria-hidden":!0}),title:x,children:e.jsx(b,{stats:t})}),e.jsx("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:H.length>0?e.jsx(n.default,{columns:O,data:H,size:"medium",headerBg:!1}):e.jsxs("div",{className:"hub__nodata",children:[e.jsx(s.FileQuestion,{"aria-hidden":!0}),e.jsx("span",{className:"hub__empty-text",children:w})]})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),a=require("react"),s=require("lucide-react"),i=require("../../button/index.js"),l=require("../../badge/index.js"),r=require("../../table/index.js"),n=require("../../result/index.js"),t=require("../../tooltip/Tooltip.js"),d=require("../../tooltip/TooltipTrigger.js"),c=require("../../tooltip/TooltipContent.js"),u=require("./platform.js");const o=["name","brand","provider","subject","game"],m=({columns:a,data:s,list:i,methods:l,item:r})=>{const n=a.find(e=>"id"===e.key||"token"===e.key),t=a.find(e=>o.includes(String(e.key)))||a.find(e=>e.maxWidth)||a[1],d=a.find(e=>"status"===e.key),c=a.find(e=>""===e.title),u=a.filter(e=>e!==n&&e!==t&&e!==d&&e!==c),m=(e,a,s)=>e.render?e.render(a[e.dataIndex],a,s):a[e.dataIndex];return e.jsx("div",{className:i?i+" hub__mlist":"hub__mlist",children:e.jsx("div",{className:l,style:{display:"contents"},children:s.map((a,s)=>e.jsxs("div",{className:r?r+" hub__mcard":"hub__mcard",children:[e.jsxs("div",{className:"hub__mcard-head",children:[e.jsxs("span",{className:"hub__mcard-title",children:[n&&e.jsx("span",{className:"hub__mcard-id",children:m(n,a,s)}),t&&e.jsx("span",{className:"hub__mcard-name",children:m(t,a,s)})]}),d&&e.jsx("span",{className:"hub__mcard-status",children:m(d,a,s)})]}),u.length>0&&e.jsx("hr",{className:"hub__mcard-sep"}),u.length>0&&(()=>{const i=a.img,l=a.square,r=e.jsx("div",{className:"hub__mcard-body",children:u.map(i=>e.jsxs("div",{className:"hub__mcard-row",children:[e.jsx("span",{className:"hub__mcard-label",children:"string"==typeof i.title?i.title:""}),e.jsx("span",{className:"hub__mcard-val",children:m(i,a,s)})]},String(i.key)))});return i?e.jsxs("div",{className:"hub__mcard-media",children:[e.jsx("span",{className:"hub__mcard-img"+(l?" hub__mcard-img--square":""),style:{backgroundImage:i},"aria-hidden":!0}),r]}):r})(),c&&e.jsx("div",{className:"hub__mcard-foot",children:m(c,a,s)})]},s))})})},h={"Açık":"purple",Beklemede:"warning","Onaylandı":"success",Reddedildi:"danger","İptal Edildi":"info","Zaman Aşımı":"warning","İşlemde":"orange","Tamamlandı":"success","Kullanıcı Vazgeçti":"danger","Başvuruldu":"purple","Kabul Edildi":"teal","Kazandı":"success",Kaybetti:"danger","Talep Edilebilir":"success","Tekrar Talep Edilebilir":"warning","Talep Edilemez":"default","Uygulandı":"purple",Aktif:"info","Kazananlar Bildirildi":"warning","Yanıtlandı":"info","Kapandı":"default"};exports.useHubMobile=u.useHubMobile,exports.HUB_NAME_KEYS=o,exports.HUB_STATUS_TONE=h,exports.HubComingSoon=({title:a="ÇOK YAKINDA",description:s="Bu bölüm henüz yapım aşamasındadır ve çok yakında yayında olacaktır.",icon:i="🚧"})=>e.jsx(n.default,{className:"hub__soon",image:e.jsx("span",{className:"hub__soon-icon","aria-hidden":!0,children:i}),title:a,description:s}),exports.HubCopyBtn=({value:a,compact:l,label:r="Kopyala"})=>e.jsxs(t.Tooltip,{children:[e.jsx(d.TooltipTrigger,{asChild:!0,children:e.jsx(i.default,{variant:"custom",size:"icon-sm",className:"hub__copybtn rounded-full"+(l?" hub__copybtn--sm":""),"aria-label":r,onClick:()=>navigator.clipboard?.writeText(a),children:e.jsx(s.Copy,{size:l?10:12})})}),e.jsx(c.TooltipContent,{placement:"top",children:r})]}),exports.HubDt=({v:a})=>{const[s,i]=a.split(" ");return e.jsxs("span",{className:"hub__hist-dt",children:[e.jsx("span",{children:s}),e.jsx("span",{children:i})]})},exports.HubHistName=({name:a,desc:i,creator:l,creatorLabel:r="Oluşturan: "})=>e.jsxs("span",{className:"hub__pay-name hub__hist-nm",children:[e.jsx("span",{className:"hub__hist-name",children:a}),i&&e.jsxs("span",{className:"hub__pay-desc hub__hist-desc",children:[i,l&&e.jsxs(t.Tooltip,{children:[e.jsx(d.TooltipTrigger,{asChild:!0,children:e.jsx("i",{className:"hub__hist-creator","aria-label":r+l,children:e.jsx(s.User,{size:12})})}),e.jsx(c.TooltipContent,{placement:"top",children:r+l})]})]})]}),exports.HubStatusBadge=({s:a,tone:s=h})=>e.jsx(l.default,{variant:"default",color:s[a]??"default",size:"medium",pill:!1,children:a}),exports.HubTable=({columns:s,data:i,cellHeight:l,mobileColumns:n,marker:t})=>{const d=a.useRef(null);return u.useHubMobile(d)?e.jsx(m,{columns:n??s,data:i,list:t?.list,methods:t?.methods,item:t?.item}):e.jsx("div",{ref:d,className:(t?.desktop?t.desktop+" ":"")+"hub__paybox hub__pay-table",children:e.jsx(r.default,{columns:s,data:i,cellHeight:l,headerBg:!1})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react");const r=t.createContext(null);exports.PortalDocumentProvider=({document:t,children:n})=>e.jsx(r.Provider,{value:t,children:n}),exports.usePortalDocument=()=>{const e=t.useContext(r);return e||("undefined"==typeof document?null:document)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("../utils/focusModality.js"),r=require("../enums/enum.js"),u=require("../hooks/useFloatingTrigger.js"),o=require("../dropdown-menu/DropdownMenu.js"),s=require("../primitives/scrollLock.js"),c=require("../context/PortalDocumentContext.js");const i=({children:i,onOpenChange:a})=>{const d=t.useId(),p=c.usePortalDocument()??("undefined"==typeof document?null:document),f=t.useRef(null),g=t.useRef(null),[m,x]=t.useState(!1);t.useEffect(()=>{const e=p;e&&n.initFocusModality(e)},[p]);const C=u.useFloatingTrigger({trigger:r.TriggerTypes.MANUAL,closeOnClickOutside:!0,open:m,onOpenChange:t.useCallback(e=>{x(e),e||(f.current=null,g.current&&(g.current.remove(),g.current=null)),a?.(e)},[a])}),h=t.useCallback((e,t)=>{g.current&&g.current.remove();const n=p??document,r=n.createElement("div");r.style.cssText=`position:fixed;top:${t}px;left:${e}px;width:0;height:0;pointer-events:none;`,n.body.appendChild(r),g.current=r,C.triggerRef.current=r,f.current=null,x(!0)},[C,p]);t.useEffect(()=>()=>{g.current&&(g.current.remove(),g.current=null)},[]),t.useEffect(()=>{if(m)return s.
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("../utils/focusModality.js"),r=require("../enums/enum.js"),u=require("../hooks/useFloatingTrigger.js"),o=require("../dropdown-menu/DropdownMenu.js"),s=require("../primitives/scrollLock.js"),c=require("../context/PortalDocumentContext.js");const i=({children:i,onOpenChange:a})=>{const d=t.useId(),p=c.usePortalDocument()??("undefined"==typeof document?null:document),f=t.useRef(null),g=t.useRef(null),[m,x]=t.useState(!1);t.useEffect(()=>{const e=p;e&&n.initFocusModality(e)},[p]);const C=u.useFloatingTrigger({trigger:r.TriggerTypes.MANUAL,closeOnClickOutside:!0,open:m,onOpenChange:t.useCallback(e=>{x(e),e||(f.current=null,g.current&&(g.current.remove(),g.current=null)),a?.(e)},[a])}),h=t.useCallback((e,t)=>{g.current&&g.current.remove();const n=p??document,r=n.createElement("div");r.style.cssText=`position:fixed;top:${t}px;left:${e}px;width:0;height:0;pointer-events:none;`,n.body.appendChild(r),g.current=r,C.triggerRef.current=r,f.current=null,x(!0)},[C,p]);t.useEffect(()=>()=>{g.current&&(g.current.remove(),g.current=null)},[]),t.useEffect(()=>{if(m)return s.default(p??document)},[m,p]);const v=t.useCallback(e=>{f.current=e?"last":"first",x(!0)},[]),j=t.useCallback(e=>{e(),C.close()},[C]);return e.jsx(l.Provider,{value:{openAtPoint:h},children:e.jsx(o.DropdownMenuContext.Provider,{value:{id:d,trigger:C,pendingFocusRef:f,onItemSelect:j,openWithKeyboard:v},children:i})})};i.displayName="ContextMenu";const l=t.createContext(null);exports.ContextMenu=i,exports.useContextMenuInternal=function(e){const n=t.useContext(l);if(!n)throw new Error(`<${e}> must be used within <ContextMenu>.`);return n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),s=require("react-dom"),o=require("react-transition-group"),i=require("../_bundled/vaul/dist/index.js"),n=require("lucide-react"),r=require("../hooks/useFocusTrap.js"),l=require("../hooks/useOnESCKeyDown.js"),a=require("../hooks/useOnClickOutside.js"),d=require("../hooks/useMediaQuery.js"),c=require("../primitives/scrollLock.js"),u=require("../primitives/overlayStack.js"),p=require("../utils/cn.js"),h=require("../primitives/Slot.js"),x=require("../button/index.js"),m=require("../context/PortalDocumentContext.js");const g=t.createContext(null),D=()=>{const e=t.useContext(g);if(!e)throw new Error("Dialog sub-components must be used inside a <Dialog> parent.");return e},C=({open:s,defaultOpen:o=!1,onOpenChange:i,children:n})=>{const[r,l]=t.useState(o),a=void 0!==s,d=a?s:r,c=t.useId(),u=t.useId(),p=t.useId(),[h,x]=t.useState(!1);return e.jsx(g.Provider,{value:{open:d,setOpen:e=>{a||l(e),i?.(e)},titleId:c,descriptionId:u,contentId:p,hasDescription:h,setHasDescription:x},children:n})},b=({asChild:s,onClick:o,children:i,...n})=>{const{open:r,setOpen:l,contentId:a}=D(),d={...n,onClick:e=>{o?.(e),e.defaultPrevented||l(!0)},"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":a};return s?t.isValidElement(i)?e.jsx(h.Slot,{...d,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogTrigger]: When `asChild` is set, children must be a single React element, e.g. <DialogTrigger asChild><Button>Open</Button></DialogTrigger>."),null):e.jsx("button",{type:"button",...d,children:i})},j=t=>{const{side:s="center",responsive:o=!1,mobileBreakpoint:i=768}=t,n=m.usePortalDocument(),r=d.default(`(max-width: ${i-1}px)`,n?.defaultView??null),l=o?r?"bottom":"center":s;return"center"===l?e.jsx(v,{...t}):e.jsx(f,{...t,side:l})},v=({className:i,children:d,showClose:u=!0,closeAriaLabel:h="Close",closeOnEscape:x=!0,closeOnOutsideClick:g=!0,onEscapeKeyDown:C,onPointerDownOutside:b,responsive:j=!1,side:v,mobileBreakpoint:f,handle:y,...N})=>{const{open:O,setOpen:k,titleId:S,descriptionId:w,contentId:A,hasDescription:E}=D(),I=t.useRef(null),q=t.useRef(null);r.useFocusTrap({isActive:O,containerRef:I,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const T=m.usePortalDocument();return l.default(()=>{O&&(C?.(),x&&k(!1))},I,{enabled:O}),a.default(I,()=>{O&&(b?.(),g&&k(!1))},{enabled:O}),t.useEffect(()=>{if(O&&T)return c.default(T)},[O,T]),T?s.createPortal(e.jsx(o.CSSTransition,{in:O,timeout:200,classNames:"itd-dialog",nodeRef:q,mountOnEnter:!0,unmountOnExit:!0,appear:!0,children:e.jsxs("div",{ref:q,className:"itd-dialog-portal",children:[e.jsx("div",{className:"itd-dialog-overlay","aria-hidden":"true"}),e.jsxs("div",{ref:I,id:A,role:"dialog","aria-modal":"true","aria-labelledby":S,"aria-describedby":E?w:void 0,tabIndex:-1,"data-responsive":j?"":void 0,...N,className:p.cn("itd-dialog-content",i),children:[u&&e.jsx("button",{type:"button",className:"itd-dialog-close","aria-label":h,onClick:()=>k(!1),children:e.jsx(n.X,{size:16,strokeWidth:2})}),d]})]})}),T.body):null},f=({className:s,children:o,showClose:a=!0,closeAriaLabel:d="Close",side:h="bottom",handle:x=!0,closeOnEscape:g=!0,closeOnOutsideClick:C=!0,onEscapeKeyDown:b,onPointerDownOutside:j,responsive:v,mobileBreakpoint:f,...y})=>{const{open:N,setOpen:O,titleId:k,descriptionId:S,contentId:w,hasDescription:A}=D(),E=m.usePortalDocument(),I=t.useRef(null),q="undefined"!=typeof document?document:null,T=!!E&&E!==q;t.useEffect(()=>{if(N&&E)return c.default(E)},[N,E]);const[F,P]=t.useState(null),R=t.useMemo(()=>({current:F}),[F]);r.useFocusTrap({isActive:N,containerRef:R,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const B=t.useRef(null);if(B.current=I.current??E?.body??null,l.default(()=>{N&&(b?.(),g&&O(!1))},B,{enabled:N}),!E)return null;const H="center"===h?"bottom":h;return e.jsx(i.Drawer.Root,{open:N,onOpenChange:O,direction:H,dismissible:C,modal:!1,noBodyStyles:!0,repositionInputs:!T,children:e.jsxs(i.Drawer.Portal,{container:E.body,children:[e.jsx("div",{className:"itd-dialog-overlay itd-sheet-overlay","aria-hidden":"true",onClick:()=>{j?.(),C&&O(!1)}}),e.jsxs(i.Drawer.Content,{ref:e=>{I.current=e,P(e)},id:w,"aria-labelledby":k,"aria-describedby":A?S:void 0,...y,"data-side":H,className:p.cn("itd-sheet-content",s),onEscapeKeyDown:e=>{e.preventDefault(),u.dismissTopOverlayLayer(I.current,e)},children:["bottom"===H&&x&&e.jsx(i.Drawer.Handle,{className:"itd-sheet-handle"}),a&&e.jsx("button",{type:"button",className:"itd-dialog-close","aria-label":d,onClick:()=>O(!1),children:e.jsx(n.X,{size:16,strokeWidth:2})}),e.jsx("div",{className:"itd-sheet-body",children:o})]})]})})},y=({className:t,variant:s="plain",...o})=>e.jsx("div",{...o,"data-variant":s,className:p.cn("itd-dialog-header",t)}),N=({className:t,...s})=>{const{titleId:o}=D();return e.jsx("h2",{id:o,...s,className:p.cn("itd-dialog-title",t)})},O=({className:s,...o})=>{const{descriptionId:i,setHasDescription:n}=D();return t.useEffect(()=>(n(!0),()=>n(!1)),[n]),e.jsx("p",{id:i,...o,className:p.cn("itd-dialog-description",s)})},k=({className:t,variant:s="plain",...o})=>e.jsx("div",{...o,"data-variant":s,className:p.cn("itd-dialog-footer",t)}),S=({asChild:s,onClick:o,children:i,...n})=>{const{setOpen:r}=D(),l={...n,onClick:e=>{o?.(e),e.defaultPrevented||r(!1)}};return s?t.isValidElement(i)?e.jsx(h.Slot,{...l,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogClose]: When `asChild` is set, children must be a single React element, e.g. <DialogClose asChild><Button>Cancel</Button></DialogClose>."),null):e.jsx("button",{type:"button",...l,children:i})},w=C,A=b,E=({className:t,...s})=>e.jsx(j,{showClose:!1,closeOnOutsideClick:!1,className:p.cn("itd-alert-dialog-content",t),...s});E.displayName="AlertDialogContent";const I=y,q=N,T=O,F=k,P=({children:t,onClick:s,...o})=>e.jsx(S,{asChild:!0,onClick:s??void 0,children:e.jsx(x.default,{type:"button",variant:"outline",...o,children:t})});P.displayName="AlertDialogCancel";const R=({children:t,onClick:s,...o})=>e.jsx(S,{asChild:!0,onClick:s??void 0,children:e.jsx(x.default,{type:"button",...o,children:t})});R.displayName="AlertDialogAction";const B=C,H=b,V=y,K=N,L=O,W=k,_=S,z=({side:t="bottom",...s})=>e.jsx(j,{side:t,...s});z.displayName="SheetContent",exports.AlertDialog=w,exports.AlertDialogAction=R,exports.AlertDialogCancel=P,exports.AlertDialogContent=E,exports.AlertDialogDescription=T,exports.AlertDialogFooter=F,exports.AlertDialogHeader=I,exports.AlertDialogTitle=q,exports.AlertDialogTrigger=A,exports.Dialog=C,exports.DialogClose=S,exports.DialogContent=j,exports.DialogDescription=O,exports.DialogFooter=k,exports.DialogHeader=y,exports.DialogTitle=N,exports.DialogTrigger=b,exports.Sheet=B,exports.SheetClose=_,exports.SheetContent=z,exports.SheetDescription=L,exports.SheetFooter=W,exports.SheetHeader=V,exports.SheetTitle=K,exports.SheetTrigger=H;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");exports.CheckIcon=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M11.5 3.5L5.5 9.5L2.5 6.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react");const n=new Set(["DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuSubTrigger"]);exports.processChildren=function r(t,o){return e.Children.map(t,t=>{if(!e.isValidElement(t))return t;if(function(e){return n.has(e.type?.displayName)}(t)){const n=o.idx++;return t.props.disabled&&o.disabledSet.add(n),e.cloneElement(t,{_itemId:`${o.menuId}-item-${n}`})}if(function(e){return"DropdownMenuRadioGroup"===e.type?.displayName}(t)||function(e){return"DropdownMenuSub"===e.type?.displayName}(t)){const n=r(t.props.children,o);return e.cloneElement(t,{},n)}return t})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),t=require("./MenuItemContext.js");exports.useMenuItemChrome=({disabled:o,className:n,itemId:r,componentName:s})=>{const{onItemSelect:a,contentInnerRef:i,closeOpenSubs:u,isPointerInGraceArea:c}=t.useMenuItemContext(s),[d,l]=e.useState(!1),m=e.useCallback(e=>{"mouse"!==e.pointerType||o||c()||(u(),e.currentTarget.focus({preventScroll:!0}))},[o,u,c]),p=e.useCallback(e=>{"mouse"===e.pointerType&&(c()||i.current?.focus({preventScroll:!0}))},[i,c]);return{onItemSelect:a,isFocused:d,itemProps:{type:"button",id:r,tabIndex:-1,className:`itd-dropdown-menu-item ${n}`.trim(),"data-highlighted":d?"":void 0,"data-disabled":o?"":void 0,"aria-disabled":o||void 0,onPointerMove:m,onPointerLeave:p,onFocus:()=>l(!0),onBlur:()=>l(!1)}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),r=require("./usePointerGraceArea.js");exports.useSubMenuRegistry=t=>{const n=e.useRef(new Set),u=e.useCallback(e=>{n.current.add(e)},[]),a=e.useCallback(e=>{n.current.delete(e)},[]),s=e.useCallback(e=>{n.current.forEach(r=>{r!==e&&r()})},[]),c=e.useRef(new Set),{setGraceArea:l,updatePointer:i,isPointerInGraceArea:o}=r.usePointerGraceArea(t),b=e.useCallback(e=>{c.current.add(e)},[]),C=e.useCallback(e=>{c.current.delete(e),l(null)},[l]),d=e.useCallback(e=>{"mouse"===e.pointerType&&i(e.clientX,e.clientY)},[i]);return{registerSubClose:u,unregisterSubClose:a,closeOpenSubs:s,registerOpenSubContent:b,unregisterOpenSubContent:C,isPointerInGraceArea:o,setGraceArea:l,handleContentPointerMove:d}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("../primitives/Slot.js");exports.createFloatingTrigger=function(n){const{name:i,useTriggerContext:s,aria:a,fallback:l}=n,o=({children:n,asChild:o=!0})=>{const u=s(i),c=u.trigger.getTriggerProps(),d={...c,...a(u),tabIndex:c.tabIndex??0};return o?t.isValidElement(n)?e.jsx(r.Slot,{...d,children:n}):("production"!==process.env.NODE_ENV&&console.warn(`[${i}]: When using \`asChild\`, children must be a single React element. Example: <${i} asChild><Button /></${i}>.`),null):"button"===l?e.jsx("button",{type:"button",...d,children:n}):e.jsx("span",{role:"button",...d,children:n})};return o.displayName=i,o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),t=require("../../context/ITDContext.js"),r=require("./index.js");exports.usePhoneCountry=u=>{const n=e.useContext(t.default),o=u??n?.country;return e.useMemo(()=>r.getPhoneCountry(o),[o])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("./GenerateColorScale.js"),r=require("./colorOps.js"),l=require("./contrast.js"),e=require("./shadowScale.js");const c={ringOffset:"1px",ringWidth:"2px",borderRadius:"0.625rem"},t={transitionDuration:"500ms",transitionTimingFunction:"cubic-bezier(0.075, 0.82, 0.165, 1)",boxShadow:"0px 3px 4px 0px rgba(0, 0, 0, 0.03)"},a={transitionDuration:".15s",transitionTimingFunction:"cubic-bezier(.4,0,.2,1)",boxShadow:"none"},n={colorAlertSuccessBackground:"oklch(0.94 0.08 145 / 0.5)",colorAlertSuccessBorder:"oklch(0.75 0.12 145 / 0.5)",colorAlertSuccessTitle:"oklch(0.57 0.14 145.3)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.74 0.19 145.25)",colorAlertWarningBackground:"oklch(0.96 0.05 97.36 / 0.5)",colorAlertWarningBorder:"oklch(0.80 0.12 100 / 0.5)",colorAlertWarningTitle:"oklab(0.67 0.03 0.15)",colorAlertWarningText:"oklch(0.7 0.12 90.34)",colorAlertErrorBackground:"oklch(0.95 0.06 15 / 0.5)",colorAlertErrorBorder:"oklch(0.75 0.08 15 / 0.5)",colorAlertErrorTitle:"oklab(0.58 0.15 0.06)",colorAlertErrorText:"oklab(0.66 0.17 0.07)"},h={colorAlertSuccessBackground:"oklch(0.36 0.03 145.01 / 0.5)",colorAlertSuccessBorder:"oklch(0.53 0.07 145.06 / 0.5)",colorAlertSuccessTitle:"oklch(0.66 0.11 145.62)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.66 0.11 145.62)",colorAlertWarningBackground:"oklch(0.38 0.08 108 / 0.5)",colorAlertWarningBorder:"oklch(0.58 0.11 107.83 / 0.5)",colorAlertWarningTitle:"oklch(0.78 0.07 87.96)",colorAlertWarningText:"oklch(0.7 0.07 87.97)",colorAlertErrorBackground:"oklch(0.28 0.06 21.66 / 0.5)",colorAlertErrorBorder:"oklch(0.55 0.1 20.67 / 0.5)",colorAlertErrorTitle:"oklab(0.75 0.18 0.07)",colorAlertErrorText:"oklab(0.65 0.11 0.04)"},d={colorUploadOverlay:"oklch(1.00 0 0 / 0.56)",colorUploadText:"oklch(0.16 0.04 250)",colorUploadOverlayError:"oklch(0.55 0.28 30)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.80 0.14 145)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"},i={colorUploadOverlay:"oklch(0.18 0.05 258.58 / 0.56)",colorUploadText:"oklch(0.85 0 0)",colorUploadOverlayError:"oklch(0.63 0.26 29.23)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.82 0.15 139.18)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"};function u(o,e,t,n,d,u={}){const m=r.shadeVal(o,50),s=r.shadeVal(o,100),p=r.shadeVal(o,200),g=r.shadeVal(o,400),B=r.shadeVal(o,800),k=n.c<.01,f=r.shadeVal(e,900),A=r.shadeVal(e,600),T=f.c>.03?f.c:Math.max(.2*t.c,.008),x=f.c>.03?f.h:t.h,v=k?.65:Math.max(f.l,.3),S=k?e[100]:e[600],b=k?e[200]:e[500],y=l.resolveOnColor(S,{candidates:[k?r.fmt(.15,0,0):r.fmt(.2,.01,n.h),"oklch(1.00 0 0)"],metric:u.metric,min:u.min,nudge:u.nudge}).value,M=Math.min(t.c,.06),F=Math.min(2*t.c,.055),w=Math.max(0,Math.cos((t.h-260)*Math.PI/180)),H=Math.min(2*Math.max(0,t.c-.02),.08)*w,O=Math.min(t.c/.06,1),I=(o,e=M)=>{const c=Math.round(100*o)/100,a=((o,r)=>w*r+(1-w)*Math.min(r,Math.max(0,.16*(o-.13))))(c,e),n=Number(a.toFixed(2)),h=l.maxSrgbChroma(c,t.h);return n<=h+.005?r.fmt(o,a,t.h):r.fmtC3(o,Math.floor(1e3*h)/1e3,t.h)};return{appearance:"dark",...c,...a,background:I(.18-H),foreground:o[50],input:I(.35-H,F),primary:S,primaryScale:e,surfaceScale:o,primaryHover:b,primaryForeground:y,onPrimary:y,secondary:I(.25-H),secondaryHover:I(.34-H),secondaryForeground:r.fmt(.86*m.l,0,0),secondaryForegroundHover:k?e[200]:e[500],accent:I(.36-H),accentForeground:o[50],muted:I(.25-H),mutedForeground:r.fmt(g.l,0,0),selection:r.fmt(.95*s.l,0,0),selectionForeground:o[900],popover:I(.23-H),popoverForeground:o[50],card:I(.21-H),cardForeground:o[50],colorBackgroundFooter:I(.2-H),colorText:r.fmt(.86*m.l,0,0),colorTextMuted:r.fmtAlpha(.86*m.l,0,0,.75),colorTextMutedForeground:r.fmt(g.l,0,0),colorPlaceholder:r.fmt(.6,.5*B.c,t.h),colorTextNeutral:r.fmt(.71,B.c,t.h),colorControlLabel:r.fmt(.71,.75*B.c,t.h),cardShadow:d.sm,floatingShadow:d.modal,colorModalShadow:d.modal,colorBorder:I(.29-H,F),colorBorderHover:I(.35-H,F),colorBorderFocus:r.fmt(v,.8*T,x),colorBorderFocusRing:r.fmtAlpha(v,.8*T,x,.5),colorBorderTransparent:r.fmtAlpha(p.l,p.c,p.h,0),surfaceHairline:"transparent",colorBackgroundAlt:I(.26-H),colorBackgroundAltHover:I(.3-H),colorBackgroundPanel:I(.25-H),colorBackgroundBordered:I(.25-H),colorBackgroundTransparent:"#00000000",colorBackgroundModal:I(.23-H),colorForegroundItemSelected:r.fmt(.93*m.l,0,0),colorForegroundItemSelectedText:o[900],colorBackgroundSelect:I(.23-H),colorBackgroundSelectFilled:I(.23-H),colorBackgroundSelectFilledItem:I(.32-H),colorBackgroundSelectItem:I(.26-H),colorBackgroundSelectItemHover:I(.3-H),colorBackgroundSelectItemSelected:I(.34-H),colorDisabledBg:r.withAlpha(I(.21-H),.5),colorDisabledBorder:I(.29-H,F),colorDisabledText:r.fmt(.4,.75*B.c,t.h),colorAccentWell:k||t.c>=.03?I(.28-H):r.fmt(.28-H,Math.min(.35*A.c,.09,l.maxSrgbChroma(.28-H,A.h)),A.h),colorAccentWellInk:k?e[100]:r.fmt(Math.max(A.l,.72),Math.min(A.c,.19),A.h),colorIcon:r.fmt(.86*m.l,0,0),colorIconMuted:"oklch(0.89 0 0)",colorError:"oklch(0.64 0.24 15.26)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.64 0.24 15.26)",colorSuccess:"oklch(0.67 0.16 150)",colorErrorOutline:"oklch(0.64 0.24 15.26 / 0.5)",colorFocusPrimary:r.fmt(v,T,x),colorFocusPrimaryRing:r.fmtAlpha(v,T,x,.5),colorTextAlpha50:r.fmtAlpha(.86*m.l,0,0,.5),colorSwitchThumb:o[50],colorSwitchFilledThumb:y,colorTextNeutralAlpha10:r.fmtAlpha(.61,B.c,t.h,.1),colorTextNeutralAlpha15:r.fmtAlpha(.61,B.c,t.h,.15),colorTextNeutralAlpha25:r.fmtAlpha(.61,B.c,t.h,.25),colorTextNeutralAlpha50:r.fmtAlpha(.61,B.c,t.h,.5),colorBackgroundAltAlpha75:r.withAlpha(I(.21-H),.75),colorBackgroundAltAlpha85:r.withAlpha(I(.21-H),.85),colorUploadTextAlpha50:r.withAlpha(i.colorUploadText,.5),colorCardOverlay:r.withAlpha(I(.23-H),.75),colorOverlay:"oklch(0 0 0 / 0.65)",tooltipBackground:I(.25-H),skeletonBase:I(.21-H),skeletonHighlight:I(.32-H),colorTabActiveBg:I(.31-H),colorTabHoverBg:I(.21-H),colorTabFilledActiveBg:I(.34-H),colorTabFilledTrackBg:I(.21-H),colorButtonOutlineBg:r.withAlpha("oklch(1.00 0 0)",.03),colorButtonOutlineHoverBg:r.withAlpha("oklch(1.00 0 0)",.08),colorButtonGhostHoverBg:r.withAlpha("oklch(1.00 0 0)",.03),colorButtonOutlineAccent:S,colorButtonOutlineAccentHover:b,colorButtonFilledBg:r.withAlpha(S,.1),colorButtonSoftDestructiveBg:"oklch(0.33 0.09 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.39 0.11 15)",scrollbarThumb:r.withAlpha(S,.5),scrollbarThumbHover:S,primaryGradientStart:S,primaryGradientEnd:r.lerp(S,b,.5),primaryHoverStart:k?r.lerp(e[100],e[200],.3):r.lerp(e[600],e[700],.3),primaryHoverEnd:b,primaryContrastText:y,buttonGenericBg:I(.34-H),buttonGenericHoverBg:b,buttonSelectedBorder:b,buttonSelectedBg:b,buttonDisabledBg:I(.21-H),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...h,colorAlertInfoBackground:r.fmtAlpha(.29,.06*O,t.h,.5),colorAlertInfoBorder:r.fmtAlpha(.5,.09*O,t.h,.5),colorAlertInfoTitle:r.fmt(.66,.11*O,t.h),colorAlertInfoText:r.fmt(.63,.09*O,t.h),...i}}function m(o){const r={};for(const l of Object.keys(o)){const e=Number(l);r[e]=o[e].replace(/oklch\(([\d.]+)%\s/,(o,r)=>`oklch(${(parseFloat(r)/100).toFixed(2)} `)}return r}function s(a,h){r.validateSeed(h.surfaceBase,"surfaceBase"),r.validateSeed(h.primaryBase,"primaryBase");const i=h.surfaceLadder?o.generateSurfaceScale(h.surfaceBase,a):o.generateColorScaleFromBase(h.surfaceBase),s=o.generateColorScaleFromBase(h.primaryBase),p=m(i),g=m(s),B=r.parseOklch(h.surfaceBase),k=r.parseOklch(h.primaryBase),f={metric:h.contrastMetric,min:h.contrastMin,nudge:h.onPrimaryNudge},A=e.buildShadowScale(e.resolveShadowParams(a,h.shadow));return"light"===a?function(o,e,a,h,i,u={},m=!1){const s=r.shadeVal(o,200),p=r.shadeVal(o,900),g=r.shadeVal(o,950),B=Math.max(0,Math.cos((a.h-260)*Math.PI/180)),k=Math.min(Math.max(.85*a.c,.014*B),.045),f=k*(.6+.35*B),A=k,T=1.2*k,x=Math.min(k,.02),v=Math.min(a.c/.06,1),S=(m?.97:.995)-B*k*.65-(1-B)*Math.min(.65*Math.max(0,a.c-.02),.03),b=r.fmt(S,f,a.h),y=m?r.fmt(Math.min(1,S+.03),f,a.h):b,M=m?y:r.fmt(S+.001,f,a.h),F=m?.98:S-.035,w=m?.93:S-.035,H=m?.93:S-.055,O=m?.93:S-.065,I=m?.93:S-.025,E=m?.95:S-.03,U=m?.95:S-.03,C=m?.9:S-.075,P=m?.88:S-.085,D=r.shadeVal(e,300),W=r.shadeVal(e,600),N=D.c>.03?D.c:Math.max(.25*a.c,.01),V=D.c>.03?D.h:a.h,G=Math.min(D.l,.78),j=l.resolveOnColor(e[600],{candidates:[r.fmt(.2,.01,h.h),"oklch(1.00 0 0)"],metric:u.metric,min:u.min,nudge:u.nudge}).value;return{appearance:"light",...c,...t,background:b,foreground:o[950],input:r.fmt(C,x,a.h),primary:e[600],primaryScale:e,surfaceScale:o,primaryHover:e[700],primaryForeground:j,onPrimary:j,secondary:r.fmt(I,A,a.h),secondaryHover:r.fmt(1.03*s.l,.11*h.c,h.h),secondaryForeground:o[950],secondaryForegroundHover:e[600],accent:r.fmt(I,A,a.h),accentForeground:o[900],muted:r.fmt(I,A,a.h),mutedForeground:o[500],selection:o[950],selectionForeground:"oklch(1.00 0 0)",popover:y,popoverForeground:o[950],card:M,cardForeground:o[950],colorBackgroundFooter:r.fmt(U,A,a.h),colorText:o[950],colorTextMuted:r.fmt(.52,Math.min(.6*a.c,.04),a.h),colorTextMutedForeground:r.fmt(.5,Math.min(.4*a.c,.03),a.h),colorPlaceholder:r.fmt(.65,Math.min(.3*a.c,.02),a.h),colorTextNeutral:r.fmt(.4,Math.min(.4*a.c,.03),a.h),colorControlLabel:r.fmt(.4,Math.min(.5*a.c,.035),a.h),cardShadow:i.sm,floatingShadow:i.lg,colorModalShadow:i["2xl"],colorBorder:r.fmt(C,x,a.h),colorBorderHover:r.fmtAlpha(.5,.17*h.c,h.h,.38),colorBorderFocus:r.fmt(G,.8*N,V),colorBorderFocusRing:r.fmtAlpha(G,.8*N,V,.5),colorBorderTransparent:r.withAlpha(o[200],0),surfaceHairline:m?"transparent":r.fmt(.94,f,a.h),colorBackgroundAlt:r.fmt(F,A,a.h),colorBackgroundAltHover:r.fmt(H,A,a.h),colorBackgroundPanel:r.fmt(O,T,a.h),colorBackgroundBordered:m?y:"transparent",colorBackgroundTransparent:r.withAlpha(b,0),colorBackgroundModal:m?y:r.lerp(o[50],b,.5),colorBackgroundInput:m?y:void 0,elevBox:m?"1":void 0,elevNested:m?"0.98":void 0,elevDeep:m?"0.95":void 0,elevationMode:m?"raised":void 0,colorForegroundItemSelected:o[950],colorForegroundItemSelectedText:"oklch(1.00 0 0)",colorBackgroundSelect:y,colorBackgroundSelectFilled:r.fmt(O,T,a.h),colorBackgroundSelectFilledItem:y,colorBackgroundSelectItem:y,colorBackgroundSelectItemHover:r.fmt(w,A,a.h),colorBackgroundSelectItemSelected:r.fmt(H,T,a.h),colorDisabledBg:r.fmt(E,A,a.h),colorDisabledBorder:r.fmt(P,Math.min(1.6*k,.02),a.h),colorDisabledText:o[400],colorAccentWell:r.fmt(.94,Math.min(.15*W.c,.035),W.h),colorAccentWellInk:r.fmt(Math.min(W.l,.55),Math.min(W.c,.2),W.h),colorIcon:o[950],colorIconMuted:r.withAlpha(o[700],.5),colorError:"oklch(0.55 0.22 15)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.55 0.22 15)",colorSuccess:"oklch(0.55 0.15 150)",colorErrorOutline:"oklch(0.55 0.22 15 / 0.5)",colorFocusPrimary:e[400],colorFocusPrimaryRing:r.withAlpha(e[400],.5),colorTextAlpha50:r.withAlpha(o[950],.5),colorSwitchThumb:y,colorSwitchFilledThumb:y,colorTextNeutralAlpha10:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.1),colorTextNeutralAlpha15:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.15),colorTextNeutralAlpha25:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.25),colorTextNeutralAlpha50:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.5),colorBackgroundAltAlpha75:r.withAlpha(r.fmt(E,A,a.h),.75),colorBackgroundAltAlpha85:r.withAlpha(r.fmt(E,A,a.h),.85),colorUploadTextAlpha50:r.withAlpha(d.colorUploadText,.5),colorCardOverlay:"oklch(1.00 0 0 / 0.75)",colorOverlay:"oklch(0 0 0 / 0.4)",tooltipBackground:o[900],skeletonBase:r.fmt(m?.94:S-.075,A,a.h),skeletonHighlight:r.fmt(w,A,a.h),colorTabActiveBg:r.fmt(w,A,a.h),colorTabHoverBg:r.fmt(w,A,a.h),colorTabFilledActiveBg:y,colorTabFilledTrackBg:r.fmt(w,A,a.h),colorButtonOutlineBg:y,colorButtonOutlineHoverBg:r.fmt(w,A,a.h),colorButtonGhostHoverBg:r.fmt(m?.92:w,A,a.h),colorButtonOutlineAccent:e[700],colorButtonOutlineAccentHover:e[800],colorButtonFilledBg:r.withAlpha(e[600],.1),colorButtonSoftDestructiveBg:"oklch(0.92 0.05 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.88 0.07 15)",scrollbarThumb:r.withAlpha(o[950],.5),scrollbarThumbHover:o[950],primaryGradientStart:r.lerp(e[600],e[700],.5),primaryGradientEnd:r.lerp(e[600],e[500],.3),primaryHoverStart:r.lerp(e[600],e[700],.3),primaryHoverEnd:r.lerp(e[500],e[400],.3),primaryContrastText:j,buttonGenericBg:r.fmt(p.l,.22*h.c,h.h),buttonGenericHoverBg:e[600],buttonSelectedBorder:e[500],buttonSelectedBg:e[600],buttonDisabledBg:r.fmt(g.l,.17*h.c,h.h),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...n,colorAlertInfoBackground:r.fmtAlpha(.9,.04*v,a.h,.5),colorAlertInfoBorder:r.fmtAlpha(.73,.09*v,a.h,.5),colorAlertInfoTitle:r.fmt(.56,.11*v,a.h),colorAlertInfoText:r.fmt(.63,.09*v,a.h),...d}}(p,g,B,k,A,f,"raised"===h.lightElevation):u(p,g,B,k,A,f)}const p=[["onPrimary","primary"],["primaryForeground","primary"],["primaryContrastText","primary"],["colorAlertInfoTitle","colorAlertInfoBackground"],["colorAlertInfoText","colorAlertInfoBackground"],["colorAlertSuccessTitle","colorAlertSuccessBackground"],["colorAlertSuccessText","colorAlertSuccessBackground"],["colorAlertWarningTitle","colorAlertWarningBackground"],["colorAlertWarningText","colorAlertWarningBackground"],["colorAlertErrorTitle","colorAlertErrorBackground"],["colorAlertErrorText","colorAlertErrorBackground"]];exports.createTheme=s,exports.default=s,exports.guardOnColors=function(o,r,e={}){let c=null;for(const[t,a]of p){const n=o[a],h=o[t];if("string"!=typeof n||"string"!=typeof h)continue;if(!(o[a]!==r[a]||o[t]!==r[t]))continue;const d=l.resolveOnColor(n,{override:h,metric:e.metric,min:e.min}).value;d!==h&&(c=c??{...o},c[t]=d)}return c??o};
|
|
1
|
+
"use strict";var o=require("./GenerateColorScale.js"),r=require("./colorOps.js"),l=require("./contrast.js"),e=require("./shadowScale.js");const c={ringOffset:"1px",ringWidth:"2px",borderRadius:"0.625rem"},t={transitionDuration:"500ms",transitionTimingFunction:"cubic-bezier(0.075, 0.82, 0.165, 1)",boxShadow:"0px 3px 4px 0px rgba(0, 0, 0, 0.03)"},a={transitionDuration:".15s",transitionTimingFunction:"cubic-bezier(.4,0,.2,1)",boxShadow:"none"},n={colorAlertSuccessBackground:"oklch(0.94 0.08 145 / 0.5)",colorAlertSuccessBorder:"oklch(0.75 0.12 145 / 0.5)",colorAlertSuccessTitle:"oklch(0.57 0.14 145.3)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.74 0.19 145.25)",colorAlertWarningBackground:"oklch(0.96 0.05 97.36 / 0.5)",colorAlertWarningBorder:"oklch(0.80 0.12 100 / 0.5)",colorAlertWarningTitle:"oklab(0.67 0.03 0.15)",colorAlertWarningText:"oklch(0.7 0.12 90.34)",colorAlertErrorBackground:"oklch(0.95 0.06 15 / 0.5)",colorAlertErrorBorder:"oklch(0.75 0.08 15 / 0.5)",colorAlertErrorTitle:"oklab(0.58 0.15 0.06)",colorAlertErrorText:"oklab(0.66 0.17 0.07)"},h={colorAlertSuccessBackground:"oklch(0.36 0.03 145.01 / 0.5)",colorAlertSuccessBorder:"oklch(0.53 0.07 145.06 / 0.5)",colorAlertSuccessTitle:"oklch(0.66 0.11 145.62)",colorAlertSuccessText:"oklch(0.6 0.09 145.68)",colorProgressSuccessFill:"oklch(0.66 0.11 145.62)",colorAlertWarningBackground:"oklch(0.38 0.08 108 / 0.5)",colorAlertWarningBorder:"oklch(0.58 0.11 107.83 / 0.5)",colorAlertWarningTitle:"oklch(0.78 0.07 87.96)",colorAlertWarningText:"oklch(0.7 0.07 87.97)",colorAlertErrorBackground:"oklch(0.28 0.06 21.66 / 0.5)",colorAlertErrorBorder:"oklch(0.55 0.1 20.67 / 0.5)",colorAlertErrorTitle:"oklab(0.75 0.18 0.07)",colorAlertErrorText:"oklab(0.65 0.11 0.04)"},d={colorUploadOverlay:"oklch(1.00 0 0 / 0.56)",colorUploadText:"oklch(0.16 0.04 250)",colorUploadOverlayError:"oklch(0.55 0.28 30)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.80 0.14 145)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"},i={colorUploadOverlay:"oklch(0.18 0.05 258.58 / 0.56)",colorUploadText:"oklch(0.85 0 0)",colorUploadOverlayError:"oklch(0.63 0.26 29.23)",colorUploadErrorText:"oklch(1.00 0 0)",colorUploadOverlayCompleted:"oklch(0.82 0.15 139.18)",colorUploadCompletedText:"oklch(1.00 0 0)",colorUploadOverlayUploading:"oklch(0.55 0.18 256.43)",colorUploadOverlayUploadingBar:"oklch(0.62 0.18 250)",colorUploadingText:"oklch(1.00 0 0)"};function u(o,e,t,n,d,u={}){const m=r.shadeVal(o,50),s=r.shadeVal(o,100),p=r.shadeVal(o,200),g=r.shadeVal(o,400),k=r.shadeVal(o,800),B=n.c<.01,f=r.shadeVal(e,900),A=r.shadeVal(e,600),T=f.c>.03?f.c:Math.max(.2*t.c,.008),x=f.c>.03?f.h:t.h,v=B?.65:Math.max(f.l,.3),S=B?e[100]:e[600],b=B?e[200]:e[500],y=l.resolveOnColor(S,{candidates:[B?r.fmt(.15,0,0):r.fmt(.2,.01,n.h),"oklch(1.00 0 0)"],metric:u.metric,min:u.min,nudge:u.nudge}).value,M=Math.min(t.c,.06),F=Math.min(2*t.c,.055),w=Math.max(0,Math.cos((t.h-260)*Math.PI/180)),H=Math.min(2*Math.max(0,t.c-.02),.08)*w,I=Math.min(t.c/.06,1),O=(o,e=M)=>{const c=Math.round(100*o)/100,a=((o,r)=>w*r+(1-w)*Math.min(r,Math.max(0,.16*(o-.13))))(c,e),n=Number(a.toFixed(2)),h=l.maxSrgbChroma(c,t.h);return n<=h+.005?r.fmt(o,a,t.h):r.fmtC3(o,Math.floor(1e3*h)/1e3,t.h)};return{appearance:"dark",...c,...a,background:O(.18-H),foreground:o[50],input:O(.35-H,F),primary:S,primaryScale:e,surfaceScale:o,primaryHover:b,primaryForeground:y,onPrimary:y,secondary:O(.25-H),secondaryHover:O(.34-H),secondaryForeground:r.fmt(.86*m.l,0,0),secondaryForegroundHover:B?e[200]:e[500],accent:O(.36-H),accentForeground:o[50],muted:O(.25-H),mutedForeground:r.fmt(g.l,0,0),selection:r.fmt(.95*s.l,0,0),selectionForeground:o[900],popover:O(.23-H),popoverForeground:o[50],card:O(.21-H),cardForeground:o[50],colorBackgroundFooter:O(.2-H),colorText:r.fmt(.86*m.l,0,0),colorTextMuted:r.fmtAlpha(.86*m.l,0,0,.75),colorTextMutedForeground:r.fmt(g.l,0,0),colorPlaceholder:r.fmt(.6,.5*k.c,t.h),colorTextNeutral:r.fmt(.71,k.c,t.h),colorControlLabel:r.fmt(.71,.75*k.c,t.h),cardShadow:d.sm,floatingShadow:d.modal,colorModalShadow:d.modal,colorBorder:O(.29-H,F),colorBorderHover:O(.35-H,F),colorBorderFocus:r.fmt(v,.8*T,x),colorBorderFocusRing:r.fmtAlpha(v,.8*T,x,.5),colorBorderTransparent:r.fmtAlpha(p.l,p.c,p.h,0),surfaceHairline:"transparent",colorBackgroundAlt:O(.26-H),colorBackgroundAltHover:O(.3-H),colorBackgroundPanel:O(.25-H),colorBackgroundBordered:O(.25-H),colorBackgroundTransparent:"#00000000",colorBackgroundModal:O(.23-H),colorForegroundItemSelected:r.fmt(.93*m.l,0,0),colorForegroundItemSelectedText:o[900],colorBackgroundSelect:O(.23-H),colorBackgroundSelectFilled:O(.23-H),colorBackgroundSelectFilledItem:O(.32-H),colorBackgroundSelectItem:O(.26-H),colorBackgroundSelectItemHover:O(.3-H),colorBackgroundSelectItemSelected:O(.34-H),colorDisabledBg:r.withAlpha(O(.21-H),.5),colorDisabledBorder:O(.29-H,F),colorDisabledText:r.fmt(.4,.75*k.c,t.h),colorAccentWell:B||t.c>=.03?O(.28-H):r.fmt(.28-H,Math.min(.35*A.c,.09,l.maxSrgbChroma(.28-H,A.h)),A.h),colorAccentWellInk:B?e[100]:r.fmt(Math.max(A.l,.72),Math.min(A.c,.19),A.h),colorIcon:r.fmt(.86*m.l,0,0),colorIconMuted:"oklch(0.89 0 0)",colorError:"oklch(0.64 0.24 15.26)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.64 0.24 15.26)",colorSuccess:"oklch(0.67 0.16 150)",colorErrorOutline:"oklch(0.64 0.24 15.26 / 0.5)",colorFocusPrimary:r.fmt(v,T,x),colorFocusPrimaryRing:r.fmtAlpha(v,T,x,.5),colorTextAlpha50:r.fmtAlpha(.86*m.l,0,0,.5),colorSwitchThumb:o[50],colorSwitchFilledThumb:y,colorTextNeutralAlpha10:r.fmtAlpha(.61,k.c,t.h,.1),colorTextNeutralAlpha15:r.fmtAlpha(.61,k.c,t.h,.15),colorTextNeutralAlpha25:r.fmtAlpha(.61,k.c,t.h,.25),colorTextNeutralAlpha50:r.fmtAlpha(.61,k.c,t.h,.5),colorBackgroundAltAlpha75:r.withAlpha(O(.21-H),.75),colorBackgroundAltAlpha85:r.withAlpha(O(.21-H),.85),colorUploadTextAlpha50:r.withAlpha(i.colorUploadText,.5),colorCardOverlay:r.withAlpha(O(.23-H),.75),colorOverlay:"oklch(0 0 0 / 0.65)",tooltipBackground:O(.25-H),skeletonBase:O(.21-H),skeletonHighlight:O(.32-H),colorTabActiveBg:O(.31-H),colorTabHoverBg:O(.21-H),colorTabFilledActiveBg:O(.34-H),colorTabFilledTrackBg:O(.21-H),colorButtonOutlineBg:r.withAlpha("oklch(1.00 0 0)",.03),colorButtonOutlineHoverBg:r.withAlpha("oklch(1.00 0 0)",.08),colorButtonGhostHoverBg:r.withAlpha("oklch(1.00 0 0)",.03),colorButtonOutlineAccent:S,colorButtonOutlineAccentHover:b,colorButtonFilledBg:r.withAlpha(S,.1),colorButtonSoftDestructiveBg:"oklch(0.33 0.09 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.39 0.11 15)",scrollbarThumb:r.withAlpha(S,.5),scrollbarThumbHover:S,primaryGradientStart:S,primaryGradientEnd:r.lerp(S,b,.5),primaryHoverStart:B?r.lerp(e[100],e[200],.3):r.lerp(e[600],e[700],.3),primaryHoverEnd:b,primaryContrastText:y,buttonGenericBg:O(.34-H),buttonGenericHoverBg:b,buttonSelectedBorder:b,buttonSelectedBg:b,buttonDisabledBg:O(.21-H),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...h,colorAlertInfoBackground:r.fmtAlpha(.29,.06*I,t.h,.5),colorAlertInfoBorder:r.fmtAlpha(.5,.09*I,t.h,.5),colorAlertInfoTitle:r.fmt(.66,.11*I,t.h),colorAlertInfoText:r.fmt(.63,.09*I,t.h),...i}}function m(o){const r={};for(const l of Object.keys(o)){const e=Number(l);r[e]=o[e].replace(/oklch\(([\d.]+)%\s/,(o,r)=>`oklch(${(parseFloat(r)/100).toFixed(2)} `)}return r}const s=[["onPrimary","primary"],["primaryForeground","primary"],["primaryContrastText","primary"],["colorAlertInfoTitle","colorAlertInfoBackground"],["colorAlertInfoText","colorAlertInfoBackground"],["colorAlertSuccessTitle","colorAlertSuccessBackground"],["colorAlertSuccessText","colorAlertSuccessBackground"],["colorAlertWarningTitle","colorAlertWarningBackground"],["colorAlertWarningText","colorAlertWarningBackground"],["colorAlertErrorTitle","colorAlertErrorBackground"],["colorAlertErrorText","colorAlertErrorBackground"]];exports.createTheme=function(a,h){r.validateSeed(h.surfaceBase,"surfaceBase"),r.validateSeed(h.primaryBase,"primaryBase");const i=h.surfaceLadder?o.generateSurfaceScale(h.surfaceBase,a):o.default(h.surfaceBase),s=o.default(h.primaryBase),p=m(i),g=m(s),k=r.parseOklch(h.surfaceBase),B=r.parseOklch(h.primaryBase),f={metric:h.contrastMetric,min:h.contrastMin,nudge:h.onPrimaryNudge},A=e.buildShadowScale(e.resolveShadowParams(a,h.shadow));return"light"===a?function(o,e,a,h,i,u={},m=!1){const s=r.shadeVal(o,200),p=r.shadeVal(o,900),g=r.shadeVal(o,950),k=Math.max(0,Math.cos((a.h-260)*Math.PI/180)),B=Math.min(Math.max(.85*a.c,.014*k),.045),f=B*(.6+.35*k),A=B,T=1.2*B,x=Math.min(B,.02),v=Math.min(a.c/.06,1),S=(m?.97:.995)-k*B*.65-(1-k)*Math.min(.65*Math.max(0,a.c-.02),.03),b=r.fmt(S,f,a.h),y=m?r.fmt(Math.min(1,S+.03),f,a.h):b,M=m?y:r.fmt(S+.001,f,a.h),F=m?.98:S-.035,w=m?.93:S-.035,H=m?.93:S-.055,I=m?.93:S-.065,O=m?.93:S-.025,E=m?.95:S-.03,U=m?.95:S-.03,C=m?.9:S-.075,D=m?.88:S-.085,P=r.shadeVal(e,300),W=r.shadeVal(e,600),N=P.c>.03?P.c:Math.max(.25*a.c,.01),V=P.c>.03?P.h:a.h,G=Math.min(P.l,.78),j=l.resolveOnColor(e[600],{candidates:[r.fmt(.2,.01,h.h),"oklch(1.00 0 0)"],metric:u.metric,min:u.min,nudge:u.nudge}).value;return{appearance:"light",...c,...t,background:b,foreground:o[950],input:r.fmt(C,x,a.h),primary:e[600],primaryScale:e,surfaceScale:o,primaryHover:e[700],primaryForeground:j,onPrimary:j,secondary:r.fmt(O,A,a.h),secondaryHover:r.fmt(1.03*s.l,.11*h.c,h.h),secondaryForeground:o[950],secondaryForegroundHover:e[600],accent:r.fmt(O,A,a.h),accentForeground:o[900],muted:r.fmt(O,A,a.h),mutedForeground:o[500],selection:o[950],selectionForeground:"oklch(1.00 0 0)",popover:y,popoverForeground:o[950],card:M,cardForeground:o[950],colorBackgroundFooter:r.fmt(U,A,a.h),colorText:o[950],colorTextMuted:r.fmt(.52,Math.min(.6*a.c,.04),a.h),colorTextMutedForeground:r.fmt(.5,Math.min(.4*a.c,.03),a.h),colorPlaceholder:r.fmt(.65,Math.min(.3*a.c,.02),a.h),colorTextNeutral:r.fmt(.4,Math.min(.4*a.c,.03),a.h),colorControlLabel:r.fmt(.4,Math.min(.5*a.c,.035),a.h),cardShadow:i.sm,floatingShadow:i.lg,colorModalShadow:i["2xl"],colorBorder:r.fmt(C,x,a.h),colorBorderHover:r.fmtAlpha(.5,.17*h.c,h.h,.38),colorBorderFocus:r.fmt(G,.8*N,V),colorBorderFocusRing:r.fmtAlpha(G,.8*N,V,.5),colorBorderTransparent:r.withAlpha(o[200],0),surfaceHairline:m?"transparent":r.fmt(.94,f,a.h),colorBackgroundAlt:r.fmt(F,A,a.h),colorBackgroundAltHover:r.fmt(H,A,a.h),colorBackgroundPanel:r.fmt(I,T,a.h),colorBackgroundBordered:m?y:"transparent",colorBackgroundTransparent:r.withAlpha(b,0),colorBackgroundModal:m?y:r.lerp(o[50],b,.5),colorBackgroundInput:m?y:void 0,elevBox:m?"1":void 0,elevNested:m?"0.98":void 0,elevDeep:m?"0.95":void 0,elevationMode:m?"raised":void 0,colorForegroundItemSelected:o[950],colorForegroundItemSelectedText:"oklch(1.00 0 0)",colorBackgroundSelect:y,colorBackgroundSelectFilled:r.fmt(I,T,a.h),colorBackgroundSelectFilledItem:y,colorBackgroundSelectItem:y,colorBackgroundSelectItemHover:r.fmt(w,A,a.h),colorBackgroundSelectItemSelected:r.fmt(H,T,a.h),colorDisabledBg:r.fmt(E,A,a.h),colorDisabledBorder:r.fmt(D,Math.min(1.6*B,.02),a.h),colorDisabledText:o[400],colorAccentWell:r.fmt(.94,Math.min(.15*W.c,.035),W.h),colorAccentWellInk:r.fmt(Math.min(W.l,.55),Math.min(W.c,.2),W.h),colorIcon:o[950],colorIconMuted:r.withAlpha(o[700],.5),colorError:"oklch(0.55 0.22 15)",colorErrorText:"oklch(1.00 0 0)",colorErrorBorder:"oklch(0.55 0.22 15)",colorSuccess:"oklch(0.55 0.15 150)",colorErrorOutline:"oklch(0.55 0.22 15 / 0.5)",colorFocusPrimary:e[400],colorFocusPrimaryRing:r.withAlpha(e[400],.5),colorTextAlpha50:r.withAlpha(o[950],.5),colorSwitchThumb:y,colorSwitchFilledThumb:y,colorTextNeutralAlpha10:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.1),colorTextNeutralAlpha15:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.15),colorTextNeutralAlpha25:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.25),colorTextNeutralAlpha50:r.fmtAlpha(.55,Math.min(.4*a.c,.03),a.h,.5),colorBackgroundAltAlpha75:r.withAlpha(r.fmt(E,A,a.h),.75),colorBackgroundAltAlpha85:r.withAlpha(r.fmt(E,A,a.h),.85),colorUploadTextAlpha50:r.withAlpha(d.colorUploadText,.5),colorCardOverlay:"oklch(1.00 0 0 / 0.75)",colorOverlay:"oklch(0 0 0 / 0.4)",tooltipBackground:o[900],skeletonBase:r.fmt(m?.94:S-.075,A,a.h),skeletonHighlight:r.fmt(w,A,a.h),colorTabActiveBg:r.fmt(w,A,a.h),colorTabHoverBg:r.fmt(w,A,a.h),colorTabFilledActiveBg:y,colorTabFilledTrackBg:r.fmt(w,A,a.h),colorButtonOutlineBg:y,colorButtonOutlineHoverBg:r.fmt(w,A,a.h),colorButtonGhostHoverBg:r.fmt(m?.92:w,A,a.h),colorButtonOutlineAccent:e[700],colorButtonOutlineAccentHover:e[800],colorButtonFilledBg:r.withAlpha(e[600],.1),colorButtonSoftDestructiveBg:"oklch(0.92 0.05 15)",colorButtonSoftDestructiveHoverBg:"oklch(0.88 0.07 15)",scrollbarThumb:r.withAlpha(o[950],.5),scrollbarThumbHover:o[950],primaryGradientStart:r.lerp(e[600],e[700],.5),primaryGradientEnd:r.lerp(e[600],e[500],.3),primaryHoverStart:r.lerp(e[600],e[700],.3),primaryHoverEnd:r.lerp(e[500],e[400],.3),primaryContrastText:j,buttonGenericBg:r.fmt(p.l,.22*h.c,h.h),buttonGenericHoverBg:e[600],buttonSelectedBorder:e[500],buttonSelectedBg:e[600],buttonDisabledBg:r.fmt(g.l,.17*h.c,h.h),buttonDisabledText:"oklch(1.00 0 0 / 0.3)",...n,colorAlertInfoBackground:r.fmtAlpha(.9,.04*v,a.h,.5),colorAlertInfoBorder:r.fmtAlpha(.73,.09*v,a.h,.5),colorAlertInfoTitle:r.fmt(.56,.11*v,a.h),colorAlertInfoText:r.fmt(.63,.09*v,a.h),...d}}(p,g,k,B,A,f,"raised"===h.lightElevation):u(p,g,k,B,A,f)},exports.guardOnColors=function(o,r,e={}){let c=null;for(const[t,a]of s){const n=o[a],h=o[t];if("string"!=typeof n||"string"!=typeof h)continue;if(!(o[a]!==r[a]||o[t]!==r[t]))continue;const d=l.resolveOnColor(n,{override:h,metric:e.metric,min:e.min}).value;d!==h&&(c=c??{...o},c[t]=d)}return c??o};
|