@inntechcorp/it-design 4.0.0-beta.6 → 4.0.0-beta.8

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.
Files changed (87) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/cjs/back-top/index.js +1 -1
  3. package/dist/cjs/blocks/auth-complete/index.js +1 -0
  4. package/dist/cjs/blocks/auth-page/index.js +1 -0
  5. package/dist/cjs/blocks/banner/index.js +1 -1
  6. package/dist/cjs/blocks/casino-featured/index.js +1 -1
  7. package/dist/cjs/blocks/game-box/index.js +1 -1
  8. package/dist/cjs/blocks/header/index.js +1 -1
  9. package/dist/cjs/blocks/login/index.js +1 -0
  10. package/dist/cjs/blocks/mega-menu/index.js +1 -1
  11. package/dist/cjs/blocks/signup/index.js +1 -0
  12. package/dist/cjs/blocks/slider/index.js +1 -1
  13. package/dist/cjs/blocks/tournaments/index.js +1 -1
  14. package/dist/cjs/blocks/user-hub/profile.js +1 -1
  15. package/dist/cjs/enums/enum.js +1 -1
  16. package/dist/cjs/form/validation/Validator.js +1 -1
  17. package/dist/cjs/helpers/theme/exampleSitePreset.js +1 -0
  18. package/dist/cjs/helpers/theme/sitePreset.js +1 -0
  19. package/dist/cjs/index.js +1 -1
  20. package/dist/cjs/locales/en/itd.json.js +1 -1
  21. package/dist/cjs/locales/tr/itd.json.js +1 -1
  22. package/dist/css/game-box.css +1 -1
  23. package/dist/css/signup.css +1 -1
  24. package/dist/es/back-top/index.js +1 -1
  25. package/dist/es/blocks/auth-complete/index.js +1 -0
  26. package/dist/es/blocks/auth-page/index.js +1 -0
  27. package/dist/es/blocks/banner/index.js +1 -1
  28. package/dist/es/blocks/casino-featured/index.js +1 -1
  29. package/dist/es/blocks/game-box/index.js +1 -1
  30. package/dist/es/blocks/header/index.js +1 -1
  31. package/dist/es/blocks/login/index.js +1 -0
  32. package/dist/es/blocks/mega-menu/index.js +1 -1
  33. package/dist/es/blocks/signup/index.js +1 -0
  34. package/dist/es/blocks/slider/index.js +1 -1
  35. package/dist/es/blocks/tournaments/index.js +1 -1
  36. package/dist/es/blocks/user-hub/profile.js +1 -1
  37. package/dist/es/enums/enum.js +1 -1
  38. package/dist/es/form/validation/Validator.js +1 -1
  39. package/dist/es/helpers/theme/exampleSitePreset.js +1 -0
  40. package/dist/es/helpers/theme/sitePreset.js +1 -0
  41. package/dist/es/index.js +1 -1
  42. package/dist/es/locales/en/itd.json.js +1 -1
  43. package/dist/es/locales/tr/itd.json.js +1 -1
  44. package/dist/global.css +2 -2
  45. package/dist/index.d.ts +528 -7
  46. package/dist/locales/en/itd.json +2 -1
  47. package/dist/locales/itd.json +2 -1
  48. package/dist/locales/tr/itd.json +2 -1
  49. package/dist/types/blocks/auth-complete/index.d.ts +2 -0
  50. package/dist/types/blocks/auth-page/index.d.ts +2 -0
  51. package/dist/types/blocks/banner/index.d.ts +2 -0
  52. package/dist/types/blocks/box-title/index.d.ts +2 -0
  53. package/dist/types/blocks/casino-featured/index.d.ts +8 -0
  54. package/dist/types/blocks/default-avatar/index.d.ts +1 -0
  55. package/dist/types/blocks/featured-games/index.d.ts +2 -0
  56. package/dist/types/blocks/filter-tabs/index.d.ts +2 -0
  57. package/dist/types/blocks/footer/index.d.ts +2 -0
  58. package/dist/types/blocks/game-box/index.d.ts +21 -0
  59. package/dist/types/blocks/game-carousel/index.d.ts +2 -0
  60. package/dist/types/blocks/game-categories/index.d.ts +2 -0
  61. package/dist/types/blocks/game-filter/index.d.ts +2 -0
  62. package/dist/types/blocks/game-navigator/index.d.ts +2 -0
  63. package/dist/types/blocks/game-providers/index.d.ts +2 -0
  64. package/dist/types/blocks/game-search/index.d.ts +4 -0
  65. package/dist/types/blocks/game-shell/index.d.ts +2 -0
  66. package/dist/types/blocks/games-grid/index.d.ts +2 -0
  67. package/dist/types/blocks/header/index.d.ts +2 -0
  68. package/dist/types/blocks/help/index.d.ts +2 -0
  69. package/dist/types/blocks/last-winners/index.d.ts +2 -0
  70. package/dist/types/blocks/layout-boxes/index.d.ts +2 -0
  71. package/dist/types/blocks/login/index.d.ts +6 -0
  72. package/dist/types/blocks/mega-menu/index.d.ts +4 -0
  73. package/dist/types/blocks/min-width-gate/index.d.ts +2 -0
  74. package/dist/types/blocks/mobile-bottom-nav/index.d.ts +2 -0
  75. package/dist/types/blocks/multiple-jackpots/index.d.ts +2 -0
  76. package/dist/types/blocks/notifications/index.d.ts +2 -0
  77. package/dist/types/blocks/post-viewer/index.d.ts +2 -0
  78. package/dist/types/blocks/promotions-grid/index.d.ts +192 -0
  79. package/dist/types/blocks/raffle/index.d.ts +2 -0
  80. package/dist/types/blocks/signup/index.d.ts +2 -0
  81. package/dist/types/blocks/slider/index.d.ts +2 -0
  82. package/dist/types/blocks/slider-double/index.d.ts +2 -0
  83. package/dist/types/blocks/spacer/index.d.ts +36 -0
  84. package/dist/types/blocks/sub-page-header/index.d.ts +2 -0
  85. package/dist/types/blocks/tournaments/index.d.ts +2 -0
  86. package/dist/types/blocks/user-hub/index.d.ts +2 -0
  87. package/package.json +6 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,66 @@ carries the v3 to v4 story. Convention from here on: every version bump adds
6
6
  its entry at the top, grouped as **Breaking / Added / Fixed**, one line per
7
7
  change, written for the consumer (what they see, not which file moved).
8
8
 
9
+ ## 4.0.0-beta.8 (2026-09-02)
10
+
11
+ ### Added
12
+
13
+ - The site-theme contract is public API: the `SitePreset` type,
14
+ `resolveSitePresetOverrides`, `validateSitePreset`, and `EXAMPLE_SITE`
15
+ (the tuned, regression-locked classic navy palette a migrating site
16
+ adopts as its default preset) all export from the barrel.
17
+ - The `multipleOf` form validator actually ships: `MULTIPLE_OF` enum
18
+ member, step check (zero/negatives refused), optional `currency` on the
19
+ rule for the stock message, en/tr locale strings. Ported from v3.1.22 -
20
+ the beta.4 notes listed it by mistake; it had never left the v3 line.
21
+
22
+ ### Docs
23
+
24
+ - THEMING.md consumer pitfall: old postcss-calc/cssnano print a harmless
25
+ "Lexical error" flood on `global.css`'s OKLCH channel math when Vite runs
26
+ package CSS through the consumer's postcss config - upgrade to cssnano 9 /
27
+ postcss-calc 11, or set `preset: ['default', { calc: false }]`.
28
+
29
+ ## 4.0.0-beta.7 (2026-09-02)
30
+
31
+ ### Added
32
+
33
+ - Per-block subpath exports: `@inntechcorp/it-design/blocks/<name>` now
34
+ resolves (types + ESM + CJS) for all 38 blocks, so sites keep per-block
35
+ lazy chunks instead of pulling the barrel. Raw `dist/es/...` paths remain
36
+ unexported. Subpath types are generated stubs that re-export from the
37
+ bundled `index.d.ts` - identical types, no duplication.
38
+ - The auth blocks joined the public API: `LoginPanel`, `SignupPanel`
39
+ (+ `stepOf`/`deriveSteps`), `CompletionPanel`, `AuthPage` (+
40
+ `ForceChangePassword`, `ResetPassword`, `EmailVerification`) and their
41
+ prop/text types export from the barrel and from `./blocks/*` subpaths.
42
+
43
+ ### Added (site marker parity)
44
+
45
+ - The missing `inn-*` markers came back (contract rule 2): back-to-top's
46
+ container, the game-box empty-tile skeleton pair, the slider slide
47
+ spinner (platform-flavored, on the page-composed Banner slides), the
48
+ mobile mega-menu group/item/icon/sub-item set, the slider slide-number,
49
+ and the hub's `inn-statistics-summary`. GameBox gains `emptyArt` (the
50
+ site's per-category placeholder art URL) drawing the
51
+ `inn-(mobile-)image-box-empty-image` layer in the skeleton tile and over
52
+ a loading/broken art box. The seven `inn-(mobile-)user-enter-*` markers
53
+ live in site-composed hub slot content and stay on the site side.
54
+ - Legacy tenant-CSS aliases: the site's un-prefixed stable class names now
55
+ ride alongside the `itd-*` ones - 44 `tournament-*` names in the
56
+ tournaments block, `header-separator`/`header-menu-list`/
57
+ `header-menu-item` in the header, and the `winners-*` set in the
58
+ casino-featured winners box. Tenant custom CSS written against the old
59
+ names keeps working through the v4 swap.
60
+
61
+ ### Changed
62
+
63
+ - SignupPanel: a `readonly` field now renders its REAL control disabled
64
+ (a locked Select showing the value, a locked Input otherwise) instead of
65
+ the label-value fact row; `.itd-signup-fact` is gone. Submit payloads are
66
+ unchanged. The step/section title wears the shell's title treatment
67
+ (16px semibold with breathing room) and hints inside signup align left.
68
+
9
69
  ## 4.0.0-beta.6 (2026-09-02)
10
70
 
11
71
  ### Breaking
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("../icons/BackToTop.js");exports.default=function({children:r=null}){const s=t.useRef(null),[n,c]=t.useState(!1);return t.useEffect(()=>{const e=s.current?.ownerDocument??document,t=e.defaultView??window,o=()=>{const o=t.scrollY||e.documentElement?.scrollTop||e.body?.scrollTop||0;c(o>t.innerHeight)};return o(),e.addEventListener("scroll",o,{passive:!0}),()=>e.removeEventListener("scroll",o)},[]),e.jsx("div",{className:"itd-back-to-top",ref:s,children:e.jsx("a",{className:"itd-back-top-show",onClick:()=>{(s.current?.ownerDocument?.defaultView??window).scrollTo({top:0,behavior:"smooth"})},"data-show":n?"":void 0,children:r||e.jsx(o.default,{width:30,height:30})})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("../icons/BackToTop.js");exports.default=function({children:r=null}){const n=t.useRef(null),[s,c]=t.useState(!1);return t.useEffect(()=>{const e=n.current?.ownerDocument??document,t=e.defaultView??window,o=()=>{const o=t.scrollY||e.documentElement?.scrollTop||e.body?.scrollTop||0;c(o>t.innerHeight)};return o(),e.addEventListener("scroll",o,{passive:!0}),()=>e.removeEventListener("scroll",o)},[]),e.jsx("div",{className:"itd-back-to-top inn-back-to-top-container",ref:n,children:e.jsx("a",{className:"itd-back-top-show",onClick:()=>{(n.current?.ownerDocument?.defaultView??window).scrollTo({top:0,behavior:"smooth"})},"data-show":s?"":void 0,children:r||e.jsx(o.default,{width:30,height:30})})})};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),l=require("../../form/index.js"),s=require("../../button/index.js"),t=require("../../badge/index.js"),d=require("../../form/group/Group.js"),n=require("../../form/control/Control.js");const a=i.forwardRef(({texts:a,skippable:r=!1,loading:o=!1,logo:c,children:u,onSubmit:m,onSkip:h,className:p=""},x)=>{const[j,g]=i.useState(!1);return e.jsxs("div",{className:"itd-login itd-auth-complete"+(p?" "+p:""),children:[c?e.jsx("div",{className:"itd-login-topbar",children:e.jsx("span",{className:"itd-login-logo",children:c})}):null,e.jsxs("div",{className:"itd-login-body",children:[e.jsxs("div",{className:"itd-login-intro",children:[a.eyebrow?e.jsx(t.default,{variant:"default",color:"warning",size:"medium",pill:!1,children:a.eyebrow}):null,e.jsx("span",{className:"itd-login-title",children:a.title})]}),e.jsx("div",{className:"itd-login-rule"}),a.hint?e.jsx("p",{className:"itd-login-hint",children:a.hint}):null,e.jsxs(l.default,{name:"auth-complete",ref:x,onFinish:e=>m?.(e),onValidated:g,children:[e.jsx(d.default,{gap:12,children:u}),e.jsx(n.default,{children:e.jsx(s.default,{type:"submit",size:"x-large",loading:o,disabled:!j||o,style:{width:"100%"},children:a.submit})})]}),e.jsx("div",{className:"itd-login-actions itd-auth-complete-foot",children:r?e.jsxs(e.Fragment,{children:[a.skip?e.jsx(s.default,{variant:"ghost",size:"medium",onClick:h,disabled:o,children:a.skip}):null,a.deadline?e.jsx("span",{className:"itd-auth-complete-deadline",children:a.deadline}):null]}):a.forced?e.jsx("span",{className:"itd-auth-complete-deadline",children:a.forced}):null})]})]})});a.displayName="CompletionPanel",exports.CompletionPanel=a,exports.default=a;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),s=require("../../form/index.js"),a=require("../../field/index.js"),i=require("../../input/index.js"),l=require("../../button/index.js"),t=require("../../alert/index.js"),d=require("../../card/Card.js");require("../../card/CardHeader.js"),require("../../card/CardTitle.js"),require("../../card/CardDescription.js"),require("../../card/CardAction.js"),require("../../card/CardTabs.js"),require("../../card/CardContent.js"),require("../../card/CardFooter.js");var n=require("../../result/index.js"),o=require("../../spin/index.js"),u=require("../../types/InputProps.js"),c=require("../../enums/enum.js"),p=require("../../helpers/platform/index.js"),h=require("../../helpers/classname/GetClassNameByPlatform.js"),g=require("../../form/group/Group.js"),m=require("../../form/control/Control.js");const x=({marker:r="inn-auth-page",logo:s,width:a,card:i=!0,children:l,language:t,copyright:n,className:o=""})=>e.jsxs("div",{className:"itd-auth-page"+(p.GetPlatform()===h.PlatformTypes.MOBILE?" itd-auth-page-mobile":"")+" "+r+(o?" "+o:""),style:a?{"--itd-auth-page-w":a}:void 0,children:[s?e.jsx("div",{className:"itd-auth-page-logo",children:s}):null,e.jsx("div",{className:"itd-auth-page-body "+r+"-form",children:i?e.jsx(d.Card,{className:"itd-auth-page-column",children:e.jsx("div",{className:"itd-auth-page-card",children:l})}):e.jsx("div",{className:"itd-auth-page-column",children:l})}),t||n?e.jsxs("div",{className:"itd-auth-page-footer "+r+"-footer",children:[e.jsx("div",{className:"itd-auth-page-language",children:t}),e.jsx("div",{className:"itd-auth-page-copyright",children:n})]}):null]}),j=({title:r,subtitle:s})=>e.jsxs("div",{className:"itd-auth-page-title",children:[e.jsx("h1",{children:r}),s?e.jsx("span",{children:s}):null]}),f=()=>e.jsx("div",{className:"itd-auth-page-separator"}),w=[{required:!0},{type:c.FormValidationTypes.MIN_LENGTH,value:8},{type:c.FormValidationTypes.MAX_LENGTH,value:35},{type:c.FormValidationTypes.PASSWORD}],y=({placeholder:r,requiredMessage:s,onChange:l,icon:t})=>e.jsx(a.Field,{name:"confirm_new_password",rules:[{required:!0,...s?{message:s}:{}},{type:c.FormValidationTypes.SAME,field:"new_password"}],children:e.jsx(i.default,{type:u.InputTypes.PASSWORD,size:"x-large",placeholder:r,onChange:l,addonBefore:t})}),q=({label:r,onClick:s})=>e.jsx("div",{className:"itd-auth-page-help",children:e.jsx(l.default,{variant:"outline",size:"large",onClick:s,style:{width:"100%"},children:r})}),N=r.forwardRef(({texts:t,fieldIcon:d,logo:n,loading:o=!1,onSubmit:c,onContactSupport:p,language:h,copyright:N,className:b},C)=>{const[v,P]=r.useState(!1);return e.jsxs(x,{marker:"inn-force-change-password",logo:n,language:h,copyright:N,className:b,children:[e.jsx(j,{title:t.title,subtitle:t.subtitle}),e.jsx(f,{}),e.jsxs(s.default,{name:"force-change-password",ref:C,onFinish:e=>{const{confirm_new_password:r,...s}=e;c?.(s)},onValidated:P,children:[e.jsxs(g.default,{gap:12,children:[e.jsx(a.Field,{name:"current_password",rules:[{required:!0}],children:e.jsx(i.default,{type:u.InputTypes.PASSWORD,size:"x-large",placeholder:t.currentPassword,addonBefore:d})}),e.jsx(a.Field,{name:"new_password",dependency:"confirm_new_password",rules:w,children:e.jsx(i.default,{type:u.InputTypes.PASSWORD,size:"x-large",placeholder:t.newPassword,addonBefore:d})}),e.jsxs("div",{children:[e.jsx(y,{placeholder:t.confirmPassword,requiredMessage:t.confirmRequired,icon:d}),t.rules?e.jsx("div",{className:"itd-auth-page-rules",children:t.rules}):null]})]}),e.jsx(m.default,{children:e.jsx(l.default,{type:"submit",size:"x-large",loading:o,disabled:!v||o,style:{width:"100%"},children:t.submit})})]}),t.support?e.jsx(q,{label:t.support,onClick:p}):null]})});N.displayName="ForceChangePassword";const b=r.forwardRef(({texts:d,fieldIcon:n,logo:o,loading:c=!1,onSubmit:p,onContactSupport:h,language:N,copyright:b,className:C},v)=>{const[P,S]=r.useState(!1);return e.jsxs(x,{marker:"inn-reset-password",logo:o,language:N,copyright:b,className:C,children:[e.jsx(j,{title:d.title,subtitle:d.subtitle}),e.jsx(f,{}),d.rules?e.jsx(t.default,{type:"info",children:d.rules}):null,e.jsxs(s.default,{name:"reset-password",ref:v,onFinish:e=>{const{confirm_new_password:r,...s}=e;p?.(s)},onValidated:S,children:[e.jsxs(g.default,{gap:12,children:[e.jsx(a.Field,{name:"new_password",dependency:"confirm_new_password",rules:w,children:e.jsx(i.default,{type:u.InputTypes.PASSWORD,size:"x-large",placeholder:d.newPassword,addonBefore:n})}),e.jsx(y,{placeholder:d.confirmPassword,requiredMessage:d.confirmRequired,icon:n})]}),e.jsx(m.default,{children:e.jsx(l.default,{type:"submit",size:"x-large",loading:c,disabled:!P||c,style:{width:"100%"},children:d.submit})})]}),d.support?e.jsx(q,{label:d.support,onClick:h}):null]})});b.displayName="ResetPassword";exports.AuthPage=x,exports.AuthPageSeparator=f,exports.AuthPageTitle=j,exports.EmailVerification=({state:r,texts:s,images:a,onHome:i,homeHref:t,logo:d,language:u,copyright:c,className:p})=>{const h=a?.[r]??("loading"===r?e.jsx(o.default,{}):null);return e.jsx(x,{marker:"inn-email-verification",logo:d,card:!1,width:"31.25rem",language:u,copyright:c,className:p,children:e.jsx("div",{className:"itd-auth-page-result","data-state":r,children:e.jsx(n.default,{image:h,title:s[r].title,description:s[r].subtitle,animation:!0,extra:e.jsx(l.default,{href:t,onClick:i,disabled:"loading"===r,children:s.home})})})})},exports.ForceChangePassword=N,exports.ResetPassword=b,exports.default=x;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("../../image/index.js"),r=require("../../skeleton/index.js"),s=require("../../helpers/classname/GetClassNameByPlatform.js"),i=require("../../hooks/useNaturalRatio.js");exports.default=({id:n,image:l,imageSource:o,art:c,alt:u,height:d,children:m,onClick:g,cover:h=!1,ratio:f,link:j,target:x="_self",className:p})=>{const[b,k]=t.useState(!1),v=t.useRef(null);t.useEffect(()=>{k(!1)},[l]);const N=i.default(v,l,b||!!f||h),y=e.jsxs(e.Fragment,{children:[l&&e.jsxs(e.Fragment,{children:[!b&&e.jsx(r.default,{className:"itd-banner-skeleton"}),e.jsx(a.default,{className:"itd-banner-img",src:l,source:o,alt:u??"",onLoad:()=>k(!0),onError:()=>k(!0)})]}),m]}),q=!(!l||N||b||f||h),R={ref:v,id:n??s.GetClassNameByPlatform("inn-image-component"),"data-itd-reserving":q||void 0,className:s.GetClassNameByPlatform("inn-image-item")+" itd-banner"+(h?" itd-banner-cover":"")+(p?" "+p:""),style:{...c&&!l?{background:c}:null,...f?{aspectRatio:f}:h?d?{height:d,aspectRatio:"auto"}:null:N?{aspectRatio:N}:d?{height:d,aspectRatio:"auto"}:null}};return j?e.jsx("a",{...R,href:j,target:x,children:y}):g?e.jsx("div",{...R,role:"button",tabIndex:0,onClick:g,onKeyDown:e=>"Enter"===e.key&&g(),children:y}):e.jsx("div",{...R,children:y})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),t=require("../../image/index.js"),r=require("../../skeleton/index.js"),s=require("../../helpers/classname/GetClassNameByPlatform.js"),n=require("../../hooks/useNaturalRatio.js");exports.default=({id:i,image:l,imageSource:o,art:c,alt:u,height:d,children:m,onClick:f,cover:g=!1,ratio:h,link:j,target:x="_self",className:p})=>{const[y,N]=a.useState(!1),b=a.useRef(null);a.useEffect(()=>{N(!1)},[l]);const k=n.default(b,l,y||!!h||g),v=e.jsxs(e.Fragment,{children:[l&&e.jsxs(e.Fragment,{children:[!y&&e.jsx(r.default,{className:"itd-banner-skeleton"+(g?" "+s.GetClassNameByPlatform("inn-lazy-load-spinner"):"")}),e.jsx(t.default,{className:"itd-banner-img",src:l,source:o,alt:u??"",onLoad:()=>N(!0),onError:()=>N(!0)})]}),m]}),q=!(!l||k||y||h||g),C={ref:b,id:i??s.GetClassNameByPlatform("inn-image-component"),"data-itd-reserving":q||void 0,className:s.GetClassNameByPlatform("inn-image-item")+" itd-banner"+(g?" itd-banner-cover":"")+(p?" "+p:""),style:{...c&&!l?{background:c}:null,...h?{aspectRatio:h}:g?d?{height:d,aspectRatio:"auto"}:null:k?{aspectRatio:k}:d?{height:d,aspectRatio:"auto"}:null}};return j?e.jsx("a",{...C,href:j,target:x,children:v}):f?e.jsx("div",{...C,role:"button",tabIndex:0,onClick:f,onKeyDown:e=>"Enter"===e.key&&f(),children:v}):e.jsx("div",{...C,children:v})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),a=require("../../button/index.js"),i=require("../../image/index.js"),t=require("../../skeleton/index.js"),l=require("../game-box/index.js");const o=({id:n,children:s})=>e.jsx("div",{id:n,className:"itd-casino-featured-empty",children:e.jsx("span",{children:s})}),d=({winners:l,loading:d,winnersMode:r,defaultWinnersMode:c="last",onWinnersModeChange:m,onWinnerSelect:u,icon:h,labels:x,className:p})=>{const[j,b]=n.useState(c),N=r??j,g=(n,s)=>e.jsx(a.default,{size:"small",variant:N===n?"default":"ghost",className:"itd-casino-winners-tab","aria-pressed":N===n,onClick:()=>{return b(e=n),void m?.(e);var e},children:s});return e.jsxs("section",{id:"inn-casino-winners-box",className:("itd-casino-panel itd-casino-winners "+(p??"")).trim(),children:[e.jsxs("header",{className:"itd-casino-panel-head",children:[h??e.jsx(s.Crown,{"aria-hidden":!0}),e.jsx("span",{className:"itd-casino-panel-title",children:x?.title??"KAZANANLAR"}),e.jsxs("span",{id:"winners-box-tabs",className:"itd-casino-winners-tabs",children:[g("last",x?.last??"SON"),g("top",x?.top??"EN ÇOK")]})]}),e.jsx("div",{className:"itd-casino-panel-body",children:e.jsx("div",{className:"itd-casino-panel-scroll",children:d?e.jsx("div",{className:"itd-casino-panel-list",children:e.jsx(t.default,{count:5,height:"3.375rem"})}):0===(l?.length??0)?e.jsx(o,{id:"inn-casino-winners-box-not-found",children:x?.empty??"Kazananlar bulunamadı!"}):e.jsx("ul",{className:"itd-casino-panel-list",children:l.map(n=>e.jsx("li",{children:e.jsxs("button",{type:"button",className:"itd-casino-panel-row itd-casino-winner",onClick:u?()=>u(n.id):void 0,children:[n.image?e.jsx(i.default,{className:"itd-casino-row-thumb",src:n.image,alt:"",brokenWidth:36,brokenHeight:36}):e.jsx("span",{className:"itd-casino-row-thumb"}),e.jsxs("span",{className:"itd-casino-row-body",children:[e.jsx("span",{className:"itd-casino-row-name",children:n.username}),e.jsx("span",{className:"itd-casino-row-sub",children:n.game})]}),e.jsx("span",{className:"itd-casino-row-amount",children:n.amount})]})},n.id))})})})]})},r=({tournaments:n,loading:l,onSelect:d,onSeeAll:r,labels:c})=>e.jsxs("section",{id:"inn-casino-tournaments-box",className:"itd-casino-panel itd-casino-tournaments",children:[e.jsxs("header",{className:"itd-casino-panel-head",id:"inn-casino-tournaments-box-title",children:[e.jsx(s.Trophy,{"aria-hidden":!0}),e.jsx("span",{className:"itd-casino-panel-title",children:c?.tournaments??"TURNUVALAR"}),null!=r&&(n?.length??0)>0&&e.jsx(a.default,{size:"small",variant:"ghost",className:"itd-casino-see-all",onClick:r,children:c?.seeAll??"HEPSİNİ GÖR"})]}),e.jsx("div",{className:"itd-casino-panel-body",children:e.jsx("div",{className:"itd-casino-panel-scroll",children:l?e.jsx("div",{className:"itd-casino-panel-list",children:e.jsx(t.default,{count:5,height:"3.5rem"})}):0===(n?.length??0)?e.jsx(o,{id:"inn-casino-tournaments-box-not-found",children:c?.tournamentsEmpty??"Turnuva bulunamadı!"}):e.jsx("ul",{className:"itd-casino-panel-list",children:n.map(n=>e.jsx("li",{children:e.jsxs("button",{type:"button",className:"itd-casino-panel-row itd-casino-tournament",onClick:d?()=>d(n.id):void 0,children:[n.image?e.jsx(i.default,{className:"itd-casino-row-thumb itd-casino-row-thumb--wide",src:n.image,alt:"",brokenWidth:56,brokenHeight:40}):e.jsx("span",{className:"itd-casino-row-thumb itd-casino-row-thumb--wide"}),e.jsxs("span",{className:"itd-casino-row-body",children:[e.jsx("span",{className:"itd-casino-row-name",children:n.name}),null!=n.prize&&e.jsx("span",{className:"itd-casino-row-amount",children:n.prize})]})]})},n.id))})})})]});exports.CasinoFeaturedTournaments=r,exports.CasinoFeaturedWinners=d,exports.default=({id:n,height:s=380,items:a,tournaments:i,tournamentsLoading:t,onTournamentSelect:c,onSeeAllTournaments:m,winners:u,winnersLoading:h,winnersMode:x,defaultWinnersMode:p,onWinnersModeChange:j,onWinnerSelect:b,labels:N,className:g})=>{const w=a??[],f={"--itd-casino-featured-height":"number"==typeof s?s+"px":s,"--itd-casino-featured-cols":String(Math.max(w.length,1))};return e.jsxs("div",{id:n??"inn-casino-featured-component",className:("itd-casino-featured "+(g??"")).trim(),"data-empty":0===w.length?"true":void 0,style:f,children:[e.jsx(r,{tournaments:i,loading:t,onSelect:c,onSeeAll:m,labels:N}),w.length>0?w.map(n=>{const s=e.jsx(l.default,{image:n.image,alt:n.alt??"casino-featured-banner",background:!1,outline:!1,ratio:"568 / 760",skeleton:!n.image});return null!=n.link?e.jsx("a",{className:"itd-casino-featured-box",href:n.link,target:n.target,children:s},n.id):e.jsx("button",{type:"button",className:"itd-casino-featured-box",onClick:n.onOpen,children:s},n.id)}):e.jsx(o,{children:N?.itemsEmpty??"Görsel(ler) bulunamadı. Henüz hiçbir görsel eklenmemiş!"}),e.jsx(d,{winners:u,loading:h,winnersMode:x,defaultWinnersMode:p,onWinnersModeChange:j,onWinnerSelect:b,labels:N})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),a=require("../../button/index.js"),i=require("../../image/index.js"),t=require("../../skeleton/index.js"),l=require("../game-box/index.js");const o=({id:n,children:s})=>e.jsx("div",{id:n,className:"itd-casino-featured-empty",children:e.jsx("span",{children:s})}),r=({winners:l,loading:r,winnersMode:d,defaultWinnersMode:c="last",onWinnersModeChange:m,onWinnerSelect:u,icon:h,labels:x,className:p})=>{const[j,b]=n.useState(c),N=d??j,w=(n,s)=>e.jsx(a.default,{size:"small",variant:N===n?"default":"ghost",className:"itd-casino-winners-tab","aria-pressed":N===n,onClick:()=>{return b(e=n),void m?.(e);var e},children:s});return e.jsxs("section",{id:"inn-casino-winners-box",className:("itd-casino-panel itd-casino-winners "+(p??"")).trim(),children:[e.jsxs("header",{className:"itd-casino-panel-head winners-box-title",children:[h??e.jsx(s.Crown,{"aria-hidden":!0}),e.jsx("span",{className:"itd-casino-panel-title",children:x?.title??"KAZANANLAR"}),e.jsxs("span",{id:"winners-box-tabs",className:"itd-casino-winners-tabs",children:[w("last",x?.last??"SON"),w("top",x?.top??"EN ÇOK")]})]}),e.jsx("div",{className:"itd-casino-panel-body winners-box-tab-content",children:e.jsx("div",{className:"itd-casino-panel-scroll",children:r?e.jsx("div",{className:"itd-casino-panel-list",children:e.jsx(t.default,{count:5,height:"3.375rem"})}):0===(l?.length??0)?e.jsx(o,{id:"inn-casino-winners-box-not-found",children:x?.empty??"Kazananlar bulunamadı!"}):e.jsx("ul",{className:"itd-casino-panel-list winners-list",children:l.map(n=>e.jsx("li",{className:"winners-list-item",children:e.jsxs("button",{type:"button",className:"itd-casino-panel-row itd-casino-winner",onClick:u?()=>u(n.id):void 0,children:[n.image?e.jsx(i.default,{className:"itd-casino-row-thumb",src:n.image,alt:"",brokenWidth:36,brokenHeight:36}):e.jsx("span",{className:"itd-casino-row-thumb"}),e.jsxs("span",{className:"itd-casino-row-body winners-winner-user-info",children:[e.jsx("span",{className:"itd-casino-row-name",children:n.username}),e.jsx("span",{className:"itd-casino-row-sub",children:n.game})]}),e.jsx("span",{className:"itd-casino-row-amount winners-winner-amount",children:n.amount})]})},n.id))})})})]})},d=({tournaments:n,loading:l,onSelect:r,onSeeAll:d,labels:c})=>e.jsxs("section",{id:"inn-casino-tournaments-box",className:"itd-casino-panel itd-casino-tournaments",children:[e.jsxs("header",{className:"itd-casino-panel-head",id:"inn-casino-tournaments-box-title",children:[e.jsx(s.Trophy,{"aria-hidden":!0}),e.jsx("span",{className:"itd-casino-panel-title",children:c?.tournaments??"TURNUVALAR"}),null!=d&&(n?.length??0)>0&&e.jsx(a.default,{size:"small",variant:"ghost",className:"itd-casino-see-all",onClick:d,children:c?.seeAll??"HEPSİNİ GÖR"})]}),e.jsx("div",{className:"itd-casino-panel-body",children:e.jsx("div",{className:"itd-casino-panel-scroll",children:l?e.jsx("div",{className:"itd-casino-panel-list",children:e.jsx(t.default,{count:5,height:"3.5rem"})}):0===(n?.length??0)?e.jsx(o,{id:"inn-casino-tournaments-box-not-found",children:c?.tournamentsEmpty??"Turnuva bulunamadı!"}):e.jsx("ul",{className:"itd-casino-panel-list",children:n.map(n=>e.jsx("li",{children:e.jsxs("button",{type:"button",className:"itd-casino-panel-row itd-casino-tournament",onClick:r?()=>r(n.id):void 0,children:[n.image?e.jsx(i.default,{className:"itd-casino-row-thumb itd-casino-row-thumb--wide",src:n.image,alt:"",brokenWidth:56,brokenHeight:40}):e.jsx("span",{className:"itd-casino-row-thumb itd-casino-row-thumb--wide"}),e.jsxs("span",{className:"itd-casino-row-body",children:[e.jsx("span",{className:"itd-casino-row-name",children:n.name}),null!=n.prize&&e.jsx("span",{className:"itd-casino-row-amount",children:n.prize})]})]})},n.id))})})})]});exports.CasinoFeaturedTournaments=d,exports.CasinoFeaturedWinners=r,exports.default=({id:n,height:s=380,items:a,tournaments:i,tournamentsLoading:t,onTournamentSelect:c,onSeeAllTournaments:m,winners:u,winnersLoading:h,winnersMode:x,defaultWinnersMode:p,onWinnersModeChange:j,onWinnerSelect:b,labels:N,className:w})=>{const g=a??[],f={"--itd-casino-featured-height":"number"==typeof s?s+"px":s,"--itd-casino-featured-cols":String(Math.max(g.length,1))};return e.jsxs("div",{id:n??"inn-casino-featured-component",className:("itd-casino-featured "+(w??"")).trim(),"data-empty":0===g.length?"true":void 0,style:f,children:[e.jsx(d,{tournaments:i,loading:t,onSelect:c,onSeeAll:m,labels:N}),g.length>0?g.map(n=>{const s=e.jsx(l.default,{image:n.image,alt:n.alt??"casino-featured-banner",background:!1,outline:!1,ratio:"568 / 760",skeleton:!n.image});return null!=n.link?e.jsx("a",{className:"itd-casino-featured-box",href:n.link,target:n.target,children:s},n.id):e.jsx("button",{type:"button",className:"itd-casino-featured-box",onClick:n.onOpen,children:s},n.id)}):e.jsx(o,{children:N?.itemsEmpty??"Görsel(ler) bulunamadı. Henüz hiçbir görsel eklenmemiş!"}),e.jsx(r,{winners:u,loading:h,winnersMode:x,defaultWinnersMode:p,onWinnersModeChange:j,onWinnerSelect:b,labels:N})]})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),s=require("lucide-react"),i=require("../../image/index.js"),n=require("../../skeleton/index.js"),t=require("../../spin/index.js"),r=require("../../hooks/useNaturalRatio.js");exports.default=({id:l,slug:o,image:d,imageSource:c,art:m,artContent:x,alt:u,name:g,description:b,playText:p,ratio:h,background:j=!0,outline:f=!0,overflow:v=!0,hasFunSupport:N=!1,action:y="click",link:k="#",target:S="_self",liveData:w,players:O,showPlayers:q=!0,limit:E,formatLimit:F,onlineText:L="Online",offlineText:R="Offline",skeleton:T=!1,loading:C=!1,broken:P=!1,onPlay:D,className:U})=>{const[M,W]=a.useState(!1),_=a.useRef(null),z=r.default(_,d,M||!!h);a.useEffect(()=>{W(!1)},[d]);const A=a.useRef(null);a.useEffect(()=>{const e=A.current,a=_.current;if(!e||!a)return;const s=()=>{delete a.dataset.nameLines;const s=getComputedStyle(e),i=parseFloat(s.lineHeight)||13,n=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),t=Math.max(1,Math.round((e.scrollHeight-n)/i));t>=3?a.dataset.nameLines="3":2===t&&(a.dataset.nameLines="2")};s();const i=new(e.ownerDocument.defaultView??window).ResizeObserver(s);return i.observe(a),()=>i.disconnect()},[g,p]);const H=w?.lastWon?.map(e=>e.color+":"+e.result).join("|"),[I,B]=a.useState(!1),[K,V]=a.useState(void 0);if(H!==K&&(V(H),void 0!==K&&void 0!==H&&B(!0)),a.useEffect(()=>{if(!I)return;const e=setTimeout(()=>B(!1),4e3);return()=>clearTimeout(e)},[I]),T)return e.jsx("div",{className:"inn-image-box itd-gamebox"+(U?" "+U:""),style:h?{aspectRatio:h}:void 0,children:e.jsx("div",{className:"inn-image-box-item itd-gamebox-item","data-background":"false","data-skeleton":"true",children:e.jsx(n.default,{className:"itd-gamebox-skeleton"})})},l);const G=o??(g?g.toLowerCase().replace(/[^a-z0-9]+/g,"-"):"");const J=F??(e=>String(e)),Q=h??z??void 0,X=Q?.split("/").map(Number),Y=2===X?.length&&X.every(e=>Number.isFinite(e)&&e>0)?X[1]>X[0]?"portrait":X[1]===X[0]?"square":"landscape":"landscape",Z=e=>{C||D?.(G,e)},$=e.jsxs("div",{className:"inn-image-box-content itd-gamebox-art"+(w?" itd-gamebox-art-live":""),style:m&&!d?{background:m}:void 0,children:[d&&!P&&e.jsxs(e.Fragment,{children:[!M&&e.jsx(n.default,{className:"itd-gamebox-skeleton"}),e.jsx(i.default,{className:"itd-gamebox-img",src:d,source:c,alt:g??u??"",onLoad:()=>W(!0),onError:()=>W(!0)})]}),P&&e.jsx(s.ImageOff,{className:"itd-gamebox-broken","aria-hidden":!0}),x]});return e.jsxs("div",{ref:_,className:"inn-image-box itd-gamebox"+(U?" "+U:""),style:Q?{aspectRatio:Q}:void 0,"data-itd-reserving":!(h||!d||z||M)||void 0,"data-orientation":Y,children:[e.jsxs("div",{className:"inn-image-box-item itd-gamebox-item","data-background":String(j),"data-outline":String(f),"data-overflow":String(v),"data-loading":String(C),"data-broken":String(P),"data-offline":String(!1===w?.isOpen),children:["link"===y?e.jsx("a",{className:"inn-image-box-content-wrapper itd-gamebox-click",href:k,target:S,children:$}):e.jsx("div",{className:"inn-image-box-content-wrapper itd-gamebox-click",role:"button",tabIndex:0,onClick:()=>Z(!1),onKeyDown:e=>{"Enter"===e.key&&Z(!1)},children:$}),N&&!w&&e.jsx("button",{type:"button",className:"inn-image-box-demo-button itd-gamebox-demo",onClick:()=>Z(!0),children:e.jsxs("span",{children:[e.jsx(s.Play,{"aria-hidden":!0}),"Demo"]})}),g&&e.jsxs("div",{className:"info-container itd-gamebox-info",children:[e.jsx("span",{className:"name",ref:A,children:p??g}),b&&e.jsx("span",{className:"description",children:b})]}),g&&e.jsx("span",{className:"itd-gamebox-play","aria-hidden":!0,children:e.jsx(s.Play,{})}),q&&null!=O&&!w&&e.jsxs("div",{className:"inn-image-box-players itd-gamebox-players",children:[e.jsx(s.User,{"aria-hidden":!0}),e.jsx("span",{children:O})]})]}),C&&e.jsx("span",{className:"itd-gamebox-spinner",children:e.jsx(t.default,{})}),w&&e.jsxs("div",{className:"inn-image-box-game-info itd-gamebox-live",children:[w.dealerName&&e.jsx("div",{className:"inn-image-box-game-name",children:e.jsx("span",{children:g})}),w.dealerName&&void 0!==w.isOpen&&e.jsxs("div",{className:"inn-image-box-online-status","data-open":String(w.isOpen),children:[e.jsx("i",{className:"online-status-icon "+(w.isOpen?"online":"offline"),"aria-hidden":!0}),e.jsx("span",{children:w.isOpen?L:R})]}),w.seats&&e.jsxs("div",{className:"inn-image-box-number-of-players",children:[e.jsx(s.User,{"aria-hidden":!0}),e.jsx("span",{children:w.seats.total-w.seats.available+"/"+w.seats.total})]}),!w.seats&&void 0!==w.players&&e.jsxs("div",{className:"inn-image-box-number-of-players",children:[e.jsx(s.User,{"aria-hidden":!0}),e.jsx("span",{children:w.players})]}),w.dealerName&&e.jsx("div",{className:"inn-image-box-dealer-name",children:e.jsx("span",{children:w.dealerName})}),E&&e.jsx("div",{className:"inn-image-box-table-limit","data-center":String(!w.dealerName),children:e.jsx("span",{children:J(E.min)+" - "+J(E.max)})}),w.lastWon&&e.jsx("div",{className:"inn-image-box-last-won-numbers",children:w.lastWon.map((a,s)=>e.jsx("span",{className:a.color+(0===s&&I?" flash-animation":""),onAnimationEnd:0===s?e=>{"itd-gamebox-flash"===e.animationName&&B(!1)}:void 0,children:a.result},a.result+"-"+s))}),w.seats&&e.jsx("div",{className:"inn-image-box-available-seats",children:Array.from({length:w.seats.total}).map((a,i)=>e.jsx("span",{className:w.seats?.taken?.includes(i+1)?"unavailable":"available",children:e.jsx(s.User,{"aria-hidden":!0})},i))})]})]},l)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),s=require("lucide-react"),i=require("../../image/index.js"),n=require("../../skeleton/index.js"),t=require("../../spin/index.js"),l=require("../../hooks/useNaturalRatio.js"),r=require("../../helpers/classname/GetClassNameByPlatform.js");exports.default=({id:o,slug:d,image:m,imageSource:c,art:x,emptyArt:g,artContent:u,alt:p,name:b,description:h,playText:j,ratio:f,background:N=!0,outline:v=!0,overflow:y=!0,hasFunSupport:k=!1,action:S="click",link:w="#",target:O="_self",liveData:q,players:C,showPlayers:P=!0,limit:E,formatLimit:F,onlineText:L="Online",offlineText:R="Offline",skeleton:T=!1,loading:B=!1,broken:D=!1,onPlay:G,className:U})=>{const[A,M]=a.useState(!1),W=a.useRef(null),_=l.default(W,m,A||!!f);a.useEffect(()=>{M(!1)},[m]);const z=a.useRef(null);a.useEffect(()=>{const e=z.current,a=W.current;if(!e||!a)return;const s=()=>{delete a.dataset.nameLines;const s=getComputedStyle(e),i=parseFloat(s.lineHeight)||13,n=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),t=Math.max(1,Math.round((e.scrollHeight-n)/i));t>=3?a.dataset.nameLines="3":2===t&&(a.dataset.nameLines="2")};s();const i=new(e.ownerDocument.defaultView??window).ResizeObserver(s);return i.observe(a),()=>i.disconnect()},[b,j]);const H=q?.lastWon?.map(e=>e.color+":"+e.result).join("|"),[I,K]=a.useState(!1),[V,J]=a.useState(void 0);if(H!==V&&(J(H),void 0!==V&&void 0!==H&&K(!0)),a.useEffect(()=>{if(!I)return;const e=setTimeout(()=>K(!1),4e3);return()=>clearTimeout(e)},[I]),T)return e.jsx("div",{className:"inn-image-box itd-gamebox"+(U?" "+U:""),style:f?{aspectRatio:f}:void 0,children:e.jsxs("div",{className:"inn-image-box-item itd-gamebox-item","data-background":"false","data-skeleton":"true",children:[g&&e.jsx("img",{className:"itd-gamebox-empty-art "+r.GetClassNameByPlatform("inn-image-box-empty-image"),src:g,alt:"","aria-hidden":!0}),e.jsx(n.default,{className:"itd-gamebox-skeleton "+r.GetClassNameByPlatform("inn-image-box-empty-skeleton")})]})},o);const Q=d??(b?b.toLowerCase().replace(/[^a-z0-9]+/g,"-"):"");const X=F??(e=>String(e)),Y=f??_??void 0,Z=Y?.split("/").map(Number),$=2===Z?.length&&Z.every(e=>Number.isFinite(e)&&e>0)?Z[1]>Z[0]?"portrait":Z[1]===Z[0]?"square":"landscape":"landscape",ee=e=>{B||G?.(Q,e)},ae=e.jsxs("div",{className:"inn-image-box-content itd-gamebox-art"+(q?" itd-gamebox-art-live":""),style:x&&!m?{background:x}:void 0,children:[m&&!D&&e.jsxs(e.Fragment,{children:[!A&&e.jsx(n.default,{className:"itd-gamebox-skeleton"}),e.jsx(i.default,{className:"itd-gamebox-img",src:m,source:c,alt:b??p??"",onLoad:()=>M(!0),onError:()=>M(!0)})]}),g&&m&&(!A||D)&&e.jsx("img",{className:"itd-gamebox-empty-art "+r.GetClassNameByPlatform("inn-image-box-empty-image"),src:g,alt:"","aria-hidden":!0}),D&&e.jsx(s.ImageOff,{className:"itd-gamebox-broken","aria-hidden":!0}),u]});return e.jsxs("div",{ref:W,className:"inn-image-box itd-gamebox"+(U?" "+U:""),style:Y?{aspectRatio:Y}:void 0,"data-itd-reserving":!(f||!m||_||A)||void 0,"data-orientation":$,children:[e.jsxs("div",{className:"inn-image-box-item itd-gamebox-item","data-background":String(N),"data-outline":String(v),"data-overflow":String(y),"data-loading":String(B),"data-broken":String(D),"data-offline":String(!1===q?.isOpen),children:["link"===S?e.jsx("a",{className:"inn-image-box-content-wrapper itd-gamebox-click",href:w,target:O,children:ae}):e.jsx("div",{className:"inn-image-box-content-wrapper itd-gamebox-click",role:"button",tabIndex:0,onClick:()=>ee(!1),onKeyDown:e=>{"Enter"===e.key&&ee(!1)},children:ae}),k&&!q&&e.jsx("button",{type:"button",className:"inn-image-box-demo-button itd-gamebox-demo",onClick:()=>ee(!0),children:e.jsxs("span",{children:[e.jsx(s.Play,{"aria-hidden":!0}),"Demo"]})}),b&&e.jsxs("div",{className:"info-container itd-gamebox-info",children:[e.jsx("span",{className:"name",ref:z,children:j??b}),h&&e.jsx("span",{className:"description",children:h})]}),b&&e.jsx("span",{className:"itd-gamebox-play","aria-hidden":!0,children:e.jsx(s.Play,{})}),P&&null!=C&&!q&&e.jsxs("div",{className:"inn-image-box-players itd-gamebox-players",children:[e.jsx(s.User,{"aria-hidden":!0}),e.jsx("span",{children:C})]})]}),B&&e.jsx("span",{className:"itd-gamebox-spinner",children:e.jsx(t.default,{})}),q&&e.jsxs("div",{className:"inn-image-box-game-info itd-gamebox-live",children:[q.dealerName&&e.jsx("div",{className:"inn-image-box-game-name",children:e.jsx("span",{children:b})}),q.dealerName&&void 0!==q.isOpen&&e.jsxs("div",{className:"inn-image-box-online-status","data-open":String(q.isOpen),children:[e.jsx("i",{className:"online-status-icon "+(q.isOpen?"online":"offline"),"aria-hidden":!0}),e.jsx("span",{children:q.isOpen?L:R})]}),q.seats&&e.jsxs("div",{className:"inn-image-box-number-of-players",children:[e.jsx(s.User,{"aria-hidden":!0}),e.jsx("span",{children:q.seats.total-q.seats.available+"/"+q.seats.total})]}),!q.seats&&void 0!==q.players&&e.jsxs("div",{className:"inn-image-box-number-of-players",children:[e.jsx(s.User,{"aria-hidden":!0}),e.jsx("span",{children:q.players})]}),q.dealerName&&e.jsx("div",{className:"inn-image-box-dealer-name",children:e.jsx("span",{children:q.dealerName})}),E&&e.jsx("div",{className:"inn-image-box-table-limit","data-center":String(!q.dealerName),children:e.jsx("span",{children:X(E.min)+" - "+X(E.max)})}),q.lastWon&&e.jsx("div",{className:"inn-image-box-last-won-numbers",children:q.lastWon.map((a,s)=>e.jsx("span",{className:a.color+(0===s&&I?" flash-animation":""),onAnimationEnd:0===s?e=>{"itd-gamebox-flash"===e.animationName&&K(!1)}:void 0,children:a.result},a.result+"-"+s))}),q.seats&&e.jsx("div",{className:"inn-image-box-available-seats",children:Array.from({length:q.seats.total}).map((a,i)=>e.jsx("span",{className:q.seats?.taken?.includes(i+1)?"unavailable":"available",children:e.jsx(s.User,{"aria-hidden":!0})},i))})]})]},o)};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),i=require("lucide-react"),s=require("../../button/index.js"),n=require("../../avatar/index.js"),l=require("../../select/index.js"),t=require("../../amount/index.js"),r=require("../../context/ITDContext.js"),o=require("../../helpers/platform/index.js"),d=require("../../helpers/classname/GetClassNameByPlatform.js"),c=require("../../hooks/useOnESCKeyDown.js"),u=require("../../select/SelectItem.js");const h=({locale:i})=>{const[s,n]=a.useState("");return a.useEffect(()=>{const e=()=>n((new Date).toLocaleTimeString(i));e();const a=setInterval(e,1e3);return()=>clearInterval(a)},[i]),e.jsx("span",{id:"inn-ticker",className:"itd-header-ticker",children:s})},m=({item:a})=>e.jsxs("a",{href:a.href??"#",className:a.active?"active":void 0,onClick:e=>{a.href||e.preventDefault(),a.onClick?.()},children:[a.icon&&e.jsx("span",{className:"itd-header-nav-icon",children:a.icon}),e.jsx("span",{children:a.label})]}),p=({languages:a,language:i,onLanguageChange:s,compact:n})=>{const{theme:t}=r.useITD(),o=n&&"dark"===t?"filled":"default";return e.jsx(l.default,{variant:o,size:n?"small":"medium",defaultValue:i,onChange:e=>s?.(e),"aria-label":"Dil",children:a.map(a=>e.jsx(u.SelectItem,{value:a.value,image:a.image,selectedLabel:n?a.label:void 0,children:n?a.label:a.fullLabel??a.label},a.value))})},x=({logo:l,nav:r=[],user:o,languages:d=[],language:u,onLanguageChange:x,languageLabel:j="Dil:",showClock:g=!0,locale:f="tr-TR",onLogin:b,onSignup:v,loginText:N="Giriş Yap",signupText:k="Kayıt Ol",onBonus:C,onDeposit:y,bonusText:z="Bonus Talep",depositText:T="Para Yatır",onNotifications:B,onSignOut:L,signOutText:q="Çıkış Yap",profileMenu:S=[],id:D,className:E})=>{const{masked:O,toggle:P}=t.useAmountMask(),F=a.useRef(null),[w,I]=a.useState(!1),[M,Y]=a.useState(!1),A=a.useRef([]),G=()=>{A.current.forEach(clearTimeout),A.current=[]};c.default(()=>{G(),Y(!1),I(!1)},F,{enabled:w}),a.useEffect(()=>G,[]);const K=e.jsx("span",{className:"itd-header-sep","aria-hidden":!0});return e.jsxs("header",{ref:F,id:D??"inn-header",className:"itd-header"+(E?" "+E:""),children:[e.jsxs("div",{id:"inn-header-top",className:"itd-header-top",children:[e.jsx("a",{id:"inn-header-logo",className:"inn-header-logo itd-header-logo",href:"#",onClick:e=>e.preventDefault(),children:l}),e.jsxs("div",{className:"itd-header-cluster",children:[o?e.jsxs(e.Fragment,{children:[C&&e.jsx(s.default,{size:"small",variant:"outline-accent",onClick:C,children:z}),y&&e.jsx(s.default,{size:"small",variant:"default",onClick:y,children:T})]}):e.jsxs(e.Fragment,{children:[e.jsx(s.default,{size:"small",variant:"outline-accent",onClick:b,children:N}),e.jsx(s.default,{size:"small",variant:"default",onClick:v,children:k})]}),d.length>0&&e.jsxs(e.Fragment,{children:[K,e.jsx("span",{id:"inn-language-select",className:"itd-header-lang",children:e.jsx(p,{languages:d,language:u,onLanguageChange:x,compact:!0})})]}),g&&e.jsxs(e.Fragment,{children:[K,e.jsx(h,{locale:f})]}),o&&e.jsxs(e.Fragment,{children:[K,e.jsxs("span",{id:"inn-balance",className:"itd-header-balance",children:[e.jsx(t.default,{value:o.balance}),e.jsx(s.default,{variant:"ghost",className:"itd-header-eye","aria-label":O?"Bakiyeleri göster":"Bakiyeleri gizle",onClick:P,children:O?e.jsx(i.EyeOff,{size:15}):e.jsx(i.Eye,{size:15})})]}),K,e.jsxs("button",{type:"button",className:"inn-mobile-notifications itd-header-bell","aria-label":"Bildirimler",onClick:B,children:[e.jsx(i.Bell,{size:16,fill:"currentColor"}),void 0!==o.notifications&&e.jsx("span",{className:"itd-header-bell-count",children:o.notifications})]}),e.jsxs("div",{id:"inn-profile-popover",className:"itd-header-profile",onMouseEnter:()=>{G(),w?Y(!0):(I(!0),A.current.push(window.setTimeout(()=>Y(!0),10)))},onMouseLeave:()=>{G(),Y(!1),A.current.push(window.setTimeout(()=>I(!1),250))},children:[e.jsx("div",{id:"inn-profile-photo",className:"itd-header-avatar","data-open":M,children:e.jsx(n.Avatar,{"aria-hidden":!0})}),e.jsx("span",{id:"inn-socket-status",className:"itd-header-dot","data-status":o.socketStatus??"connected",title:"Bağlı",children:e.jsx("span",{})}),e.jsxs("div",{className:"inn-profile-popover-body itd-header-pop",style:{opacity:M?1:0,transform:M?"translateY(0)":"translateY(-10px)",transition:"opacity 250ms ease, transform 250ms ease",visibility:w?"visible":"hidden",pointerEvents:w?"auto":"none"},children:[e.jsxs("div",{className:"inn-profile-popover-user itd-header-pop-user",children:[e.jsx("span",{className:"inn-profile-popover-user-photo itd-header-pop-photo",children:e.jsx(n.Avatar,{"aria-hidden":!0})}),e.jsxs("span",{className:"inn-profile-popover-user-info itd-header-pop-id",children:[e.jsx("span",{children:o.username}),o.country&&e.jsx("span",{children:o.country})]})]}),e.jsx("hr",{className:"itd-header-pop-sep"}),e.jsx("div",{className:"inn-profile-popover-menu inn-mobile-menu-items itd-header-pop-menu",children:S.map(a=>e.jsxs(s.default,{variant:"ghost",size:"default",className:"inn-mobile-menu-item justify-start",onClick:a.onClick,children:[a.icon,a.label]},a.label))}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("hr",{className:"itd-header-pop-sep"}),e.jsxs("div",{className:"inn-profile-popover-language itd-header-pop-lang",children:[e.jsx("span",{children:j}),e.jsx(p,{languages:d,language:u,onLanguageChange:x})]})]}),e.jsx("hr",{className:"itd-header-pop-sep"}),e.jsx("div",{className:"inn-profile-popover-sign-out itd-header-pop-out",children:e.jsxs(s.default,{variant:"ghost",size:"default",className:"justify-start",onClick:L,children:[e.jsx(i.LogOut,{size:16}),q]})})]})]})]})]})]}),r.length>0&&e.jsx("nav",{id:"inn-header-menu",className:"itd-header-menu",children:e.jsx("ul",{className:"itd-header-menu-list",children:r.map(a=>e.jsx("li",{className:"itd-header-menu-item",children:e.jsx(m,{item:a})},a.label))})})]})},j=({logo:a,user:l,onLogin:r,onSignup:o,loginText:d="Giriş Yap",signupText:c="Kayıt Ol",onDeposit:u,onNotifications:h,onProfile:m,id:p,className:x})=>{const{masked:j,toggle:g}=t.useAmountMask();return e.jsx("header",{id:p??"inn-mobile-header",className:"itd-mobile-header"+(x?" "+x:""),children:e.jsxs("div",{id:"inn-mobile-header-top",className:"itd-mobile-header-top",children:[e.jsx("a",{id:"inn-mobile-header-logo",className:"inn-mobile-header-logo itd-mobile-header-logo",href:"#",onClick:e=>e.preventDefault(),children:a}),e.jsx("div",{className:"itd-mobile-header-cluster",children:l?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"inn-mobile-balance itd-mobile-header-balance",children:[e.jsx("button",{type:"button",className:"itd-mobile-header-balance-amount","aria-label":j?"Bakiyeyi göster":"Bakiyeyi gizle",onClick:g,children:e.jsx(t.default,{value:l.balance})}),e.jsx(s.default,{size:"small",variant:"default","aria-label":"Para Yatır",onClick:u,children:e.jsx(i.Plus,{size:18})})]}),e.jsxs("button",{type:"button",className:"inn-mobile-notifications itd-mobile-header-bell","aria-label":"Bildirimler",onClick:h,children:[e.jsx(i.Bell,{size:16,fill:"currentColor"}),void 0!==l.notifications&&e.jsx("span",{className:"itd-mobile-header-bell-count",children:l.notifications})]}),e.jsxs("button",{type:"button",id:"inn-mobile-profile-photo",className:"itd-mobile-header-avatar","aria-label":"Profil",onClick:m,children:[e.jsx(n.Avatar,{"aria-hidden":!0}),e.jsx("span",{id:"inn-socket-status",className:"itd-mobile-header-dot","data-status":l.socketStatus??"connected",title:"Bağlı",children:e.jsx("span",{})})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(s.default,{variant:"custom",size:"medium",className:"itd-mobile-header-login",onClick:r,children:d}),e.jsx(s.default,{size:"medium",className:"itd-mobile-header-signup",onClick:o,children:c})]})})]})})};exports.default=a=>o.GetPlatform()===d.PlatformTypes.MOBILE?e.jsx(j,{...a}):e.jsx(x,{...a});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),i=require("lucide-react"),s=require("../../button/index.js"),n=require("../../avatar/index.js"),l=require("../../select/index.js"),t=require("../../amount/index.js"),r=require("../../context/ITDContext.js"),o=require("../../helpers/platform/index.js"),d=require("../../helpers/classname/GetClassNameByPlatform.js"),c=require("../../hooks/useOnESCKeyDown.js"),u=require("../../select/SelectItem.js");const h=({locale:i})=>{const[s,n]=a.useState("");return a.useEffect(()=>{const e=()=>n((new Date).toLocaleTimeString(i));e();const a=setInterval(e,1e3);return()=>clearInterval(a)},[i]),e.jsx("span",{id:"inn-ticker",className:"itd-header-ticker",children:s})},m=({item:a})=>e.jsxs("a",{href:a.href??"#",className:a.active?"active":void 0,onClick:e=>{a.href||e.preventDefault(),a.onClick?.()},children:[a.icon&&e.jsx("span",{className:"itd-header-nav-icon",children:a.icon}),e.jsx("span",{children:a.label})]}),p=({languages:a,language:i,onLanguageChange:s,compact:n})=>{const{theme:t}=r.useITD(),o=n&&"dark"===t?"filled":"default";return e.jsx(l.default,{variant:o,size:n?"small":"medium",defaultValue:i,onChange:e=>s?.(e),"aria-label":"Dil",children:a.map(a=>e.jsx(u.SelectItem,{value:a.value,image:a.image,selectedLabel:n?a.label:void 0,children:n?a.label:a.fullLabel??a.label},a.value))})},x=({logo:l,nav:r=[],user:o,languages:d=[],language:u,onLanguageChange:x,languageLabel:j="Dil:",showClock:g=!0,locale:f="tr-TR",onLogin:b,onSignup:v,loginText:N="Giriş Yap",signupText:k="Kayıt Ol",onBonus:C,onDeposit:y,bonusText:z="Bonus Talep",depositText:T="Para Yatır",onNotifications:B,onSignOut:L,signOutText:q="Çıkış Yap",profileMenu:S=[],id:D,className:E})=>{const{masked:O,toggle:P}=t.useAmountMask(),F=a.useRef(null),[w,I]=a.useState(!1),[M,Y]=a.useState(!1),A=a.useRef([]),G=()=>{A.current.forEach(clearTimeout),A.current=[]};c.default(()=>{G(),Y(!1),I(!1)},F,{enabled:w}),a.useEffect(()=>G,[]);const K=e.jsx("span",{className:"itd-header-sep header-separator","aria-hidden":!0});return e.jsxs("header",{ref:F,id:D??"inn-header",className:"itd-header"+(E?" "+E:""),children:[e.jsxs("div",{id:"inn-header-top",className:"itd-header-top",children:[e.jsx("a",{id:"inn-header-logo",className:"inn-header-logo itd-header-logo",href:"#",onClick:e=>e.preventDefault(),children:l}),e.jsxs("div",{className:"itd-header-cluster",children:[o?e.jsxs(e.Fragment,{children:[C&&e.jsx(s.default,{size:"small",variant:"outline-accent",onClick:C,children:z}),y&&e.jsx(s.default,{size:"small",variant:"default",onClick:y,children:T})]}):e.jsxs(e.Fragment,{children:[e.jsx(s.default,{size:"small",variant:"outline-accent",onClick:b,children:N}),e.jsx(s.default,{size:"small",variant:"default",onClick:v,children:k})]}),d.length>0&&e.jsxs(e.Fragment,{children:[K,e.jsx("span",{id:"inn-language-select",className:"itd-header-lang",children:e.jsx(p,{languages:d,language:u,onLanguageChange:x,compact:!0})})]}),g&&e.jsxs(e.Fragment,{children:[K,e.jsx(h,{locale:f})]}),o&&e.jsxs(e.Fragment,{children:[K,e.jsxs("span",{id:"inn-balance",className:"itd-header-balance",children:[e.jsx(t.default,{value:o.balance}),e.jsx(s.default,{variant:"ghost",className:"itd-header-eye","aria-label":O?"Bakiyeleri göster":"Bakiyeleri gizle",onClick:P,children:O?e.jsx(i.EyeOff,{size:15}):e.jsx(i.Eye,{size:15})})]}),K,e.jsxs("button",{type:"button",className:"inn-mobile-notifications itd-header-bell","aria-label":"Bildirimler",onClick:B,children:[e.jsx(i.Bell,{size:16,fill:"currentColor"}),void 0!==o.notifications&&e.jsx("span",{className:"itd-header-bell-count",children:o.notifications})]}),e.jsxs("div",{id:"inn-profile-popover",className:"itd-header-profile",onMouseEnter:()=>{G(),w?Y(!0):(I(!0),A.current.push(window.setTimeout(()=>Y(!0),10)))},onMouseLeave:()=>{G(),Y(!1),A.current.push(window.setTimeout(()=>I(!1),250))},children:[e.jsx("div",{id:"inn-profile-photo",className:"itd-header-avatar","data-open":M,children:e.jsx(n.Avatar,{"aria-hidden":!0})}),e.jsx("span",{id:"inn-socket-status",className:"itd-header-dot","data-status":o.socketStatus??"connected",title:"Bağlı",children:e.jsx("span",{})}),e.jsxs("div",{className:"inn-profile-popover-body itd-header-pop",style:{opacity:M?1:0,transform:M?"translateY(0)":"translateY(-10px)",transition:"opacity 250ms ease, transform 250ms ease",visibility:w?"visible":"hidden",pointerEvents:w?"auto":"none"},children:[e.jsxs("div",{className:"inn-profile-popover-user itd-header-pop-user",children:[e.jsx("span",{className:"inn-profile-popover-user-photo itd-header-pop-photo",children:e.jsx(n.Avatar,{"aria-hidden":!0})}),e.jsxs("span",{className:"inn-profile-popover-user-info itd-header-pop-id",children:[e.jsx("span",{children:o.username}),o.country&&e.jsx("span",{children:o.country})]})]}),e.jsx("hr",{className:"itd-header-pop-sep"}),e.jsx("div",{className:"inn-profile-popover-menu inn-mobile-menu-items itd-header-pop-menu",children:S.map(a=>e.jsxs(s.default,{variant:"ghost",size:"default",className:"inn-mobile-menu-item justify-start",onClick:a.onClick,children:[a.icon,a.label]},a.label))}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("hr",{className:"itd-header-pop-sep"}),e.jsxs("div",{className:"inn-profile-popover-language itd-header-pop-lang",children:[e.jsx("span",{children:j}),e.jsx(p,{languages:d,language:u,onLanguageChange:x})]})]}),e.jsx("hr",{className:"itd-header-pop-sep"}),e.jsx("div",{className:"inn-profile-popover-sign-out itd-header-pop-out",children:e.jsxs(s.default,{variant:"ghost",size:"default",className:"justify-start",onClick:L,children:[e.jsx(i.LogOut,{size:16}),q]})})]})]})]})]})]}),r.length>0&&e.jsx("nav",{id:"inn-header-menu",className:"itd-header-menu",children:e.jsx("ul",{className:"itd-header-menu-list header-menu-list",children:r.map(a=>e.jsx("li",{className:"itd-header-menu-item header-menu-item",children:e.jsx(m,{item:a})},a.label))})})]})},j=({logo:a,user:l,onLogin:r,onSignup:o,loginText:d="Giriş Yap",signupText:c="Kayıt Ol",onDeposit:u,onNotifications:h,onProfile:m,id:p,className:x})=>{const{masked:j,toggle:g}=t.useAmountMask();return e.jsx("header",{id:p??"inn-mobile-header",className:"itd-mobile-header"+(x?" "+x:""),children:e.jsxs("div",{id:"inn-mobile-header-top",className:"itd-mobile-header-top",children:[e.jsx("a",{id:"inn-mobile-header-logo",className:"inn-mobile-header-logo itd-mobile-header-logo",href:"#",onClick:e=>e.preventDefault(),children:a}),e.jsx("div",{className:"itd-mobile-header-cluster",children:l?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"inn-mobile-balance itd-mobile-header-balance",children:[e.jsx("button",{type:"button",className:"itd-mobile-header-balance-amount","aria-label":j?"Bakiyeyi göster":"Bakiyeyi gizle",onClick:g,children:e.jsx(t.default,{value:l.balance})}),e.jsx(s.default,{size:"small",variant:"default","aria-label":"Para Yatır",onClick:u,children:e.jsx(i.Plus,{size:18})})]}),e.jsxs("button",{type:"button",className:"inn-mobile-notifications itd-mobile-header-bell","aria-label":"Bildirimler",onClick:h,children:[e.jsx(i.Bell,{size:16,fill:"currentColor"}),void 0!==l.notifications&&e.jsx("span",{className:"itd-mobile-header-bell-count",children:l.notifications})]}),e.jsxs("button",{type:"button",id:"inn-mobile-profile-photo",className:"itd-mobile-header-avatar","aria-label":"Profil",onClick:m,children:[e.jsx(n.Avatar,{"aria-hidden":!0}),e.jsx("span",{id:"inn-socket-status",className:"itd-mobile-header-dot","data-status":l.socketStatus??"connected",title:"Bağlı",children:e.jsx("span",{})})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(s.default,{variant:"custom",size:"medium",className:"itd-mobile-header-login",onClick:r,children:d}),e.jsx(s.default,{size:"medium",className:"itd-mobile-header-signup",onClick:o,children:c})]})})]})})};exports.default=a=>o.GetPlatform()===d.PlatformTypes.MOBILE?e.jsx(j,{...a}):e.jsx(x,{...a});
@@ -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"),a=require("react"),n=require("lucide-react"),i=require("../../select/index.js"),m=require("../../select/SelectItem.js");const l=({icon:a})=>a?e.jsx("span",{className:"itd-mega-menu-icon inn-mega-menu-icon",children:a}):null,t=({link:a,className:n,trailing:i})=>{const m=e.jsxs(e.Fragment,{children:[e.jsx(l,{icon:a.icon}),e.jsx("span",{className:"itd-mega-menu-label inn-mega-menu-label",children:a.label}),null!=a.badge&&e.jsx("span",{className:"itd-mega-menu-badge inn-mega-menu-badge",children:a.badge}),i]}),t={className:(n+(a.active?" is-active":"")).trim(),"data-active":a.active?"true":void 0};return a.href?e.jsx("a",{...t,href:a.href,onClick:a.onClick,children:m}):e.jsx("button",{type:"button",...t,onClick:a.onClick,children:m})},s=({entries:l=[],className:s=""})=>{const[c,d]=a.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(a=>{if("accordion"===a.kind){const i=c.has(a.id);return e.jsxs("div",{className:"itd-mega-menu-item itd-mega-menu-item--accordion inn-mega-menu-item","data-open":i?"true":"false",children:[e.jsxs("div",{className:"itd-mega-menu-head inn-mega-menu-item-head",children:[e.jsx(t,{link:{label:a.label,icon:a.icon,href:a.href,onClick:a.onClick,active:a.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":i,"aria-label":i?"Kapat":"Aç",onClick:()=>{return e=a.id,d(a=>{const n=new Set(a);return n.has(e)?n.delete(e):n.add(e),n});var e},children:e.jsx("span",{className:"itd-mega-menu-toggle-icon","aria-hidden":!0,children:e.jsx(n.ChevronDown,{})})})]}),e.jsx("div",{className:"itd-mega-menu-collapse inn-mega-menu-sub",children:e.jsx("div",{className:"itd-mega-menu-collapse-inner",children:a.items.map(a=>e.jsx(t,{link:a,className:"itd-mega-menu-subitem inn-mega-menu-sub-item"},a.id))})})]},a.id)}return"group"===a.kind?e.jsx("div",{className:"itd-mega-menu-item itd-mega-menu-item--group inn-mega-menu-item inn-mega-menu-group",children:a.items.map(a=>e.jsx(t,{link:a,className:"itd-mega-menu-groupitem inn-mega-menu-group-item"},a.id))},a.id):"select"===a.kind?e.jsx("div",{className:"itd-mega-menu-item itd-mega-menu-item--select inn-mega-menu-item",children:e.jsx(i.default,{size:"large",className:"itd-mega-menu-select"+(a.arrowWell?" itd-mega-menu-select--well":""),defaultValue:a.defaultValue,onChange:e=>a.onChange?.(e),"aria-label":a.ariaLabel,children:a.options.map(a=>e.jsx(m.SelectItem,{value:a.value,image:a.image,children:a.label},a.value))})},a.id):e.jsx("div",{className:"itd-mega-menu-item itd-mega-menu-item--link inn-mega-menu-item",children:e.jsx(t,{link:{label:a.label,icon:a.icon,href:a.href,onClick:a.onClick,active:a.active,badge:a.badge},className:"itd-mega-menu-link inn-mega-menu-link",trailing:e.jsx("span",{className:"itd-mega-menu-chevron inn-mega-menu-chevron","aria-hidden":!0,children:e.jsx(n.ChevronRight,{})})})},a.id)})})};exports.MegaMenu=s,exports.default=s;
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;
@@ -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"),a=require("../embla/useEmblaState.js");exports.default=({id:r,slides:t,autoplay:n=4e3,loop:o=!0,dots:c=!0,slideSize:u,slideSpacing:m,dotLabel:p=e=>"Slide "+(e+1),hideBackground:b=!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}=a.default(N),y=d.GetClassNameByPlatform,f={...u?{"--itd-slider-slide-size":u}:null,...m?{"--itd-slider-spacing":m}:null};return e.jsx("section",{id:r??y("inn-slider-component"),className:"itd-slider-block"+(j?" "+j:""),style:f,"data-background":String(!b),"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(!b),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":p(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
+ "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"),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";var o,e,t,s,i,n,p,r,a,l,m,x;exports.ModalState=void 0,(o=exports.ModalState||(exports.ModalState={})).NOT_SHOW="modal-not-show",o.BEGIN="modal-begin",o.ENTERING="modal-entering",o.ENTERED="modal-entered",o.EXITING="modal-exiting",o.EXITED="modal-exited",o.REMOVED="modal-removed",o.OK_CLICK="modal-ok-button-click",o.CANCEL_CLICK="modal-cancel-button-click",o.CLOSE_CLICK="modal-close-button-click",o.OUTSIDE_CLICK="modal-outside-click",o.ESC_CLICK="modal-esc-click",o.ALL_REMOVED="modal-all-removed",exports.FileTypes=void 0,(e=exports.FileTypes||(exports.FileTypes={})).SVG="image/svg+xml",e.PNG="image/png",e.JPG="image/jpeg",e.JPEG="image/jpeg",e.GIF="image/gif",e.WEBP="image/webp",e.PDF="application/pdf",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.OTF="font/otf",exports.FileExtensions=void 0,(t=exports.FileExtensions||(exports.FileExtensions={})).SVG=".svg",t.PNG=".png",t.JPG=".jpg",t.GIF=".gif",t.WEBP=".webp",t.PDF=".pdf",t.XLSX=".xlsx",t.OTF=".otf",exports.FormValidations=void 0,(s=exports.FormValidations||(exports.FormValidations={})).REQUIRED="required",s.TYPE="type",exports.FormValidationTypes=void 0,(i=exports.FormValidationTypes||(exports.FormValidationTypes={})).MIN_LENGTH="minLength",i.MAX_LENGTH="maxLength",i.EXACT_LENGTH="exactLength",i.SAME="same",i.NOT_SAME="notSame",i.TC_IDENTITY="TCIdentity",i.PASSWORD="password",i.EMAIL="email",i.USERNAME="username",i.SITE_USERNAME="siteUsername",i.ADMIN_USERNAME="adminUsername",i.URL="url",i.FORBIDDEN_WORDS="forbiddenWords",exports.ConnectionStatus=void 0,(n=exports.ConnectionStatus||(exports.ConnectionStatus={})).ONLINE="online",n.OFFLINE="offline",exports.ComponentSizes=void 0,(p=exports.ComponentSizes||(exports.ComponentSizes={})).X_SMALL="x-small",p.SMALL="small",p.MEDIUM="medium",p.DEFAULT="default",p.LARGE="large",p.X_LARGE="x-large",exports.ComponentSizesSlug=void 0,(r=exports.ComponentSizesSlug||(exports.ComponentSizesSlug={})).X_SMALL="xs",r.SMALL="sm",r.MEDIUM="md",r.DEFAULT="df",r.LARGE="lg",r.X_LARGE="xlg",exports.ButtonSizes=void 0,(a=exports.ButtonSizes||(exports.ButtonSizes={})).X_SMALL="x-small",a.SMALL="small",a.MEDIUM="medium",a.DEFAULT="default",a.LARGE="large",a.X_LARGE="x-large",a.ICON="icon",a.ICON_SM="icon-sm",a.ICON_LG="icon-lg",exports.ButtonSizesSlug=void 0,(l=exports.ButtonSizesSlug||(exports.ButtonSizesSlug={})).X_SMALL="xs",l.SMALL="sm",l.MEDIUM="md",l.DEFAULT="df",l.LARGE="lg",l.X_LARGE="xlg",l.ICON="icon",l.ICON_SM="icon-sm",l.ICON_LG="icon-lg",exports.ComponentXPositions=void 0,(m=exports.ComponentXPositions||(exports.ComponentXPositions={})).LEFT="left",m.RIGHT="right",m.INLINE_START="inline-start",m.INLINE_END="inline-end",exports.ComponentYPositions=void 0,(x=exports.ComponentYPositions||(exports.ComponentYPositions={})).TOP="top",x.BOTTOM="bottom";const E=exports.ComponentXPositions;var d,T,L,S,g;exports.ComponentVariants=void 0,(d=exports.ComponentVariants||(exports.ComponentVariants={})).DEFAULT="default",d.FILLED="filled",d.CUSTOM="custom",exports.ButtonTypes=void 0,(T=exports.ButtonTypes||(exports.ButtonTypes={})).BUTTON="button",T.SUBMIT="submit",T.RESET="reset",exports.TooltipPositions=void 0,(L=exports.TooltipPositions||(exports.TooltipPositions={})).TOP_LEFT="top-left",L.TOP_RIGHT="top-right",L.BOTTOM_LEFT="bottom-left",L.BOTTOM_RIGHT="bottom-right",exports.TriggerTypes=void 0,(S=exports.TriggerTypes||(exports.TriggerTypes={})).HOVER="hover",S.CLICK="click",S.FOCUS="focus",S.MANUAL="manual",exports.ThemeAppearances=void 0,(g=exports.ThemeAppearances||(exports.ThemeAppearances={})).LIGHT="light",g.DARK="dark",exports.ComponentPositions=E;
1
+ "use strict";var o,e,t,s,i,n,p,r,l,a,m,x;exports.ModalState=void 0,(o=exports.ModalState||(exports.ModalState={})).NOT_SHOW="modal-not-show",o.BEGIN="modal-begin",o.ENTERING="modal-entering",o.ENTERED="modal-entered",o.EXITING="modal-exiting",o.EXITED="modal-exited",o.REMOVED="modal-removed",o.OK_CLICK="modal-ok-button-click",o.CANCEL_CLICK="modal-cancel-button-click",o.CLOSE_CLICK="modal-close-button-click",o.OUTSIDE_CLICK="modal-outside-click",o.ESC_CLICK="modal-esc-click",o.ALL_REMOVED="modal-all-removed",exports.FileTypes=void 0,(e=exports.FileTypes||(exports.FileTypes={})).SVG="image/svg+xml",e.PNG="image/png",e.JPG="image/jpeg",e.JPEG="image/jpeg",e.GIF="image/gif",e.WEBP="image/webp",e.PDF="application/pdf",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.OTF="font/otf",exports.FileExtensions=void 0,(t=exports.FileExtensions||(exports.FileExtensions={})).SVG=".svg",t.PNG=".png",t.JPG=".jpg",t.GIF=".gif",t.WEBP=".webp",t.PDF=".pdf",t.XLSX=".xlsx",t.OTF=".otf",exports.FormValidations=void 0,(s=exports.FormValidations||(exports.FormValidations={})).REQUIRED="required",s.TYPE="type",exports.FormValidationTypes=void 0,(i=exports.FormValidationTypes||(exports.FormValidationTypes={})).MIN_LENGTH="minLength",i.MAX_LENGTH="maxLength",i.EXACT_LENGTH="exactLength",i.SAME="same",i.NOT_SAME="notSame",i.TC_IDENTITY="TCIdentity",i.PASSWORD="password",i.EMAIL="email",i.USERNAME="username",i.SITE_USERNAME="siteUsername",i.ADMIN_USERNAME="adminUsername",i.URL="url",i.FORBIDDEN_WORDS="forbiddenWords",i.MULTIPLE_OF="multipleOf",exports.ConnectionStatus=void 0,(n=exports.ConnectionStatus||(exports.ConnectionStatus={})).ONLINE="online",n.OFFLINE="offline",exports.ComponentSizes=void 0,(p=exports.ComponentSizes||(exports.ComponentSizes={})).X_SMALL="x-small",p.SMALL="small",p.MEDIUM="medium",p.DEFAULT="default",p.LARGE="large",p.X_LARGE="x-large",exports.ComponentSizesSlug=void 0,(r=exports.ComponentSizesSlug||(exports.ComponentSizesSlug={})).X_SMALL="xs",r.SMALL="sm",r.MEDIUM="md",r.DEFAULT="df",r.LARGE="lg",r.X_LARGE="xlg",exports.ButtonSizes=void 0,(l=exports.ButtonSizes||(exports.ButtonSizes={})).X_SMALL="x-small",l.SMALL="small",l.MEDIUM="medium",l.DEFAULT="default",l.LARGE="large",l.X_LARGE="x-large",l.ICON="icon",l.ICON_SM="icon-sm",l.ICON_LG="icon-lg",exports.ButtonSizesSlug=void 0,(a=exports.ButtonSizesSlug||(exports.ButtonSizesSlug={})).X_SMALL="xs",a.SMALL="sm",a.MEDIUM="md",a.DEFAULT="df",a.LARGE="lg",a.X_LARGE="xlg",a.ICON="icon",a.ICON_SM="icon-sm",a.ICON_LG="icon-lg",exports.ComponentXPositions=void 0,(m=exports.ComponentXPositions||(exports.ComponentXPositions={})).LEFT="left",m.RIGHT="right",m.INLINE_START="inline-start",m.INLINE_END="inline-end",exports.ComponentYPositions=void 0,(x=exports.ComponentYPositions||(exports.ComponentYPositions={})).TOP="top",x.BOTTOM="bottom";const E=exports.ComponentXPositions;var T,d,L,S,g;exports.ComponentVariants=void 0,(T=exports.ComponentVariants||(exports.ComponentVariants={})).DEFAULT="default",T.FILLED="filled",T.CUSTOM="custom",exports.ButtonTypes=void 0,(d=exports.ButtonTypes||(exports.ButtonTypes={})).BUTTON="button",d.SUBMIT="submit",d.RESET="reset",exports.TooltipPositions=void 0,(L=exports.TooltipPositions||(exports.TooltipPositions={})).TOP_LEFT="top-left",L.TOP_RIGHT="top-right",L.BOTTOM_LEFT="bottom-left",L.BOTTOM_RIGHT="bottom-right",exports.TriggerTypes=void 0,(S=exports.TriggerTypes||(exports.TriggerTypes={})).HOVER="hover",S.CLICK="click",S.FOCUS="focus",S.MANUAL="manual",exports.ThemeAppearances=void 0,(g=exports.ThemeAppearances||(exports.ThemeAppearances={})).LIGHT="light",g.DARK="dark",exports.ComponentPositions=E;
@@ -1 +1 @@
1
- "use strict";var e=require("../../enums/enum.js"),s=require("./TCIdentity.js");const r=new RegExp(/^[a-zA-Z0-9.!#$%&'+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/),t=new RegExp(/^[a-zA-Z0-9_.-]+$/),a=new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+={};:<>|./?,"'\[\]\\`~\-])[a-zA-Z\d\[\]\\`~!@#$%^&*()_+={};:<>|.\/?,"'-]{8,60}$/),i=new RegExp(/^[a-z0-9._-]+$/),n=new RegExp(/^[a-zA-Z0-9]+$/),o=new RegExp(/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/);const g=e=>a.test(e),m=e=>r.test(e),l=e=>t.test(e),u=(e,s)=>e.length>=s,p=(e,s)=>e.length<=s,d=(e,s)=>e===s,y=(e,s)=>e!==s,h=(e,s)=>e.length===s,f=e=>i.test(e),S=e=>n.test(e),E=e=>o.test(e),A=(e,s)=>{if(!Array.isArray(s)||0===s.length)return!0;const r=String(e).trim().toLowerCase();return!s.some(e=>r===String(e).trim().toLowerCase())},T=e=>s.default(e),R=e=>{if(null==e)return!1;if(Array.isArray(e)){if(0===e.length)return!1}else{if("object"==typeof e){let s=!0;return Object.keys(e).forEach(r=>{""===e[r]&&(s=!1)}),s}if("string"==typeof e){if(""===e)return!1}else if("boolean"==typeof e&&!1===e)return!1}return!0};exports.CheckValidations=function(s,r,t,a){let i=[];return s.forEach(s=>{if(s.hasOwnProperty(e.FormValidations.REQUIRED)&&!R(r)&&s.required&&i.push(s.message?s.message:a("errors.required")),s.hasOwnProperty(e.FormValidations.TYPE)&&(s.type===e.FormValidationTypes.MIN_LENGTH&&(u(String(r),Number(s.value))||i.push(s.message?s.message:a("errors.minLength",{length:Number(s.value)}))),s.type===e.FormValidationTypes.MAX_LENGTH&&(p(String(r),Number(s.value))||i.push(s.message?s.message:a("errors.maxLength",{length:Number(s.value)}))),s.type===e.FormValidationTypes.EXACT_LENGTH&&(h(String(r),Number(s.value))||i.push(s.message?s.message:a("errors.exactLength",{length:Number(s.value)}))),s.type===e.FormValidationTypes.SAME&&(d(String(r),String(t(String(s.field))))||i.push(s.message?s.message:a("errors.fieldMustBeTheSame",{fields:s.field}))),s.type===e.FormValidationTypes.NOT_SAME&&(y(String(r),String(t(String(s.field))))||i.push(s.message?s.message:a("errors.fieldMustBeDifferent",{fields:s.field}))),s.type===e.FormValidationTypes.TC_IDENTITY&&(T(String(r))||i.push(s.message?s.message:a("errors.wrongTCIdentity"))),s.type===e.FormValidationTypes.PASSWORD&&(g(String(r))||i.push(s.message?s.message:a("errors.passwordRule"))),s.type===e.FormValidationTypes.EMAIL&&(m(String(r))||i.push(s.message?s.message:a("errors.invalidEmailAddress"))),s.type===e.FormValidationTypes.USERNAME&&(l(String(r))||i.push(s.message?s.message:a("errors.usernameRule"))),s.type===e.FormValidationTypes.SITE_USERNAME&&(f(String(r))||i.push(s.message?s.message:a("errors.siteUsernameRule"))),s.type===e.FormValidationTypes.ADMIN_USERNAME&&(S(String(r))||i.push(s.message?s.message:a("errors.adminUsernameRule"))),s.type===e.FormValidationTypes.URL&&(E(String(r))||i.push(s.message?s.message:a("errors.invalidURL"))),s.type===e.FormValidationTypes.FORBIDDEN_WORDS)){const e=Array.isArray(s.value)?s.value:void 0!==s.value?[s.value]:[];A(String(r),e)||i.push(s.message?s.message:a("errors.forbiddenWords"))}if("function"==typeof s.validator){const e=s.validator(r,t);!0!==e&&i.push("string"==typeof e&&e?e:s.message?s.message:a("errors.invalid"))}}),i};
1
+ "use strict";var e=require("../../enums/enum.js"),r=require("./TCIdentity.js");const s=new RegExp(/^[a-zA-Z0-9.!#$%&'+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/),t=new RegExp(/^[a-zA-Z0-9_.-]+$/),a=new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+={};:<>|./?,"'\[\]\\`~\-])[a-zA-Z\d\[\]\\`~!@#$%^&*()_+={};:<>|.\/?,"'-]{8,60}$/),i=new RegExp(/^[a-z0-9._-]+$/),n=new RegExp(/^[a-zA-Z0-9]+$/),o=new RegExp(/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/);const g=e=>a.test(e),m=e=>s.test(e),u=e=>t.test(e),l=(e,r)=>e.length>=r,p=(e,r)=>e.length<=r,y=(e,r)=>e===r,d=(e,r)=>e!==r,f=(e,r)=>e.length===r,h=(e,r)=>!(!r||isNaN(e)||e<=0)&&e%r===0,S=e=>i.test(e),E=e=>n.test(e),T=e=>o.test(e),A=(e,r)=>{if(!Array.isArray(r)||0===r.length)return!0;const s=String(e).trim().toLowerCase();return!r.some(e=>s===String(e).trim().toLowerCase())},v=e=>r.default(e),N=e=>{if(null==e)return!1;if(Array.isArray(e)){if(0===e.length)return!1}else{if("object"==typeof e){let r=!0;return Object.keys(e).forEach(s=>{""===e[s]&&(r=!1)}),r}if("string"==typeof e){if(""===e)return!1}else if("boolean"==typeof e&&!1===e)return!1}return!0};exports.CheckValidations=function(r,s,t,a){let i=[];return r.forEach(r=>{if(r.hasOwnProperty(e.FormValidations.REQUIRED)&&!N(s)&&r.required&&i.push(r.message?r.message:a("errors.required")),r.hasOwnProperty(e.FormValidations.TYPE)){if(r.type===e.FormValidationTypes.MIN_LENGTH&&(l(String(s),Number(r.value))||i.push(r.message?r.message:a("errors.minLength",{length:Number(r.value)}))),r.type===e.FormValidationTypes.MAX_LENGTH&&(p(String(s),Number(r.value))||i.push(r.message?r.message:a("errors.maxLength",{length:Number(r.value)}))),r.type===e.FormValidationTypes.EXACT_LENGTH&&(f(String(s),Number(r.value))||i.push(r.message?r.message:a("errors.exactLength",{length:Number(r.value)}))),r.type===e.FormValidationTypes.SAME&&(y(String(s),String(t(String(r.field))))||i.push(r.message?r.message:a("errors.fieldMustBeTheSame",{fields:r.field}))),r.type===e.FormValidationTypes.NOT_SAME&&(d(String(s),String(t(String(r.field))))||i.push(r.message?r.message:a("errors.fieldMustBeDifferent",{fields:r.field}))),r.type===e.FormValidationTypes.TC_IDENTITY&&(v(String(s))||i.push(r.message?r.message:a("errors.wrongTCIdentity"))),r.type===e.FormValidationTypes.PASSWORD&&(g(String(s))||i.push(r.message?r.message:a("errors.passwordRule"))),r.type===e.FormValidationTypes.EMAIL&&(m(String(s))||i.push(r.message?r.message:a("errors.invalidEmailAddress"))),r.type===e.FormValidationTypes.USERNAME&&(u(String(s))||i.push(r.message?r.message:a("errors.usernameRule"))),r.type===e.FormValidationTypes.SITE_USERNAME&&(S(String(s))||i.push(r.message?r.message:a("errors.siteUsernameRule"))),r.type===e.FormValidationTypes.ADMIN_USERNAME&&(E(String(s))||i.push(r.message?r.message:a("errors.adminUsernameRule"))),r.type===e.FormValidationTypes.URL&&(T(String(s))||i.push(r.message?r.message:a("errors.invalidURL"))),r.type===e.FormValidationTypes.FORBIDDEN_WORDS){const e=Array.isArray(r.value)?r.value:void 0!==r.value?[r.value]:[];A(String(s),e)||i.push(r.message?r.message:a("errors.forbiddenWords"))}if(r.type===e.FormValidationTypes.MULTIPLE_OF&&!h(Number(s),Number(r.value))){const e=r.currency?`${r.currency}${r.value}`:String(r.value);i.push(r.message?r.message:a("errors.multipleOf",{value:e}))}}if("function"==typeof r.validator){const e=r.validator(s,t);!0!==e&&i.push("string"==typeof e&&e?e:r.message?r.message:a("errors.invalid"))}}),i};