@consenti/api 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +578 -143
  2. package/dist/chunk-COR72NFQ.js +2 -0
  3. package/dist/chunk-COR72NFQ.js.map +1 -0
  4. package/dist/chunk-S2IEYESR.js +2 -0
  5. package/dist/chunk-S2IEYESR.js.map +1 -0
  6. package/dist/dashboard/assets/ApiConfig-CZMtYRfK.js +1 -0
  7. package/dist/dashboard/assets/ArchivedProfileList-BlQ2gEWz.js +1 -0
  8. package/dist/dashboard/assets/AuditLog-BpZoAFOe.js +1 -0
  9. package/dist/dashboard/assets/ChangePassword-BZkP2dXQ.js +1 -0
  10. package/dist/dashboard/assets/ConfirmDialog-BDlnfTdx.js +1 -0
  11. package/dist/dashboard/assets/ConsentList-DgJMrhih.js +1 -0
  12. package/dist/dashboard/assets/ConsentTemplateEditor-DA7B5aI_.js +1 -0
  13. package/dist/dashboard/assets/ConsentTemplateList-DMPd2y5s.js +1 -0
  14. package/dist/dashboard/assets/HeadingTagInput-D2S9xDMJ.js +1 -0
  15. package/dist/dashboard/assets/HowItWorks-CJCrdr3o.js +1 -0
  16. package/dist/dashboard/assets/PermissionGate-C69dhwV1.js +1 -0
  17. package/dist/dashboard/assets/PreviewPane-D7mDeBT8.js +38 -0
  18. package/dist/dashboard/assets/ProfileEditor-CSFdOweN.js +2 -0
  19. package/dist/dashboard/assets/ProfileList-C4cIDrM6.js +1 -0
  20. package/dist/dashboard/assets/ProfileVersionHistory-CX5-Oupy.js +3 -0
  21. package/dist/dashboard/assets/RecordDetailModal-DIpGxfqA.js +1 -0
  22. package/dist/dashboard/assets/Reports-B1Ww0ovT.js +1 -0
  23. package/dist/dashboard/assets/RoleList-CQ1GjR0W.js +1 -0
  24. package/dist/dashboard/assets/Select-C_JusbT5.js +1 -0
  25. package/dist/dashboard/assets/Settings-sIMVWQ0V.js +1 -0
  26. package/dist/dashboard/assets/SetupWizard-ChFBxqo3.js +1 -0
  27. package/dist/dashboard/assets/Table-BUxoz0YR.js +1 -0
  28. package/dist/dashboard/assets/TenantList-DCsT7ghb.js +1 -0
  29. package/dist/dashboard/assets/UITemplateEditor-BAaMnuOU.js +2 -0
  30. package/dist/dashboard/assets/UITemplateList-C3UMbnfs.js +1 -0
  31. package/dist/dashboard/assets/UserList-CHGNnS50.js +1 -0
  32. package/dist/dashboard/assets/VendorList-C-sswM1A.js +1 -0
  33. package/dist/dashboard/assets/VisitorList-DNB9Ia72.js +1 -0
  34. package/dist/dashboard/assets/check-D0g4XvmN.js +1 -0
  35. package/dist/dashboard/assets/client-CYntrO2g.js +1 -0
  36. package/dist/dashboard/assets/copy-DEi_W2TM.js +1 -0
  37. package/dist/dashboard/assets/createLucideIcon-DAiYBrnd.js +1 -0
  38. package/dist/dashboard/assets/de-jwngydrC.js +25 -0
  39. package/dist/dashboard/assets/debounce-DlvAAT2V.js +1 -0
  40. package/dist/dashboard/assets/dist-GoiMJCTt.js +1 -0
  41. package/dist/dashboard/assets/es-B6Jp0OPe.js +25 -0
  42. package/dist/dashboard/assets/external-link-CFZxxe3W.js +1 -0
  43. package/dist/dashboard/assets/fr-CshYcQPW.js +25 -0
  44. package/dist/dashboard/assets/index-Cr5M1Qy_.css +2 -0
  45. package/dist/dashboard/assets/index-Tr_BcjkN.js +26 -0
  46. package/dist/dashboard/assets/ja-CgjZNBrc.js +25 -0
  47. package/dist/dashboard/assets/profiles-C_SuoLJD.js +1 -0
  48. package/dist/dashboard/assets/roles-D7L936FV.js +1 -0
  49. package/dist/dashboard/assets/rotate-ccw-clock-6y2NDrJ7.js +1 -0
  50. package/dist/dashboard/assets/search-DKwfLBOv.js +1 -0
  51. package/dist/dashboard/assets/templates-CIyMjskA.js +1 -0
  52. package/dist/dashboard/assets/templates-DY68xNys.js +1 -0
  53. package/dist/dashboard/assets/trash-2-eX9s6x8V.js +1 -0
  54. package/dist/dashboard/assets/trash-O30ycMcz.js +1 -0
  55. package/dist/dashboard/assets/useHashQuery-BDjUPXDR.js +1 -0
  56. package/dist/dashboard/assets/users-BRrNOK0W.js +1 -0
  57. package/dist/dashboard/assets/x-BhZiH8AL.js +1 -0
  58. package/dist/dashboard/assets/zh-CN-BnLZkfBC.js +25 -0
  59. package/dist/dashboard/index.html +4 -2
  60. package/dist/dist-QJYW5KUK.js +2 -0
  61. package/dist/dist-QJYW5KUK.js.map +1 -0
  62. package/dist/index.cjs +90 -101
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.d.cts +847 -150
  65. package/dist/index.d.ts +847 -150
  66. package/dist/index.js +90 -101
  67. package/dist/index.js.map +1 -1
  68. package/dist/profiles-FCX454HS.js +2 -0
  69. package/dist/profiles-FCX454HS.js.map +1 -0
  70. package/dist/widget/widget.css +1 -1
  71. package/dist/widget/widget.js +1 -1
  72. package/package.json +32 -17
  73. package/dist/dashboard/assets/de-DwE2aQfW.js +0 -5
  74. package/dist/dashboard/assets/es-Dq88TWkB.js +0 -5
  75. package/dist/dashboard/assets/fr-o_Pyg8eR.js +0 -5
  76. package/dist/dashboard/assets/index-BSsYDdb9.js +0 -40
  77. package/dist/dashboard/assets/index-bOTGevzl.css +0 -2
  78. package/dist/dashboard/assets/ja-CwgXYmpD.js +0 -5
  79. package/dist/dashboard/assets/zh-CN-ety9KoQ0.js +0 -5
@@ -0,0 +1,2 @@
1
+ import{a as e,c as t,l as n,n as r,o as i,p as a,t as o}from"./createLucideIcon-DAiYBrnd.js";import{t as s}from"./client-CYntrO2g.js";import{t as c}from"./check-D0g4XvmN.js";import{t as l}from"./copy-DEi_W2TM.js";import{t as u}from"./PreviewPane-D7mDeBT8.js";import{t as d}from"./ConfirmDialog-BDlnfTdx.js";import{t as f}from"./x-BhZiH8AL.js";import{h as p,m,o as ee,s as h}from"./index-Tr_BcjkN.js";import{t as g}from"./profiles-C_SuoLJD.js";import{i as te,o as _,s as v,t as y}from"./dist-GoiMJCTt.js";import{n as ne,t as re}from"./templates-DY68xNys.js";import{f as ie,n as b,s as x,t as S}from"./templates-CIyMjskA.js";import{t as ae}from"./Select-C_JusbT5.js";var oe=o(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),se=o(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),ce=o(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),le=o(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ue=o(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),C=o(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),de=o(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),w=o(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),fe=o(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),pe=o(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),me=o(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]);function T(e){return e.map(E).join(``)}function E(e){return e.t===`text`?he(e.v):e.t===`br`?`<br>`:e.t===`a`?`<a href="${ge(e.href)}">${e.c.map(E).join(``)}</a>`:`<${e.t}>${e.c.map(E).join(``)}</${e.t}>`}function he(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function ge(e){return e.replace(/"/g,`&quot;`).replace(/</g,`&lt;`)}function D(e){if(!e)return``;let t=e.trim();if(t.startsWith(`[`))try{return T(JSON.parse(t))}catch{}return e}function _e(e){return e.t===`text`?e.v.trim().length>0:e.t!==`br`&&e.c.some(_e)}function ve(e){return e.replace(/<[^>]*>/g,``).trim().length>0}function O(e){if(!e)return!1;let t=e.trim();if(!t)return!1;if(t.startsWith(`[`))try{return JSON.parse(t).some(_e)}catch{}return ve(t)}var ye={complianceGroup:`opt-in`,gpcMode:`ignore`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1},functionality_storage:{purpose:`functional`,listenGpc:!1},personalization_storage:{purpose:`preferences`,listenGpc:!1},analytics_storage:{purpose:`analytics`,listenGpc:!0},ad_storage:{purpose:`marketing`,listenGpc:!0,cpraCategory:`sharing`}},translations:{en:{mainBanner:{position:`bottom`,heading:`We value your privacy`,htmlText:`We use cookies and similar technologies to enhance your browsing experience, analyse site traffic, and show you personalised content. Non-essential cookies require your consent under the GDPR and ePrivacy Directive.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"reject-optional":{text:`Reject Optional`,style:`primary`,action:`custom`,cookies:`!`},"manage-preferences":{text:`Manage Preferences`,style:`text`,action:`manage`}}},gpcBanner:{position:`bottom`,heading:`Global Privacy Control detected`,htmlText:`Your browser is sending a Global Privacy Control signal. We have applied your preference and will not set non-essential cookies unless you change your settings below.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"confirm-settings":{text:`Confirm Settings`,style:`primary`,action:`custom`,cookies:`!`},"manage-preferences":{text:`Manage Preferences`,style:`text`,action:`manage`}}},preferenceModal:{position:`right`,heading:`Privacy Preferences`,subheading:`Manage your consent settings for each category below.`,htmlText:`You can choose which cookie categories you allow. Your choices apply to this site only. Essential cookies cannot be disabled as they are required for the site to function correctly.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"reject-optional":{text:`Reject Optional`,style:`primary`,action:`custom`,cookies:`!`},"save-preferences":{text:`Save My Preferences`,style:`primary`,action:`submit`}},categories:{necessary:{heading:`Strictly Necessary`,htmlText:`These cookies are required for the website to function and cannot be disabled. They are usually set in response to actions you take, such as setting your privacy preferences, logging in, or filling in forms.`,legalBasis:`mandatory`,cookies:[`security_storage`]},functional:{heading:`Functional`,htmlText:`These cookies enable enhanced functionality and personalisation. They may be set by us or by third-party providers whose services we have added to our pages. If you do not allow these cookies, some or all of these features may not function properly.`,legalBasis:`consent`,cookies:[`functionality_storage`,`personalization_storage`]},analytics:{heading:`Analytics`,htmlText:`These cookies allow us to count visits and traffic sources so we can measure and improve site performance. They help us understand which pages are most and least popular. All information collected is aggregated and therefore anonymous.`,legalBasis:`consent`,cookies:[`analytics_storage`]},marketing:{heading:`Marketing`,htmlText:`These cookies may be set through our site by advertising partners to build a profile of your interests and show you relevant adverts on other sites. They do not store personal information directly but identify your browser and device uniquely.`,legalBasis:`consent`,cookies:[`ad_storage`]}}}}}},be={complianceGroup:`opt-out`,gpcMode:`honor`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1},functionality_storage:{purpose:`functional`,listenGpc:!0},personalization_storage:{purpose:`preferences`,listenGpc:!0},analytics_storage:{purpose:`analytics`,listenGpc:!0},ad_storage:{purpose:`marketing`,listenGpc:!0,cpraCategory:`sharing`}},translations:{en:{mainBanner:{position:`bottom`,heading:`We use cookies`,htmlText:`We and our partners use cookies and similar tracking technologies to improve your experience, analyse site usage, and show relevant advertising. You may opt out of the sale or sharing of your personal data at any time.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"do-not-sell-share":{text:`Do Not Sell or Share My Personal Information`,style:`secondary`,action:`custom`,cookies:`!`},"manage-preferences":{text:`Manage Preferences`,style:`text`,action:`manage`}}},gpcBanner:{position:`bottom`,heading:`Your opt-out has been applied`,htmlText:`Your browser sent a Global Privacy Control signal. We have automatically opted you out of the sale and sharing of your personal data as required by applicable US state privacy laws.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"confirm-opt-out":{text:`Confirm Opt-Out`,style:`secondary`,action:`custom`,cookies:`!`},"manage-preferences":{text:`Manage Preferences`,style:`text`,action:`manage`}}},preferenceModal:{position:`right`,heading:`Cookie Preferences`,subheading:`Manage your data preferences. You may opt out of non-essential uses at any time.`,htmlText:`Under applicable US state privacy laws, you have the right to opt out of the sale and sharing of your personal data. Toggle the categories below to exercise your rights.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"opt-out-all":{text:`Opt Out of All`,style:`secondary`,action:`custom`,cookies:`!`},"save-choices":{text:`Save My Choices`,style:`primary`,action:`submit`}},categories:{necessary:{heading:`Strictly Necessary`,htmlText:`These cookies are required for the website to operate and cannot be disabled. They do not involve the sale or sharing of personal data.`,legalBasis:`mandatory`,cookies:[`security_storage`]},functional:{heading:`Functional`,htmlText:`These cookies improve the functionality of the site. Disabling them may affect how the site operates. You may opt out at any time.`,legalBasis:`consent`,cookies:[`functionality_storage`,`personalization_storage`]},analytics:{heading:`Analytics`,htmlText:`Analytics cookies help us understand how visitors interact with the site. Opting out prevents your data from being included in usage statistics.`,legalBasis:`consent`,cookies:[`analytics_storage`]},marketing:{heading:`Sale / Sharing of Personal Data`,htmlText:`These cookies involve the sale or sharing of your personal data with advertising partners for targeted advertising. You have the right to opt out of this under applicable US state privacy laws.`,legalBasis:`consent`,cookies:[`ad_storage`]}}}}}},xe={complianceGroup:`opt-out-strict`,gpcMode:`honor`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1},functionality_storage:{purpose:`functional`,listenGpc:!0,cpraCategory:`sharing`},personalization_storage:{purpose:`preferences`,listenGpc:!0,cpraCategory:`sharing`},analytics_storage:{purpose:`analytics`,listenGpc:!0,cpraCategory:`sharing`},ad_storage:{purpose:`marketing`,listenGpc:!0,cpraCategory:`sharing`},sensitive_info_storage:{purpose:`marketing`,listenGpc:!0,cpraCategory:`sensitive`}},translations:{en:{mainBanner:{position:`bottom`,heading:`Your California Privacy Rights`,htmlText:`Under the California Privacy Rights Act (CPRA), you have the right to opt out of the sale, sharing, and use of sensitive personal information. We use cookies and tracking technologies that may involve the sale or sharing of your data with third parties.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"opt-out-sale-sharing-sensitive":{text:`Opt Out of Sale, Sharing & Sensitive Use`,style:`secondary`,action:`custom`,cookies:`!`},manage:{text:`Manage`,style:`text`,action:`manage`}}},gpcBanner:{position:`bottom`,heading:`GPC opt-out applied automatically`,htmlText:`Your browser sent a Global Privacy Control signal. Under the CPRA, we are required to honor this as a Do Not Sell or Share My Personal Information request. Your opt-out has been applied automatically.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"confirm-opt-out":{text:`Confirm Opt-Out`,style:`secondary`,action:`custom`,cookies:`!`},"review-choices":{text:`Review Choices`,style:`text`,action:`manage`}}},preferenceModal:{position:`right`,heading:`Privacy Rights Center`,subheading:`Manage your CPRA rights: opt out of sale, sharing, and limit the use of sensitive personal information.`,htmlText:`As a California resident, you have the right under CPRA to opt out of the sale and sharing of your personal information, including for cross-context behavioral advertising, and to limit the use of your sensitive personal information. Toggle each category below to exercise your rights.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"opt-out-sale-sharing-sensitive":{text:`Opt Out of Sale, Sharing & Sensitive Use`,style:`secondary`,action:`custom`,cookies:`!`},"save-choices":{text:`Save My Choices`,style:`primary`,action:`submit`}},categories:{necessary:{heading:`Strictly Necessary`,htmlText:`Essential to deliver the service. These cookies are not sold or shared and cannot be disabled.`,legalBasis:`mandatory`,cookies:[`security_storage`]},functional:{heading:`Functional & Personalisation`,htmlText:`Improve site functionality and remember your preferences. May involve sharing of browsing data.`,legalBasis:`consent`,cookies:[`functionality_storage`,`personalization_storage`]},analytics:{heading:`Analytics (Sharing)`,htmlText:`Measure site performance. Analytics data may be shared with third-party providers, which constitutes "sharing" under CPRA.`,legalBasis:`consent`,cookies:[`analytics_storage`]},marketing:{heading:`Sale & Sharing of Personal Data`,htmlText:`Advertising and retargeting cookies that involve the sale or sharing of your personal data with third-party advertisers for cross-context behavioural advertising.`,legalBasis:`consent`,cookies:[`ad_storage`]},sensitive:{heading:`Sensitive Personal Information`,htmlText:`Some technologies may use sensitive personal information as defined by CPRA (e.g. precise geolocation, health data). You have the right to limit such use.`,legalBasis:`consent`,cookies:[`sensitive_info_storage`]}}}}}},Se={complianceGroup:`opt-in-dpdpa`,gpcMode:`ignore`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1},functionality_storage:{purpose:`functional`,listenGpc:!1},personalization_storage:{purpose:`preferences`,listenGpc:!1},analytics_storage:{purpose:`analytics`,listenGpc:!1},ad_storage:{purpose:`marketing`,listenGpc:!1}},translations:{en:{mainBanner:{position:`bottom`,heading:`Data Protection Notice`,htmlText:`We are the Data Fiduciary under India's Digital Personal Data Protection Act (DPDPA). Your explicit consent is required before we process your personal data using non-essential cookies. You may withdraw consent at any time without affecting prior processing.`,buttons:{"consent-all":{text:`I Consent`,style:`primary`,action:`custom`,cookies:`*`},"deny-all":{text:`I Do Not Consent`,style:`secondary`,action:`custom`,cookies:`!`},"review-choices":{text:`Review Choices`,style:`text`,action:`manage`}}},preferenceModal:{position:`right`,heading:`Consent Preferences`,subheading:`Review the purposes for which we process your personal data and provide or withdraw consent for each.`,htmlText:`Under the Digital Personal Data Protection Act (DPDPA) 2023, you have the right to give, manage, and withdraw consent for personal data processing. Legitimate interest is not a valid legal basis under the DPDPA — all data processing requires your explicit consent.`,buttons:{"consent-all":{text:`Give Consent to All`,style:`primary`,action:`custom`,cookies:`*`},"withdraw-all":{text:`Withdraw All Consent`,style:`secondary`,action:`custom`,cookies:`!`},"save-choices":{text:`Save Choices`,style:`secondary`,action:`submit`}},categories:{necessary:{heading:`Strictly Necessary`,htmlText:`Required to deliver the core service. No personal data is shared and consent is not required for these.`,legalBasis:`mandatory`,cookies:[`security_storage`]},functional:{heading:`Functional`,htmlText:`Enable enhanced features and personalisation. Your explicit consent is required under the DPDPA before we process data for these purposes.`,legalBasis:`consent`,cookies:[`functionality_storage`,`personalization_storage`]},analytics:{heading:`Analytics`,htmlText:`Help us understand how you interact with the site. Your consent is required before any analytics data is collected.`,legalBasis:`consent`,cookies:[`analytics_storage`]},marketing:{heading:`Marketing & Advertising`,htmlText:`Allow personalised advertising based on your browsing activity. Requires your explicit consent under the DPDPA.`,legalBasis:`consent`,cookies:[`ad_storage`]}}}}}},Ce={complianceGroup:`opt-in-china`,gpcMode:`ignore`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1},functionality_storage:{purpose:`functional`,listenGpc:!1},personalization_storage:{purpose:`preferences`,listenGpc:!1},analytics_storage:{purpose:`analytics`,listenGpc:!1},ad_storage:{purpose:`marketing`,listenGpc:!1}},translations:{en:{mainBanner:{position:`bottom`,heading:`Personal Information Processing Notice`,htmlText:`In accordance with China's Personal Information Protection Law (PIPL), Data Security Law (DSL), and Cybersecurity Law (CSL), we process personal information only for specified, explicit, and legitimate purposes with minimum data collection. Your consent is required for non-essential cookies.`,buttons:{"agree-all":{text:`Agree to All`,style:`primary`,action:`custom`,cookies:`*`},"reject-non-necessary":{text:`Reject Non-Necessary`,style:`secondary`,action:`custom`,cookies:`!`},"manage-preferences":{text:`Manage Preferences`,style:`text`,action:`manage`}}},preferenceModal:{position:`right`,heading:`Personal Information Processing Settings`,subheading:`Review the purpose and scope of each category of personal information processing.`,htmlText:`Under the PIPL, you have the right to know, decide, and restrict the processing of your personal information. Processing is limited to the stated purposes. Cross-border transfers of your data, if any, are handled in accordance with Chapter III of the PIPL, including security assessments or standard contracts where applicable.`,buttons:{"agree-all":{text:`Agree to All`,style:`primary`,action:`custom`,cookies:`*`},"disagree-all":{text:`Disagree to All`,style:`secondary`,action:`custom`,cookies:`!`},"confirm-settings":{text:`Confirm Settings`,style:`primary`,action:`submit`}},categories:{necessary:{heading:`Necessary for Service`,htmlText:`Required to deliver the core service and ensure network security under the CSL. Cannot be disabled.`,legalBasis:`mandatory`,cookies:[`security_storage`]},functional:{heading:`Functionality & Personalisation`,htmlText:`Enable enhanced features. Personal information is processed only for the stated purposes and retained for no longer than necessary.`,legalBasis:`consent`,cookies:[`functionality_storage`,`personalization_storage`]},analytics:{heading:`Statistical Analysis`,htmlText:`Collect and analyse usage data to improve the service. Data is processed within China unless cross-border transfer requirements are satisfied.`,legalBasis:`consent`,cookies:[`analytics_storage`]},marketing:{heading:`Targeted Advertising`,htmlText:`Personalise advertisements based on your interactions. Requires explicit consent under PIPL. You may withdraw consent and object to personalised advertising at any time.`,legalBasis:`consent`,cookies:[`ad_storage`]}}}}}},we={complianceGroup:`opt-in-brazil`,gpcMode:`ignore`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1},functionality_storage:{purpose:`functional`,listenGpc:!1},personalization_storage:{purpose:`preferences`,listenGpc:!1},analytics_storage:{purpose:`analytics`,listenGpc:!1},ad_storage:{purpose:`marketing`,listenGpc:!1}},translations:{en:{mainBanner:{position:`bottom`,heading:`We value your privacy`,htmlText:`In accordance with Brazil's Lei Geral de Proteção de Dados (LGPD), we process personal data only with a valid legal basis. Non-essential cookies require your prior consent. You may withdraw consent at any time. Legitimate interest applies where noted.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"reject-optional":{text:`Reject Optional`,style:`secondary`,action:`custom`,cookies:`!`},manage:{text:`Manage`,style:`text`,action:`manage`}}},preferenceModal:{position:`right`,heading:`Privacy Preferences`,subheading:`Review and manage your data processing preferences under the LGPD.`,htmlText:`You have rights under the LGPD including: access, correction, deletion, portability, and withdrawal of consent. Categories based on legitimate interest are indicated below — you may object to these at any time.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"reject-optional":{text:`Reject Optional`,style:`secondary`,action:`custom`,cookies:`!`},"save-preferences":{text:`Save My Preferences`,style:`primary`,action:`submit`}},categories:{necessary:{heading:`Strictly Necessary`,htmlText:`Essential for the service to function. Legal basis: fulfillment of a contract or legal obligation. Cannot be disabled.`,legalBasis:`mandatory`,cookies:[`security_storage`]},functional:{heading:`Functional`,htmlText:`Enhance site functionality and remember your settings. Legal basis: legitimate interest (LGPD Art. 7, X). You may object to this processing at any time.`,legalBasis:`legitimate_interest`,legitimateInterestDescription:`Remembering a visitor's in-session preferences (e.g. layout, saved settings) is necessary to deliver the functionality they engaged with, has minimal privacy impact since no data is shared with third parties, and is limited to what a visitor would reasonably expect from using the site, per the balancing test required by LGPD Art. 10.`,cookies:[`functionality_storage`,`personalization_storage`]},analytics:{heading:`Analytics`,htmlText:`Help us understand how visitors use the site so we can improve it. Legal basis: your consent.`,legalBasis:`consent`,cookies:[`analytics_storage`]},marketing:{heading:`Marketing & Advertising`,htmlText:`Personalise ads and measure campaign effectiveness. Legal basis: your consent. You may withdraw consent at any time without affecting the lawfulness of prior processing.`,legalBasis:`consent`,cookies:[`ad_storage`]}}}}}},Te={complianceGroup:`general-privacy-consent`,gpcMode:`ignore`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1},functionality_storage:{purpose:`functional`,listenGpc:!1},personalization_storage:{purpose:`preferences`,listenGpc:!1},analytics_storage:{purpose:`analytics`,listenGpc:!1},ad_storage:{purpose:`marketing`,listenGpc:!1}},translations:{en:{mainBanner:{position:`bottom`,heading:`We use cookies`,htmlText:`We use cookies to improve your browsing experience, analyse site traffic, and show you relevant content. By continuing to use this site, you accept our use of cookies. You can manage your preferences at any time.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"reject-marketing":{text:`Reject Marketing`,style:`secondary`,action:`custom`,cookies:[`security_storage`,`functionality_storage`,`personalization_storage`,`analytics_storage`]},"manage-preferences":{text:`Manage Preferences`,style:`text`,action:`manage`}}},preferenceModal:{position:`right`,heading:`Cookie Settings`,subheading:`We document the legal basis for each category of cookie we use.`,htmlText:`A privacy notice or consent framework applies in your jurisdiction. While a strict cookie consent banner may not be legally required, we document our legal basis for processing to follow privacy best practices.`,buttons:{"accept-all":{text:`Accept All`,style:`primary`,action:`custom`,cookies:`*`},"necessary-only":{text:`Necessary Only`,style:`secondary`,action:`custom`,cookies:`!`},"save-preferences":{text:`Save My Settings`,style:`primary`,action:`submit`}},categories:{necessary:{heading:`Strictly Necessary`,htmlText:`Required to deliver the service. No optional data processing takes place. Cannot be disabled.`,legalBasis:`mandatory`,cookies:[`security_storage`]},functional:{heading:`Functional`,htmlText:`Improve how the site works and remember your preferences. Legal basis: legitimate interest.`,legalBasis:`legitimate_interest`,legitimateInterestDescription:`Remembering a visitor's in-session preferences (e.g. layout, saved settings) is a low-privacy-impact processing activity that a visitor would reasonably expect from using the site, and is necessary to deliver the functionality they engaged with — our interest in providing it is not overridden by the visitor's privacy interest, since no data leaves the site and nothing is used for profiling or advertising.`,cookies:[`functionality_storage`,`personalization_storage`]},analytics:{heading:`Analytics`,htmlText:`Help us understand usage patterns to improve the site. Legal basis: legitimate interest. Data is aggregated and anonymised where possible.`,legalBasis:`legitimate_interest`,legitimateInterestDescription:`Measuring aggregate, anonymised site usage to improve performance and content is a reasonable, low-risk business interest that does not identify individual visitors or feed advertising/profiling, and is proportionate to the minimal impact on visitor privacy.`,cookies:[`analytics_storage`]},marketing:{heading:`Marketing`,htmlText:`Personalise advertising and measure campaign reach. Legal basis: your consent. You may withdraw consent at any time.`,legalBasis:`consent`,cookies:[`ad_storage`]}}}}}},Ee={complianceGroup:`notice-only`,gpcMode:`ignore`,defaultLocale:`en`,expiryDays:365,cookies:{security_storage:{purpose:`necessary`,listenGpc:!1}},translations:{en:{mainBanner:{position:`bottom`,heading:`This site uses essential cookies only`,htmlText:`We use strictly necessary cookies to ensure this website functions correctly. No tracking, advertising, or analytics cookies are used. No specific cookie consent law applies in your jurisdiction.`,buttons:{ok:{text:`OK`,style:`primary`,action:`close`}}},preferenceModal:{position:`right`,heading:`Cookie Information`,subheading:`We only use cookies that are strictly necessary for this site to work.`,htmlText:`This site does not use optional cookies. The only cookie set is required to maintain basic security and session integrity. You cannot disable it without affecting site functionality.`,buttons:{close:{text:`Close`,style:`primary`,action:`close`}},categories:{necessary:{heading:`Strictly Necessary`,htmlText:`Required for the site to function. These cookies do not track you and cannot be disabled.`,legalBasis:`mandatory`,cookies:[`security_storage`]}}}}}},De={mainBanner:{heading:`Wir schätzen Ihre Privatsphäre`,htmlText:`Wir verwenden Cookies, um Ihre Browser-Erfahrung zu verbessern, personalisierte Inhalte oder Anzeigen bereitzustellen und unseren Datenverkehr zu analysieren. Mit dem Klicken auf <strong>Alle akzeptieren</strong> stimmen Sie der Verwendung von Cookies zu. Sie können Ihre Einstellungen jederzeit ändern.`,buttons:{"accept-all":`Alle akzeptieren`,"reject-optional":`Alle ablehnen`,"manage-preferences":`Einstellungen verwalten`}},gpcBanner:{heading:`Datenschutzpräferenz erkannt`,htmlText:`Ihr Browser hat ein Global Privacy Control (GPC) Signal gesendet. Wir haben Ihre Datenschutzpräferenz berücksichtigt.`,buttons:{"accept-all":`Einstellungen überprüfen`,"confirm-settings":`Weiter`}},preferenceModal:{heading:`Datenschutzeinstellungen`,subheading:`Wählen Sie aus, welche Cookies Sie erlauben.`,htmlText:`Wir verwenden verschiedene Cookie-Typen. Sie können die einzelnen Kategorien aktivieren oder deaktivieren. Notwendige Cookies können nicht deaktiviert werden.`,buttons:{"accept-all":`Alle akzeptieren`,"reject-optional":`Alle ablehnen`,"save-preferences":`Auswahl speichern`},categories:{"cat-necessary":{heading:`Unbedingt erforderlich`,htmlText:`Diese Cookies sind für das Funktionieren der Website unbedingt erforderlich und können nicht deaktiviert werden.`},"cat-functional":{heading:`Funktional`,htmlText:`Ermöglichen erweiterte Funktionen wie gespeicherte Präferenzen und Personalisierung.`},"cat-preferences":{heading:`Präferenzen`,htmlText:`Speichern Ihre persönlichen Einstellungen und Präferenzen für zukünftige Besuche.`},"cat-analytics":{heading:`Analyse`,htmlText:`Helfen uns zu verstehen, wie Besucher mit unserer Website interagieren.`},"cat-marketing":{heading:`Marketing`,htmlText:`Werden verwendet, um Ihnen relevante Werbung anzuzeigen.`}}}},Oe={mainBanner:{heading:`Valoramos su privacidad`,htmlText:`Utilizamos cookies para mejorar su experiencia de navegación, mostrar anuncios o contenido personalizados y analizar nuestro tráfico. Al hacer clic en <strong>Aceptar todo</strong>, consiente el uso de cookies. Puede cambiar sus preferencias en cualquier momento.`,buttons:{"accept-all":`Aceptar todo`,"reject-optional":`Rechazar todo`,"manage-preferences":`Gestionar preferencias`}},gpcBanner:{heading:`Preferencia de privacidad reconocida`,htmlText:`Su navegador ha enviado una señal Global Privacy Control (GPC). Hemos aplicado su preferencia de privacidad.`,buttons:{"accept-all":`Revisar preferencias`,"confirm-settings":`Continuar`}},preferenceModal:{heading:`Preferencias de privacidad`,subheading:`Elija qué cookies desea permitir.`,htmlText:`Utilizamos distintos tipos de cookies. Puede activar o desactivar cada categoría. Las cookies necesarias no pueden desactivarse.`,buttons:{"accept-all":`Aceptar todo`,"reject-optional":`Rechazar todo`,"save-preferences":`Guardar selección`},categories:{"cat-necessary":{heading:`Estrictamente necesarias`,htmlText:`Estas cookies son imprescindibles para el funcionamiento del sitio web y no pueden desactivarse.`},"cat-functional":{heading:`Funcionales`,htmlText:`Permiten funciones avanzadas como preferencias guardadas y personalización.`},"cat-preferences":{heading:`Preferencias`,htmlText:`Guardan su configuración personal y preferencias para visitas futuras.`},"cat-analytics":{heading:`Analíticas`,htmlText:`Nos ayudan a entender cómo los visitantes interactúan con nuestro sitio web.`},"cat-marketing":{heading:`Marketing`,htmlText:`Se utilizan para mostrarle publicidad relevante.`}}}},ke={mainBanner:{heading:`Nous respectons votre vie privée`,htmlText:`Nous utilisons des cookies pour améliorer votre expérience de navigation, afficher des publicités ou du contenu personnalisés et analyser notre trafic. En cliquant sur <strong>Tout accepter</strong>, vous consentez à l'utilisation des cookies. Vous pouvez modifier vos préférences à tout moment.`,buttons:{"accept-all":`Tout accepter`,"reject-optional":`Tout refuser`,"manage-preferences":`Gérer les préférences`}},gpcBanner:{heading:`Préférence de confidentialité reconnue`,htmlText:`Votre navigateur a envoyé un signal Global Privacy Control (GPC). Nous avons appliqué votre préférence de confidentialité.`,buttons:{"accept-all":`Vérifier les préférences`,"confirm-settings":`Continuer`}},preferenceModal:{heading:`Paramètres de confidentialité`,subheading:`Choisissez les cookies que vous souhaitez autoriser.`,htmlText:`Nous utilisons différents types de cookies. Vous pouvez activer ou désactiver chaque catégorie. Les cookies nécessaires ne peuvent pas être désactivés.`,buttons:{"accept-all":`Tout accepter`,"reject-optional":`Tout refuser`,"save-preferences":`Enregistrer la sélection`},categories:{"cat-necessary":{heading:`Strictement nécessaires`,htmlText:`Ces cookies sont indispensables au fonctionnement du site web et ne peuvent pas être désactivés.`},"cat-functional":{heading:`Fonctionnels`,htmlText:`Permettent des fonctionnalités avancées comme les préférences enregistrées et la personnalisation.`},"cat-preferences":{heading:`Préférences`,htmlText:`Sauvegardent vos paramètres personnels et préférences pour les visites futures.`},"cat-analytics":{heading:`Analytiques`,htmlText:`Nous aident à comprendre comment les visiteurs interagissent avec notre site web.`},"cat-marketing":{heading:`Marketing`,htmlText:`Sont utilisés pour vous afficher des publicités pertinentes.`}}}},Ae={mainBanner:{heading:`プライバシーを大切にしています`,htmlText:`ブラウジング体験の向上、パーソナライズされた広告・コンテンツの表示、トラフィック分析のためにCookieを使用しています。<strong>すべて同意</strong>をクリックすることで、Cookieの使用に同意したことになります。設定はいつでも変更できます。`,buttons:{"accept-all":`すべて同意`,"reject-optional":`すべて拒否`,"manage-preferences":`設定を管理`}},gpcBanner:{heading:`プライバシー設定が検出されました`,htmlText:`ブラウザからGlobal Privacy Control(GPC)シグナルが送信されました。お客様のプライバシー設定を適用しました。`,buttons:{"accept-all":`設定を確認`,"confirm-settings":`続行`}},preferenceModal:{heading:`プライバシー設定`,subheading:`許可するCookieを選択してください。`,htmlText:`さまざまな種類のCookieを使用しています。各カテゴリを有効または無効にすることができます。必須Cookieは無効にできません。`,buttons:{"accept-all":`すべて同意`,"reject-optional":`すべて拒否`,"save-preferences":`選択を保存`},categories:{"cat-necessary":{heading:`必須`,htmlText:`これらのCookieはウェブサイトの機能に不可欠であり、無効にすることはできません。`},"cat-functional":{heading:`機能`,htmlText:`保存された設定やパーソナライゼーションなどの高度な機能を有効にします。`},"cat-preferences":{heading:`設定`,htmlText:`将来の訪問のために個人設定や好みを保存します。`},"cat-analytics":{heading:`分析`,htmlText:`訪問者がどのようにウェブサイトを利用しているかを理解するのに役立ちます。`},"cat-marketing":{heading:`マーケティング`,htmlText:`関連する広告を表示するために使用されます。`}}}},je={mainBanner:{heading:`Wir verwenden Cookies`,htmlText:`Wir verwenden Cookies, um unsere Dienste zu verbessern. Sie können dem Verkauf oder der Weitergabe Ihrer persönlichen Daten jederzeit widersprechen.`,buttons:{"accept-all":`Alle akzeptieren`,"do-not-sell-share":`Nicht verkaufen oder weitergeben`,"manage-preferences":`Einstellungen verwalten`}},gpcBanner:{heading:`GPC erkannt – Opt-out angewendet`,htmlText:`Ihr Browser hat ein Global Privacy Control Signal gesendet. Wir haben Sie vom Verkauf und der Weitergabe Ihrer Daten abgemeldet.`,buttons:{"accept-all":`Einstellungen überprüfen`,"confirm-opt-out":`Weiter`}},preferenceModal:{heading:`Datenschutzeinstellungen`,subheading:`Wählen Sie Ihre Datenschutzoptionen.`,buttons:{"accept-all":`Alle akzeptieren`,"opt-out-all":`Nicht verkaufen oder weitergeben`,"save-choices":`Auswahl speichern`},categories:{"cat-necessary":{heading:`Unbedingt erforderlich`,htmlText:`Diese Cookies sind für das Funktionieren der Website unbedingt erforderlich.`},"cat-functional":{heading:`Funktional`,htmlText:`Ermöglichen erweiterte Funktionen und Personalisierung.`},"cat-preferences":{heading:`Präferenzen`,htmlText:`Speichern Ihre Einstellungen für zukünftige Besuche.`},"cat-analytics":{heading:`Analyse`,htmlText:`Helfen uns zu verstehen, wie Besucher unsere Website nutzen.`},"cat-marketing":{heading:`Werbung / Verkauf`,htmlText:`Ermöglichen gezielte Werbung. Sie können dem Verkauf Ihrer Daten widersprechen.`}}}},Me={mainBanner:{heading:`Utilizamos cookies`,htmlText:`Utilizamos cookies para mejorar nuestros servicios. Puede oponerse a la venta o al intercambio de sus datos personales en cualquier momento.`,buttons:{"accept-all":`Aceptar todo`,"do-not-sell-share":`No vender ni compartir`,"manage-preferences":`Gestionar preferencias`}},gpcBanner:{heading:`GPC detectado – exclusión aplicada`,htmlText:`Su navegador ha enviado una señal Global Privacy Control. Le hemos excluido de la venta y el intercambio de sus datos.`,buttons:{"accept-all":`Revisar preferencias`,"confirm-opt-out":`Continuar`}},preferenceModal:{heading:`Preferencias de privacidad`,subheading:`Elija sus opciones de privacidad.`,buttons:{"accept-all":`Aceptar todo`,"opt-out-all":`No vender ni compartir`,"save-choices":`Guardar selección`},categories:{"cat-necessary":{heading:`Estrictamente necesarias`,htmlText:`Imprescindibles para el funcionamiento del sitio web.`},"cat-functional":{heading:`Funcionales`,htmlText:`Permiten funciones avanzadas y personalización.`},"cat-preferences":{heading:`Preferencias`,htmlText:`Guardan su configuración para visitas futuras.`},"cat-analytics":{heading:`Analíticas`,htmlText:`Nos ayudan a entender cómo los visitantes utilizan nuestro sitio.`},"cat-marketing":{heading:`Publicidad / Venta`,htmlText:`Permiten publicidad dirigida. Puede oponerse a la venta de sus datos.`}}}},k={mainBanner:{heading:`Nous utilisons des cookies`,htmlText:`Nous utilisons des cookies pour améliorer nos services. Vous pouvez vous opposer à la vente ou au partage de vos données personnelles à tout moment.`,buttons:{"accept-all":`Tout accepter`,"do-not-sell-share":`Ne pas vendre ni partager`,"manage-preferences":`Gérer les préférences`}},gpcBanner:{heading:`GPC détecté – exclusion appliquée`,htmlText:`Votre navigateur a envoyé un signal Global Privacy Control. Nous avons appliqué votre demande de ne pas vendre ni partager vos données.`,buttons:{"accept-all":`Vérifier les préférences`,"confirm-opt-out":`Continuer`}},preferenceModal:{heading:`Paramètres de confidentialité`,subheading:`Choisissez vos options de confidentialité.`,buttons:{"accept-all":`Tout accepter`,"opt-out-all":`Ne pas vendre ni partager`,"save-choices":`Enregistrer la sélection`},categories:{"cat-necessary":{heading:`Strictement nécessaires`,htmlText:`Indispensables au fonctionnement du site web.`},"cat-functional":{heading:`Fonctionnels`,htmlText:`Permettent des fonctionnalités avancées et la personnalisation.`},"cat-preferences":{heading:`Préférences`,htmlText:`Sauvegardent vos paramètres pour les visites futures.`},"cat-analytics":{heading:`Analytiques`,htmlText:`Nous aident à comprendre comment les visiteurs utilisent notre site.`},"cat-marketing":{heading:`Publicité / Vente`,htmlText:`Permettent la publicité ciblée. Vous pouvez vous opposer à la vente de vos données.`}}}},Ne={mainBanner:{heading:`Cookieを使用しています`,htmlText:`サービス向上のためにCookieを使用しています。個人データの販売や共有にはいつでも異議を申し立てることができます。`,buttons:{"accept-all":`すべて同意`,"do-not-sell-share":`販売・共有しない`,"manage-preferences":`設定を管理`}},gpcBanner:{heading:`GPC検出 – オプトアウト適用済み`,htmlText:`ブラウザからGlobal Privacy Controlシグナルが送信されました。データの販売および共有からオプトアウトしました。`,buttons:{"accept-all":`設定を確認`,"confirm-opt-out":`続行`}},preferenceModal:{heading:`プライバシー設定`,subheading:`プライバシーオプションを選択してください。`,buttons:{"accept-all":`すべて同意`,"opt-out-all":`販売・共有しない`,"save-choices":`選択を保存`},categories:{"cat-necessary":{heading:`必須`,htmlText:`ウェブサイトの機能に不可欠です。`},"cat-functional":{heading:`機能`,htmlText:`高度な機能とパーソナライゼーションを有効にします。`},"cat-preferences":{heading:`設定`,htmlText:`将来の訪問のために設定を保存します。`},"cat-analytics":{heading:`分析`,htmlText:`訪問者のサイト利用状況を把握するのに役立ちます。`},"cat-marketing":{heading:`広告・販売`,htmlText:`ターゲット広告を可能にします。データの販売に異議を申し立てることができます。`}}}},Pe={mainBanner:{heading:`Datenschutzrechte in Kalifornien`,htmlText:`Gemäß dem California Privacy Rights Act (CPRA) haben Sie das Recht, dem Verkauf, der Weitergabe und der Verwendung Ihrer persönlichen Daten zu widersprechen.`,buttons:{"accept-all":`Alle akzeptieren`,"opt-out-sale-sharing-sensitive":`Meine Daten nicht verkaufen oder teilen`,manage:`Einstellungen verwalten`}},gpcBanner:{heading:`GPC erkannt – CPRA-Opt-out angewendet`,htmlText:`Ihr Global Privacy Control Signal wurde erkannt. Ihr Recht auf Opt-out gemäß CPRA wurde automatisch angewendet.`,buttons:{"accept-all":`Einstellungen überprüfen`,"confirm-opt-out":`Weiter`}},preferenceModal:{heading:`Datenschutzeinstellungen (CPRA)`,subheading:`Verwalten Sie Ihre Datenschutzrechte.`,buttons:{"accept-all":`Alle akzeptieren`,"opt-out-sale-sharing-sensitive":`Meine Daten nicht verkaufen oder teilen`,"save-choices":`Auswahl speichern`},categories:{"cat-necessary":{heading:`Unbedingt erforderlich`,htmlText:`Für den Betrieb der Website unbedingt erforderlich.`},"cat-functional":{heading:`Funktional`,htmlText:`Ermöglichen erweiterte Funktionen.`},"cat-preferences":{heading:`Präferenzen`,htmlText:`Speichern Ihre persönlichen Einstellungen.`},"cat-analytics":{heading:`Analyse`,htmlText:`Helfen uns, die Website-Nutzung zu verstehen.`},"cat-marketing":{heading:`Verkauf / Weitergabe (CPRA)`,htmlText:`Verkauf und Weitergabe persönlicher Daten gemäß CPRA. Sie können widersprechen.`}}}},Fe={mainBanner:{heading:`Derechos de privacidad en California`,htmlText:`De acuerdo con la Ley de Derechos de Privacidad de California (CPRA), tiene derecho a oponerse a la venta, el intercambio y el uso de sus datos personales.`,buttons:{"accept-all":`Aceptar todo`,"opt-out-sale-sharing-sensitive":`No vender ni compartir mis datos`,manage:`Gestionar preferencias`}},gpcBanner:{heading:`GPC detectado – exclusión CPRA aplicada`,htmlText:`Se ha detectado su señal Global Privacy Control. Su derecho de exclusión según la CPRA se ha aplicado automáticamente.`,buttons:{"accept-all":`Revisar preferencias`,"confirm-opt-out":`Continuar`}},preferenceModal:{heading:`Configuración de privacidad (CPRA)`,subheading:`Administre sus derechos de privacidad.`,buttons:{"accept-all":`Aceptar todo`,"opt-out-sale-sharing-sensitive":`No vender ni compartir mis datos`,"save-choices":`Guardar selección`},categories:{"cat-necessary":{heading:`Estrictamente necesarias`,htmlText:`Imprescindibles para el funcionamiento del sitio.`},"cat-functional":{heading:`Funcionales`,htmlText:`Permiten funciones avanzadas.`},"cat-preferences":{heading:`Preferencias`,htmlText:`Guardan su configuración personal.`},"cat-analytics":{heading:`Analíticas`,htmlText:`Nos ayudan a entender el uso del sitio.`},"cat-marketing":{heading:`Venta / Intercambio (CPRA)`,htmlText:`Venta e intercambio de datos personales según la CPRA. Puede oponerse.`}}}},Ie={mainBanner:{heading:`Droits à la vie privée en Californie`,htmlText:`Conformément au California Privacy Rights Act (CPRA), vous avez le droit de vous opposer à la vente, au partage et à l'utilisation de vos données personnelles.`,buttons:{"accept-all":`Tout accepter`,"opt-out-sale-sharing-sensitive":`Ne pas vendre ni partager mes données`,manage:`Gérer les préférences`}},gpcBanner:{heading:`GPC détecté – exclusion CPRA appliquée`,htmlText:`Votre signal Global Privacy Control a été détecté. Votre droit d'exclusion selon la CPRA a été appliqué automatiquement.`,buttons:{"accept-all":`Vérifier les préférences`,"confirm-opt-out":`Continuer`}},preferenceModal:{heading:`Paramètres de confidentialité (CPRA)`,subheading:`Gérez vos droits à la vie privée.`,buttons:{"accept-all":`Tout accepter`,"opt-out-sale-sharing-sensitive":`Ne pas vendre ni partager mes données`,"save-choices":`Enregistrer la sélection`},categories:{"cat-necessary":{heading:`Strictement nécessaires`,htmlText:`Indispensables au fonctionnement du site.`},"cat-functional":{heading:`Fonctionnels`,htmlText:`Permettent des fonctionnalités avancées.`},"cat-preferences":{heading:`Préférences`,htmlText:`Sauvegardent vos paramètres personnels.`},"cat-analytics":{heading:`Analytiques`,htmlText:`Nous aident à comprendre l'utilisation du site.`},"cat-marketing":{heading:`Vente / Partage (CPRA)`,htmlText:`Vente et partage de données personnelles selon la CPRA. Vous pouvez vous y opposer.`}}}},Le={mainBanner:{heading:`カリフォルニア州のプライバシー権`,htmlText:`カリフォルニア・プライバシー権法(CPRA)に基づき、お客様には個人データの販売・共有・利用に異議を申し立てる権利があります。`,buttons:{"accept-all":`すべて同意`,"opt-out-sale-sharing-sensitive":`販売・共有しない`,manage:`設定を管理`}},gpcBanner:{heading:`GPC検出 – CPRAオプトアウト適用済み`,htmlText:`ブラウザからGlobal Privacy Controlシグナルが検出されました。CPRAに基づくオプトアウト権が自動的に適用されました。`,buttons:{"accept-all":`設定を確認`,"confirm-opt-out":`続行`}},preferenceModal:{heading:`プライバシー設定(CPRA)`,subheading:`プライバシー権を管理してください。`,buttons:{"accept-all":`すべて同意`,"opt-out-sale-sharing-sensitive":`販売・共有しない`,"save-choices":`選択を保存`},categories:{"cat-necessary":{heading:`必須`,htmlText:`ウェブサイトの動作に不可欠です。`},"cat-functional":{heading:`機能`,htmlText:`高度な機能を有効にします。`},"cat-preferences":{heading:`設定`,htmlText:`個人設定を保存します。`},"cat-analytics":{heading:`分析`,htmlText:`サイト利用状況の把握に役立てます。`},"cat-marketing":{heading:`販売・共有(CPRA)`,htmlText:`CPRAに基づく個人データの販売および共有。異議を申し立てることができます。`}}}},Re={mainBanner:{heading:`Datenschutzhinweis`,htmlText:`Wir sind der für die Datenverarbeitung Verantwortliche gemäß dem Digitalen Personaldatenschutzgesetz (DPDPA) Indiens. Ihre Einwilligung ist erforderlich, bevor wir Ihre personenbezogenen Daten verarbeiten.`,buttons:{"consent-all":`Ich stimme zu`,"deny-all":`Ich stimme nicht zu`,"review-choices":`Auswahl überprüfen`}},preferenceModal:{heading:`Datenschutzeinstellungen (DPDPA)`,subheading:`Bitte wählen Sie aus, in welche Verarbeitungen Sie einwilligen.`,buttons:{"consent-all":`Ich stimme zu`,"withdraw-all":`Ich stimme nicht zu`,"save-choices":`Auswahl speichern`},categories:{"cat-necessary":{heading:`Unbedingt erforderlich`,htmlText:`Für den Betrieb der Website unbedingt erforderlich. Keine Einwilligung erforderlich.`},"cat-functional":{heading:`Funktional`,htmlText:`Ermöglichen erweiterte Funktionen. Ihre Einwilligung ist gemäß DPDPA erforderlich.`},"cat-preferences":{heading:`Präferenzen`,htmlText:`Speichern Ihre persönlichen Einstellungen. Einwilligung gemäß DPDPA erforderlich.`},"cat-analytics":{heading:`Analyse`,htmlText:`Helfen uns, die Website-Nutzung zu verstehen. Einwilligung gemäß DPDPA erforderlich.`},"cat-marketing":{heading:`Marketing`,htmlText:`Ermöglichen personalisierte Werbung. Einwilligung gemäß DPDPA erforderlich.`}}}},ze={mainBanner:{heading:`Aviso de protección de datos`,htmlText:`Somos el Fiduciario de Datos según la Ley de Protección de Datos Digitales Personales (DPDPA) de India. Su consentimiento es necesario antes de que procesemos sus datos personales.`,buttons:{"consent-all":`Doy mi consentimiento`,"deny-all":`No doy mi consentimiento`,"review-choices":`Revisar opciones`}},preferenceModal:{heading:`Configuración de privacidad (DPDPA)`,subheading:`Elija en qué procesamientos desea dar su consentimiento.`,buttons:{"consent-all":`Doy mi consentimiento`,"withdraw-all":`No doy mi consentimiento`,"save-choices":`Guardar selección`},categories:{"cat-necessary":{heading:`Estrictamente necesarias`,htmlText:`Imprescindibles para el funcionamiento del sitio. No requieren consentimiento.`},"cat-functional":{heading:`Funcionales`,htmlText:`Permiten funciones avanzadas. Su consentimiento es requerido según la DPDPA.`},"cat-preferences":{heading:`Preferencias`,htmlText:`Guardan su configuración personal. Se requiere consentimiento según la DPDPA.`},"cat-analytics":{heading:`Analíticas`,htmlText:`Nos ayudan a entender el uso del sitio. Se requiere consentimiento según la DPDPA.`},"cat-marketing":{heading:`Marketing`,htmlText:`Permiten publicidad personalizada. Se requiere consentimiento según la DPDPA.`}}}},Be={mainBanner:{heading:`Avis de protection des données`,htmlText:`Nous sommes le Fiduciaire de données au sens de la loi indienne sur la protection des données personnelles numériques (DPDPA). Votre consentement est requis avant que nous traitions vos données personnelles.`,buttons:{"consent-all":`Je consens`,"deny-all":`Je ne consens pas`,"review-choices":`Examiner les choix`}},preferenceModal:{heading:`Paramètres de confidentialité (DPDPA)`,subheading:`Choisissez les traitements auxquels vous consentez.`,buttons:{"consent-all":`Je consens`,"withdraw-all":`Je ne consens pas`,"save-choices":`Enregistrer la sélection`},categories:{"cat-necessary":{heading:`Strictement nécessaires`,htmlText:`Indispensables au fonctionnement du site. Aucun consentement requis.`},"cat-functional":{heading:`Fonctionnels`,htmlText:`Permettent des fonctionnalités avancées. Votre consentement est requis selon la DPDPA.`},"cat-preferences":{heading:`Préférences`,htmlText:`Sauvegardent vos paramètres personnels. Consentement requis selon la DPDPA.`},"cat-analytics":{heading:`Analytiques`,htmlText:`Nous aident à comprendre l'utilisation du site. Consentement requis selon la DPDPA.`},"cat-marketing":{heading:`Marketing`,htmlText:`Permettent la publicité personnalisée. Consentement requis selon la DPDPA.`}}}},Ve={mainBanner:{heading:`データ保護に関するお知らせ`,htmlText:`当社はインドのデジタル個人データ保護法(DPDPA)に基づくデータ受託者です。お客様の個人データを処理する前に同意が必要です。`,buttons:{"consent-all":`同意する`,"deny-all":`同意しない`,"review-choices":`選択を確認`}},preferenceModal:{heading:`プライバシー設定(DPDPA)`,subheading:`同意する処理を選択してください。`,buttons:{"consent-all":`同意する`,"withdraw-all":`同意しない`,"save-choices":`選択を保存`},categories:{"cat-necessary":{heading:`必須`,htmlText:`ウェブサイトの動作に不可欠です。同意は不要です。`},"cat-functional":{heading:`機能`,htmlText:`高度な機能を有効にします。DPDPAに基づき同意が必要です。`},"cat-preferences":{heading:`設定`,htmlText:`個人設定を保存します。DPDPAに基づき同意が必要です。`},"cat-analytics":{heading:`分析`,htmlText:`サイト利用状況の把握に使用します。DPDPAに基づき同意が必要です。`},"cat-marketing":{heading:`マーケティング`,htmlText:`パーソナライズされた広告を可能にします。DPDPAに基づき同意が必要です。`}}}},He={mainBanner:{heading:`Hinweis zur Verarbeitung personenbezogener Daten`,htmlText:`Gemäß dem Gesetz zum Schutz personenbezogener Daten (PIPL) müssen wir Sie vor der Verarbeitung Ihrer Daten informieren. Wir verarbeiten Daten nur zu den angegebenen Zwecken auf Grundlage Ihrer Einwilligung.`,buttons:{"agree-all":`Zustimmen`,"reject-non-necessary":`Ablehnen`,"manage-preferences":`Einstellungen`}},preferenceModal:{heading:`Datenschutzeinstellungen (PIPL)`,subheading:`Bitte wählen Sie, welcher Datenverarbeitung Sie zustimmen.`,buttons:{"agree-all":`Zustimmen`,"disagree-all":`Ablehnen`,"confirm-settings":`Auswahl speichern`},categories:{"cat-necessary":{heading:`Unbedingt erforderlich`,htmlText:`Für den Betrieb der Website unbedingt erforderlich. Zweck: Sicherheit und grundlegende Funktionalität.`},"cat-functional":{heading:`Funktional`,htmlText:`Zweck: Verbesserung der Benutzererfahrung. Einwilligung gemäß PIPL erforderlich.`},"cat-preferences":{heading:`Präferenzen`,htmlText:`Zweck: Speicherung personalisierter Einstellungen. Einwilligung gemäß PIPL erforderlich.`},"cat-analytics":{heading:`Analyse`,htmlText:`Zweck: Statistiken zur Website-Nutzung. Einwilligung gemäß PIPL erforderlich.`},"cat-marketing":{heading:`Marketing`,htmlText:`Zweck: Personalisierte Werbung. Einwilligung gemäß PIPL erforderlich.`}}}},Ue={mainBanner:{heading:`Aviso de tratamiento de información personal`,htmlText:`De conformidad con la Ley de Protección de Información Personal (PIPL), debemos informarle antes de tratar sus datos. Solo procesamos datos con fines específicos y con su consentimiento.`,buttons:{"agree-all":`Aceptar`,"reject-non-necessary":`Rechazar`,"manage-preferences":`Configuración`}},preferenceModal:{heading:`Configuración de privacidad (PIPL)`,subheading:`Elija qué tratamientos de datos acepta.`,buttons:{"agree-all":`Aceptar`,"disagree-all":`Rechazar`,"confirm-settings":`Guardar selección`},categories:{"cat-necessary":{heading:`Estrictamente necesarias`,htmlText:`Imprescindibles para el sitio. Finalidad: seguridad y funcionalidad básica.`},"cat-functional":{heading:`Funcionales`,htmlText:`Finalidad: mejorar la experiencia del usuario. Se requiere consentimiento según la PIPL.`},"cat-preferences":{heading:`Preferencias`,htmlText:`Finalidad: guardar configuración personalizada. Se requiere consentimiento según la PIPL.`},"cat-analytics":{heading:`Analíticas`,htmlText:`Finalidad: estadísticas de uso del sitio. Se requiere consentimiento según la PIPL.`},"cat-marketing":{heading:`Marketing`,htmlText:`Finalidad: publicidad personalizada. Se requiere consentimiento según la PIPL.`}}}},A={mainBanner:{heading:`Avis de traitement des informations personnelles`,htmlText:`Conformément à la loi sur la protection des informations personnelles (PIPL), nous devons vous informer avant tout traitement. Nous traitons les données à des fins spécifiques uniquement, avec votre consentement.`,buttons:{"agree-all":`Accepter`,"reject-non-necessary":`Refuser`,"manage-preferences":`Paramètres`}},preferenceModal:{heading:`Paramètres de confidentialité (PIPL)`,subheading:`Choisissez les traitements de données que vous acceptez.`,buttons:{"agree-all":`Accepter`,"disagree-all":`Refuser`,"confirm-settings":`Enregistrer la sélection`},categories:{"cat-necessary":{heading:`Strictement nécessaires`,htmlText:`Indispensables au site. Finalité : sécurité et fonctionnalité de base.`},"cat-functional":{heading:`Fonctionnels`,htmlText:`Finalité : améliorer l'expérience utilisateur. Consentement requis selon la PIPL.`},"cat-preferences":{heading:`Préférences`,htmlText:`Finalité : sauvegarder les paramètres personnalisés. Consentement requis selon la PIPL.`},"cat-analytics":{heading:`Analytiques`,htmlText:`Finalité : statistiques d'utilisation du site. Consentement requis selon la PIPL.`},"cat-marketing":{heading:`Marketing`,htmlText:`Finalité : publicité personnalisée. Consentement requis selon la PIPL.`}}}},We={mainBanner:{heading:`個人情報処理に関するお知らせ`,htmlText:`個人情報保護法(PIPL)に基づき、データ処理の前にお知らせする義務があります。お客様の同意を得た特定の目的にのみデータを使用します。`,buttons:{"agree-all":`同意する`,"reject-non-necessary":`拒否する`,"manage-preferences":`設定`}},preferenceModal:{heading:`プライバシー設定(PIPL)`,subheading:`同意するデータ処理を選択してください。`,buttons:{"agree-all":`同意する`,"disagree-all":`拒否する`,"confirm-settings":`選択を保存`},categories:{"cat-necessary":{heading:`必須`,htmlText:`ウェブサイトに不可欠です。目的:セキュリティと基本機能。`},"cat-functional":{heading:`機能`,htmlText:`目的:ユーザー体験の向上。PIPLに基づき同意が必要です。`},"cat-preferences":{heading:`設定`,htmlText:`目的:個人設定の保存。PIPLに基づき同意が必要です。`},"cat-analytics":{heading:`分析`,htmlText:`目的:サイト利用統計。PIPLに基づき同意が必要です。`},"cat-marketing":{heading:`マーケティング`,htmlText:`目的:パーソナライズされた広告。PIPLに基づき同意が必要です。`}}}},j={mainBanner:{heading:`Wir schätzen Ihre Privatsphäre`,htmlText:`Gemäß dem brasilianischen Datenschutzgesetz (LGPD) verarbeiten wir Ihre personenbezogenen Daten auf Grundlage Ihrer Einwilligung oder unseres berechtigten Interesses, sofern anwendbar. Sie können Ihre Wahl jederzeit ändern.`,buttons:{"accept-all":`Alle akzeptieren`,"reject-optional":`Alle ablehnen`,manage:`Verwalten`}},preferenceModal:{heading:`Datenschutzeinstellungen (LGPD)`,subheading:`Wählen Sie Ihre Datenschutzoptionen.`,buttons:{"accept-all":`Alle akzeptieren`,"reject-optional":`Alle ablehnen`,"save-preferences":`Auswahl speichern`},categories:{"cat-necessary":{heading:`Unbedingt erforderlich`,htmlText:`Für den Betrieb der Website unbedingt erforderlich.`},"cat-functional":{heading:`Funktional`,htmlText:`Ermöglichen erweiterte Funktionen. Rechtsgrundlage: berechtigtes Interesse (LGPD Art. 10).`},"cat-preferences":{heading:`Präferenzen`,htmlText:`Speichern Ihre Einstellungen. Rechtsgrundlage: berechtigtes Interesse (LGPD Art. 10).`},"cat-analytics":{heading:`Analyse`,htmlText:`Helfen uns, die Website-Nutzung zu verstehen. Einwilligung gemäß LGPD erforderlich.`},"cat-marketing":{heading:`Marketing`,htmlText:`Ermöglichen personalisierte Werbung. Einwilligung gemäß LGPD erforderlich.`}}}},Ge={mainBanner:{heading:`Valoramos su privacidad`,htmlText:`De acuerdo con la Ley General de Protección de Datos (LGPD) de Brasil, tratamos sus datos personales con su consentimiento o con base en interés legítimo cuando corresponda. Puede cambiar sus preferencias en cualquier momento.`,buttons:{"accept-all":`Aceptar todo`,"reject-optional":`Rechazar todo`,manage:`Gestionar`}},preferenceModal:{heading:`Configuración de privacidad (LGPD)`,subheading:`Elija sus opciones de privacidad.`,buttons:{"accept-all":`Aceptar todo`,"reject-optional":`Rechazar todo`,"save-preferences":`Guardar selección`},categories:{"cat-necessary":{heading:`Estrictamente necesarias`,htmlText:`Imprescindibles para el funcionamiento del sitio.`},"cat-functional":{heading:`Funcionales`,htmlText:`Permiten funciones avanzadas. Base legal: interés legítimo (LGPD Art. 10).`},"cat-preferences":{heading:`Preferencias`,htmlText:`Guardan su configuración. Base legal: interés legítimo (LGPD Art. 10).`},"cat-analytics":{heading:`Analíticas`,htmlText:`Nos ayudan a comprender el uso del sitio. Se requiere consentimiento según la LGPD.`},"cat-marketing":{heading:`Marketing`,htmlText:`Permiten publicidad personalizada. Se requiere consentimiento según la LGPD.`}}}},M={mainBanner:{heading:`Nous respectons votre vie privée`,htmlText:`Conformément à la loi brésilienne sur la protection des données (LGPD), nous traitons vos données personnelles sur la base de votre consentement ou d'un intérêt légitime, selon le cas. Vous pouvez modifier vos préférences à tout moment.`,buttons:{"accept-all":`Tout accepter`,"reject-optional":`Tout refuser`,manage:`Gérer`}},preferenceModal:{heading:`Paramètres de confidentialité (LGPD)`,subheading:`Choisissez vos options de confidentialité.`,buttons:{"accept-all":`Tout accepter`,"reject-optional":`Tout refuser`,"save-preferences":`Enregistrer la sélection`},categories:{"cat-necessary":{heading:`Strictement nécessaires`,htmlText:`Indispensables au fonctionnement du site.`},"cat-functional":{heading:`Fonctionnels`,htmlText:`Permettent des fonctionnalités avancées. Base légale : intérêt légitime (LGPD Art. 10).`},"cat-preferences":{heading:`Préférences`,htmlText:`Sauvegardent vos paramètres. Base légale : intérêt légitime (LGPD Art. 10).`},"cat-analytics":{heading:`Analytiques`,htmlText:`Nous aident à comprendre l'utilisation du site. Consentement requis selon la LGPD.`},"cat-marketing":{heading:`Marketing`,htmlText:`Permettent la publicité personnalisée. Consentement requis selon la LGPD.`}}}},Ke={mainBanner:{heading:`プライバシーを大切にしています`,htmlText:`ブラジルの一般データ保護法(LGPD)に基づき、お客様の同意または正当な利益を根拠として個人データを処理します。設定はいつでも変更できます。`,buttons:{"accept-all":`すべて同意`,"reject-optional":`すべて拒否`,manage:`管理する`}},preferenceModal:{heading:`プライバシー設定(LGPD)`,subheading:`プライバシーオプションを選択してください。`,buttons:{"accept-all":`すべて同意`,"reject-optional":`すべて拒否`,"save-preferences":`選択を保存`},categories:{"cat-necessary":{heading:`必須`,htmlText:`ウェブサイトの動作に不可欠です。`},"cat-functional":{heading:`機能`,htmlText:`高度な機能を有効にします。法的根拠:正当な利益(LGPD第10条)。`},"cat-preferences":{heading:`設定`,htmlText:`設定を保存します。法的根拠:正当な利益(LGPD第10条)。`},"cat-analytics":{heading:`分析`,htmlText:`サイト利用状況の把握に役立てます。LGPDに基づき同意が必要です。`},"cat-marketing":{heading:`マーケティング`,htmlText:`パーソナライズされた広告を可能にします。LGPDに基づき同意が必要です。`}}}},qe={mainBanner:{heading:`Wir verwenden Cookies`,htmlText:`Wir verwenden Cookies und ähnliche Technologien, um unsere Dienste bereitzustellen und zu verbessern. Für Marketing-Cookies ist Ihre Einwilligung erforderlich. Andere Cookies basieren auf unserem berechtigten Interesse.`,buttons:{"accept-all":`Alle akzeptieren`,"reject-marketing":`Marketing ablehnen`,"manage-preferences":`Einstellungen verwalten`}},preferenceModal:{heading:`Datenschutzeinstellungen`,subheading:`Wählen Sie Ihre Cookie-Präferenzen.`,buttons:{"accept-all":`Alle akzeptieren`,"necessary-only":`Marketing ablehnen`,"save-preferences":`Auswahl speichern`},categories:{"cat-necessary":{heading:`Unbedingt erforderlich`,htmlText:`Für den Betrieb der Website unbedingt erforderlich.`},"cat-functional":{heading:`Funktional`,htmlText:`Ermöglichen erweiterte Funktionen. Rechtsgrundlage: berechtigtes Interesse.`},"cat-preferences":{heading:`Präferenzen`,htmlText:`Speichern Ihre persönlichen Einstellungen. Rechtsgrundlage: berechtigtes Interesse.`},"cat-analytics":{heading:`Analyse`,htmlText:`Helfen uns, die Website-Nutzung zu verstehen. Rechtsgrundlage: berechtigtes Interesse.`},"cat-marketing":{heading:`Marketing`,htmlText:`Ermöglichen personalisierte Werbung. Ihre Einwilligung ist erforderlich.`}}}},Je={mainBanner:{heading:`Usamos cookies`,htmlText:`Utilizamos cookies y tecnologías similares para ofrecer y mejorar nuestros servicios. Las cookies de marketing requieren su consentimiento. Las demás se basan en interés legítimo.`,buttons:{"accept-all":`Aceptar todo`,"reject-marketing":`Rechazar marketing`,"manage-preferences":`Gestionar preferencias`}},preferenceModal:{heading:`Configuración de privacidad`,subheading:`Elija sus preferencias de cookies.`,buttons:{"accept-all":`Aceptar todo`,"necessary-only":`Rechazar marketing`,"save-preferences":`Guardar selección`},categories:{"cat-necessary":{heading:`Estrictamente necesarias`,htmlText:`Imprescindibles para el funcionamiento del sitio.`},"cat-functional":{heading:`Funcionales`,htmlText:`Permiten funciones avanzadas. Base legal: interés legítimo.`},"cat-preferences":{heading:`Preferencias`,htmlText:`Guardan su configuración personal. Base legal: interés legítimo.`},"cat-analytics":{heading:`Analíticas`,htmlText:`Nos ayudan a entender el uso del sitio. Base legal: interés legítimo.`},"cat-marketing":{heading:`Marketing`,htmlText:`Permiten publicidad personalizada. Se requiere su consentimiento.`}}}},Ye={mainBanner:{heading:`Nous utilisons des cookies`,htmlText:`Nous utilisons des cookies et des technologies similaires pour fournir et améliorer nos services. Les cookies marketing nécessitent votre consentement. Les autres reposent sur notre intérêt légitime.`,buttons:{"accept-all":`Tout accepter`,"reject-marketing":`Refuser le marketing`,"manage-preferences":`Gérer les préférences`}},preferenceModal:{heading:`Paramètres de confidentialité`,subheading:`Choisissez vos préférences en matière de cookies.`,buttons:{"accept-all":`Tout accepter`,"necessary-only":`Refuser le marketing`,"save-preferences":`Enregistrer la sélection`},categories:{"cat-necessary":{heading:`Strictement nécessaires`,htmlText:`Indispensables au fonctionnement du site.`},"cat-functional":{heading:`Fonctionnels`,htmlText:`Permettent des fonctionnalités avancées. Base légale : intérêt légitime.`},"cat-preferences":{heading:`Préférences`,htmlText:`Sauvegardent vos paramètres personnels. Base légale : intérêt légitime.`},"cat-analytics":{heading:`Analytiques`,htmlText:`Nous aident à comprendre l'utilisation du site. Base légale : intérêt légitime.`},"cat-marketing":{heading:`Marketing`,htmlText:`Permettent la publicité personnalisée. Votre consentement est requis.`}}}},Xe={mainBanner:{heading:`Cookieを使用しています`,htmlText:`サービスの提供・改善のためにCookieおよび類似技術を使用しています。マーケティングCookieにはお客様の同意が必要です。その他は正当な利益を根拠としています。`,buttons:{"accept-all":`すべて同意`,"reject-marketing":`マーケティングを拒否`,"manage-preferences":`設定を管理`}},preferenceModal:{heading:`プライバシー設定`,subheading:`Cookieの設定を選択してください。`,buttons:{"accept-all":`すべて同意`,"necessary-only":`マーケティングを拒否`,"save-preferences":`選択を保存`},categories:{"cat-necessary":{heading:`必須`,htmlText:`ウェブサイトの動作に不可欠です。`},"cat-functional":{heading:`機能`,htmlText:`高度な機能を有効にします。法的根拠:正当な利益。`},"cat-preferences":{heading:`設定`,htmlText:`個人設定を保存します。法的根拠:正当な利益。`},"cat-analytics":{heading:`分析`,htmlText:`サイト利用状況の把握に役立てます。法的根拠:正当な利益。`},"cat-marketing":{heading:`マーケティング`,htmlText:`パーソナライズされた広告を可能にします。お客様の同意が必要です。`}}}},N={mainBanner:{heading:`Diese Website verwendet nur notwendige Cookies`,htmlText:`Wir verwenden ausschließlich technisch notwendige Cookies, die für den Betrieb der Website erforderlich sind. Es werden keine Marketing- oder Analyse-Cookies eingesetzt.`,buttons:{ok:`OK`}},preferenceModal:{heading:`Cookie-Informationen`,buttons:{close:`Schließen`},categories:{"cat-necessary":{heading:`Notwendige Cookies`,htmlText:`Technisch notwendige Cookies, die für den ordnungsgemäßen Betrieb der Website erforderlich sind. Sie können nicht deaktiviert werden.`}}}},P={mainBanner:{heading:`Este sitio solo usa cookies esenciales`,htmlText:`Únicamente utilizamos cookies técnicamente necesarias para el funcionamiento del sitio. No utilizamos cookies de marketing ni analíticas.`,buttons:{ok:`Aceptar`}},preferenceModal:{heading:`Información sobre cookies`,buttons:{close:`Cerrar`},categories:{"cat-necessary":{heading:`Cookies necesarias`,htmlText:`Cookies técnicamente necesarias para el correcto funcionamiento del sitio. No pueden desactivarse.`}}}},F={mainBanner:{heading:`Ce site utilise uniquement des cookies essentiels`,htmlText:`Nous n'utilisons que des cookies techniquement nécessaires au bon fonctionnement du site. Aucun cookie de marketing ou d'analyse n'est utilisé.`,buttons:{ok:`OK`}},preferenceModal:{heading:`Informations sur les cookies`,buttons:{close:`Fermer`},categories:{"cat-necessary":{heading:`Cookies nécessaires`,htmlText:`Cookies techniquement nécessaires au bon fonctionnement du site. Ils ne peuvent pas être désactivés.`}}}},I={mainBanner:{heading:`当サイトは必須Cookieのみを使用しています`,htmlText:`サイトの正常な動作に必要な技術的Cookieのみを使用しています。マーケティングや分析のCookieは使用していません。`,buttons:{ok:`OK`}},preferenceModal:{heading:`Cookieに関する情報`,buttons:{close:`閉じる`},categories:{"cat-necessary":{heading:`必須Cookie`,htmlText:`サイトの正常な動作に必要な技術的Cookieです。無効にすることはできません。`}}}},Ze={"opt-in":ye,"opt-out":be,"opt-out-strict":xe,"opt-in-dpdpa":Se,"opt-in-china":Ce,"opt-in-brazil":we,"general-privacy-consent":Te,"notice-only":Ee},Qe={"opt-in":{de:De,es:Oe,fr:ke,ja:Ae},"opt-out":{de:je,es:Me,fr:k,ja:Ne},"opt-out-strict":{de:Pe,es:Fe,fr:Ie,ja:Le},"opt-in-dpdpa":{de:Re,es:ze,fr:Be,ja:Ve},"opt-in-china":{de:He,es:Ue,fr:A,ja:We},"opt-in-brazil":{de:j,es:Ge,fr:M,ja:Ke},"general-privacy-consent":{de:qe,es:Je,fr:Ye,ja:Xe},"notice-only":{de:N,es:P,fr:F,ja:I}},L={en:{heading:`Global Privacy Control detected`,htmlText:`Your browser sent a Global Privacy Control signal. We have applied your privacy preference accordingly — you can review or change your choices below.`},de:{heading:`Global Privacy Control erkannt`,htmlText:`Ihr Browser hat ein Global-Privacy-Control-Signal gesendet. Wir haben Ihre Datenschutzeinstellung entsprechend angewendet — Sie können Ihre Auswahl unten überprüfen oder ändern.`},es:{heading:`Control de privacidad global detectado`,htmlText:`Su navegador envió una señal de Global Privacy Control. Hemos aplicado su preferencia de privacidad en consecuencia; puede revisar o cambiar sus opciones a continuación.`},fr:{heading:`Contrôle de confidentialité global détecté`,htmlText:`Votre navigateur a envoyé un signal Global Privacy Control. Nous avons appliqué votre préférence de confidentialité en conséquence — vous pouvez vérifier ou modifier vos choix ci-dessous.`},ja:{heading:`グローバル・プライバシー・コントロールを検出しました`,htmlText:`お使いのブラウザからGlobal Privacy Control信号が送信されました。これに応じてお客様のプライバシー設定を適用しました。以下で選択内容を確認・変更いただけます。`}},$e={en:{heading:`Are you 16 or older?`,htmlText:`Please confirm your age before we show you cookie preferences.`,confirmButtonLabel:`Yes`,denyButtonLabel:`No`,parentalConsent:{heading:`Parental consent required`,htmlText:`Only strictly necessary cookies will be used until a parent or guardian verifies consent on your behalf.`,confirmButtonLabel:`OK`}},de:{heading:`Bist du 16 Jahre oder älter?`,htmlText:`Bitte bestätige dein Alter, bevor wir dir die Cookie-Einstellungen anzeigen.`,confirmButtonLabel:`Ja`,denyButtonLabel:`Nein`,parentalConsent:{heading:`Elterliche Zustimmung erforderlich`,htmlText:`Bis ein Elternteil oder Erziehungsberechtigter die Zustimmung in deinem Namen bestätigt, werden nur unbedingt erforderliche Cookies verwendet.`,confirmButtonLabel:`OK`}},es:{heading:`¿Tienes 16 años o más?`,htmlText:`Confirma tu edad antes de mostrarte las preferencias de cookies.`,confirmButtonLabel:`Sí`,denyButtonLabel:`No`,parentalConsent:{heading:`Se requiere consentimiento parental`,htmlText:`Solo se utilizarán las cookies estrictamente necesarias hasta que un padre, madre o tutor confirme el consentimiento en tu nombre.`,confirmButtonLabel:`Aceptar`}},fr:{heading:`Avez-vous 16 ans ou plus\xA0?`,htmlText:`Merci de confirmer votre âge avant que nous vous montrions les préférences de cookies.`,confirmButtonLabel:`Oui`,denyButtonLabel:`Non`,parentalConsent:{heading:`Consentement parental requis`,htmlText:`Seuls les cookies strictement nécessaires seront utilisés jusqu’à ce qu’un parent ou tuteur confirme son consentement en votre nom.`,confirmButtonLabel:`OK`}},ja:{heading:`16歳以上ですか?`,htmlText:`Cookieの設定を表示する前に、年齢をご確認ください。`,confirmButtonLabel:`はい`,denyButtonLabel:`いいえ`,parentalConsent:{heading:`保護者の同意が必要です`,htmlText:`保護者が同意を確認するまで、必要最小限のCookieのみが使用されます。`,confirmButtonLabel:`OK`}}};function et(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=t[r]===void 0?i:{...i,text:t[r]};return n}function tt(e,t){let n=Ze[e]?.translations.en;if(!n)return;if(t===`en`)return n;let r=Qe[e]?.[t];if(!r)return;let i={};for(let[e,t]of Object.entries(n.preferenceModal.categories)){let n=r.preferenceModal.categories[`cat-${e}`];i[e]=n?{...t,heading:n.heading,htmlText:n.htmlText}:t}return{mainBanner:{...n.mainBanner,heading:r.mainBanner.heading,htmlText:r.mainBanner.htmlText,buttons:et(n.mainBanner.buttons,r.mainBanner.buttons)},...n.gpcBanner?{gpcBanner:r.gpcBanner?{...n.gpcBanner,heading:r.gpcBanner.heading,htmlText:r.gpcBanner.htmlText,buttons:et(n.gpcBanner.buttons,r.gpcBanner.buttons)}:n.gpcBanner}:{},preferenceModal:{...n.preferenceModal,heading:r.preferenceModal.heading,...r.preferenceModal.subheading?{subheading:r.preferenceModal.subheading}:{},...r.preferenceModal.htmlText?{htmlText:r.preferenceModal.htmlText}:{},buttons:et(n.preferenceModal.buttons,r.preferenceModal.buttons),categories:i}}}var R=[{value:`en`,label:`en — English`},{value:`en-US`,label:`en-US — English (United States)`},{value:`en-GB`,label:`en-GB — English (United Kingdom)`},{value:`en-AU`,label:`en-AU — English (Australia)`},{value:`en-CA`,label:`en-CA — English (Canada)`},{value:`en-IN`,label:`en-IN — English (India)`},{value:`ar`,label:`ar — Arabic`},{value:`ar-SA`,label:`ar-SA — Arabic (Saudi Arabia)`},{value:`bg-BG`,label:`bg-BG — Bulgarian (Bulgaria)`},{value:`bs-BA`,label:`bs-BA — Bosnian (Bosnia)`},{value:`ca-AD`,label:`ca-AD — Catalan (Andorra)`},{value:`cs-CZ`,label:`cs-CZ — Czech (Czech Republic)`},{value:`da-DK`,label:`da-DK — Danish (Denmark)`},{value:`de`,label:`de — German`},{value:`de-AT`,label:`de-AT — German (Austria)`},{value:`de-CH`,label:`de-CH — German (Switzerland)`},{value:`de-DE`,label:`de-DE — German (Germany)`},{value:`de-LI`,label:`de-LI — German (Liechtenstein)`},{value:`de-LU`,label:`de-LU — German (Luxembourg)`},{value:`el-CY`,label:`el-CY — Greek (Cyprus)`},{value:`el-GR`,label:`el-GR — Greek (Greece)`},{value:`es`,label:`es — Spanish`},{value:`es-ES`,label:`es-ES — Spanish (Spain)`},{value:`es-MX`,label:`es-MX — Spanish (Mexico)`},{value:`es-AR`,label:`es-AR — Spanish (Argentina)`},{value:`et-EE`,label:`et-EE — Estonian (Estonia)`},{value:`fi-FI`,label:`fi-FI — Finnish (Finland)`},{value:`fr`,label:`fr — French`},{value:`fr-BE`,label:`fr-BE — French (Belgium)`},{value:`fr-CH`,label:`fr-CH — French (Switzerland)`},{value:`fr-FR`,label:`fr-FR — French (France)`},{value:`fr-LU`,label:`fr-LU — French (Luxembourg)`},{value:`fr-MC`,label:`fr-MC — French (Monaco)`},{value:`he`,label:`he — Hebrew`},{value:`hi`,label:`hi — Hindi`},{value:`hi-IN`,label:`hi-IN — Hindi (India)`},{value:`hr-HR`,label:`hr-HR — Croatian (Croatia)`},{value:`hu-HU`,label:`hu-HU — Hungarian (Hungary)`},{value:`id`,label:`id — Indonesian`},{value:`is-IS`,label:`is-IS — Icelandic (Iceland)`},{value:`it`,label:`it — Italian`},{value:`it-IT`,label:`it-IT — Italian (Italy)`},{value:`ja`,label:`ja — Japanese`},{value:`ko`,label:`ko — Korean`},{value:`lt-LT`,label:`lt-LT — Lithuanian (Lithuania)`},{value:`lv-LV`,label:`lv-LV — Latvian (Latvia)`},{value:`mk-MK`,label:`mk-MK — Macedonian (North Macedonia)`},{value:`mt-MT`,label:`mt-MT — Maltese (Malta)`},{value:`nb-NO`,label:`nb-NO — Norwegian Bokmål (Norway)`},{value:`nl`,label:`nl — Dutch`},{value:`nl-BE`,label:`nl-BE — Dutch (Belgium)`},{value:`nl-NL`,label:`nl-NL — Dutch (Netherlands)`},{value:`pl-PL`,label:`pl-PL — Polish (Poland)`},{value:`pt`,label:`pt — Portuguese`},{value:`pt-BR`,label:`pt-BR — Portuguese (Brazil)`},{value:`pt-PT`,label:`pt-PT — Portuguese (Portugal)`},{value:`ro-RO`,label:`ro-RO — Romanian (Romania)`},{value:`ru`,label:`ru — Russian`},{value:`sk-SK`,label:`sk-SK — Slovak (Slovakia)`},{value:`sl-SI`,label:`sl-SI — Slovenian (Slovenia)`},{value:`sq-AL`,label:`sq-AL — Albanian (Albania)`},{value:`sr-Latn-BA`,label:`sr-Latn-BA — Serbian Latin (Bosnia)`},{value:`sr-Latn-ME`,label:`sr-Latn-ME — Serbian Latin (Montenegro)`},{value:`sv-SE`,label:`sv-SE — Swedish (Sweden)`},{value:`th`,label:`th — Thai`},{value:`tr`,label:`tr — Turkish`},{value:`uk`,label:`uk — Ukrainian`},{value:`vi`,label:`vi — Vietnamese`},{value:`zh`,label:`zh — Chinese (Simplified)`},{value:`zh-TW`,label:`zh-TW — Chinese (Traditional)`},{value:`zh-HK`,label:`zh-HK — Chinese (Hong Kong)`}],nt=Object.fromEntries(R.map(e=>[e.value,e.label]));function rt(e){return nt[e]??e}function it({value:t,onChange:n,placeholder:r=`Select locale…`,disabled:i,id:a,class:o}){return e(ae,{options:R,value:t,onChange:n,placeholder:r,searchable:!0,...i===void 0?{}:{disabled:i},...a===void 0?{}:{id:a},...o===void 0?{}:{class:o}})}function at({locales:n,defaultLocale:r,activeLocale:i,onSelect:a,onAdd:o,onRemove:s}){let c=h(),[l,u]=t(!1);return e(`div`,{class:`flex flex-wrap items-center gap-1 border-b border-gray-200 mb-4 pb-0`,children:[n.map(t=>e(`div`,{class:`relative flex items-center -mb-px`,children:[e(`button`,{onClick:()=>a(t),title:rt(t),class:`px-3 py-2 text-sm font-medium border-b-2 transition-colors ${t===r?``:`pr-5`} ${t===i?`border-blue-500 text-blue-600`:`border-transparent text-gray-500 hover:text-gray-700`}`,children:[t.toUpperCase(),t===r&&e(`span`,{class:`ml-1 text-xs text-gray-400`,children:c(`profileEditor.content.defaultLocaleLabel`)})]}),t!==r&&e(`button`,{onClick:()=>s(t),class:`absolute right-1 text-gray-300 hover:text-red-500 transition-colors`,"aria-label":`Remove ${t}`,children:e(f,{size:12})})]},t)),l?e(`div`,{class:`flex items-center gap-1.5 ml-2 relative z-10`,children:[e(it,{value:``,onChange:e=>{e&&!n.includes(e)&&o(e),u(!1)},placeholder:c(`profileEditor.content.selectLocale`),class:`w-52`}),e(`button`,{onClick:()=>u(!1),class:`text-xs text-gray-400 hover:underline px-1`,children:c(`common.cancel`)})]}):e(`button`,{onClick:()=>u(!0),class:`px-2 py-2 text-xs text-gray-400 hover:text-blue-600 transition-colors -mb-px border-b-2 border-transparent`,children:c(`profileEditor.content.addLocale`)})]})}function z(e){if(!e||!e.trim())return[];let t=e.trim();if(t.startsWith(`[`))try{return JSON.parse(t)}catch{}return B(e)}function ot(e){return e.length?JSON.stringify(e):``}function B(e){return!e||!e.trim()?[]:st([...new DOMParser().parseFromString(e,`text/html`).body.childNodes])}function st(e){let t=[];for(let n of e)if(n.nodeType===Node.TEXT_NODE){let e=n.textContent??``;e&&t.push({t:`text`,v:e})}else n.nodeType===Node.ELEMENT_NODE&&t.push(...ct(n));return t}function ct(e){let t=e.tagName.toLowerCase(),n=st([...e.childNodes]);switch(t){case`br`:return[{t:`br`}];case`b`:case`strong`:return[{t:`b`,c:n}];case`i`:case`em`:return[{t:`i`,c:n}];case`u`:return[{t:`u`,c:n}];case`ul`:return[{t:`ul`,c:n}];case`ol`:return[{t:`ol`,c:n}];case`li`:return[{t:`li`,c:n}];case`a`:return[{t:`a`,href:e.getAttribute(`href`)??``,c:n}];case`p`:case`div`:case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return n.length===1&&`c`in n[0]&&(n[0].t===`p`||n[0].t===`ul`||n[0].t===`ol`)?n:[{t:`p`,c:n}];case`span`:{let t=e.style,r=n;return t.textDecoration?.includes(`underline`)&&(r=[{t:`u`,c:r}]),t.fontStyle===`italic`&&(r=[{t:`i`,c:r}]),(t.fontWeight===`bold`||t.fontWeight>=`700`)&&(r=[{t:`b`,c:r}]),r}default:return n}}function lt({value:r,onChange:a,placeholder:o,rows:s=4,label:c,required:l,hint:u}){let[d,f]=t(`rich`),p=i(null),m=i(r),[ee,h]=t(()=>T(z(r))),g=e=>T(z(e)),te=e=>{let t=ot(B(e));m.current=t,a(t)};n(()=>{if(r===m.current)return;m.current=r;let e=g(r);d===`rich`&&p.current&&(p.current.innerHTML=e),h(e)},[r]),n(()=>{d===`rich`&&p.current&&(p.current.innerHTML=ee)},[d]);let _=()=>{if(p.current){let e=p.current.innerHTML;te(e),h(e)}f(`code`)},v=()=>f(`rich`),y=(e,t)=>{p.current?.focus(),document.execCommand(e,!1,t??``),p.current&&te(p.current.innerHTML)},ne=()=>{let e=window.prompt(`Enter URL:`);e&&y(`createLink`,e)},re=!r||!z(r).length;return e(`div`,{children:[c&&e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[c,l&&e(`span`,{class:`text-red-500 ml-0.5`,children:`*`}),u&&e(`span`,{class:`ml-1.5 text-gray-400 font-normal`,children:u})]}),e(`div`,{class:`border border-gray-300 rounded-lg overflow-hidden focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-400 transition-shadow`,children:[e(`div`,{class:`flex items-center border-b border-gray-200 bg-gray-50 min-h-[33px]`,children:[e(`div`,{class:`flex shrink-0 border-r border-gray-200`,children:[e(ut,{active:d===`rich`,onClick:v,children:`Text`}),e(ut,{active:d===`code`,onClick:_,icon:e(ce,{size:11}),children:`Code`})]}),d===`rich`&&e(`div`,{class:`flex items-center gap-px px-1.5`,children:[e(V,{title:`Bold`,onAct:()=>y(`bold`),children:e(oe,{size:12})}),e(V,{title:`Italic`,onAct:()=>y(`italic`),children:e(ue,{size:12})}),e(dt,{}),e(V,{title:`Bullet list`,onAct:()=>y(`insertUnorderedList`),children:e(w,{size:12})}),e(V,{title:`Numbered list`,onAct:()=>y(`insertOrderedList`),children:e(de,{size:12})}),e(dt,{}),e(V,{title:`Add link`,onAct:ne,children:e(C,{size:12})}),e(V,{title:`Remove link`,onAct:()=>y(`unlink`),children:e(fe,{size:12})})]})]}),e(`div`,{ref:p,contentEditable:!0,class:`px-3 py-2.5 text-sm text-gray-800 bg-white focus:outline-none prose prose-sm max-w-none ${d===`code`?`hidden`:``}`,style:{minHeight:`${s*1.625}rem`},onInput:()=>p.current&&te(p.current.innerHTML),"data-placeholder":re&&d===`rich`?o??``:``}),d===`code`&&e(`textarea`,{class:`w-full px-3 py-2 text-sm font-mono resize-y focus:outline-none bg-white`,style:{minHeight:`${s*1.625}rem`},value:ee,onInput:e=>{let t=e.target.value;h(t),te(t)},placeholder:o,spellcheck:!1})]}),l&&re&&e(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`This field is required`})]})}function ut({active:t,onClick:n,children:r,icon:i}){return e(`button`,{type:`button`,onClick:n,class:`flex items-center gap-1 text-xs px-3 py-1.5 transition-colors ${t?`bg-white text-gray-800 font-medium border-b-2 border-blue-500 -mb-px`:`text-gray-500 hover:text-gray-700`}`,children:[i,r]})}function V({title:t,onAct:n,children:r}){return e(`button`,{type:`button`,title:t,onMouseDown:e=>{e.preventDefault(),n()},class:`p-1 text-gray-500 hover:text-gray-800 hover:bg-gray-200 rounded transition-colors`,children:r})}function dt(){return e(`div`,{class:`w-px h-3.5 bg-gray-200 mx-0.5`})}function ft(e){let t=e.trim().toLowerCase();try{if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=new URL(t);return e.port?`${e.hostname}:${e.port}`:e.hostname}}catch{}return t}function pt(e){let t=e.startsWith(`*.`)?e.slice(2):e;if(/^localhost(:\d{1,5})?$/.test(t))return!0;let[n,r]=t.split(`:`);return r!==void 0&&!/^\d{1,5}$/.test(r)?!1:/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$/.test(n??``)}function mt(e){return e.split(/[\s,\n]+/).map(ft).filter(e=>e.length>0)}function ht({value:n,onChange:r,placeholder:i,disabled:a}){let[o,s]=t(``),[c,l]=t(!1),u=e=>{let t=mt(e);if(t.filter(e=>!pt(e)).length>0){l(!0);return}l(!1),r([...new Set([...n,...t])]),s(``)},d=e=>r(n.filter(t=>t!==e)),p=e=>{s(e),l(!1)};return e(`div`,{class:`space-y-1`,children:[e(`div`,{class:`flex flex-wrap gap-1.5 border rounded px-3 py-2 min-h-[42px] focus-within:ring-1 transition-colors ${c?`border-red-400 focus-within:ring-red-400`:`border-gray-300 focus-within:ring-blue-500 focus-within:border-blue-500`} ${a?`bg-gray-50`:`bg-white`}`,children:[n.map(t=>e(`span`,{class:`inline-flex items-center gap-1 bg-blue-50 text-blue-700 text-xs px-2 py-0.5 rounded-full border border-blue-200 font-mono`,children:[t,!a&&e(`button`,{type:`button`,onClick:()=>d(t),class:`text-blue-400 hover:text-blue-700 leading-none ml-0.5`,"aria-label":`Remove ${t}`,children:e(f,{size:10})})]},t)),!a&&e(`input`,{type:`text`,value:o,class:`outline-none flex-1 min-w-[200px] text-sm bg-transparent`,placeholder:n.length===0?i??`example.com, *.staging.example.com`:``,onInput:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`||e.key===`,`?(e.preventDefault(),o.trim()&&u(o)):e.key===`Backspace`&&!o&&n.length>0&&r(n.slice(0,-1))},onBlur:()=>{o.trim()&&u(o)},onPaste:e=>{e.preventDefault();let t=e.clipboardData?.getData(`text`)??``;t.trim()&&u(t)}})]}),c&&e(`p`,{class:`flex items-center gap-1 text-xs text-red-600`,children:[e(se,{size:12}),`Invalid domain. Use `,e(`code`,{class:`font-mono bg-red-50 px-1 rounded`,children:`example.com`}),` or `,e(`code`,{class:`font-mono bg-red-50 px-1 rounded`,children:`*.example.com`}),`. Full URLs are accepted and normalized automatically.`]})]})}function gt(e){return ot(B(e))}function H(e){return T(z(e))}function U(e,t,n,r){let i=[];i.push(`mainBanner.heading`,`mainBanner.htmlText`);for(let t of e.buttons)i.push(`mainBanner.button.${t.id}`);i.push(`gpcBanner.heading`,`gpcBanner.htmlText`);for(let e of t.buttons)i.push(`gpcBanner.button.${e.id}`);i.push(`preferenceModal.heading`,`preferenceModal.subheading`,`preferenceModal.htmlText`);for(let e of n.buttons)i.push(`preferenceModal.button.${e.id}`);i.push(`preferenceModal.receiptLabel`,`preferenceModal.receiptDescription`);for(let[e,t]of Object.entries(r))i.push(`category.${e}.heading`,`category.${e}.htmlText`),t.legalBasis===`legitimate_interest`&&i.push(`category.${e}.legitimateInterestDescription`);return i}function _t(e,t,n,r,i){let a={};a[`mainBanner.heading`]=e.mainBanner.heading,a[`mainBanner.htmlText`]=H(e.mainBanner.htmlText),t.buttons.forEach(t=>{a[`mainBanner.button.${t.id}`]=e.mainBanner.buttonLabels[t.id]??``}),a[`gpcBanner.heading`]=e.gpcBanner.heading,a[`gpcBanner.htmlText`]=H(e.gpcBanner.htmlText),n.buttons.forEach(t=>{a[`gpcBanner.button.${t.id}`]=e.gpcBanner.buttonLabels[t.id]??``}),a[`preferenceModal.heading`]=e.preferenceModal.heading,a[`preferenceModal.subheading`]=e.preferenceModal.subheading,a[`preferenceModal.htmlText`]=H(e.preferenceModal.htmlText),r.buttons.forEach(t=>{a[`preferenceModal.button.${t.id}`]=e.preferenceModal.buttonLabels[t.id]??``}),a[`preferenceModal.receiptLabel`]=e.preferenceModal.receiptLabel??``,a[`preferenceModal.receiptDescription`]=e.preferenceModal.receiptDescription??``;for(let[t,n]of Object.entries(i)){let r=e.preferenceModal.categories.find(e=>e.id===t);a[`category.${t}.heading`]=r?.heading??``,a[`category.${t}.htmlText`]=r?H(r.htmlText):``,n.legalBasis===`legitimate_interest`&&(a[`category.${t}.legitimateInterestDescription`]=r?.legitimateInterestDescription??``)}return a}function vt(e,t,n,r,i,a){let o=t=>e[t],s={...t.mainBanner.buttonLabels};n.buttons.forEach(e=>{let t=o(`mainBanner.button.${e.id}`);t!==void 0&&(s[e.id]=t)});let c={...t.gpcBanner.buttonLabels};r.buttons.forEach(e=>{let t=o(`gpcBanner.button.${e.id}`);t!==void 0&&(c[e.id]=t)});let l={...t.preferenceModal.buttonLabels};i.buttons.forEach(e=>{let t=o(`preferenceModal.button.${e.id}`);t!==void 0&&(l[e.id]=t)});let u=o(`preferenceModal.receiptLabel`),d=o(`preferenceModal.receiptDescription`);return{mainBanner:{heading:o(`mainBanner.heading`)??t.mainBanner.heading,htmlText:o(`mainBanner.htmlText`)===void 0?t.mainBanner.htmlText:gt(o(`mainBanner.htmlText`)),buttonLabels:s},gpcBanner:{heading:o(`gpcBanner.heading`)??t.gpcBanner.heading,htmlText:o(`gpcBanner.htmlText`)===void 0?t.gpcBanner.htmlText:gt(o(`gpcBanner.htmlText`)),buttonLabels:c},preferenceModal:{heading:o(`preferenceModal.heading`)??t.preferenceModal.heading,subheading:o(`preferenceModal.subheading`)??t.preferenceModal.subheading,htmlText:o(`preferenceModal.htmlText`)===void 0?t.preferenceModal.htmlText:gt(o(`preferenceModal.htmlText`)),buttonLabels:l,...u===void 0?t.preferenceModal.receiptLabel===void 0?{}:{receiptLabel:t.preferenceModal.receiptLabel}:{receiptLabel:u},...d===void 0?t.preferenceModal.receiptDescription===void 0?{}:{receiptDescription:t.preferenceModal.receiptDescription}:{receiptDescription:d},categories:Object.keys(a).map(e=>{let n=t.preferenceModal.categories.find(t=>t.id===e),r=o(`category.${e}.heading`),i=o(`category.${e}.htmlText`),a=o(`category.${e}.legitimateInterestDescription`);return{id:e,heading:r??n?.heading??``,htmlText:i===void 0?n?.htmlText??``:gt(i),...a===void 0?n?.legitimateInterestDescription===void 0?{}:{legitimateInterestDescription:n.legitimateInterestDescription}:{legitimateInterestDescription:a}}})}}}function yt(e,t,n,r,i){let a={};for(let{value:o}of R){let s=e[o];a[o]=s?_t(s,t,n,r,i):{}}return JSON.stringify(a,null,2)}var bt=/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/i;function xt(e,t,n,r,i,a){let o=JSON.parse(e);if(!o||typeof o!=`object`||Array.isArray(o))throw Error(`Invalid JSON`);let s={},c=[];for(let[e,l]of Object.entries(o)){if(!bt.test(e)||!l||typeof l!=`object`||Array.isArray(l)){c.push(e);continue}if(Object.keys(l).length!==0)try{s[e]=vt(l,t,n,r,i,a)}catch{c.push(e)}}return{locales:s,skipped:c}}function St(e){return`"${e.replace(/"/g,`""`)}"`}function Ct(e,t,n,r,i){let a=U(t,n,r,i),o=[[`locale`,...a]];for(let{value:s}of R){let c=e[s],l=c?_t(c,t,n,r,i):null;o.push([s,...a.map(e=>St(l?.[e]??``))])}return o.map(e=>e.join(`,`)).join(`
2
+ `)}function W(e){let t=[],n=``,r=!1;for(let i=0;i<e.length;i++){let a=e[i];r?a===`"`&&e[i+1]===`"`?(n+=`"`,i++):a===`"`?r=!1:n+=a:a===`"`?r=!0:a===`,`?(t.push(n),n=``):n+=a}return t.push(n),t}function wt(e,t,n,r,i,a){let o=e.split(/\r?\n/).filter(e=>e.trim());if(o.length<1)return{locales:{},skipped:[]};let s=W(o[0]).map(e=>e.trim()).slice(1),c={},l=[];for(let e of o.slice(1)){let o=W(e),u=(o[0]??``).trim();if(!u)continue;if(!bt.test(u)){l.push(u);continue}let d={},f=!1;s.forEach((e,t)=>{let n=(o[t+1]??``).trim();n&&(f=!0),d[e]=n}),f&&(c[u]=vt(d,t,n,r,i,a))}return{locales:c,skipped:l}}function Tt(e,t,n){let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,a.style.display=`none`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}function G(e){return e.replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim()}function Et(e){return(e.match(/[.!?]+/g)??[]).length||1}function Dt(e){return e.split(/\s+/).filter(Boolean)}function Ot(e){let t=[];if(e.heading&&e.heading.length>80&&t.push({field:`heading`,code:`heading_too_long`,value:e.heading.length}),e.htmlText){let n=G(e.htmlText),r=Dt(n),i=Et(n),a=r.length/i;a>25&&t.push({field:`htmlText`,code:`avg_sentence_too_long`,value:Math.round(a)}),r.length>150&&t.push({field:`htmlText`,code:`total_words_too_long`,value:r.length})}return t}function kt(e,t){return e===`manage`?`manage`:e===`close`?`close`:e===`link`?`link`:e===`submit`||e===`custom`?t===`*`?`acceptAll`:t===`!`?`denyAll`:Array.isArray(t)?`customSubset`:`finalSubmit`:`other`}var At={acceptAll:`Accept All`,denyAll:`Reject All`,customSubset:`Select`,finalSubmit:`Save Preferences`,manage:`Manage Preferences`,close:`Close`,link:`Learn More`,other:`Continue`};function jt(e,t){let n=new Map;for(let e of Object.values(t)){let t=kt(e.action,e.cookies);n.has(t)||n.set(t,e.text)}let r={};for(let[t,i]of Object.entries(e)){let e=kt(i.action,i.cookies);r[t]=n.get(e)??At[e]}return r}var Mt=e=>({heading:e.replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),htmlText:`Used to enable specific functionality on this website.`});function K(e){return Object.fromEntries(Object.keys(e).map(e=>[e,``]))}function Nt(e,t,n,r){if(!Ze[e])return{mainBanner:{heading:``,htmlText:``,buttonLabels:K(t.mainBanner.buttons)},gpcBanner:{heading:``,htmlText:``,buttonLabels:K(t.gpcBanner.buttons)},preferenceModal:{heading:``,subheading:``,htmlText:``,buttonLabels:K(t.preferenceModal.buttons),categories:Object.keys(n?.categories??{}).map(e=>({id:e,heading:``,htmlText:``}))}};let i=e,a=tt(i,r)??Ze[i]?.translations.en,o=a?.preferenceModal.categories??{},s={necessary:`necessary`,functional:`functional`,preferences:`functional`,analytics:`analytics`,marketing:`marketing`},c=Object.entries(n?.categories??{}).map(([e,t])=>{let r=(t.cookies??[]).map(e=>n?.cookies?.[e]?.purpose).filter(e=>!!e).map(e=>s[e]).find(e=>e&&o[e]),i=r?o[r]:void 0;return i?{id:e,heading:i.heading,htmlText:i.htmlText}:{id:e,...Mt(e)}}),l=a?.mainBanner,u=a?.gpcBanner,d=a?.preferenceModal,f=L[r]??L.en;return{mainBanner:{heading:l?.heading??``,htmlText:l?.htmlText??``,buttonLabels:jt(t.mainBanner.buttons,l?.buttons??{})},gpcBanner:{heading:u?.heading??f.heading,htmlText:u?.htmlText??f.htmlText,buttonLabels:jt(t.gpcBanner.buttons,u?.buttons??l?.buttons??{})},preferenceModal:{heading:d?.heading??``,subheading:d?.subheading??``,htmlText:d?.htmlText??``,buttonLabels:jt(t.preferenceModal.buttons,d?.buttons??{}),categories:c}}}function q(e){return ot(B(e))}function Pt({step:t,labels:n,descriptions:r=[],disabledSteps:i=[]}){return e(`div`,{class:`flex items-center gap-0 mb-6`,children:n.map((a,o)=>{let s=o+1,l=i.includes(s),u=t>s&&!l,d=t===s,f=u?r[o]:void 0;return e(`div`,{class:`flex items-center flex-1 last:flex-none`,children:[e(`div`,{class:`flex items-center gap-2 shrink-0`,children:[e(`div`,{class:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold transition-colors shrink-0 ${l?`bg-gray-100 text-gray-300`:u?`bg-green-500 text-white`:d?`bg-blue-600 text-white`:`bg-gray-200 text-gray-500`}`,children:u?e(c,{size:14}):s}),e(`div`,{class:`hidden sm:flex flex-col leading-tight min-w-0`,children:[e(`span`,{class:`text-sm font-medium ${l?`text-gray-300 line-through`:d?`text-blue-600`:u?`text-green-600`:`text-gray-400`}`,children:a}),f&&e(`span`,{class:`text-[11px] text-gray-400 truncate max-w-[12rem]`,title:f,children:f})]})]}),o<n.length-1&&e(`div`,{class:`h-px flex-1 mx-3 ${t>s?`bg-green-400`:`bg-gray-200`}`})]},s)})})}function J(e){return Object.fromEntries(Object.keys(e).map(e=>[e,``]))}function Ft(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]={text:t[r]??``,style:i.type,action:i.action,...i.cookies==null?{}:{cookies:i.cookies},...i.url==null?{}:{url:i.url}};return n}function Y(e,t){return{mainBanner:{heading:``,htmlText:``,buttonLabels:J(e.mainBanner.buttons)},gpcBanner:{heading:``,htmlText:``,buttonLabels:J(e.gpcBanner.buttons)},preferenceModal:{heading:``,subheading:``,htmlText:``,buttonLabels:J(e.preferenceModal.buttons),categories:Object.keys(t?.categories??{}).map(e=>({id:e,heading:``,htmlText:``}))}}}function It(e){let t=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.trim()?t:x(e)])),n=(e,t)=>e&&O(e)?e:t,r=(e,t)=>e?.trim()?e:t,i=e.ageGateModal;return{mainBanner:{...e.mainBanner,heading:e.mainBanner.heading?.trim()?e.mainBanner.heading:b,htmlText:O(e.mainBanner.htmlText)?e.mainBanner.htmlText:S,buttonLabels:t(e.mainBanner.buttonLabels)},gpcBanner:{...e.gpcBanner,heading:e.gpcBanner.heading?.trim()?e.gpcBanner.heading:b,htmlText:O(e.gpcBanner.htmlText)?e.gpcBanner.htmlText:S,buttonLabels:t(e.gpcBanner.buttonLabels)},preferenceModal:{...e.preferenceModal,heading:e.preferenceModal.heading?.trim()?e.preferenceModal.heading:b,subheading:e.preferenceModal.subheading?.trim()?e.preferenceModal.subheading:S,buttonLabels:t(e.preferenceModal.buttonLabels)},ageGateModal:{heading:r(i?.heading,b),htmlText:n(i?.htmlText,S),confirmButtonLabel:r(i?.confirmButtonLabel,`Yes`),denyButtonLabel:r(i?.denyButtonLabel,`No`),parentalConsent:{heading:r(i?.parentalConsent?.heading,b),htmlText:n(i?.parentalConsent?.htmlText,S),confirmButtonLabel:r(i?.parentalConsent?.confirmButtonLabel,`OK`)}}}}function Lt(e,t,n){let r=Object.keys(n?.categories??{}),i=(e,t)=>Object.fromEntries(Object.keys(e).map(e=>[e,t[e]??``]));return{...e,mainBanner:{...e.mainBanner,buttonLabels:i(t.mainBanner.buttons,e.mainBanner.buttonLabels)},gpcBanner:{...e.gpcBanner,buttonLabels:i(t.gpcBanner.buttons,e.gpcBanner.buttonLabels)},preferenceModal:{...e.preferenceModal,buttonLabels:i(t.preferenceModal.buttons,e.preferenceModal.buttonLabels),categories:r.map(t=>({id:t,heading:e.preferenceModal.categories.find(e=>e.id===t)?.heading??``,htmlText:e.preferenceModal.categories.find(e=>e.id===t)?.htmlText??``}))}}}function Rt(e,t,n){let r=_(n),i=e===`opt-out`||e===`opt-out-strict`,a={};for(let[e,n]of Object.entries(t)){if(v(e,r)!==`consent`)continue;let t=!i;t!==(n.preGrant??!1)&&(a[e]={preGrant:t})}return a}function zt(e,t,n,r=!1,i=!0){return{mainBanner:{position:e.mainBanner.position,overlayOpacity:e.mainBanner.overlayOpacity,showClose:e.mainBanner.showClose,showLocaleSwitcher:e.mainBanner.showLocaleSwitcher,headingTag:e.mainBanner.headingTag,heading:n.mainBanner.heading,htmlText:D(n.mainBanner.htmlText),buttons:Ft(e.mainBanner.buttons,n.mainBanner.buttonLabels)},...i?{gpcBanner:{position:e.gpcBanner.position,overlayOpacity:e.gpcBanner.overlayOpacity,showClose:e.gpcBanner.showClose,showLocaleSwitcher:e.gpcBanner.showLocaleSwitcher,headingTag:e.gpcBanner.headingTag,heading:n.gpcBanner.heading,htmlText:D(n.gpcBanner.htmlText),buttons:Ft(e.gpcBanner.buttons,n.gpcBanner.buttonLabels)}}:{},preferenceModal:{position:e.preferenceModal.position,overlayOpacity:e.preferenceModal.overlayOpacity,showClose:e.preferenceModal.showClose,showLocaleSwitcher:e.preferenceModal.showLocaleSwitcher,showForgetMe:e.preferenceModal.showForgetMe,persistent:e.preferenceModal.persistent,headingTag:e.preferenceModal.headingTag,heading:n.preferenceModal.heading,...e.preferenceModal.hasSubheading&&n.preferenceModal.subheading?{subheading:n.preferenceModal.subheading}:{},...n.preferenceModal.htmlText?{htmlText:D(n.preferenceModal.htmlText)}:{},...n.preferenceModal.receiptLabel?{receiptLabel:n.preferenceModal.receiptLabel}:{},...n.preferenceModal.receiptDescription?{receiptDescription:n.preferenceModal.receiptDescription}:{},...n.preferenceModal.forgetMeLabel?{forgetMeLabel:n.preferenceModal.forgetMeLabel}:{},buttons:Ft(e.preferenceModal.buttons,n.preferenceModal.buttonLabels),categories:Object.fromEntries(Object.entries(t.categories).map(([e,t])=>{let r=n.preferenceModal.categories.find(t=>t.id===e);return[e,{heading:r?.heading||t.heading||e,headingTag:t.headingTag,htmlText:D(r?.htmlText),legalBasis:t.legalBasis,...t.legalBasis===`legitimate_interest`&&r?.legitimateInterestDescription?{legitimateInterestDescription:r.legitimateInterestDescription}:{},cookies:t.cookies}]}))},...n.ageGateModal?.htmlText&&n.ageGateModal.confirmButtonLabel&&n.ageGateModal.denyButtonLabel&&(!r||n.ageGateModal.parentalConsent?.htmlText&&n.ageGateModal.parentalConsent.confirmButtonLabel)?{ageGateModal:{...n.ageGateModal.heading?{heading:n.ageGateModal.heading}:{},htmlText:D(n.ageGateModal.htmlText),confirmButtonLabel:n.ageGateModal.confirmButtonLabel,denyButtonLabel:n.ageGateModal.denyButtonLabel,parentalConsent:r?{...n.ageGateModal.parentalConsent?.heading?{heading:n.ageGateModal.parentalConsent.heading}:{},htmlText:D(n.ageGateModal.parentalConsent?.htmlText??``),confirmButtonLabel:n.ageGateModal.parentalConsent?.confirmButtonLabel??``}:{htmlText:``,confirmButtonLabel:``}}}:{}}}function Bt(e,t){let n=e=>Object.fromEntries(Object.entries(e??{}).map(([e,t])=>[e,t.text??``])),r=Object.keys(t?t.categories:e.preferenceModal.categories??{});return{mainBanner:{heading:e.mainBanner.heading??``,htmlText:q(e.mainBanner.htmlText??``),buttonLabels:n(e.mainBanner.buttons)},gpcBanner:{heading:e.gpcBanner?.heading??``,htmlText:q(e.gpcBanner?.htmlText??``),buttonLabels:n(e.gpcBanner?.buttons)},preferenceModal:{heading:e.preferenceModal.heading??``,subheading:e.preferenceModal.subheading??``,htmlText:e.preferenceModal.htmlText?q(e.preferenceModal.htmlText):``,buttonLabels:n(e.preferenceModal.buttons),categories:r.map(t=>{let n=e.preferenceModal.categories?.[t];return{id:t,heading:n?.heading??``,htmlText:n?.htmlText?q(n.htmlText):``,...n?.legitimateInterestDescription===void 0?{}:{legitimateInterestDescription:n.legitimateInterestDescription}}}),...e.preferenceModal.receiptLabel===void 0?{}:{receiptLabel:e.preferenceModal.receiptLabel},...e.preferenceModal.receiptDescription===void 0?{}:{receiptDescription:e.preferenceModal.receiptDescription},...e.preferenceModal.forgetMeLabel===void 0?{}:{forgetMeLabel:e.preferenceModal.forgetMeLabel}},...e.ageGateModal?{ageGateModal:{...e.ageGateModal.heading?{heading:e.ageGateModal.heading}:{},htmlText:e.ageGateModal.htmlText?q(e.ageGateModal.htmlText):``,confirmButtonLabel:e.ageGateModal.confirmButtonLabel??``,denyButtonLabel:e.ageGateModal.denyButtonLabel??``,parentalConsent:{...e.ageGateModal.parentalConsent?.heading?{heading:e.ageGateModal.parentalConsent.heading}:{},htmlText:e.ageGateModal.parentalConsent?.htmlText?q(e.ageGateModal.parentalConsent.htmlText):``,confirmButtonLabel:e.ageGateModal.parentalConsent?.confirmButtonLabel??``}}}:{}}}function Vt(e,t){return e.includes(t)?[t,...e.filter(e=>e!==t)]:e}function Ht(e,t,n=!1){let r=[];for(let[i,a]of Object.entries(e)){if(t.includes(`ageGateModal`)&&(O(a.ageGateModal?.htmlText??``)||r.push({locale:i,section:`ageGateModal`,field:`htmlText`}),a.ageGateModal?.confirmButtonLabel?.trim()||r.push({locale:i,section:`ageGateModal`,field:`confirmButtonLabel`}),a.ageGateModal?.denyButtonLabel?.trim()||r.push({locale:i,section:`ageGateModal`,field:`denyButtonLabel`}),n&&(O(a.ageGateModal?.parentalConsent?.htmlText??``)||r.push({locale:i,section:`ageGateModal`,field:`parentalConsent.htmlText`}),a.ageGateModal?.parentalConsent?.confirmButtonLabel?.trim()||r.push({locale:i,section:`ageGateModal`,field:`parentalConsent.confirmButtonLabel`}))),t.includes(`mainBanner`)){O(a.mainBanner.htmlText)||r.push({locale:i,section:`mainBanner`,field:`htmlText`});for(let[e,t]of Object.entries(a.mainBanner.buttonLabels))t.trim()||r.push({locale:i,section:`mainBanner`,field:`buttons.${e}`})}if(t.includes(`gpcBanner`)){O(a.gpcBanner.htmlText)||r.push({locale:i,section:`gpcBanner`,field:`htmlText`});for(let[e,t]of Object.entries(a.gpcBanner.buttonLabels))t.trim()||r.push({locale:i,section:`gpcBanner`,field:`buttons.${e}`})}if(t.includes(`preferenceModal`)){a.preferenceModal.heading?.trim()||r.push({locale:i,section:`preferenceModal`,field:`heading`}),O(a.preferenceModal.htmlText)||r.push({locale:i,section:`preferenceModal`,field:`htmlText`});for(let[e,t]of Object.entries(a.preferenceModal.buttonLabels))t.trim()||r.push({locale:i,section:`preferenceModal`,field:`buttons.${e}`});for(let e of a.preferenceModal.categories)e.heading?.trim()||r.push({locale:i,section:`preferenceModal`,field:`categories.${e.id}.heading`})}}return r}function Ut(e,t){return t===`preferenceModal`||e[t]?.heading?.trim()?[]:[`heading`]}function Wt(e,t){if(!e)return!1;if(t===`ageGateModal`){let t=e.ageGateModal;return t?O(t.heading??``)||O(t.htmlText??``)||!!t.confirmButtonLabel?.trim()||!!t.denyButtonLabel?.trim()||O(t.parentalConsent?.heading??``)||O(t.parentalConsent?.htmlText??``)||!!t.parentalConsent?.confirmButtonLabel?.trim():!1}if(t===`preferenceModal`){let t=e.preferenceModal;return O(t.heading??``)||O(t.subheading??``)||O(t.htmlText??``)||Object.values(t.buttonLabels).some(e=>e.trim())||t.categories.some(e=>O(e.heading??``)||O(e.htmlText??``))}let n=e[t];return O(n.heading??``)||O(n.htmlText??``)||Object.values(n.buttonLabels).some(e=>e.trim())}function Gt(e,t,n,r,i,a,o=!0,s){let c=a??n,l=r[c]??r[n]??Y(t,e),u=zt(t,e,o?It(l):l,s?.requireParentalConsent);return{cookies:e.cookies,...s?{ageGate:s}:{},...i===void 0?{}:{expiryDays:i},defaultLocale:c,translations:{[c]:u}}}var Kt={heading_too_long:`readability.headingTooLong`,avg_sentence_too_long:`readability.avgSentenceLong`,total_words_too_long:`readability.totalWordsLong`};function qt({heading:t,htmlText:n}){let r=h(),i=Ot({...t===void 0?{}:{heading:t},...n===void 0?{}:{htmlText:n}});return i.length?e(`div`,{class:`mt-1 space-y-0.5`,children:i.map((t,n)=>e(`p`,{class:`text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1`,children:r(Kt[t.code]??`readability.headingTooLong`,{n:t.value})},n))}):null}function Jt({categories:t,labels:n}){let r=Object.entries(t);return r.length?e(`div`,{class:`overflow-x-auto mb-4`,children:e(`table`,{class:`w-full text-xs`,children:[e(`thead`,{children:e(`tr`,{class:`text-left text-gray-500 border-b border-gray-200`,children:[e(`th`,{scope:`col`,class:`pb-2 pr-3 pl-1 font-medium`,children:n.id}),e(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium`,children:n.legalBasis}),e(`th`,{scope:`col`,class:`pb-2 font-medium`,children:n.cookies})]})}),e(`tbody`,{children:r.map(([t,n])=>e(`tr`,{class:`border-b border-gray-100 last:border-0 align-top`,children:[e(`td`,{class:`py-1.5 pr-3 pl-1 font-mono text-gray-800`,children:t}),e(`td`,{class:`py-1.5 pr-3 text-gray-600`,children:n.legalBasis}),e(`td`,{class:`py-1.5 text-gray-600 flex gap-2`,children:[e(`span`,{class:`text-gray-400`,children:[`(`,n.cookies.length,`)`]}),` `,n.cookies.map(t=>e(`span`,{class:`bg-gray-100 px-2 py-1 rounded-full text-[10px] text-italic font-mono`,children:t},t))]})]},t))})]})}):null}function Yt({cookies:t,categories:n,labels:r,cookiesOverride:i,onTogglePreGrant:a}){let o=Object.entries(t);if(!o.length)return e(`p`,{class:`text-xs text-gray-400 italic`,children:r.noNoCookies});let s=_(n);return e(`div`,{class:`overflow-x-auto`,children:e(`table`,{class:`w-full text-xs`,children:[e(`thead`,{children:e(`tr`,{class:`text-left text-gray-500 border-b border-gray-200`,children:[e(`th`,{scope:`col`,class:`pb-2 pr-3 pl-1 font-medium`,children:r.id}),e(`th`,{scope:`col`,class:`pb-2 pr-3 pl-1 font-medium`,children:r.purpose}),e(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium text-center`,children:r.gpc}),e(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium text-center`,children:r.preGrant}),e(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium`,children:r.tcfVendor}),e(`th`,{scope:`col`,class:`pb-2 font-medium`,children:r.cpraCategory})]})}),e(`tbody`,{children:o.map(([t,n])=>{let o=v(t,s)!==`consent`,c=o?!0:i?.[t]?.preGrant??n.preGrant??!1;return e(`tr`,{class:`border-b border-gray-100 last:border-0`,children:[e(`td`,{class:`py-1.5 pr-3 pl-1 font-mono text-gray-800`,children:t}),e(`td`,{class:`py-1.5 pr-3 pl-1 font-mono text-gray-800`,children:n.purpose}),e(`td`,{class:`py-1.5 pr-3 text-center text-gray-600`,children:n.listenGpc?e(`span`,{class:`text-green-600`,children:`✓`}):`–`}),e(`td`,{class:`py-1.5 pr-3 text-center text-gray-600`,children:a?e(`input`,{type:`checkbox`,class:`w-3.5 h-3.5 accent-blue-600`,checked:c,disabled:o,onChange:e=>a(t,e.target.checked),title:o?r.preGrantLocked:``,"aria-label":`${r.preGrant} ${t}`}):c?e(`span`,{class:`text-green-600`,children:`✓`}):`–`}),e(`td`,{class:`py-1.5 pr-3 text-gray-600`,children:n.tcfVendorId??`–`}),e(`td`,{class:`py-1.5 text-gray-600`,children:n.cpraCategory??`–`})]},t)})})]})})}function Xt({id:o,current:c}){let f=h(),_=!o||o===`new`,[v,b]=t(``),[x,S]=t(`en`),[oe,se]=t([]),[ce,ue]=t([]),[C,de]=t(``),[w,fe]=t(``),[T,E]=t(``),[he,ge]=t(!1),[D,_e]=t(!0),[ve,O]=t(_),[ye,be]=t(!1),[xe,Se]=t(!1),[Ce,we]=t(``),[Te,Ee]=t(``),[De,Oe]=t(``),[ke,Ae]=t(!1),[je,Me]=t(16),[k,Ne]=t(!1),[Pe,Fe]=t(365),[Ie,Le]=t(``),[Re,ze]=t([]),[Be,Ve]=t([]),[He,Ue]=t(``),[A,We]=t(null),[j,Ge]=t(``),[M,Ke]=t(null),[qe,Je]=t({}),[Ye,Xe]=t(!1),[N,P]=t(`en`),[F,I]=t({}),[Ze,Qe]=t(``),[L,et]=t([]),[tt,R]=t([]),nt=i(null),[z,ot]=t([]),[B,st]=t([]),[ct,ut]=t(!1),[V,dt]=t(null),[ft,pt]=t(null),{requestConfirm:mt,dialog:gt}=d(),[H,U]=t(1),[_t,vt]=t(!_);ee(f(_t?`profileEditor.title.loading`:_?`profileEditor.title.new`:`profileEditor.title.edit`));let[bt,St]=t(!1),[W,G]=t(``);n(()=>{Promise.all([re.list(),ne.list()]).then(([e,t])=>{ze(e),Ve(t)}).catch(()=>{})},[]),n(()=>{if(_)return;let e=!1;return(async()=>{try{let t=await g.get(o);if(e)return;b(t.name),S(t.defaultLocale),P(t.defaultLocale);let n=t.profileJson;Array.isArray(n.regulations)?ue(n.regulations):typeof n.regulation==`string`&&n.regulation&&ue([n.regulation]),Array.isArray(n.allowedOrigins)&&se(n.allowedOrigins),typeof n.complianceGroup==`string`&&de(n.complianceGroup),typeof n.customComplianceGroup==`string`&&fe(n.customComplianceGroup),n.gpcMode!==void 0&&E(String(n.gpcMode)),n.darkMode===!0&&ge(!0),typeof n.hidePoweredBy==`boolean`&&_e(n.hidePoweredBy),O(n.allowReceipt===!0),n.enhanceAccessibility===!0&&be(!0),n.showFooterMetadata===!0&&Se(!0),typeof n.expiryDays==`number`&&Fe(n.expiryDays),n.dpdpa&&(we(n.dpdpa.dataFiduciary??``),Ee(n.dpdpa.grievanceEmail??``),Oe(n.dpdpa.purposeDescription??``)),n.ageGate?.enabled&&(Ae(!0),Me(n.ageGate.minimumAge),Ne(n.ageGate.requireParentalConsent===!0)),n.cookiesOverride&&typeof n.cookiesOverride==`object`&&Je(n.cookiesOverride);let r=n.consentTemplateId,i=n.uiTemplateId,a=null;if(r&&(Ue(r),a=await re.get(r).catch(()=>null),!e&&a&&We(a)),i){Ge(i);let r=await ne.get(i).catch(()=>null);if(e)return;if(r&&Ke(r),r&&n.mainBanner&&n.preferenceModal){let i=n.locales?.length?n.locales:[t.defaultLocale],s=await Promise.all(i.map(async e=>{if(e===t.defaultLocale)return[e,Bt({mainBanner:n.mainBanner,...n.gpcBanner?{gpcBanner:n.gpcBanner}:{},preferenceModal:n.preferenceModal,...n.ageGateModal?{ageGateModal:n.ageGateModal}:{}},a)];try{return[e,Bt(await g.getVersion(o,String(t.version),e),a)]}catch{return[e,Y(r,a)]}}));e||I(Object.fromEntries(s))}}}catch{e||G(f(`profileEditor.error.load`))}finally{e||vt(!1)}})(),()=>{e=!0}},[o,_]);let Et=e=>{if(de(e),!e){E(``),Xe(!1);return}fe(``);let t=y[e];if(t&&(E(t.defaultGpc),O(e.startsWith(`opt-in`)),A)){let t=Rt(e,A.cookies,A.categories);Je(t),Xe(Object.keys(t).length>0&&(e===`opt-out`||e===`opt-out-strict`))}},Dt=(e,t)=>{Je(n=>{let r=A?.cookies[e]?.preGrant??!1,{[e]:i,...a}=n;return t===r?a:{...a,[e]:{preGrant:t}}})},Ot=e=>{fe(e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``))},kt=e=>{if(Ue(e),!e){We(null);return}re.get(e).then(e=>{if(We(e),C){let t=Rt(C,e.cookies,e.categories);Je(t),Xe(Object.keys(t).length>0&&(C===`opt-out`||C===`opt-out-strict`))}}).catch(()=>We(null))},At=e=>{if(Ge(e),!e){Ke(null);return}ne.get(e).then(e=>{Ke(e),I(t=>{let n=Object.keys(t),r=n.length?n:[x],i={};for(let n of r)i[n]=t[n]?Lt(t[n],e,A):Y(e,A);return i})}).catch(()=>Ke(null))},jt=e=>{I(t=>({...t,[e]:M?Y(M,A):{mainBanner:{heading:``,htmlText:``,buttonLabels:{}},gpcBanner:{heading:``,htmlText:``,buttonLabels:{}},preferenceModal:{heading:``,subheading:``,htmlText:``,buttonLabels:{},categories:[]}}})),P(e)},Mt=e=>{e!==x&&(I(t=>{let{[e]:n,...r}=t;return r}),N===e&&P(x))},K=(e,t,n)=>{I(r=>({...r,[N]:{...r[N],[e]:{...r[N][e],[t]:n}}}))},q=(e,t)=>{I(n=>({...n,[N]:{...n[N],preferenceModal:{...n[N].preferenceModal,[e]:t}}}))},J=(e,t)=>{I(n=>({...n,[N]:{...n[N],ageGateModal:{...n[N].ageGateModal,[e]:t}}}))},Ft=(e,t)=>{I(n=>({...n,[N]:{...n[N],ageGateModal:{...n[N].ageGateModal,parentalConsent:{...n[N].ageGateModal?.parentalConsent,[e]:t}}}}))},It=(e,t,n)=>{I(r=>{let i=[...r[N]?.preferenceModal.categories??[]];return i[e]={...i[e],[t]:n},{...r,[N]:{...r[N],preferenceModal:{...r[N].preferenceModal,categories:i}}}})},Kt=(e,t,n)=>{I(r=>{let i=r[N],a={...i[e].buttonLabels,[t]:n};return{...r,[N]:{...i,[e]:{...i[e],buttonLabels:a}}}})},Xt=e=>{if(!M)return;let t=Nt(C,M,A,N);I(n=>{let r=n[N]??Y(M,A);return{...n,[N]:{...r,[e]:t[e]}}})},Zt=()=>{if(!M)return;let e=$e[N]??$e.en;I(t=>{let n=t[N]??Y(M,A);return{...t,[N]:{...n,ageGateModal:{heading:e.heading,htmlText:e.htmlText,confirmButtonLabel:e.confirmButtonLabel,denyButtonLabel:e.denyButtonLabel,parentalConsent:{heading:e.parentalConsent.heading,htmlText:e.parentalConsent.htmlText,confirmButtonLabel:e.parentalConsent.confirmButtonLabel}}}}})},Qt=async(e,t)=>{Wt(F[N],e)&&!await mt({title:f(`profileEditor.copyLocale.confirmTitle`),message:f(`profileEditor.copyLocale.confirmMessage`,{locale:N.toUpperCase(),source:t.toUpperCase()}),confirmLabel:f(`profileEditor.copyLocale.confirmAction`),cancelLabel:f(`common.cancel`)})||I(n=>{let r=n[t];if(!r)return n;let i=n[N]??(M?Y(M,A):r);return e===`ageGateModal`?{...n,[N]:{...i,...r.ageGateModal?{ageGateModal:{...r.ageGateModal,parentalConsent:{...r.ageGateModal.parentalConsent}}}:{}}}:e===`preferenceModal`?{...n,[N]:{...i,preferenceModal:{...r.preferenceModal,buttonLabels:{...r.preferenceModal.buttonLabels},categories:r.preferenceModal.categories.map(e=>({...e}))}}}:{...n,[N]:{...i,[e]:{...r[e],buttonLabels:{...r[e].buttonLabels}}}}})},$t=e=>({...e,buttons:ie(e.buttons)}),en=e=>({...e,buttons:ie(e.buttons)}),tn=()=>{!M||!A||!Object.keys(F).length||Tt(yt(F,$t(M.mainBanner),$t(M.gpcBanner),en(M.preferenceModal),A.categories),`locales.json`,`application/json`)},nn=()=>{!M||!A||Tt(Ct(F,$t(M.mainBanner),$t(M.gpcBanner),en(M.preferenceModal),A.categories),`locales.csv`,`text/csv`)},rn=e=>{if(Qe(``),et([]),R([]),!M||!A){Qe(f(`profileEditor.content.importError`));return}let t=$t(M.mainBanner),n=$t(M.gpcBanner),r=en(M.preferenceModal),i=new FileReader;i.onload=i=>{let a=i.target?.result;try{let i=F[x]??F[N]??Y(M,A),{locales:o,skipped:s}=e.name.endsWith(`.csv`)?wt(a,i,t,n,r,A.categories):xt(a,i,t,n,r,A.categories);I(e=>({...e,...o}));let c=Object.keys(o);et(c),R(s);let l=c.find(e=>!Object.keys(F).includes(e))??c[0];l&&P(l)}catch{Qe(f(`profileEditor.content.importError`))}},i.readAsText(e)},an=ke?{enabled:!0,minimumAge:je,...k?{requireParentalConsent:!0}:{}}:void 0,X=A&&M?Gt(A,M,x,F,Pe,N,!0,an):null,on=e=>{if(!A||!M)throw Error(`Consent Template and UI Template must be selected before saving`);let t=(ce.includes(`dpdpa`)||y[C]?.requiresDpdpaDisclosure)&&Ce.trim()&&Te.trim()?{dataFiduciary:Ce.trim(),grievanceEmail:Te.trim(),...De.trim()?{purposeDescription:De.trim()}:{}}:void 0,n=Vt(Object.keys(F).length>0?Object.keys(F):[x],x),r=F[x]??Y(M,A),i=zt(M,A,r,k,!Z),a={};for(let e of n){if(e===x)continue;let t=F[e];t&&(a[e]=zt(M,A,t,k,!Z))}return{name:v,defaultLocale:x,...e?{choice:e}:{},profileJson:{consentTemplateId:He,uiTemplateId:j,defaultLocale:x,expiryDays:Pe,locales:n.includes(x)?n:[x,...n],...ce.length>0?{regulations:ce}:{},...C?{complianceGroup:C}:{},...!C&&w?{customComplianceGroup:w}:{},...T?{gpcMode:T===`true`||T!==`false`&&T}:{},...oe.length>0?{allowedOrigins:oe}:{},...t?{dpdpa:t}:{},...an?{ageGate:an}:{},...he?{darkMode:!0}:{},hidePoweredBy:D,...ve?{allowReceipt:!0}:{},...ye?{enhanceAccessibility:!0}:{},...xe?{showFooterMetadata:!0}:{},...Object.keys(qe).length>0?{cookiesOverride:qe}:{},...i},...Object.keys(a).length>0?{localeContent:a}:{}}},sn=e=>{if(e instanceof s)try{let t=JSON.parse(e.message),n=t.details?.errors;if(n?.length){let e=n[0],r=n.length>1?` ${f(`profileEditor.error.saveFailedMoreFields`,{count:n.length-1})}`:``,i=e.locale&&e.section?{locale:e.locale,section:e.section}:void 0;return{message:`${t.error??f(`profileEditor.error.failed`)}: ${e.message}${r}`,jump:i}}if(t.error)return{message:t.error,jump:void 0}}catch{}return{message:f(`profileEditor.error.failed`),jump:void 0}},cn=async e=>{St(!0),G(``);try{let t=on(e),n=_?await g.create(t):await g.update(o,t);if(n.requiresChoice){pt(t),dt(n.conflict);return}window.location.hash=`#/banners/profiles`}catch(e){let{message:t,jump:n}=sn(e);n&&(P(n.locale),U(n.section===`ageGateModal`?3:n.section===`mainBanner`?4:n.section===`gpcBanner`?5:6)),G(t)}finally{St(!1)}},ln=e=>{let t=Ht(F,e,k);if(t.length===0)return!1;let n=t[0];return P(n.locale),U(n.section===`ageGateModal`?3:n.section===`mainBanner`?4:n.section===`gpcBanner`?5:6),G(f(`profileEditor.error.missingRequiredContent`,{locale:n.locale})),!0},un=async e=>{let t=F[N];return!t||Ut(t,e).length===0?!1:mt({title:f(`profileEditor.nudge.title`),message:f(`profileEditor.nudge.headingBlank`),confirmLabel:f(`profileEditor.nudge.addNow`),cancelLabel:f(`profileEditor.nudge.ignore`),danger:!1})},dn=async(e,t)=>{await un(e)||t()},fn=async(e,t)=>{G(``),!ln([t])&&await dn(t,()=>U(e))},pn=async()=>{if(!v.trim()){G(f(`profileEditor.error.nameRequired`)),U(1);return}if(Pe<1){G(f(`profileEditor.error.expiryDays`)),U(1);return}if(!C&&!w.trim()){G(f(`profileEditor.error.customComplianceGroupRequired`)),U(1);return}if(!He){G(f(`profileEditor.error.cookieRequired`)),U(2);return}if(!j){G(f(`profileEditor.error.uiRequired`)),U(2);return}let e=[...ke?[`ageGateModal`]:[],`mainBanner`,...Z?[]:[`gpcBanner`],`preferenceModal`];ln(e)||await cn()},mn=async e=>{dt(null),pt(null),await cn(e)},hn=!ke,Z=T===`ignore`||T===``&&(!C||y[C]?.defaultGpc===`ignore`),gn=ce.includes(`dpdpa`)||y[C]?.requiresDpdpaDisclosure===!0,Q=F[N],$=N===x?void 0:F[x],_n=Vt(Object.keys(F).length?Object.keys(F):[x],x),vn={noNoCookies:f(`profileEditor.table.noNoCookies`),id:f(`profileEditor.table.id`),purpose:f(`consentTemplates.col.purposeShort`),legalBasis:f(`profileEditor.table.legalBasis`),gpc:f(`profileEditor.table.gpc`),preGrant:f(`profileEditor.table.preGrant`),preGrantLocked:f(`profileEditor.table.preGrantLocked`),tcfVendor:f(`profileEditor.table.tcfVendor`),cpraCategory:f(`profileEditor.table.cpraCategory`)};if(_t)return e(`p`,{class:`text-gray-400 text-sm`,role:`status`,"aria-live":`polite`,children:f(`common.loading`)});let yn=[f(`profileEditor.step.config`),f(`profileEditor.step.templates`),f(`profileEditor.step.ageGateModal`),f(`profileEditor.step.mainBanner`),f(`profileEditor.step.gpcBanner`),f(`profileEditor.step.prefModal`)],bn=F[x]??F[N],xn=[C||w?`${C||w}, gpc: ${T||`inherit`}`:void 0,[A?.name,M?.name].filter(Boolean).join(`, `)||void 0,bn?.ageGateModal?.heading||void 0,bn?.mainBanner.heading||void 0,bn?.gpcBanner.heading||void 0,bn?.preferenceModal.heading||void 0],Sn=({section:t})=>{let n=_n.filter(e=>e!==N);return n.length===0?null:e(`div`,{class:`relative flex items-center gap-1 text-xs px-2.5 py-1.5 border border-gray-300 rounded hover:bg-gray-50 text-gray-600 transition-colors`,children:[e(l,{size:12,"aria-hidden":`true`}),f(`profileEditor.content.copyLocale`),e(`select`,{value:``,onChange:e=>{let n=e.target.value;n&&Qt(t,n)},class:`absolute inset-0 w-full h-full opacity-0 cursor-pointer`,title:f(`profileEditor.content.copyLocaleTitle`),"aria-label":f(`profileEditor.content.copyLocale`),children:[e(`option`,{value:``,children:f(`profileEditor.content.copyLocale`)}),n.map(t=>e(`option`,{value:t,children:rt(t)},t))]})]})},Cn=({section:t})=>e(`div`,{class:`flex flex-wrap items-start justify-between gap-3 mb-4`,children:[e(at,{locales:_n,defaultLocale:x,activeLocale:N,onSelect:e=>void dn(t,()=>P(e)),onAdd:jt,onRemove:Mt}),e(`div`,{class:`flex items-center gap-1.5 shrink-0`,children:[e(Sn,{section:t}),e(`button`,{type:`button`,onClick:()=>Xt(t),disabled:!M,class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-purple-300 rounded hover:bg-purple-50 text-purple-700 transition-colors disabled:opacity-40`,title:f(`profileEditor.content.loadDefaultsTitle`),children:[e(me,{size:12,"aria-hidden":`true`}),` `,f(`profileEditor.content.loadDefaults`)]})]})]}),wn=()=>e(`div`,{class:`flex flex-wrap items-center justify-end gap-1.5 mb-3`,children:[e(`button`,{type:`button`,onClick:tn,disabled:!M,class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-gray-300 rounded hover:bg-gray-50 text-gray-600 transition-colors disabled:opacity-40`,title:f(`profileEditor.export.jsonTitle`),children:[e(le,{size:12,"aria-hidden":`true`}),` `,f(`profileEditor.export.json`)]}),e(`button`,{type:`button`,onClick:nn,disabled:!M,class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-gray-300 rounded hover:bg-gray-50 text-gray-600 transition-colors disabled:opacity-40`,title:f(`profileEditor.export.csvTitle`),children:[e(le,{size:12,"aria-hidden":`true`}),` `,f(`profileEditor.export.csv`)]}),e(`label`,{class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-blue-300 rounded hover:bg-blue-50 text-blue-600 cursor-pointer transition-colors`,title:f(`profileEditor.export.importTitle`),children:[e(pe,{size:12,"aria-hidden":`true`}),` `,f(`profileEditor.export.import`),e(`input`,{ref:nt,type:`file`,accept:`.json,.csv`,class:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&rn(t),e.target.value=``}})]})]});return e(a,{children:[gt,V&&r(e(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[e(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>dt(null),"aria-hidden":`true`}),e(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[e(`h3`,{class:`text-sm font-semibold text-gray-900`,children:f(`profileEditor.conflict.title`)}),e(`p`,{class:`text-sm text-gray-600`,children:f(`profileEditor.conflict.message`,{name:V.name})}),e(`div`,{class:`flex flex-col gap-2 pt-1`,children:[e(`button`,{type:`button`,onClick:()=>mn(`deactivate`),class:`w-full bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:f(`profileEditor.conflict.deactivate`,{name:V.name})}),e(`button`,{type:`button`,onClick:()=>mn(`inactive`),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:f(`profileEditor.conflict.saveInactive`)}),e(`button`,{type:`button`,onClick:()=>{dt(null),pt(null)},class:`w-full text-gray-400 px-4 py-1.5 text-sm hover:text-gray-600 transition-colors`,children:f(`common.cancel`)})]})]})]}),document.body),e(Pt,{step:H,labels:yn,descriptions:xn,disabledSteps:[...hn?[3]:[],...Z?[5]:[]]}),(H===3||H===4||H===5||H===6)&&e(a,{children:[e(wn,{}),Ze&&e(`p`,{class:`text-xs text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2 mb-3`,children:Ze}),L.length>0&&e(`p`,{class:`text-xs text-green-700 bg-green-50 border border-green-200 rounded px-3 py-2 mb-3`,children:f(L.length===1?`profileEditor.import.importedSingular`:`profileEditor.import.imported`,{n:L.length,list:L.join(`, `)})}),tt.length>0&&e(`p`,{class:`text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-3 py-2 mb-3`,children:f(tt.length===1?`profileEditor.import.skippedSingular`:`profileEditor.import.skipped`,{n:tt.length,list:tt.join(`, `)})})]}),H===1&&e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5 space-y-4`,children:[e(`div`,{class:`grid grid-cols-2 gap-4`,children:[e(`div`,{children:[e(`label`,{for:`profile-name`,class:`block text-sm font-medium text-gray-700 mb-1`,children:[f(`profileEditor.config.profileName`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{id:`profile-name`,class:`w-full border rounded px-3 py-2 text-sm ${!v.trim()&&W?`border-red-400`:`border-gray-300`}`,value:v,onInput:e=>b(e.target.value),placeholder:f(`profileEditor.config.profileNamePlaceholder`),required:!0,"aria-required":`true`})]}),e(`div`,{children:[e(`label`,{for:`default-locale`,class:`block text-sm font-medium text-gray-700 mb-1`,children:f(`profileEditor.config.defaultLocale`)}),e(it,{id:`default-locale`,value:x,onChange:S,placeholder:f(`profileEditor.config.selectDefaultLocale`)})]})]}),e(`div`,{children:[e(`label`,{class:`block text-sm font-medium text-gray-700 mb-1`,children:[f(`profileEditor.config.allowedDomains`),e(`span`,{class:`ml-1.5 text-xs font-normal text-gray-400`,children:f(`profileEditor.config.allowedDomainsHint`)})]}),e(ht,{value:oe,onChange:se})]}),e(`div`,{children:[e(`label`,{class:`block text-sm font-medium text-gray-700 mb-2`,children:[f(`profileEditor.config.complianceGroup`),e(`span`,{class:`ml-1.5 text-xs font-normal text-gray-400`,children:[`(`,f(`common.optional`),`)`]})]}),e(`div`,{class:`grid md:grid-cols-2 lg:grid-cols-3 gap-2`,children:[Object.entries(y).map(([t,n])=>e(`label`,{class:`flex flex-col gap-1 p-3 border rounded-lg cursor-pointer transition-colors select-none ${C===t?`border-blue-400 bg-blue-50`:`border-gray-200 hover:border-gray-300 bg-white`}`,children:[e(`div`,{class:`flex items-center gap-2`,children:[e(`input`,{type:`radio`,name:`complianceGroup`,class:`accent-blue-600 shrink-0 w-4 h-4`,checked:C===t,onChange:()=>Et(C===t?``:t)}),e(`span`,{class:`text-sm font-medium text-gray-700 leading-tight`,children:n.label})]}),e(`div`,{class:`ml-5 flex flex-wrap gap-1`,children:[e(`p`,{class:`text-[11px] text-gray-500 py-2`,children:n.description}),n.compliances.map(t=>e(`span`,{class:`text-[10px] bg-gray-100 text-gray-400 px-1.5 py-0.5 rounded font-mono`,children:t},t))]})]},t)),e(`div`,{class:`flex flex-col gap-1 p-3 border rounded-lg transition-colors select-none ${C?`border-gray-200 hover:border-gray-300 bg-white`:`border-gray-400 bg-gray-50`}`,children:[e(`label`,{class:`flex items-center gap-2 cursor-pointer`,children:[e(`input`,{type:`radio`,name:`complianceGroup`,class:`accent-gray-600 shrink-0`,checked:!C,onChange:()=>Et(``)}),e(`span`,{class:`text-sm font-medium text-gray-600`,children:f(`profileEditor.config.complianceGroupNone`)})]}),!C&&e(`div`,{class:`ml-5 mt-1`,children:[e(`label`,{for:`custom-compliance-group`,class:`block text-[11px] text-gray-500 mb-1`,children:[f(`profileEditor.config.customComplianceGroup`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{id:`custom-compliance-group`,class:`w-full border rounded px-2 py-1 text-xs font-mono ${!w.trim()&&W?`border-red-400`:`border-gray-300`}`,value:w,onInput:e=>Ot(e.target.value),placeholder:f(`profileEditor.config.customComplianceGroupPlaceholder`),required:!0,"aria-required":`true`}),e(`p`,{class:`text-[10px] text-gray-400 mt-0.5`,children:f(`profileEditor.config.customComplianceGroupHint`)})]})]})]})]}),e(`hr`,{class:`my-7 text-gray-300`}),e(`div`,{class:`grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3`,children:[e(`div`,{children:[e(`label`,{for:`gpc-mode`,class:`block text-sm font-medium text-gray-700 mb-1`,children:[f(`profileEditor.config.gpcMode`),e(`span`,{class:`ml-1.5 text-xs font-normal text-gray-400`,children:[`(`,f(`common.optional`),`)`]})]}),e(ae,{id:`gpc-mode`,options:[{value:``,label:f(`profileEditor.config.gpcModeDefault`)},...te.map(e=>({value:e.value,label:`${e.label} — ${e.description}`}))],value:T,onChange:E,placeholder:f(`profileEditor.config.gpcModePlaceholder`)})]}),e(`div`,{children:[e(`label`,{for:`expiry-days`,class:`block text-sm font-medium text-gray-700 mb-1`,children:f(`profileEditor.config.expiryDays`)}),e(`input`,{id:`expiry-days`,type:`number`,min:`1`,max:`3650`,class:`w-full border rounded px-3 py-2 text-sm ${Ie?`border-red-400 bg-red-50`:`border-gray-300`}`,value:Pe,onInput:e=>{let t=parseInt(e.target.value,10);Fe(isNaN(t)?1:t),Le(``)}}),e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:f(`profileEditor.config.expiryDaysHint`)}),Ie&&e(`p`,{role:`alert`,class:`text-xs text-red-500 mt-0.5`,children:Ie})]}),[{checked:he,onChange:ge,label:f(`profileEditor.config.darkMode`),hint:f(`profileEditor.config.darkModeHint`)},{checked:D,onChange:_e,label:f(`profileEditor.config.hidePoweredBy`),hint:f(`profileEditor.config.hidePoweredByHint`)},{checked:ve,onChange:O,label:f(`profileEditor.config.allowReceipt`),hint:f(`profileEditor.config.allowReceiptHint`)},{checked:ye,onChange:be,label:f(`profileEditor.config.enhanceAccessibility`),hint:f(`profileEditor.config.enhanceAccessibilityHint`)},{checked:xe,onChange:Se,label:f(`profileEditor.config.showFooterMetadata`),hint:f(`profileEditor.config.showFooterMetadataHint`)},{checked:ke,onChange:Ae,label:f(`profileEditor.config.ageGate`),hint:f(`profileEditor.config.ageGateHint`)}].map(({checked:t,onChange:n,label:r,hint:i})=>e(`label`,{class:`flex items-start gap-2.5 p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-gray-300 bg-white select-none`,children:[e(`input`,{type:`checkbox`,class:`mt-2 accent-blue-600 shrink-0 w-4 h-4`,checked:t,onChange:e=>n(e.target.checked)}),e(`div`,{children:[e(`span`,{class:`text-sm font-medium text-gray-700`,children:r}),e(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:i})]})]},r))]}),gn&&e(`div`,{class:`border border-amber-200 bg-amber-50 rounded-lg p-4 space-y-3`,children:[e(`p`,{class:`text-xs font-semibold text-amber-800`,children:f(`profileEditor.config.dpdpa.heading`)}),e(`div`,{class:`grid grid-cols-2 gap-3`,children:[e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-700 mb-1`,children:[f(`profileEditor.config.dpdpa.fiduciary`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Ce,onInput:e=>we(e.target.value),placeholder:f(`profileEditor.config.dpdpa.fiduciaryPlaceholder`)})]}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-700 mb-1`,children:[f(`profileEditor.config.dpdpa.grievanceEmail`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{type:`email`,class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Te,onInput:e=>Ee(e.target.value),placeholder:f(`profileEditor.config.dpdpa.grievanceEmailPlaceholder`)})]})]}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-700 mb-1`,children:f(`profileEditor.config.dpdpa.purpose`)}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:De,onInput:e=>Oe(e.target.value),placeholder:f(`profileEditor.config.dpdpa.purposePlaceholder`)})]})]}),ke&&e(`div`,{class:`border border-amber-200 bg-amber-50 rounded-lg p-4 space-y-3`,children:[e(`p`,{class:`text-xs font-semibold text-amber-800`,children:f(`profileEditor.config.ageGateSection.heading`)}),e(`div`,{class:`grid grid-cols-2 gap-3`,children:[e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-700 mb-1`,children:[f(`profileEditor.config.ageGateSection.minimumAge`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{type:`number`,min:`1`,max:`99`,class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:je,onInput:e=>{let t=parseInt(e.target.value,10);Me(isNaN(t)?1:t)}}),e(`p`,{class:`text-[10px] text-gray-400 mt-0.5`,children:f(`profileEditor.config.ageGateSection.minimumAgeHint`)})]}),e(`label`,{class:`flex items-start gap-2.5 mt-5 cursor-pointer select-none`,children:[e(`input`,{type:`checkbox`,class:`mt-0.5 accent-blue-600 shrink-0 w-4 h-4`,checked:k,onChange:e=>Ne(e.target.checked)}),e(`div`,{children:[e(`span`,{class:`text-sm font-medium text-gray-700`,children:f(`profileEditor.config.ageGateSection.requireParentalConsent`)}),e(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:f(`profileEditor.config.ageGateSection.requireParentalConsentHint`)})]})]})]})]})]}),W&&e(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:W}),e(`div`,{class:`flex justify-between`,children:[e(`a`,{href:`#/banners/profiles`,class:`px-5 py-2 rounded-lg text-sm text-red-600 hover:bg-red-100 transition-colors`,children:f(`common.cancel`)}),e(`button`,{type:`button`,onClick:()=>{if(!v.trim()){G(f(`profileEditor.error.nameRequiredContinue`));return}if(Pe<1){Le(f(`profileEditor.error.expiryDays`)),G(f(`profileEditor.error.expiryDays`));return}if(!C&&!w.trim()){G(f(`profileEditor.error.customComplianceGroupRequired`));return}G(``),U(2)},class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[f(`profileEditor.nav.nextTemplates`),` `,e(m,{size:14,"aria-hidden":`true`})]})]})]}),H===2&&e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[e(`div`,{class:`flex items-start justify-between gap-4 mb-3`,children:[e(`div`,{children:[e(`h3`,{class:`text-sm font-semibold text-gray-700`,children:f(`profileEditor.templates.cookieTemplate`)}),e(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:f(`profileEditor.templates.cookieTemplateHint`)})]}),e(`a`,{href:`#/banners/consent-templates/new`,class:`text-xs text-blue-600 hover:underline whitespace-nowrap shrink-0`,target:`_blank`,children:f(`profileEditor.newLink`)})]}),e(`select`,{class:`border border-gray-300 rounded px-3 py-2 text-sm w-full max-w-sm mb-4`,value:He,onChange:e=>kt(e.target.value),children:[e(`option`,{value:``,children:f(`profileEditor.templates.selectCookie`)}),Re.map(t=>{let n=Object.keys(t.cookies).length,r=Object.keys(t.categories).length;return e(`option`,{value:t.id,children:[t.name,` (`,n,` `,f(`consentTemplates.editor.definitions`),`, `,r,` `,f(`consentTemplates.editor.categories`),`)`]},t.id)})]}),A?e(a,{children:[e(`p`,{class:`text-xs text-gray-500 mt-4 mb-2`,children:e(`strong`,{class:`text-gray-700`,children:f(`consentTemplates.editor.definitions`)})}),Ye&&e(`p`,{class:`text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-3 py-2 mb-2`,children:f(`profileEditor.compliance.preGrantOverridden`)}),e(Yt,{cookies:A.cookies,categories:A.categories,labels:vn,cookiesOverride:qe,onTogglePreGrant:Dt}),e(`p`,{class:`text-xs text-gray-500 mt-6 mb-2`,children:e(`strong`,{class:`text-gray-700`,children:f(`consentTemplates.editor.categories`)})}),e(Jt,{categories:A.categories,labels:vn})]}):e(`p`,{class:`text-xs text-gray-400 italic`,children:f(`profileEditor.templates.noTemplate`)})]}),e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[e(`div`,{class:`flex items-start justify-between gap-4 mb-3`,children:[e(`div`,{children:[e(`h3`,{class:`text-sm font-semibold text-gray-700`,children:f(`profileEditor.templates.uiTemplate`)}),e(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:f(`profileEditor.templates.uiTemplateHint`)})]}),e(`a`,{href:`#/banners/ui-templates/new`,class:`text-xs text-blue-600 hover:underline whitespace-nowrap shrink-0`,target:`_blank`,children:f(`profileEditor.newLink`)})]}),e(`select`,{class:`border border-gray-300 rounded px-3 py-2 text-sm w-full max-w-sm mb-4`,value:j,onChange:e=>At(e.target.value),children:[e(`option`,{value:``,children:f(`profileEditor.templates.selectUi`)}),Be.map(t=>e(`option`,{value:t.id,children:t.name},t.id))]}),M&&e(`div`,{class:`flex flex-wrap gap-3 text-xs text-gray-500`,children:[e(`span`,{children:[f(`uiTemplates.mainBanner`),` `,e(`strong`,{class:`text-gray-700`,children:M.mainBanner.position})]}),e(`span`,{children:[f(`uiTemplates.gpcBanner`),` `,e(`strong`,{class:`text-gray-700`,children:M.gpcBanner.position})]}),e(`span`,{children:[f(`uiTemplates.modal`),` `,e(`strong`,{class:`text-gray-700`,children:M.preferenceModal.position})]}),e(`span`,{children:[e(`strong`,{class:`text-gray-700`,children:Object.keys(M.mainBanner.buttons).length+Object.keys(M.preferenceModal.buttons).length}),` `,f(`profileEditor.templates.buttonsTotal`)]})]})]}),X?e(u,{draft:X,expandable:!0}):e(`div`,{class:`bg-gray-50 border border-dashed border-gray-300 rounded-lg p-6 text-center text-xs text-gray-400`,children:f(`profileEditor.templates.previewPrompt`)}),W&&e(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:W}),z.length>0&&e(`div`,{class:`bg-red-50 border border-red-200 rounded-lg px-4 py-3 space-y-1`,children:[e(`p`,{class:`text-xs font-semibold text-red-700`,children:f(`profileEditor.compliance.errors.heading`)}),z.map((t,n)=>e(`p`,{class:`text-xs text-red-600`,children:[`• [`,t.cookieId,`] `,t.message]},n))]}),B.length>0&&e(`div`,{class:`bg-amber-50 border border-amber-200 rounded-lg px-4 py-3 space-y-2`,children:[e(`p`,{class:`text-xs font-semibold text-amber-800`,children:f(`profileEditor.compliance.warnings.heading`)}),B.map((t,n)=>e(`p`,{class:`text-xs text-amber-700`,children:[`• [`,t.cookieId,`] `,t.message]},n)),e(`label`,{class:`flex items-center gap-2 mt-1 cursor-pointer`,children:[e(`input`,{type:`checkbox`,class:`accent-amber-700`,checked:ct,onChange:e=>ut(e.target.checked)}),e(`span`,{class:`text-xs text-amber-800 font-medium`,children:f(`profileEditor.compliance.warnings.acknowledge`)})]})]}),e(`div`,{class:`flex justify-between`,children:[e(`button`,{type:`button`,onClick:()=>{G(``),U(1)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[e(p,{size:14,"aria-hidden":`true`}),` `,f(`common.back`)]}),e(`button`,{type:`button`,onClick:async()=>{if(!He){G(f(`profileEditor.error.cookieContinue`));return}if(!j){G(f(`profileEditor.error.uiContinue`));return}if(C&&A)try{let e=await g.validateCompliance({complianceGroup:C,cookies:A.cookies,categories:A.categories});if(ot(e.errors??[]),st(e.warnings??[]),!e.valid&&(e.errors??[]).length>0||(e.warnings??[]).length>0&&!ct)return}catch{}!F[x]&&M&&I(e=>({...e,[x]:Y(M,A)})),P(x),G(``),U(hn?4:3)},class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[f(hn?`profileEditor.nav.nextMainBanner`:`profileEditor.nav.nextAgeGate`),` `,e(m,{size:14,"aria-hidden":`true`})]})]})]}),H===3&&e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`bg-white border border-amber-200 rounded-lg p-5`,children:[e(`div`,{class:`flex flex-wrap items-start justify-between gap-3 mb-4`,children:[e(at,{locales:_n,defaultLocale:x,activeLocale:N,onSelect:e=>void dn(`ageGateModal`,()=>P(e)),onAdd:jt,onRemove:Mt}),e(`div`,{class:`flex items-center gap-1.5 shrink-0`,children:[e(Sn,{section:`ageGateModal`}),e(`button`,{type:`button`,onClick:Zt,disabled:!M,class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-purple-300 rounded hover:bg-purple-50 text-purple-700 transition-colors disabled:opacity-40`,title:f(`profileEditor.content.ageGateModal.loadDefaultsTitle`),children:[e(me,{size:12,"aria-hidden":`true`}),` `,f(`profileEditor.content.loadDefaults`)]})]})]}),e(`p`,{class:`text-xs text-purple-600 bg-purple-50 border border-purple-100 rounded px-3 py-1.5 mb-4`,children:f(`profileEditor.content.loadDefaultsNotice`)}),Q?e(`div`,{class:`space-y-3`,children:[e(`h4`,{class:`text-xs font-semibold text-amber-800 uppercase tracking-wide`,children:f(`profileEditor.content.ageGateModal.heading`)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[f(`profileEditor.content.heading`),` `,e(`span`,{class:`text-xs font-normal text-gray-400`,children:[`(`,f(`common.optional`),`)`]})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.ageGateModal?.heading??``,onInput:e=>J(`heading`,e.target.value),placeholder:f(`profileEditor.content.ageGateModal.headingPlaceholder`)})]}),e(lt,{label:f(`profileEditor.content.ageGateModal.bodyText`),required:!0,value:Q.ageGateModal?.htmlText??``,onChange:e=>J(`htmlText`,e),placeholder:f(`profileEditor.content.ageGateModal.bodyPlaceholder`),rows:3}),e(`div`,{class:`grid grid-cols-2 gap-3`,children:[e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[f(`profileEditor.content.ageGateModal.confirmButtonLabel`),` `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.ageGateModal?.confirmButtonLabel??``,onInput:e=>J(`confirmButtonLabel`,e.target.value),placeholder:f(`profileEditor.content.ageGateModal.confirmButtonPlaceholder`)})]}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[f(`profileEditor.content.ageGateModal.denyButtonLabel`),` `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.ageGateModal?.denyButtonLabel??``,onInput:e=>J(`denyButtonLabel`,e.target.value),placeholder:f(`profileEditor.content.ageGateModal.denyButtonPlaceholder`)})]})]}),k&&e(`div`,{class:`border-t border-amber-100 pt-3 space-y-3`,children:[e(`h5`,{class:`text-xs font-semibold text-amber-800 uppercase tracking-wide`,children:f(`profileEditor.content.ageGateModal.parentalConsent.heading`)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[f(`profileEditor.content.heading`),` `,e(`span`,{class:`text-xs font-normal text-gray-400`,children:[`(`,f(`common.optional`),`)`]})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.ageGateModal?.parentalConsent?.heading??``,onInput:e=>Ft(`heading`,e.target.value),placeholder:f(`profileEditor.content.ageGateModal.parentalConsent.headingPlaceholder`)})]}),e(lt,{label:f(`profileEditor.content.ageGateModal.parentalConsent.bodyText`),required:!0,value:Q.ageGateModal?.parentalConsent?.htmlText??``,onChange:e=>Ft(`htmlText`,e),placeholder:f(`profileEditor.content.ageGateModal.parentalConsent.bodyPlaceholder`),rows:3}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[f(`profileEditor.content.ageGateModal.parentalConsent.confirmButtonLabel`),` `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.ageGateModal?.parentalConsent?.confirmButtonLabel??``,onInput:e=>Ft(`confirmButtonLabel`,e.target.value),placeholder:f(`profileEditor.content.ageGateModal.parentalConsent.confirmButtonPlaceholder`)})]})]})]}):e(`p`,{class:`text-xs text-gray-400 italic py-4 text-center`,children:f(j&&!M?`profileEditor.content.loadingTemplate`:`profileEditor.content.noContent`)})]}),X&&e(u,{draft:X,expandable:!0,previewMode:`ageGate`}),W&&e(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:W}),e(`div`,{class:`flex justify-between`,children:[e(`button`,{type:`button`,onClick:()=>{G(``),U(2)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[e(p,{size:14,"aria-hidden":`true`}),` `,f(`common.back`)]}),e(`button`,{type:`button`,onClick:()=>void fn(4,`ageGateModal`),class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[f(`profileEditor.nav.nextMainBanner`),` `,e(m,{size:14,"aria-hidden":`true`})]})]})]}),H===4&&e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[e(Cn,{section:`mainBanner`}),e(`p`,{class:`text-xs text-purple-600 bg-purple-50 border border-purple-100 rounded px-3 py-1.5 mb-4`,children:f(`profileEditor.content.loadDefaultsNotice`)}),Q&&M?e(`div`,{class:`space-y-3`,children:[e(`h4`,{class:`text-xs font-semibold text-gray-700 uppercase tracking-wide`,children:f(`profileEditor.content.mainBanner`)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:f(`profileEditor.content.heading`)}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.mainBanner.heading,onInput:e=>K(`mainBanner`,`heading`,e.target.value),placeholder:$?.mainBanner.heading||f(`profileEditor.content.mainBannerHeadingPlaceholder`)}),e(qt,{heading:Q.mainBanner.heading})]}),e(lt,{label:f(`profileEditor.content.bodyText`),required:!0,value:Q.mainBanner.htmlText,onChange:e=>K(`mainBanner`,`htmlText`,e),placeholder:f(`profileEditor.content.mainBannerBodyPlaceholder`),rows:4}),e(qt,{htmlText:Q.mainBanner.htmlText}),Object.keys(M.mainBanner.buttons).length>0&&e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1.5`,children:f(`profileEditor.content.buttonLabels`)}),e(`div`,{class:`grid grid-cols-3 gap-3`,children:Object.entries(M.mainBanner.buttons).map(([t,n])=>e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-400 mb-1`,children:[t,` (`,n.action,`) `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-sm`,value:Q.mainBanner.buttonLabels[t]??``,onInput:e=>Kt(`mainBanner`,t,e.target.value),placeholder:f(`profileEditor.content.buttonLabelPlaceholder`)})]},t))})]})]}):e(`p`,{class:`text-xs text-gray-400 italic py-4 text-center`,children:f(j&&!M?`profileEditor.content.loadingTemplate`:`profileEditor.content.noContent`)})]}),X&&e(u,{draft:X,expandable:!0,previewMode:`main`}),W&&e(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:W}),e(`div`,{class:`flex justify-between`,children:[e(`button`,{type:`button`,onClick:()=>{G(``),U(hn?2:3)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[e(p,{size:14,"aria-hidden":`true`}),` `,f(`common.back`)]}),e(`button`,{type:`button`,onClick:()=>void fn(Z?6:5,`mainBanner`),class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[f(Z?`profileEditor.nav.nextPrefModal`:`profileEditor.nav.nextGpcBanner`),` `,e(m,{size:14,"aria-hidden":`true`})]})]})]}),H===5&&e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[e(Cn,{section:`gpcBanner`}),e(`p`,{class:`text-xs text-purple-600 bg-purple-50 border border-purple-100 rounded px-3 py-1.5 mb-4`,children:f(`profileEditor.content.loadDefaultsNotice`)}),Q&&M?e(`div`,{class:`space-y-3`,children:[e(`h4`,{class:`text-xs font-semibold text-gray-700 uppercase tracking-wide`,children:f(`profileEditor.content.gpcBanner`)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:f(`profileEditor.content.heading`)}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.gpcBanner.heading,onInput:e=>K(`gpcBanner`,`heading`,e.target.value),placeholder:$?.gpcBanner.heading||f(`profileEditor.content.gpcHeadingPlaceholder`)}),e(qt,{heading:Q.gpcBanner.heading})]}),e(lt,{label:f(`profileEditor.content.bodyText`),required:!0,value:Q.gpcBanner.htmlText,onChange:e=>K(`gpcBanner`,`htmlText`,e),rows:3}),e(qt,{htmlText:Q.gpcBanner.htmlText}),Object.keys(M.gpcBanner.buttons).length>0&&e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1.5`,children:f(`profileEditor.content.buttonLabels`)}),e(`div`,{class:`grid grid-cols-3 gap-3`,children:Object.entries(M.gpcBanner.buttons).map(([t,n])=>e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-400 mb-1`,children:[t,` (`,n.action,`) `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-sm`,value:Q.gpcBanner.buttonLabels[t]??``,onInput:e=>Kt(`gpcBanner`,t,e.target.value),placeholder:f(`profileEditor.content.buttonLabelPlaceholder`)})]},t))})]})]}):e(`p`,{class:`text-xs text-gray-400 italic py-4 text-center`,children:f(j&&!M?`profileEditor.content.loadingTemplate`:`profileEditor.content.noContent`)})]}),X&&e(u,{draft:X,expandable:!0,previewMode:`gpc`}),W&&e(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:W}),e(`div`,{class:`flex justify-between`,children:[e(`button`,{type:`button`,onClick:()=>{G(``),U(4)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[e(p,{size:14,"aria-hidden":`true`}),` `,f(`common.back`)]}),e(`button`,{type:`button`,onClick:()=>void fn(6,`gpcBanner`),class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[f(`profileEditor.nav.nextPrefModal`),` `,e(m,{size:14,"aria-hidden":`true`})]})]})]}),H===6&&e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[e(Cn,{section:`preferenceModal`}),e(`p`,{class:`text-xs text-purple-600 bg-purple-50 border border-purple-100 rounded px-3 py-1.5 mb-4`,children:f(`profileEditor.content.loadDefaultsNotice`)}),Q&&M?e(`div`,{class:`space-y-3`,children:[e(`h4`,{class:`text-xs font-semibold text-gray-700 uppercase tracking-wide`,children:f(`profileEditor.content.prefModal`)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[f(`profileEditor.content.heading`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.preferenceModal.heading,onInput:e=>q(`heading`,e.target.value),placeholder:$?.preferenceModal.heading||f(`profileEditor.content.prefHeadingPlaceholder`)}),e(qt,{heading:Q.preferenceModal.heading})]}),M.preferenceModal.hasSubheading&&e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:f(`profileEditor.content.subheading`)}),e(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:Q.preferenceModal.subheading,onInput:e=>q(`subheading`,e.target.value),placeholder:$?.preferenceModal.subheading||f(`profileEditor.content.prefSubheadingPlaceholder`)})]}),e(lt,{label:f(`profileEditor.content.introText`),required:!0,value:Q.preferenceModal.htmlText,onChange:e=>q(`htmlText`,e),placeholder:f(`profileEditor.content.prefIntroPlaceholder`),rows:3}),Object.keys(M.preferenceModal.buttons).length>0&&e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1.5`,children:f(`profileEditor.content.buttonLabels`)}),e(`div`,{class:`grid grid-cols-3 gap-3`,children:Object.entries(M.preferenceModal.buttons).map(([t,n])=>e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-400 mb-1`,children:[t,` (`,n.action,`) `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-sm`,value:Q.preferenceModal.buttonLabels[t]??``,onInput:e=>Kt(`preferenceModal`,t,e.target.value),placeholder:f(`profileEditor.content.buttonLabelPlaceholder`)})]},t))})]}),Q.preferenceModal.categories.map((t,n)=>{let r=A?.categories[t.id];return e(`div`,{class:`border border-gray-100 rounded p-3 bg-gray-50 space-y-2`,children:[e(`div`,{class:`flex items-center gap-2`,children:[e(`span`,{class:`text-xs font-semibold text-gray-700`,children:t.id||f(`profileEditor.content.categoryFallback`,{n:String(n+1)})}),r?.legalBasis===`mandatory`&&e(`span`,{class:`text-xs bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded-full`,children:f(`common.mandatory`)}),r?.legalBasis===`legitimate_interest`&&e(`span`,{class:`text-xs bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full`,children:`LI`})]}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-0.5`,children:[f(`profileEditor.content.categoryHeading`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:t.heading,onInput:e=>It(n,`heading`,e.target.value),placeholder:$?.preferenceModal.categories.find(e=>e.id===t.id)?.heading||t.id})]}),e(lt,{label:f(`profileEditor.content.categoryDesc`),value:t.htmlText,onChange:e=>It(n,`htmlText`,e),placeholder:f(`profileEditor.content.categoryDescPlaceholder`),rows:3}),r?.legalBasis===`legitimate_interest`&&e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-0.5`,children:f(`profileEditor.content.liDescription`)}),e(`textarea`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:t.legitimateInterestDescription??``,onInput:e=>It(n,`legitimateInterestDescription`,e.target.value),placeholder:$?.preferenceModal.categories.find(e=>e.id===t.id)?.legitimateInterestDescription||f(`profileEditor.content.liDescriptionPlaceholder`),rows:2}),e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:f(`profileEditor.content.liDescriptionHint`)})]})]},t.id)}),ve&&e(`div`,{class:`border border-gray-100 rounded p-3 bg-gray-50 space-y-2`,children:[e(`span`,{class:`text-xs font-semibold text-gray-700`,children:f(`profileEditor.content.receiptHeading`)}),e(`p`,{class:`text-xs text-gray-500`,children:f(`profileEditor.content.receiptHint`)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-0.5`,children:f(`profileEditor.content.receiptLabel`)}),e(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:Q.preferenceModal.receiptLabel??``,onInput:e=>q(`receiptLabel`,e.target.value),placeholder:$?.preferenceModal.receiptLabel||`Get a copy of my consent choices (JSON)`})]}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-0.5`,children:f(`profileEditor.content.receiptDescription`)}),e(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:Q.preferenceModal.receiptDescription??``,onInput:e=>q(`receiptDescription`,e.target.value),placeholder:$?.preferenceModal.receiptDescription||`A JSON file will be downloaded to your device when you save your preferences.`})]})]}),M?.preferenceModal.showForgetMe&&e(`div`,{class:`border border-gray-100 rounded p-3 bg-gray-50 space-y-2`,children:[e(`span`,{class:`text-xs font-semibold text-gray-700`,children:f(`profileEditor.content.forgetMeHeading`)}),e(`p`,{class:`text-xs text-gray-500`,children:f(`profileEditor.content.forgetMeHint`)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-0.5`,children:f(`profileEditor.content.forgetMeLabel`)}),e(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:Q.preferenceModal.forgetMeLabel??``,onInput:e=>q(`forgetMeLabel`,e.target.value),placeholder:$?.preferenceModal.forgetMeLabel||`Forget me`})]})]})]}):e(`p`,{class:`text-xs text-gray-400 italic py-4 text-center`,children:f(j&&!M?`profileEditor.content.loadingTemplate`:`profileEditor.content.noContent`)})]}),X&&e(u,{draft:X,expandable:!0,previewMode:`modal`}),W&&e(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:W}),e(`div`,{class:`flex justify-between`,children:[e(`button`,{type:`button`,onClick:()=>{G(``),U(Z?4:5)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[e(p,{size:14,"aria-hidden":`true`}),` `,f(`common.back`)]}),e(`button`,{type:`button`,onClick:pn,disabled:bt,class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:f(bt?`common.saving`:_?`profileEditor.action.create`:`profileEditor.action.save`)})]})]})]})}export{Xt as ProfileEditor};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n,n as r,o as i,p as a,t as o}from"./createLucideIcon-DAiYBrnd.js";import{i as s}from"./client-CYntrO2g.js";import{t as c}from"./check-D0g4XvmN.js";import{t as l}from"./copy-DEi_W2TM.js";import{t as u}from"./rotate-ccw-clock-6y2NDrJ7.js";import{n as d,t as f}from"./trash-O30ycMcz.js";import{t as p}from"./ConfirmDialog-BDlnfTdx.js";import{o as m,s as h}from"./index-Tr_BcjkN.js";import{t as g}from"./Table-BUxoz0YR.js";import{t as _}from"./profiles-C_SuoLJD.js";import{t as v}from"./dist-GoiMJCTt.js";import{t as y}from"./PermissionGate-C69dhwV1.js";var b=o(`book-copy`,[[`path`,{d:`M5 7a2 2 0 0 0-2 2v11`,key:`1yhqjt`}],[`path`,{d:`M5.803 18H5a2 2 0 0 0 0 4h9.5a.5.5 0 0 0 .5-.5V21`,key:`edzzo5`}],[`path`,{d:`M9 15V4a2 2 0 0 1 2-2h9.5a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5H11a2 2 0 0 1 0-4h10`,key:`1nwzrg`}]]),x=o(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),S=o(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),C=o(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]);function w({content:n,children:a}){let[o,s]=t(null),c=i(null),l=()=>{if(!c.current)return;let e=c.current.getBoundingClientRect(),t=e.top-6-8,n=window.innerHeight-e.bottom-6-8;s(t>=n?{bottom:window.innerHeight-e.top+6,left:e.left+e.width/2,placement:`top`,maxHeight:Math.max(t,40)}:{top:e.bottom+6,left:e.left+e.width/2,placement:`bottom`,maxHeight:Math.max(n,40)})},u=()=>s(null);return e(`span`,{ref:c,class:`relative inline-flex items-center`,onMouseEnter:l,onMouseLeave:u,onFocus:l,onBlur:u,children:[a,o&&r(e(`span`,{role:`tooltip`,class:`fixed -translate-x-1/2 z-50 min-w-max max-w-xs overflow-y-auto bg-gray-900 text-white text-xs rounded px-2.5 py-1.5 shadow-lg pointer-events-none`,style:{left:o.left,maxHeight:o.maxHeight,...o.placement===`top`?{bottom:o.bottom}:{top:o.top}},children:[o.placement===`top`?e(`span`,{class:`absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-gray-900`}):e(`span`,{class:`absolute bottom-full left-1/2 -translate-x-1/2 border-4 border-transparent border-b-gray-900`}),n]}),document.body)]})}function T({current:i}){let o=h();m(o(`profiles.title`));let[T,E]=t([]),[D,O]=t(!0),[k,A]=t(null),[j,M]=t(null),[N,P]=t(null),[F,I]=t(null),[L,R]=t(null),[z,B]=t(``),{requestConfirm:V,dialog:H}=p(),U=e=>{navigator.clipboard.writeText(e).then(()=>{M(e),setTimeout(()=>M(t=>t===e?null:t),1500)}).catch(()=>{})},W=()=>{O(!0),_.listSummary().then(E).catch(()=>{}).finally(()=>O(!1))};n(()=>{W()},[]);let G=async(e,t)=>{if(await V({title:o(`profiles.dialog.delete.title`,{name:t}),message:o(`profiles.dialog.delete.message`)})){B(``);try{await _.delete(e)}catch(e){B(s(e,o(`profiles.error.delete`)))}W()}},K=async e=>{if(await V({title:o(`profiles.dialog.copy.title`,{name:e.name}),message:o(`profiles.dialog.copy.message`)})){A(e.id),B(``);try{await _.copy(e.id),W()}catch(e){B(s(e,o(`profiles.error.copy`)))}finally{A(null)}}},q=async(e,t)=>{P(e),B(``);try{let n=await _.activate(e,t?{choice:t}:void 0);if(n.requiresChoice){R(e),I(n.conflict);return}W()}catch(e){B(s(e,o(`profiles.error.activate`)))}finally{P(t=>t===e?null:t)}},J=async()=>{let e=L;I(null),R(null),e&&await q(e,`deactivate`)},Y=async e=>{if(e.isActive){if(!await V({title:`Deactivate profile "${e.name}"?`,message:`This will remove the profile JSON files for this compliance group.`}))return;P(e.id),B(``);try{await _.deactivate(e.id),W()}catch(e){B(s(e,o(`profiles.error.deactivate`)))}finally{P(null)}}else await q(e.id)},X=T.length,Z=o(X===1?`profiles.countSingular`:`profiles.count`,{n:X});return e(a,{children:[H,z&&e(`div`,{class:`mb-4 flex items-start justify-between gap-3 rounded-lg border border-red-200 bg-red-50 px-4 py-2.5 text-sm text-red-700`,children:[e(`span`,{children:z}),e(`button`,{type:`button`,onClick:()=>B(``),class:`text-red-400 hover:text-red-600`,"aria-label":o(`common.close`),children:`×`})]}),F&&r(e(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[e(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>{I(null),R(null)},"aria-hidden":`true`}),e(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[e(`h3`,{class:`text-sm font-semibold text-gray-900`,children:o(`profileEditor.conflict.title`)}),e(`p`,{class:`text-sm text-gray-600`,children:o(`profileEditor.conflict.message`,{name:F.name})}),e(`div`,{class:`flex flex-col gap-2 pt-1`,children:[e(`button`,{type:`button`,onClick:J,class:`w-full bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:o(`profileEditor.conflict.deactivate`,{name:F.name})}),e(`button`,{type:`button`,onClick:()=>{I(null),R(null)},class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:o(`common.cancel`)})]})]})]}),document.body),e(`div`,{class:`flex justify-between items-center mb-4`,children:[e(`p`,{class:`text-sm text-gray-500`,children:Z}),e(`div`,{class:`flex items-center gap-2`,children:[e(`a`,{href:`#/banners/profiles/archived`,class:`border border-gray-300 text-gray-600 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors flex items-center gap-1.5`,children:[e(u,{size:14,"aria-hidden":`true`}),o(`profiles.archived.cta`)]}),e(y,{perm:`profile:create`,children:e(`a`,{href:`#/banners/profiles/new`,class:`bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:o(`profiles.newProfile`)})})]})]}),e(g,{loading:D,keyFn:e=>e.id,rows:T,search:{placeholder:o(`profiles.search.placeholder`),keys:e=>[e.name,e.id,e.consentTemplateName,e.uiTemplateName]},filters:[{label:o(`profiles.filter.status`),options:[{value:`active`,label:o(`profiles.filter.active`)},{value:`inactive`,label:o(`profiles.filter.inactive`)}],predicate:(e,t)=>t===`active`===e.isActive}],columns:[{key:`name`,label:o(`profiles.col.name`),render:t=>{let n=t;return e(`div`,{children:[e(`div`,{class:`font-medium text-sm text-gray-900`,children:n.name}),e(`div`,{class:`flex items-center gap-1 mt-0.5`,children:[e(`span`,{class:`text-xs text-gray-400 font-mono`,children:n.id}),e(`button`,{onClick:e=>{e.stopPropagation(),U(n.id)},class:`text-gray-400 hover:text-gray-600 transition-colors`,"aria-label":o(`profiles.action.copyId`),title:o(`profiles.action.copyId`),children:j===n.id?e(c,{size:11,className:`text-green-500`,"aria-hidden":`true`}):e(l,{size:11,"aria-hidden":`true`})})]})]})}},{key:`defaultLocale`,label:o(`profiles.col.defaultLocale`)},{key:`complianceGroup`,label:`Compliance Group`,render:t=>{let n=t,r=n.complianceGroup??n.customComplianceGroup;if(!n.complianceGroup)return n.customComplianceGroup?e(`div`,{children:[e(`div`,{class:`font-medium text-sm text-gray-900`,children:n.customComplianceGroup}),e(`div`,{class:`flex items-center gap-1`,children:[e(`span`,{class:`text-sm text-gray-700 font-mono`,children:r}),e(`button`,{onClick:e=>{e.stopPropagation(),U(r)},class:`text-gray-400 hover:text-gray-600 transition-colors`,"aria-label":o(`profiles.action.copySlug`),title:o(`profiles.action.copySlug`),children:j===r?e(c,{size:11,className:`text-green-500`,"aria-hidden":`true`}):e(l,{size:11,"aria-hidden":`true`})})]})]}):e(`span`,{class:`text-xs text-gray-400`,children:`—`});let i=v[n.complianceGroup],a=i?.label??n.complianceGroup,s=i?.compliances??[];return e(`div`,{children:[e(`div`,{class:`font-medium text-sm text-gray-900`,children:a}),e(`div`,{class:`flex items-center gap-1.5`,children:[e(`span`,{class:`text-sm text-gray-700`,children:r}),e(`button`,{onClick:e=>{e.stopPropagation(),U(r)},class:`text-gray-400 hover:text-gray-600 transition-colors`,"aria-label":o(`profiles.action.copySlug`),title:o(`profiles.action.copySlug`),children:j===r?e(c,{size:11,className:`text-green-500`,"aria-hidden":`true`}):e(l,{size:11,"aria-hidden":`true`})}),s.length>0&&e(w,{content:e(`div`,{class:`space-y-0.5`,children:s.map(t=>e(`div`,{class:`text-xs`,children:t},t))}),children:e(x,{size:13,className:`text-gray-400 cursor-help`,"aria-hidden":`true`})})]})]})}},{key:`isActive`,label:`Status`,render:t=>{let n=t;return e(`span`,{class:`text-xs font-medium px-2 py-0.5 rounded-full ${n.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:n.isActive?`Active`:`Inactive`})}},{key:`templates`,label:o(`profiles.col.templates`),render:t=>{let n=t;return e(`div`,{class:`text-xs text-gray-500 space-y-0.5`,children:[n.consentTemplateName&&e(`div`,{children:[`Consent: `,e(`span`,{class:`text-gray-700`,children:n.consentTemplateName})]}),n.uiTemplateName&&e(`div`,{children:[`UI: `,e(`span`,{class:`text-gray-700`,children:n.uiTemplateName})]}),!n.consentTemplateName&&!n.uiTemplateName&&e(`span`,{class:`text-gray-300`,children:`—`})]})}},{key:`createdAt`,label:o(`profiles.col.created`),render:t=>{let n=t;return e(`div`,{class:`text-xs text-gray-500`,children:[e(`div`,{children:new Date(n.createdAt).toLocaleDateString()}),n.updatedAt&&n.updatedAt!==n.createdAt&&e(`div`,{class:`text-gray-400`,children:[`upd `,new Date(n.updatedAt).toLocaleDateString()]})]})}},{key:`actions`,label:``,render:t=>{let n=t;return e(`div`,{class:`flex gap-2 items-center`,children:[e(`a`,{href:`#/banners/profiles/${n.id}`,class:`text-blue-600 hover:text-blue-800 text-xs`,title:o(`common.edit`),"aria-label":o(`common.edit`),children:e(d,{size:14,"aria-hidden":`true`})}),e(`a`,{href:`#/banners/profiles/${n.id}/history`,class:`text-gray-500 hover:text-gray-700 text-xs`,title:`Version history`,"aria-label":`Version history`,children:e(u,{size:14,"aria-hidden":`true`})}),e(y,{perm:`profile:update`,children:e(`button`,{onClick:()=>Y(n),disabled:N===n.id,class:`text-xs disabled:opacity-50 ${n.isActive?`text-amber-500 hover:text-amber-700`:`text-green-600 hover:text-green-800`}`,title:n.isActive?`Deactivate`:`Activate`,"aria-label":n.isActive?`Deactivate`:`Activate`,children:n.isActive?e(S,{size:14,"aria-hidden":`true`}):e(C,{size:14,"aria-hidden":`true`})})}),e(y,{perm:`profile:create`,children:e(`button`,{onClick:()=>K(n),disabled:k===n.id,class:`text-gray-500 hover:text-blue-600 text-xs disabled:opacity-50`,title:o(`common.duplicate`),"aria-label":o(`common.duplicate`),children:k===n.id?`…`:e(b,{size:14,"aria-hidden":`true`})})}),e(y,{perm:`profile:delete`,children:e(`button`,{onClick:()=>G(n.id,n.name),class:`text-red-500 hover:text-red-700 text-xs`,title:o(`common.delete`),"aria-label":o(`common.delete`),children:e(f,{size:14,"aria-hidden":`true`})})})]})}}],emptyText:o(`profiles.empty`)})]})}export{T as ProfileList};
@@ -0,0 +1,3 @@
1
+ import{a as e,c as t,l as n,p as r,t as i}from"./createLucideIcon-DAiYBrnd.js";import{t as a}from"./x-BhZiH8AL.js";import{h as o,o as s}from"./index-Tr_BcjkN.js";import{t as c}from"./profiles-C_SuoLJD.js";import{t as l}from"./Select-C_JusbT5.js";var u=i(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]);function d(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a]===t[n]?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o]===t[s]?(a.push({type:`same`,line:e[o]}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,line:e[o]}),o++):(a.push({type:`add`,line:t[s]}),s++);for(;o<n;)a.push({type:`del`,line:e[o]}),o++;for(;s<r;)a.push({type:`add`,line:t[s]}),s++;return a}function f(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/("(?:\\u[a-fA-F0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(?:true|false)\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,e=>{let t=`#fcd34d`;return/^"/.test(e)?t=/:\s*$/.test(e)?`#7dd3fc`:`#86efac`:e===`true`||e===`false`?t=`#c4b5fd`:e===`null`&&(t=`#9ca3af`),`<span style="color:${t}">${e}</span>`})}function p({id:i,current:p,initialVersion:m,compareVersion:h}){let[g,_]=t(``);s(`Version History — ${g||i}`);let[v,y]=t([]),[b,x]=t(null),[S,C]=t(`default`),[w,T]=t(null),[E,D]=t(!0),[O,k]=t(!1),[A,j]=t(!1),[M,N]=t(h!==void 0),[P,F]=t(h??null),[I,L]=t(null),[R,z]=t(!1);n(()=>{c.get(i).then(e=>_(e.name)).catch(()=>j(!0)),c.listVersions(i).then(e=>{y(e);let t=m!==void 0&&e.some(e=>e.version===m)?m:e[0]?.version;if(t!==void 0&&x(t),h!==void 0&&!e.some(e=>e.version===h)){let n=e.findIndex(e=>e.version===t);F(e[n+1]?.version??null)}}).catch(()=>{}).finally(()=>D(!1))},[i]),n(()=>{b!==null&&(k(!0),c.getVersion(i,String(b),S).then(e=>T(JSON.stringify(e,null,2))).catch(()=>T(null)).finally(()=>k(!1)))},[i,b,S]),n(()=>{if(!M||P===null){L(null);return}z(!0),c.getVersion(i,String(P),S).then(e=>L(JSON.stringify(e,null,2))).catch(()=>L(null)).finally(()=>z(!1))},[i,P,S,M]);let B=v.find(e=>e.version===b),V=B?[`default`,...B.locales.filter(e=>e!=="default")].map(e=>({value:e,label:e})):[{value:`default`,label:`default`}],H=v.filter(e=>e.version!==b).map(e=>({value:String(e.version),label:`v${e.version} — ${new Date(e.createdAt).toLocaleDateString()}`})),U=()=>{N(e=>{let t=!e;if(t&&P===null){let e=v.findIndex(e=>e.version===b);F(v[e+1]?.version??null)}return t})},W=w!==null&&I!==null?d(I.split(`
2
+ `),w.split(`
3
+ `)):null;return e(r,{children:[e(`div`,{class:`mb-4`,children:e(`a`,{href:A?`#/banners/profiles/archived`:`#/banners/profiles/${i}`,class:`inline-flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700 transition-colors`,children:[e(o,{size:14,"aria-hidden":`true`}),A?`Back to archived profiles`:`Back to profile`]})}),E?e(`div`,{class:`text-sm text-gray-400`,children:`Loading…`}):v.length===0?e(`div`,{class:`text-sm text-gray-400`,children:`No version files found. Versions are written when a profile is saved with file storage enabled.`}):e(`div`,{class:`flex gap-0 h-[calc(100vh-10rem)] border border-gray-200 rounded-lg overflow-hidden`,children:[e(`aside`,{class:`w-32 shrink-0 border-r border-gray-200 bg-gray-50 overflow-y-auto`,children:[e(`div`,{class:`px-3 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wide border-b border-gray-200`,children:`Versions`}),e(`ul`,{children:v.map(t=>e(`li`,{children:e(`button`,{type:`button`,onClick:()=>{x(t.version),C(`default`),P===t.version&&F(null)},class:`w-full text-left px-3 py-2.5 text-sm transition-colors ${b===t.version?`bg-blue-600 text-white`:`text-gray-700 hover:bg-gray-100`}`,children:[e(`div`,{class:`font-mono font-semibold`,children:[`v`,t.version]}),e(`div`,{class:`text-[10px] mt-0.5 ${b===t.version?`text-blue-200`:`text-gray-400`}`,children:new Date(t.createdAt).toLocaleDateString()})]})},t.version))})]}),e(`div`,{class:`flex-1 flex flex-col overflow-hidden`,children:[b!==null&&e(`div`,{class:`flex items-center gap-3 px-4 py-2.5 border-b border-gray-200 bg-white flex-wrap`,children:[e(`span`,{class:`text-sm font-mono font-medium text-gray-700`,children:[`v`,b]}),e(`div`,{class:`w-48`,children:e(l,{options:V,value:S,onChange:e=>C(e),placeholder:`Select locale…`})}),e(`button`,{type:`button`,onClick:U,disabled:v.length<2,class:`flex items-center gap-1.5 text-xs px-2.5 py-1.5 rounded-md transition-colors disabled:opacity-40 disabled:cursor-not-allowed ${M?`bg-blue-600 text-white`:`text-gray-600 hover:bg-gray-100 border border-gray-200`}`,title:v.length<2?`Need at least two versions to compare`:`Compare with another version`,children:[e(u,{size:13,"aria-hidden":`true`}),` Compare`]}),M&&e(r,{children:[e(`span`,{class:`text-xs text-gray-400`,children:`vs`}),e(`div`,{class:`w-48`,children:e(l,{options:H,value:P===null?``:String(P),onChange:e=>F(Number(e)),placeholder:`Compare against…`})}),e(`button`,{type:`button`,onClick:()=>{N(!1),F(null)},class:`text-gray-400 hover:text-gray-700`,"aria-label":`Close compare`,title:`Close compare`,children:e(a,{size:14,"aria-hidden":`true`})})]})]}),e(`div`,{class:`flex-1 overflow-auto bg-gray-950 p-4`,children:O||M&&R?e(`span`,{class:`text-gray-400 text-sm`,children:`Loading…`}):w===null?e(`span`,{class:`text-gray-500 text-sm`,children:`File not found for this version/locale.`}):M?P===null?e(`span`,{class:`text-gray-500 text-sm`,children:`Pick a version to compare against.`}):I===null?e(`span`,{class:`text-gray-500 text-sm`,children:[`File not found for v`,P,` at this locale.`]}):W&&W.every(e=>e.type===`same`)?e(`span`,{class:`text-gray-500 text-sm`,children:[`No differences between v`,P,` and v`,b,` for this locale.`]}):e(`div`,{class:`text-xs font-mono leading-relaxed`,children:W.map((t,n)=>e(`div`,{class:`px-2 whitespace-pre-wrap ${t.type===`add`?`bg-green-900/30`:t.type===`del`?`bg-red-900/30`:``}`,children:[e(`span`,{class:`select-none mr-2 ${t.type===`add`?`text-green-500`:t.type===`del`?`text-red-500`:`text-gray-600`}`,children:t.type===`add`?`+`:t.type===`del`?`-`:` `}),e(`span`,{dangerouslySetInnerHTML:{__html:f(t.line)}})]},n))}):e(`pre`,{class:`text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed`,dangerouslySetInnerHTML:{__html:f(w)}})})]})]})]})}export{p as ProfileVersionHistory};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,n,o as r}from"./createLucideIcon-DAiYBrnd.js";import{t as i}from"./x-BhZiH8AL.js";import{s as a}from"./index-Tr_BcjkN.js";var o=`record-detail-title`;function s({open:s,title:c,fields:l,onClose:u}){let d=a(),f=r(null),p=r(null);return t(()=>{if(!s)return;f.current?.focus();let e=e=>{if(e.key===`Escape`){u();return}if(e.key!==`Tab`)return;let t=p.current;if(!t)return;let n=Array.from(t.querySelectorAll(`button, [href], input, [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),i.focus()):document.activeElement===i&&(e.preventDefault(),r.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s,u]),s?n(e(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[e(`div`,{class:`absolute inset-0 bg-black/40`,onClick:u,"aria-hidden":`true`}),e(`div`,{ref:p,role:`dialog`,"aria-modal":`true`,"aria-labelledby":o,class:`relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-lg mx-4 max-h-[85vh] flex flex-col`,children:[e(`div`,{class:`flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700 shrink-0`,children:[e(`h3`,{id:o,class:`text-sm font-semibold text-gray-900 dark:text-gray-100`,children:c}),e(`button`,{ref:f,type:`button`,onClick:u,"aria-label":d(`common.close`),class:`text-gray-400 hover:text-gray-600 dark:hover:text-gray-200`,children:e(i,{size:18,"aria-hidden":`true`})})]}),e(`dl`,{class:`px-6 py-4 space-y-3 overflow-y-auto`,children:l.map(t=>e(`div`,{children:[e(`dt`,{class:`text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide`,children:t.label}),e(`dd`,{class:`text-sm text-gray-800 dark:text-gray-200 mt-0.5 break-words`,children:t.value})]},t.label))})]})]}),document.body):null}function c({value:t}){return t==null?e(`span`,{class:`text-gray-400`,children:`—`}):e(`pre`,{class:`text-xs bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded p-2 overflow-x-auto`,children:JSON.stringify(t,null,2)})}export{s as n,c as t};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n,p as r}from"./createLucideIcon-DAiYBrnd.js";import{a as i,r as a}from"./client-CYntrO2g.js";import{a as o,i as s,n as c,o as l,r as u,s as d}from"./index-Tr_BcjkN.js";var f={optIn:(e={})=>{let t=new URLSearchParams;e.profileId&&t.set(`profileId`,e.profileId),e.complianceGroup&&t.set(`complianceGroup`,e.complianceGroup),e.from&&t.set(`from`,e.from),e.to&&t.set(`to`,e.to),e.locale&&t.set(`locale`,e.locale);let n=t.toString();return i(`/analytics/opt-in${n?`?${n}`:``}`)}};function p({current:i}){let p=d();l(p(`reports.title`));let[m,h]=t(null),[g,_]=t(null),[v,y]=t(``),[b,x]=t(``),[S,C]=t(!0),w=()=>{C(!0);let e={};v&&(e.from=v),b&&(e.to=b),Promise.all([c.categories().then(h).catch(()=>{}),f.optIn(e).then(_).catch(()=>{})]).finally(()=>C(!1))};n(()=>{w()},[]);let T=m?Object.entries(m).map(([e,t])=>({label:e,granted:t.granted,denied:t.denied,objected:t.objected})):[],E=g?Object.entries(g.byLocale).map(([e,t])=>({label:e,granted:t.granted,denied:t.denied,objected:t.managed})):[],D=g?g.byDate.map(e=>({date:e.date,count:e.total})):[];return e(r,{children:e(`div`,{class:`space-y-6`,children:[e(`form`,{class:`flex flex-wrap items-end gap-3 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-4`,onSubmit:e=>{e.preventDefault(),w()},children:[e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-500 dark:text-gray-400 mb-1`,for:`reports-from`,children:p(`reports.filters.from`)}),e(`input`,{id:`reports-from`,type:`date`,value:v,onChange:e=>y(e.target.value),class:`text-sm border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 rounded px-2 py-1.5`})]}),e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-500 dark:text-gray-400 mb-1`,for:`reports-to`,children:p(`reports.filters.to`)}),e(`input`,{id:`reports-to`,type:`date`,value:b,onChange:e=>x(e.target.value),class:`text-sm border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 rounded px-2 py-1.5`})]}),e(`button`,{type:`submit`,class:`px-3 py-1.5 text-sm rounded bg-blue-600 text-white hover:bg-blue-700 transition-colors`,children:p(`reports.filters.apply`)}),e(`button`,{type:`button`,onClick:()=>a(`/export/consents?format=csv`),class:`ml-auto text-sm text-blue-600 dark:text-blue-400 hover:underline`,children:p(`common.exportCsv`)})]}),S?e(`p`,{role:`status`,"aria-live":`polite`,class:`text-gray-400 text-sm`,children:p(`common.loading`)}):e(r,{children:[g&&e(`div`,{class:`grid grid-cols-2 lg:grid-cols-4 gap-4`,children:[e(s,{label:p(`reports.optin.total`),value:g.total}),e(s,{label:p(`reports.optin.granted`),value:`${g.grantedPct}%`}),e(s,{label:p(`reports.optin.denied`),value:`${g.deniedPct}%`}),e(s,{label:p(`reports.optin.managed`),value:`${g.managedPct}%`})]}),e(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5`,children:[e(`p`,{class:`text-sm font-medium text-gray-700 dark:text-gray-300 mb-3`,children:p(`reports.optin.byDate`)}),e(o,{data:D,ariaLabel:p(`reports.optin.byDateAria`),noDataLabel:p(`dashboard.chart.noData`)})]}),e(`div`,{class:`grid grid-cols-1 lg:grid-cols-2 gap-6`,children:[e(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5`,children:[e(`p`,{class:`text-sm font-medium text-gray-700 dark:text-gray-300 mb-3`,children:p(`reports.category.title`)}),e(u,{rows:T,noDataLabel:p(`dashboard.chart.noData`),grantedLabel:p(`reports.legend.granted`),deniedLabel:p(`reports.legend.denied`),objectedLabel:p(`reports.legend.objected`)})]}),e(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5`,children:[e(`p`,{class:`text-sm font-medium text-gray-700 dark:text-gray-300 mb-3`,children:p(`reports.optin.byLocale`)}),e(u,{rows:E,noDataLabel:p(`dashboard.chart.noData`),grantedLabel:p(`reports.legend.granted`),deniedLabel:p(`reports.legend.denied`),objectedLabel:p(`reports.legend.managed`)})]})]})]})]})})}export{p as Reports};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n,p as r,t as i}from"./createLucideIcon-DAiYBrnd.js";import{i as a}from"./client-CYntrO2g.js";import{t as o}from"./check-D0g4XvmN.js";import{t as s}from"./trash-2-eX9s6x8V.js";import{t as c}from"./ConfirmDialog-BDlnfTdx.js";import{t as l}from"./x-BhZiH8AL.js";import{o as u,s as d}from"./index-Tr_BcjkN.js";import{t as f}from"./roles-D7L936FV.js";var p=i(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),m=i(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),h=`role_super_admin`;function g(e){let t={};for(let n of e){let e=n.name.includes(`:`)?n.name.split(`:`)[0]:`other`;(t[e]??=[]).push(n)}return Object.entries(t).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({group:e,items:t}))}function _({initial:n,onSave:r,onCancel:i,saving:a}){let s=d(),[c,u]=t(n?.name??``),[f,p]=t(n?.description??``),m=!c.trim();return e(`form`,{onSubmit:e=>{e.preventDefault(),!m&&r(c.trim(),f.trim())},class:`border border-blue-200 bg-blue-50 rounded-lg p-3 space-y-2`,children:[e(`div`,{children:[e(`label`,{for:`role-name`,class:`block text-xs font-medium text-gray-600 mb-0.5`,children:[s(`roles.form.roleNameLabel`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{id:`role-name`,class:`w-full border rounded px-2 py-1.5 text-sm ${m?`border-red-300 bg-red-50`:`border-gray-300 bg-white`}`,value:c,onInput:e=>u(e.target.value),placeholder:s(`roles.form.roleNamePlaceholder`),autoFocus:!0,required:!0,"aria-required":`true`,"aria-invalid":m}),m&&e(`p`,{role:`alert`,class:`text-xs text-red-500 mt-0.5`,children:s(`common.required`)})]}),e(`div`,{children:[e(`label`,{for:`role-desc`,class:`block text-xs font-medium text-gray-600 mb-0.5`,children:s(`roles.form.descriptionLabel`)}),e(`input`,{id:`role-desc`,class:`w-full border border-gray-300 bg-white rounded px-2 py-1.5 text-sm`,value:f,onInput:e=>p(e.target.value),placeholder:s(`roles.form.descriptionPlaceholder`)})]}),e(`div`,{class:`flex gap-2 pt-1`,children:[e(`button`,{type:`submit`,disabled:a||m,class:`flex items-center gap-1.5 px-3 py-1.5 bg-blue-600 text-white text-xs font-medium rounded hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:[e(o,{size:12,"aria-hidden":`true`}),` `,s(a?`common.saving`:`common.save`)]}),e(`button`,{type:`button`,onClick:i,class:`flex items-center gap-1.5 px-3 py-1.5 text-xs text-gray-600 hover:bg-gray-100 rounded transition-colors`,children:[e(l,{size:12,"aria-hidden":`true`}),` `,s(`common.cancel`)]})]})]})}function v({current:i}){let o=d();u(o(`roles.title`));let[l,v]=t([]),[y,b]=t([]),[x,S]=t(null),[C,w]=t([]),[T,E]=t(!0),[D,O]=t(!1),[k,A]=t(null),[j,M]=t(!1),[N,P]=t(``),{requestConfirm:F,dialog:I}=c(),L=()=>{E(!0),Promise.all([f.list(),f.allPermissions()]).then(([e,t])=>{v(e),b(t)}).catch(()=>P(o(`roles.error.load`))).finally(()=>E(!1))};n(L,[]);let R=e=>{k!==e.id&&(S(e),f.permissions(e.id).then(w).catch(()=>{}))},z=async e=>{if(!x)return;let t=C.some(t=>t.id===e.id);try{t?(await f.revokePermission(x.id,e.id),w(t=>t.filter(t=>t.id!==e.id))):(await f.assignPermission(x.id,e.id),w(t=>[...t,e]))}catch(e){P(a(e,o(`roles.error.perm`)))}},B=async(e,t)=>{M(!0),P(``);try{let n=await f.create({name:e,description:t||void 0});O(!1),L(),S(n),f.permissions(n.id).then(w).catch(()=>{})}catch(e){P(a(e,o(`roles.error.create`)))}finally{M(!1)}},V=async(e,t,n)=>{M(!0),P(``);try{await f.update(e,{name:t,description:n||void 0}),A(null),L(),x?.id===e&&S(e=>e&&{...e,name:t,description:n})}catch(e){P(a(e,o(`roles.error.update`)))}finally{M(!1)}},H=async e=>{if(await F({title:o(`roles.dialog.delete.title`,{name:e.name}),message:o(`roles.dialog.delete.message`)}))try{await f.delete(e.id),x?.id===e.id&&(S(null),w([])),L()}catch(e){P(a(e,o(`roles.error.delete`)))}},U=g(y);return e(r,{children:[I,N&&e(`p`,{role:`alert`,class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2 mb-4`,children:N}),T?e(`p`,{role:`status`,"aria-live":`polite`,class:`text-gray-400 text-sm`,children:o(`common.loading`)}):e(`div`,{class:`grid grid-cols-1 md:grid-cols-[280px_1fr] gap-6 items-start`,children:[e(`div`,{children:[e(`div`,{class:`flex items-center justify-between mb-2`,children:[e(`h2`,{class:`text-sm font-semibold text-gray-700`,children:o(`roles.list.heading`)}),e(`button`,{onClick:()=>{O(!0),A(null)},class:`flex items-center gap-1 text-xs text-blue-600 hover:underline`,children:[e(m,{size:12,"aria-hidden":`true`}),` `,o(`common.newRole`)]})]}),e(`div`,{class:`space-y-2`,children:[D&&e(_,{onSave:B,onCancel:()=>O(!1),saving:j}),l.map(t=>{let n=x?.id===t.id;if(k===t.id)return e(_,{initial:{name:t.name,description:t.description??``},onSave:(e,n)=>V(t.id,e,n),onCancel:()=>A(null),saving:j},t.id);let r=t.id===h;return e(`div`,{class:`group flex items-start gap-2 px-3 py-2.5 rounded-lg border text-sm transition-colors cursor-pointer ${n?`border-blue-500 bg-blue-50`:`border-gray-200 bg-white hover:border-gray-300`}`,onClick:()=>R(t),role:`button`,tabIndex:0,onKeyDown:e=>e.key===`Enter`&&R(t),"aria-pressed":n,children:[e(`div`,{class:`flex-1 min-w-0`,children:[e(`p`,{class:`font-medium ${n?`text-blue-700`:`text-gray-700`}`,children:t.name}),t.description&&e(`p`,{class:`text-xs text-gray-400 mt-0.5 truncate`,children:t.description})]}),r?e(`span`,{class:`shrink-0 text-xs text-gray-400 mt-0.5`,title:o(`roles.superAdminLocked`),children:o(`common.locked`)}):e(`div`,{class:`flex gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity mt-0.5`,children:[e(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),A(t.id),O(!1)},class:`p-1 text-gray-400 hover:text-blue-600 rounded transition-colors`,"aria-label":o(`roles.aria.editRole`),title:o(`roles.aria.editRole`),children:e(p,{size:13,"aria-hidden":`true`})}),e(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),H(t)},class:`p-1 text-gray-400 hover:text-red-600 rounded transition-colors`,"aria-label":o(`roles.aria.deleteRole`),title:o(`roles.aria.deleteRole`),children:e(s,{size:13,"aria-hidden":`true`})})]})]},t.id)}),l.length===0&&!D&&e(`p`,{class:`text-sm text-gray-400 text-center py-6`,children:o(`roles.list.empty`)})]})]}),e(`div`,{children:[e(`h2`,{class:`text-sm font-semibold text-gray-700 mb-2`,children:x?o(`roles.perms.heading`,{name:x.name}):o(`roles.perms.selectPrompt`)}),x?e(`div`,{class:`space-y-4`,children:[x.id===h&&e(`p`,{class:`text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-3 py-2`,children:o(`roles.superAdminLocked`)}),U.map(({group:t,items:n})=>e(`div`,{class:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:[e(`div`,{class:`px-4 py-2 bg-gray-50 border-b border-gray-200 flex items-center justify-between`,children:[e(`span`,{class:`text-xs font-semibold text-gray-600 uppercase tracking-wide`,children:t}),x.id!==h&&e(`div`,{class:`flex gap-2`,children:e(`button`,{type:`button`,class:`text-xs text-blue-600 hover:underline`,onClick:()=>{(n.every(e=>C.some(t=>t.id===e.id))?n.filter(e=>C.some(t=>t.id===e.id)):n.filter(e=>!C.some(t=>t.id===e.id))).forEach(e=>z(e))},children:n.every(e=>C.some(t=>t.id===e.id))?o(`common.revokeAll`):o(`common.grantAll`)})})]}),e(`div`,{class:`divide-y divide-gray-50`,children:n.map(t=>{let n=C.some(e=>e.id===t.id);return e(`label`,{class:`flex items-center gap-3 px-4 py-2.5 transition-colors ${x.id===h?`cursor-not-allowed opacity-70`:`hover:bg-gray-50 cursor-pointer`}`,children:[e(`input`,{type:`checkbox`,checked:n,disabled:x.id===h,onChange:()=>z(t),class:`w-4 h-4 accent-blue-600 rounded shrink-0`}),e(`div`,{class:`min-w-0`,children:[e(`p`,{class:`text-sm font-medium text-gray-700 font-mono`,children:t.name}),t.description&&e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:t.description})]}),n&&e(`span`,{class:`ml-auto shrink-0 text-xs text-green-600 bg-green-50 px-1.5 py-0.5 rounded-full`,children:o(`common.granted`)})]},t.id)})})]},t)),y.length===0&&e(`p`,{class:`text-sm text-gray-400`,children:o(`roles.perms.noPerms`)})]}):e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-8 text-center`,children:e(`p`,{class:`text-sm text-gray-400`,children:o(`roles.perms.clickPrompt`)})})]})]})]})}export{v as RoleList};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n,o as r}from"./createLucideIcon-DAiYBrnd.js";import{t as i}from"./search-DKwfLBOv.js";import{g as a}from"./index-Tr_BcjkN.js";function o({options:o,value:s,onChange:c,placeholder:l=`Select…`,searchable:u,disabled:d,id:f,class:p}){let[m,h]=t(!1),[g,_]=t(``),v=r(null),y=r(null),b=o.find(e=>e.value===s),x=g?o.filter(e=>e.label.toLowerCase().includes(g.toLowerCase())||e.value.toLowerCase().includes(g.toLowerCase())):o;return n(()=>{m&&u&&setTimeout(()=>y.current?.focus(),10),m||_(``)},[m,u]),n(()=>{let e=e=>{v.current&&!v.current.contains(e.target)&&h(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),e(`div`,{ref:v,class:`relative ${p??``}`,children:[e(`button`,{id:f,type:`button`,disabled:d,onClick:()=>h(e=>!e),onKeyDown:e=>{e.key===`Escape`&&h(!1),e.key===`Enter`&&!m&&h(!0)},class:`w-full flex items-center justify-between gap-2 border border-gray-300 rounded px-3 py-2 text-sm bg-white text-left ${d?`opacity-50 cursor-not-allowed`:`cursor-pointer hover:border-gray-400`}`,"aria-haspopup":`listbox`,"aria-expanded":m,children:[e(`span`,{class:b?`text-gray-900`:`text-gray-400`,children:b?.label??l}),e(a,{size:14,className:`shrink-0 text-gray-400 transition-transform ${m?`rotate-180`:``}`,"aria-hidden":`true`})]}),m&&e(`div`,{class:`absolute z-50 mt-1 w-full bg-white border border-gray-200 rounded shadow-lg max-h-56 flex flex-col`,role:`listbox`,children:[u&&e(`div`,{class:`px-2 pt-2 pb-1 border-b border-gray-100`,children:e(`div`,{class:`flex items-center gap-1.5 border border-gray-300 rounded px-2 py-1`,children:[e(i,{size:12,className:`text-gray-400 shrink-0`,"aria-hidden":`true`}),e(`input`,{ref:y,type:`text`,class:`flex-1 text-sm outline-none bg-transparent`,placeholder:`Search…`,value:g,onInput:e=>_(e.target.value),"aria-label":`Search options`})]})}),e(`ul`,{class:`overflow-y-auto flex-1`,children:[x.length===0&&e(`li`,{class:`px-3 py-2 text-sm text-gray-400`,children:`No results`}),x.map(t=>e(`li`,{role:`option`,"aria-selected":t.value===s,onClick:()=>{c(t.value),h(!1)},class:`px-3 py-2 text-sm cursor-pointer transition-colors ${t.value===s?`bg-blue-50 text-blue-700 font-medium`:`hover:bg-gray-50 text-gray-700`}`,children:t.label},t.value))]})]})]})}export{o as t};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n,p as r}from"./createLucideIcon-DAiYBrnd.js";import{r as i}from"./client-CYntrO2g.js";import{o as a,s as o,y as s}from"./index-Tr_BcjkN.js";function c({current:c}){let{user:l}=s(),u=o();a(u(`settings.title`));let[d]=t(!0);return n(()=>{},[]),e(r,{children:e(`div`,{class:`max-w-2xl space-y-4`,children:[e(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[e(`h2`,{class:`text-sm font-semibold text-gray-700 mb-3`,children:u(`settings.account.heading`)}),e(`div`,{class:`space-y-2 text-sm text-gray-600`,children:[e(`p`,{children:[e(`span`,{class:`font-medium`,children:u(`settings.account.email`)}),` `,l?.email]}),e(`p`,{children:[e(`span`,{class:`font-medium`,children:u(`settings.account.roles`)}),` `,l?.roles.join(`, `)]}),e(`p`,{children:[e(`span`,{class:`font-medium`,children:u(`settings.account.id`)}),` `,e(`span`,{class:`font-mono`,children:l?.sub})]})]}),e(`div`,{class:`mt-4 pt-4 border-t border-gray-100`,children:e(`a`,{href:`#/settings/change-password`,class:`text-sm text-blue-600 hover:underline`,children:u(`settings.account.changePassword`)})})]}),e(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[e(`h2`,{class:`text-sm font-semibold text-gray-700 mb-2`,children:u(`settings.export.heading`)}),e(`p`,{class:`text-xs text-gray-500 mb-3`,children:u(`settings.export.hint`)}),e(`div`,{class:`flex flex-wrap gap-3`,children:[e(`button`,{onClick:()=>i(`/export/consents?format=csv`),class:`text-sm text-blue-600 hover:underline`,children:u(`settings.export.consentCsv`)}),e(`button`,{onClick:()=>i(`/export/consents/xlsx`),class:`text-sm text-blue-600 hover:underline`,children:u(`settings.export.consentXlsx`)}),e(`button`,{onClick:()=>i(`/export/consents?format=json`),class:`text-sm text-blue-600 hover:underline`,children:u(`settings.export.consentJson`)}),e(`button`,{onClick:()=>i(`/export/audit?format=csv`),class:`text-sm text-blue-600 hover:underline`,children:u(`settings.export.auditCsv`)})]})]}),e(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[e(`h2`,{class:`text-sm font-semibold text-gray-700 mb-2`,children:u(`settings.about.heading`)}),e(`p`,{class:`text-xs text-gray-500`,children:[u(`settings.about.text`),e(`br`,{}),u(`settings.about.license`)]})]})]})})}export{c as Settings};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n}from"./createLucideIcon-DAiYBrnd.js";import{i as r}from"./client-CYntrO2g.js";import{t as i}from"./check-D0g4XvmN.js";import{t as a}from"./external-link-CFZxxe3W.js";import{_ as o,g as s,m as c,s as l,t as u}from"./index-Tr_BcjkN.js";var d=[`welcome`,`config`,`profiles`,`confirmation`];function f({step:t}){return e(`div`,{class:`flex items-center justify-center gap-2 mb-8`,children:d.map((n,r)=>{let i=r+1;return e(`div`,{class:`h-2 rounded-full transition-all ${t>i?`w-2 bg-green-500`:t===i?`w-6 bg-blue-600`:`w-2 bg-gray-200`}`},n)})})}function p({value:t}){return t==null?e(`span`,{class:`text-gray-400`,children:`—`}):Array.isArray(t)?t.length?e(`span`,{class:`text-gray-700`,children:t.map(String).join(`, `)}):e(`span`,{class:`text-gray-400`,children:`—`}):typeof t==`object`?e(`div`,{class:`pl-3 border-l-2 border-gray-100 space-y-1 mt-1`,children:Object.entries(t).map(([t,n])=>e(`div`,{class:`flex flex-wrap items-baseline gap-x-2 text-xs`,children:[e(`span`,{class:`text-gray-500 font-medium`,children:t}),e(p,{value:n})]},t))}):e(`span`,{class:`text-gray-700`,children:String(t)})}function m({title:t,value:n}){return e(`div`,{class:`border border-gray-200 rounded-lg p-4`,children:[e(`p`,{class:`text-sm font-semibold text-gray-800 mb-2`,children:t}),e(p,{value:n})]})}function h({mode:t}){return e(`span`,{class:`text-[11px] px-1.5 py-0.5 rounded ${t===`strict`?`bg-red-100 text-red-700`:t===`honor`?`bg-amber-100 text-amber-700`:`bg-gray-100 text-gray-600`}`,children:[`GPC: `,t]})}function g({group:n,checked:r,onToggle:i}){let[a,o]=t(!1);return e(`div`,{class:`border border-gray-200 rounded-lg overflow-hidden`,children:[e(`div`,{class:`flex items-center gap-3 p-3 bg-white`,children:[e(`input`,{type:`checkbox`,checked:r,onChange:i,class:`w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500`,"aria-label":n.label}),e(`button`,{type:`button`,onClick:()=>o(e=>!e),class:`flex-1 flex items-center justify-between text-left`,children:[e(`span`,{class:`text-sm font-medium text-gray-800`,children:n.label}),e(a?s:c,{size:16,class:`text-gray-400`})]})]}),a&&e(`div`,{class:`px-3 pb-3 pt-0 bg-gray-50 border-t border-gray-100`,children:[e(`p`,{class:`text-xs text-gray-600 leading-relaxed mb-2`,children:n.description}),e(`div`,{class:`flex flex-wrap gap-1.5`,children:[e(h,{mode:n.defaultGpc}),n.allowsTcf&&e(`span`,{class:`text-[11px] px-1.5 py-0.5 rounded bg-blue-100 text-blue-700`,children:`TCF`}),n.requiresCpraCategory&&e(`span`,{class:`text-[11px] px-1.5 py-0.5 rounded bg-orange-100 text-orange-700`,children:`CPRA categories`}),n.requiresDpdpaDisclosure&&e(`span`,{class:`text-[11px] px-1.5 py-0.5 rounded bg-violet-100 text-violet-700`,children:`DPDPA disclosure`}),n.allowsLegitimateInterest&&e(`span`,{class:`text-[11px] px-1.5 py-0.5 rounded bg-green-100 text-green-700`,children:`Legitimate interest`})]})]})]})}function _({onComplete:s}){let c=l(),{appName:d,appLogoPath:p}=o(),[h,_]=t(1),[v,y]=t(null),[b,x]=t([]),[S,C]=t(new Set),[w,T]=t(0),[E,D]=t(!1),[O,k]=t(``);n(()=>{u.config().then(y).catch(()=>{}),u.complianceGroups().then(e=>{x(e),C(new Set(e.map(e=>e.id)))}).catch(()=>{})},[]);let A=async e=>{D(!0);try{await u.complete()}catch{}finally{s(),window.location.hash=e}},j=e=>{C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},M=()=>{C(e=>e.size===b.length?new Set:new Set(b.map(e=>e.id)))},N=async()=>{D(!0),k(``);try{let e=[...S];if(e.length>0){let{seeded:t}=await u.seedProfiles(e);T(t.length)}else T(0);_(4)}catch(e){k(r(e,c(`setupWizard.profiles.error`)))}finally{D(!1)}};return e(`div`,{class:`min-h-screen bg-gray-50 flex flex-col items-center justify-center p-4`,children:e(`div`,{class:`bg-white rounded-xl shadow-sm border border-gray-200 p-8 w-full max-w-2xl`,children:[p&&e(`img`,{src:p,alt:d,class:`h-10 w-auto mx-auto mb-6 object-contain`}),e(f,{step:h}),h===1&&e(`div`,{class:`text-center`,children:[e(`h1`,{class:`text-xl font-bold text-gray-900 mb-2`,children:c(`setupWizard.welcome.title`,{appName:d})}),e(`p`,{class:`text-sm text-gray-500 leading-relaxed mb-6 max-w-md mx-auto`,children:c(`setupWizard.welcome.body`)}),e(`div`,{class:`flex items-center justify-center gap-4 mb-8 text-sm`,children:[e(`a`,{href:`https://consenti.dev/docs?utm_source=dashboard&utm_medium=setup-wizard&utm_campaign=consenti-api`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 hover:underline`,children:[c(`setupWizard.welcome.docsLink`),` `,e(a,{size:12,"aria-hidden":`true`})]}),e(`a`,{href:`#/how-it-works`,class:`text-blue-600 hover:text-blue-800 hover:underline`,children:c(`setupWizard.welcome.howItWorksLink`)})]}),e(`button`,{type:`button`,onClick:()=>_(2),class:`w-full bg-blue-600 text-white rounded-lg px-4 py-2.5 text-sm font-medium hover:bg-blue-700 transition-colors`,children:c(`setupWizard.welcome.getStarted`)})]}),h===2&&e(`div`,{children:[e(`h2`,{class:`text-lg font-semibold text-gray-900 mb-1`,children:c(`setupWizard.config.title`)}),e(`p`,{class:`text-sm text-gray-500 mb-5`,children:c(`setupWizard.config.subtitle`)}),v?e(`div`,{class:`space-y-3 max-h-96 overflow-y-auto pr-1`,children:Object.entries(v.config).map(([t,n])=>e(m,{title:t,value:n},t))}):e(`p`,{class:`text-sm text-gray-400`,children:c(`common.loading`)}),e(`div`,{class:`flex items-center justify-between mt-6`,children:[e(`button`,{type:`button`,onClick:()=>_(1),class:`text-sm text-gray-500 hover:text-gray-700`,children:c(`setupWizard.back`)}),e(`button`,{type:`button`,onClick:()=>_(3),class:`bg-blue-600 text-white rounded-lg px-4 py-2.5 text-sm font-medium hover:bg-blue-700 transition-colors`,children:c(`setupWizard.continue`)})]})]}),h===3&&e(`div`,{children:[e(`h2`,{class:`text-lg font-semibold text-gray-900 mb-1`,children:c(`setupWizard.profiles.title`)}),e(`p`,{class:`text-sm text-gray-500 mb-4`,children:c(`setupWizard.profiles.subtitle`)}),e(`label`,{class:`flex items-center gap-2 mb-3 text-sm text-gray-700`,children:[e(`input`,{type:`checkbox`,checked:S.size===b.length&&b.length>0,onChange:M,class:`w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500`}),c(`setupWizard.profiles.selectAll`)]}),e(`div`,{class:`space-y-2 max-h-80 overflow-y-auto pr-1`,children:b.map(t=>e(g,{group:t,checked:S.has(t.id),onToggle:()=>j(t.id)},t.id))}),O&&e(`p`,{role:`alert`,class:`text-sm text-red-600 mt-3`,children:O}),e(`div`,{class:`flex items-center justify-between mt-6`,children:[e(`button`,{type:`button`,onClick:()=>_(2),class:`text-sm text-gray-500 hover:text-gray-700`,children:c(`setupWizard.back`)}),e(`button`,{type:`button`,disabled:E,onClick:()=>void N(),class:`bg-blue-600 text-white rounded-lg px-4 py-2.5 text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:E?c(`common.saving`):S.size>0?c(`setupWizard.profiles.installAndContinue`):c(`setupWizard.profiles.skipAndContinue`)})]})]}),h===4&&e(`div`,{class:`text-center`,children:[e(`div`,{class:`w-12 h-12 rounded-full bg-green-100 text-green-600 flex items-center justify-center mx-auto mb-4`,children:e(i,{size:24,"aria-hidden":`true`})}),e(`h1`,{class:`text-xl font-bold text-gray-900 mb-2`,children:c(`setupWizard.confirmation.title`)}),e(`p`,{class:`text-sm text-gray-500 mb-6`,children:w>0?c(`setupWizard.confirmation.seededSummary`,{count:w}):c(`setupWizard.confirmation.noneSeeded`)}),v&&(v.usingJsonStorage||v.usingDefaultCredentials)&&e(`div`,{class:`text-left bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6`,children:[e(`p`,{class:`text-xs font-semibold text-amber-800 mb-2`,children:c(`setupWizard.confirmation.readinessTitle`)}),e(`ul`,{class:`space-y-1 text-xs text-amber-700 list-disc list-inside`,children:[v.usingJsonStorage&&e(`li`,{children:c(`setupWizard.confirmation.readinessJsonStorage`)}),v.usingDefaultCredentials&&e(`li`,{children:c(`setupWizard.confirmation.readinessDefaultCredentials`)})]})]}),e(`div`,{class:`flex items-center justify-center gap-3`,children:[e(`button`,{type:`button`,disabled:E,onClick:()=>void A(`#/how-it-works`),class:`border border-gray-300 text-gray-700 rounded-lg px-4 py-2.5 text-sm font-medium hover:bg-gray-50 disabled:opacity-50 transition-colors`,children:c(`setupWizard.confirmation.howItWorks`)}),e(`button`,{type:`button`,disabled:E,onClick:()=>void A(`#/`),class:`bg-blue-600 text-white rounded-lg px-4 py-2.5 text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:c(`setupWizard.confirmation.goToDashboard`)})]})]})]})})}export{_ as SetupWizard};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,s as n}from"./createLucideIcon-DAiYBrnd.js";import{t as r}from"./search-DKwfLBOv.js";import{s as i}from"./index-Tr_BcjkN.js";function a({columns:a,rows:o,keyFn:s,loading:c,emptyText:l,search:u,filters:d}){let f=i(),p=l??f(`common.noData`),[m,h]=t(``),[g,_]=t({}),v=n(()=>{let e=o;if(u&&m.trim()){let t=m.trim().toLowerCase();e=e.filter(e=>u.keys(e).some(e=>e?.toLowerCase().includes(t)))}return d&&d.forEach((t,n)=>{let r=g[n];r&&(e=e.filter(e=>t.predicate(e,r)))}),e},[o,m,g,u,d]);if(c)return e(`div`,{role:`status`,"aria-live":`polite`,class:`flex items-center justify-center py-12 text-gray-400 dark:text-gray-500 text-sm`,children:f(`common.loading`)});let y=!!u||d&&d.length>0;return e(`div`,{children:[y&&e(`div`,{class:`flex flex-wrap items-center gap-2 mb-3`,children:[u&&e(`div`,{class:`relative flex-1 min-w-[200px] max-w-sm`,children:[e(r,{size:14,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-400`,"aria-hidden":`true`}),e(`input`,{type:`search`,value:m,onInput:e=>h(e.target.value),placeholder:u.placeholder??f(`common.search`),"aria-label":u.placeholder??f(`common.search`),class:`w-full pl-8 pr-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200`})]}),d?.map((t,n)=>e(`select`,{value:g[n]??``,onChange:e=>_(t=>({...t,[n]:e.target.value})),"aria-label":t.label,class:`text-sm border border-gray-300 dark:border-gray-600 rounded-lg px-2.5 py-1.5 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200`,children:[e(`option`,{value:``,children:t.label}),t.options.map(t=>e(`option`,{value:t.value,children:t.label},t.value))]},t.label))]}),e(`div`,{class:`overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800`,children:e(`table`,{class:`min-w-full text-sm`,children:[e(`thead`,{children:e(`tr`,{class:`bg-gray-50 dark:bg-gray-700/50 border-b border-gray-200 dark:border-gray-700`,children:a.map(t=>e(`th`,{scope:`col`,class:`px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide`,children:t.label},t.key))})}),e(`tbody`,{children:v.length===0?e(`tr`,{children:e(`td`,{colSpan:a.length,class:`px-4 py-8 text-center text-gray-400 dark:text-gray-500`,children:o.length===0?p:f(`common.noResults`)})}):v.map(t=>e(`tr`,{class:`border-b border-gray-100 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700/40 transition-colors`,children:a.map(n=>e(`td`,{class:`px-4 py-3 text-gray-700 dark:text-gray-300`,children:n.render?n.render(t):String(t[n.key]??``)},n.key))},s(t)))})]})})]})}export{a as t};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n,p as r}from"./createLucideIcon-DAiYBrnd.js";import{a as i,i as a}from"./client-CYntrO2g.js";import{t as o}from"./ConfirmDialog-BDlnfTdx.js";import{o as s,s as c}from"./index-Tr_BcjkN.js";import{t as l}from"./Table-BUxoz0YR.js";function u({current:u}){let d=c();s(d(`sites.title`));let[f,p]=t([]),[m,h]=t(!0),[g,_]=t(!1),[v,y]=t(``),[b,x]=t(``),[S,C]=t(``),{requestConfirm:w,dialog:T}=o(),E=()=>{h(!0),i(`/tenants`).then(p).catch(()=>{}).finally(()=>h(!1))};n(()=>{E()},[]);let D=async()=>{if(!(!v.trim()||!b.trim())){_(!0),C(``);try{await i(`/tenants`,{method:`POST`,body:JSON.stringify({name:v.trim(),slug:b.trim()})}),y(``),x(``),E()}catch(e){C(a(e,d(`sites.error.create`)))}finally{_(!1)}}},O=async(e,t)=>{await w({title:d(`sites.dialog.delete.title`,{name:t}),message:d(`sites.dialog.delete.message`)})&&(await i(`/tenants/${e}`,{method:`DELETE`}).catch(()=>{}),E())};return e(r,{children:[T,e(`div`,{class:`mb-4 bg-white rounded-lg border border-gray-200 p-4`,children:[e(`p`,{class:`text-sm font-medium text-gray-700 mb-3`,children:d(`sites.createNew`)}),e(`div`,{class:`flex gap-2 flex-wrap`,children:[e(`input`,{type:`text`,placeholder:d(`sites.namePlaceholder`),value:v,onInput:e=>y(e.target.value),class:`border border-gray-300 rounded px-3 py-1.5 text-sm w-40`,"aria-label":d(`sites.namePlaceholder`)}),e(`input`,{type:`text`,placeholder:d(`sites.slugPlaceholder`),value:b,onInput:e=>x(e.target.value),class:`border border-gray-300 rounded px-3 py-1.5 text-sm w-40`,"aria-label":d(`sites.slugPlaceholder`)}),e(`button`,{onClick:D,disabled:g,class:`bg-blue-600 text-white text-sm px-3 py-1.5 rounded hover:bg-blue-700 disabled:opacity-50`,children:d(`common.create`)})]}),S&&e(`p`,{class:`text-sm text-red-600 mt-2`,children:S})]}),e(l,{loading:m,keyFn:e=>e.id,rows:f,columns:[{key:`name`,label:d(`sites.col.name`)},{key:`slug`,label:d(`sites.col.slug`),render:t=>e(`span`,{class:`font-mono text-xs`,children:t.slug})},{key:`id`,label:d(`sites.col.id`),render:t=>e(`span`,{class:`font-mono text-xs text-gray-400`,children:t.id})},{key:`createdAt`,label:d(`sites.col.created`),render:e=>new Date(e.createdAt).toLocaleDateString()},{key:`actions`,label:``,render:t=>{let n=t;return n.id==="default"?e(`span`,{class:`text-xs text-gray-400`,children:d(`common.default`)}):e(`button`,{onClick:()=>O(n.id,n.name),class:`text-xs text-red-500 hover:underline`,children:d(`common.delete`)})}}],emptyText:d(`sites.empty`)})]})}export{u as TenantList};
@@ -0,0 +1,2 @@
1
+ import{a as e,c as t,l as n,p as r,t as i}from"./createLucideIcon-DAiYBrnd.js";import{i as a}from"./client-CYntrO2g.js";import{n as o,t as s}from"./HeadingTagInput-D2S9xDMJ.js";import{t as c}from"./PreviewPane-D7mDeBT8.js";import{t as l}from"./ConfirmDialog-BDlnfTdx.js";import{t as u}from"./x-BhZiH8AL.js";import{l as d,o as f,p,s as m,u as h}from"./index-Tr_BcjkN.js";import{n as g}from"./templates-DY68xNys.js";import{a as _,c as v,d as y,f as b,l as x,r as S,u as C}from"./templates-CIyMjskA.js";var w=i(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),T=i(`focus`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),E=i(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),D=i(`heading`,[[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}],[`path`,{d:`M18 20V4`,key:`o2hl4u`}]]),O=i(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]);function k({value:t,onChange:n}){return e(`div`,{class:`flex items-center gap-3`,children:[e(`input`,{type:`range`,min:`0`,max:`100`,class:`flex-1 h-1.5 rounded-full appearance-none bg-gray-200 accent-blue-600 cursor-pointer`,value:t,onInput:e=>n(parseInt(e.target.value))}),e(`span`,{class:`text-sm font-mono text-gray-700 w-10 text-right shrink-0`,children:[t,`%`]})]})}var A=[`primary`,`secondary`,`accent`,`text`],j=[`custom`,`submit`,`manage`,`close`,`link`],M={primary:`Primary`,secondary:`Secondary`,accent:`Accent`,text:`Text`},N={custom:`Custom (grant)`,submit:`Submit (save toggles)`,manage:`Manage (open modal)`,close:`Close (dismiss)`,link:`Link (open URL)`},P={custom:`Grants exactly the selected cookies below. Mandatory cookies are always granted regardless of this selection.`,submit:`Submits whatever consent already exists — the live toggle states in this modal, or mandatory-only in a banner. Ignores cookie selection entirely; two "submit" buttons always produce the same result no matter their labels.`,manage:`Opens the preference modal. Does not change consent by itself.`,close:`Dismisses without saving any consent.`,link:`Opens the URL below in a new tab. Does not change consent.`};function F({btn:t,onChange:n,onRemove:r,extraCookies:i}){let a=(e,r)=>n({...t,[e]:r}),s=!t.id.trim(),c=t.action===`link`&&!t.url?.trim();return e(`div`,{class:`border border-gray-100 rounded p-2.5 bg-gray-50 space-y-2`,children:e(`div`,{class:`grid grid-cols-[1fr_1fr_1fr_2fr_auto] gap-2 items-start`,children:[e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`Button ID `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{class:`w-full border rounded px-2 py-1 text-xs font-mono ${s?`border-red-300 bg-red-50`:`border-gray-300`}`,value:t.id,onInput:e=>a(`id`,e.target.value),placeholder:`accept-all`}),s?e(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Required`}):e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:`Machine id, not display text — text is authored per-locale in the profile.`})]}),e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:`Style`}),e(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-xs`,value:t.type,onChange:e=>a(`type`,e.target.value),children:A.map(t=>e(`option`,{value:t,children:M[t]},t))})]}),e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:`Action`}),e(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-xs`,value:t.action,onChange:e=>{let r=e.target.value;n({...t,action:r,cookies:r===`custom`?t.cookies??`*`:void 0,url:r===`link`?t.url??``:void 0,type:r===`link`&&t.type!==`text`?`text`:t.type})},children:j.map(t=>e(`option`,{value:t,children:N[t]},t))}),e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:P[t.action]})]}),t.action===`custom`?e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`Cookies to grant `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(o,{value:t.cookies,onChange:e=>a(`cookies`,e),showSpecial:!0,extraCookies:i}),!t.cookies&&e(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Required for custom action`})]}):t.action===`link`?e(`div`,{children:[e(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`URL `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`input`,{type:`url`,class:`w-full border rounded px-2 py-1 text-xs ${c?`border-red-300 bg-red-50`:`border-gray-300`}`,value:t.url??``,onInput:e=>a(`url`,e.target.value),placeholder:`https://example.com/privacy`}),c&&e(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Required for link action`})]}):e(`div`,{}),e(`div`,{class:`flex items-end pb-0.5`,children:e(`button`,{type:`button`,onClick:r,class:`text-red-400 hover:text-red-600 text-lg leading-none p-0.5`,title:`Remove button`,children:`✕`})})]})})}function I({buttons:t,onChange:n,cookieOptions:r}){return e(`div`,{class:`space-y-2`,children:[t.map((i,a)=>e(F,{btn:i,onChange:e=>n(t.map((t,n)=>n===a?e:t)),onRemove:()=>n(t.filter((e,t)=>t!==a)),extraCookies:r},a)),e(`button`,{type:`button`,onClick:()=>n([...t,{id:``,type:`primary`,action:`custom`,cookies:`*`}]),class:`text-xs text-blue-600 hover:underline`,children:`+ Add Button`})]})}var L=[`top`,`bottom`,`middle`,`left-bottom`,`right-bottom`];function R({label:t,value:n,onChange:r,cookieOptions:i}){let a=m(),o=(e,t)=>r({...n,[e]:t});return e(`div`,{class:`space-y-5`,children:[t&&e(`p`,{class:`text-xs text-gray-500 italic`,children:t}),e(`div`,{class:`grid grid-cols-2 lg:grid-cols-3 gap-4`,children:[e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[`Position `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:n.position,onChange:e=>o(`position`,e.target.value),children:L.map(t=>e(`option`,{value:t,children:t},t))})]}),e(s,{value:n.headingTag,onChange:e=>o(`headingTag`,e)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:`Overlay opacity`}),e(k,{value:n.overlayOpacity,onChange:e=>o(`overlayOpacity`,e)}),e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:`0% = transparent (page still interactive) · 100% = darkened`})]}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:a(`uiTemplates.editor.stackButtonsOnBreakpoint`)}),e(`input`,{type:`number`,min:`0`,max:`2560`,class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:n.stackButtonsOnBreakpoint??576,onChange:e=>o(`stackButtonsOnBreakpoint`,parseInt(e.target.value,10)||0)}),e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:a(`uiTemplates.editor.stackButtonsOnBreakpointHint`)})]}),e(`div`,{class:`flex flex-col justify-center gap-4 pb-1`,children:[e(`label`,{class:`flex items-center gap-2 text-xs font-medium text-gray-600 cursor-pointer`,children:[e(`input`,{type:`checkbox`,class:`w-4 h-4`,checked:n.showClose,onChange:e=>o(`showClose`,e.target.checked)}),`Show `,e(u,{size:10,className:`inline-block mx-0.5`}),` close button`]}),e(`label`,{class:`flex items-center gap-2 text-xs font-medium text-gray-600 cursor-pointer`,children:[e(`input`,{type:`checkbox`,class:`w-4 h-4`,checked:n.showLocaleSwitcher??!1,onChange:e=>o(`showLocaleSwitcher`,e.target.checked)}),`🌐 Show locale switcher`]})]}),e(`div`,{class:`flex items-center pb-1`})]}),e(`div`,{children:[e(`h4`,{class:`text-xs font-semibold text-gray-600 mb-2 uppercase tracking-wide`,children:`Buttons`}),e(I,{buttons:n.buttons,onChange:e=>o(`buttons`,e),cookieOptions:i})]})]})}var z=[`left`,`right`,`center`];function B({value:t,onChange:n,cookieOptions:r}){let i=m(),a=(e,r)=>n({...t,[e]:r});return e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`grid grid-cols-2 lg:grid-cols-3 gap-4`,children:[e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[`Position `,e(`span`,{class:`text-red-500`,children:`*`})]}),e(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:t.position,onChange:e=>a(`position`,e.target.value),children:z.map(t=>e(`option`,{value:t,children:t},t))})]}),e(s,{value:t.headingTag,onChange:e=>a(`headingTag`,e)}),e(`div`,{children:[e(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:`Overlay opacity`}),e(k,{value:t.overlayOpacity,onChange:e=>a(`overlayOpacity`,e)}),e(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:`0% = transparent (page still interactive) · 100% = darkened`})]}),[[`showClose`,e(`span`,{class:`flex items-center gap-1`,children:[`Show `,e(u,{size:10}),` close button`]})],[`showLocaleSwitcher`,`🌐 Show locale switcher`],[`showForgetMe`,i(`uiTemplates.editor.showForgetMe`)],[`persistent`,`Persistent (block outside-click dismiss)`],[`hasSubheading`,`Include subheading field`],[`trapFocus`,i(`uiTemplates.editor.trapFocus`)]].map(([n,r])=>e(`label`,{class:`flex items-center gap-2 text-xs font-medium text-gray-600 cursor-pointer`,title:n===`trapFocus`?i(`uiTemplates.editor.trapFocusHint`):n===`showForgetMe`?i(`uiTemplates.editor.showForgetMeHint`):void 0,children:[e(`input`,{type:`checkbox`,class:`w-4 h-4`,checked:t[n],onChange:e=>a(n,e.target.checked)}),r]},n))]}),e(`div`,{children:[e(`h4`,{class:`text-xs font-semibold text-gray-600 mb-2 uppercase tracking-wide`,children:`Buttons`}),e(I,{buttons:t.buttons,onChange:e=>a(`buttons`,e),cookieOptions:r})]})]})}var V=[{key:`headingTag`,Icon:D,label:`uiTemplates.editor.fieldInfo.headingTag.label`,description:`uiTemplates.editor.fieldInfo.headingTag.description`,highlights:`uiTemplates.editor.fieldInfo.headingTag.highlights`},{key:`style`,Icon:d,label:`uiTemplates.editor.fieldInfo.style.label`,description:`uiTemplates.editor.fieldInfo.style.description`,highlights:`uiTemplates.editor.fieldInfo.style.highlights`},{key:`action`,Icon:O,label:`uiTemplates.editor.fieldInfo.action.label`,description:`uiTemplates.editor.fieldInfo.action.description`,highlights:`uiTemplates.editor.fieldInfo.action.highlights`},{key:`cookies`,Icon:p,label:`uiTemplates.editor.fieldInfo.cookies.label`,description:`uiTemplates.editor.fieldInfo.cookies.description`,highlights:`uiTemplates.editor.fieldInfo.cookies.highlights`},{key:`trapFocus`,Icon:T,label:`uiTemplates.editor.fieldInfo.trapFocus.label`,description:`uiTemplates.editor.fieldInfo.trapFocus.description`,highlights:`uiTemplates.editor.fieldInfo.trapFocus.highlights`},{key:`buttonId`,Icon:E,label:`uiTemplates.editor.fieldInfo.buttonId.label`,description:`uiTemplates.editor.fieldInfo.buttonId.description`,highlights:`uiTemplates.editor.fieldInfo.buttonId.highlights`},{key:`localeSwitcher`,Icon:h,label:`uiTemplates.editor.fieldInfo.localeSwitcher.label`,description:`uiTemplates.editor.fieldInfo.localeSwitcher.description`,highlights:`uiTemplates.editor.fieldInfo.localeSwitcher.highlights`},{key:`forgetMe`,Icon:w,label:`uiTemplates.editor.fieldInfo.forgetMe.label`,description:`uiTemplates.editor.fieldInfo.forgetMe.description`,highlights:`uiTemplates.editor.fieldInfo.forgetMe.highlights`}];function H({t:n}){let[r,i]=t(0),a=V[r];return e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5 xl:sticky xl:top-4`,children:[e(`p`,{class:`text-xs text-gray-400 mb-3 uppercase tracking-wide font-semibold`,children:n(`uiTemplates.editor.fieldInfo.title`)}),e(`div`,{class:`flex flex-wrap gap-1.5 mb-4`,children:V.map((t,a)=>e(`button`,{type:`button`,onClick:()=>i(a),class:`text-xs px-2.5 py-1 rounded-full border transition-colors ${r===a?`bg-blue-600 text-white border-blue-600`:`border-gray-300 text-gray-600 hover:border-blue-400`}`,children:n(t.label)},t.key))}),e(`div`,{class:`space-y-2`,children:[e(`div`,{class:`flex items-center gap-2`,children:[e(a.Icon,{size:18,className:`text-gray-600 shrink-0`}),e(`h4`,{class:`font-semibold text-gray-800 text-sm`,children:n(a.label)})]}),e(`p`,{class:`text-xs text-gray-600 leading-relaxed`,children:n(a.description)}),e(`ul`,{class:`list-disc list-inside space-y-1`,children:n(a.highlights).split(`
2
+ `).map((t,n)=>e(`li`,{class:`text-xs text-gray-600 leading-relaxed`,children:t},n))})]})]})}var U={position:`bottom`,overlayOpacity:.5,showClose:!0,headingTag:`h2`,buttons:[]},W={position:`center`,overlayOpacity:.5,showClose:!0,persistent:!1,headingTag:`h2`,hasSubheading:!1,buttons:[]};function G(e,t,n){return e.buttons.length===0&&t.buttons.length===0&&n.buttons.length===0}function K({id:i,current:o}){let s=m(),u=!i||i===`new`,[d,p]=t(``),[h,w]=t(``),[T,E]=t(`main`),[D,O]=t(u?U:y().mainBanner),[k,A]=t(u?U:y().gpcBanner),[j,M]=t(u?W:y().preferenceModal),[N,P]=t(``),[F,I]=t(!1),[L,z]=t(!u);f(s(L?`uiTemplates.editor.title.edit`:u?`uiTemplates.editor.title.new`:`uiTemplates.editor.title.edit`));let{requestConfirm:V,dialog:K}=l();n(()=>{!u&&i&&g.get(i).then(e=>{p(e.name),O({...e.mainBanner,buttons:b(e.mainBanner.buttons)}),A({...e.gpcBanner,buttons:b(e.gpcBanner.buttons)}),M({...e.preferenceModal,buttons:b(e.preferenceModal.buttons)})}).catch(()=>P(s(`uiTemplates.editor.error.notFound`))).finally(()=>z(!1))},[i,u]);let q=_(x(),v(),{mainBanner:D,gpcBanner:k,preferenceModal:j},`en`,{en:C(v(),{mainBanner:D,gpcBanner:k,preferenceModal:j})},{}),J=async()=>{let e=!0;d.trim()?w(``):(w(s(`uiTemplates.editor.nameRequired`)),e=!1);let t=[...D.buttons,...k.buttons,...j.buttons];if(t.some(e=>!e.id.trim())){P(s(`uiTemplates.editor.error.buttons`));return}for(let e of[D.buttons,k.buttons,j.buttons]){let t=e.map(e=>e.id.trim());if(new Set(t).size!==t.length){P(s(`uiTemplates.editor.error.uniqueButtonIds`));return}}if(t.some(e=>e.action===`custom`&&!e.cookies)){P(s(`uiTemplates.editor.error.customButtons`));return}if(e){if(!u&&i){let e=await g.profileUsage(i).catch(()=>[]);if(e.length>0){let t=e.map(e=>`"${e.name}"`).join(`, `);if(!await V({title:s(e.length===1?`uiTemplates.editor.confirmUpdate.titleSingular`:`uiTemplates.editor.confirmUpdate.title`,{n:e.length}),message:s(`uiTemplates.editor.confirmUpdate.message`,{names:t})}))return}}P(``),I(!0);try{let e={name:d,mainBanner:{...D,buttons:S(D.buttons)},gpcBanner:{...k,buttons:S(k.buttons)},preferenceModal:{...j,buttons:S(j.buttons)}};u?await g.create(e):await g.update(i,e),window.location.hash=`#/banners/ui-templates`}catch(e){P(a(e,s(`uiTemplates.editor.error.failed`)))}finally{I(!1)}}},Y=[{key:`main`,label:s(`uiTemplates.editor.tabMain`)},{key:`gpc`,label:s(`uiTemplates.editor.tabGpc`)},{key:`modal`,label:s(`uiTemplates.editor.tabModal`)}],X=Y.findIndex(e=>e.key===T),Z=X===0,Q=X===Y.length-1;return L?e(`p`,{class:`text-sm text-gray-400`,role:`status`,"aria-live":`polite`,children:s(`uiTemplates.editor.loading`)}):e(r,{children:[K,e(`div`,{class:`space-y-5`,children:[e(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[e(`label`,{for:`ui-template-name`,class:`block text-sm font-medium text-gray-700 mb-1`,children:[s(`uiTemplates.editor.name`),` `,e(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),e(`input`,{id:`ui-template-name`,class:`w-full border rounded px-3 py-2 text-sm ${h?`border-red-400 bg-red-50`:`border-gray-300`}`,value:d,onInput:e=>{p(e.target.value),w(``)},placeholder:s(`uiTemplates.editor.namePlaceholder`),required:!0,"aria-required":`true`}),h&&e(`p`,{role:`alert`,class:`text-xs text-red-500 mt-1`,children:h})]}),u&&G(D,k,j)&&e(`div`,{class:`bg-amber-50 border border-amber-200 rounded-lg p-4 flex items-center justify-between gap-4`,children:[e(`p`,{class:`text-sm text-amber-800`,children:s(`uiTemplates.editor.loadDefaultsPrompt`)}),e(`button`,{type:`button`,onClick:()=>{let e=y();O(e.mainBanner),A(e.gpcBanner),M(e.preferenceModal)},class:`shrink-0 bg-amber-700 text-white text-xs px-3 py-1.5 rounded hover:bg-amber-800 transition-colors`,children:s(`uiTemplates.editor.loadDefaultsBtn`)})]}),e(`div`,{class:`grid grid-cols-1 xl:grid-cols-[2fr_1fr] gap-5 items-start`,children:[e(`div`,{class:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:[e(`div`,{class:`flex items-center border-b border-gray-200 px-5 py-3 gap-2`,children:[Y.map((t,n)=>e(`div`,{class:`flex items-center gap-2`,children:[e(`span`,{class:`flex items-center justify-center w-6 h-6 rounded-full text-xs font-bold ${n===X?`bg-blue-600 text-white`:n<X?`bg-blue-100 text-blue-600`:`bg-gray-100 text-gray-400`}`,children:n+1}),e(`span`,{class:`text-sm font-medium ${n===X?`text-blue-600`:n<X?`text-blue-400`:`text-gray-400`}`,children:t.label}),n<Y.length-1&&e(`span`,{class:`mx-1 text-gray-300 text-xs select-none`,children:`›`})]},t.key)),e(`span`,{class:`ml-auto text-xs text-gray-400`,children:s(`uiTemplates.editor.wizard.stepOf`,{step:X+1,total:Y.length})})]}),e(`div`,{class:`p-5`,children:[T===`main`&&e(R,{label:s(`uiTemplates.editor.mainBannerHint`),value:D,onChange:O}),T===`gpc`&&e(R,{label:s(`uiTemplates.editor.gpcBannerHint`),value:k,onChange:A}),T===`modal`&&e(B,{value:j,onChange:M})]}),N&&e(`div`,{class:`px-5 pb-4`,children:e(`p`,{role:`alert`,class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:N})}),e(`div`,{class:`flex items-center justify-between border-t border-gray-100 px-5 py-4`,children:[e(`div`,{class:`flex gap-2`,children:[!Z&&e(`button`,{type:`button`,onClick:()=>{Z||E(Y[X-1].key)},class:`px-4 py-2 rounded-lg text-sm text-gray-600 border border-gray-300 hover:bg-gray-50 transition-colors`,children:s(`uiTemplates.editor.wizard.back`)}),e(`a`,{href:`#/banners/ui-templates`,class:`px-4 py-2 rounded-lg text-sm text-gray-500 hover:bg-gray-100 transition-colors`,children:s(`common.cancel`)})]}),e(`div`,{children:Q?e(`button`,{type:`button`,onClick:J,disabled:F,class:`bg-blue-600 text-white px-5 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:s(F?`common.saving`:u?`uiTemplates.editor.action.create`:`uiTemplates.editor.action.save`)}):e(`button`,{type:`button`,onClick:()=>{Q||E(Y[X+1].key)},class:`bg-blue-600 text-white px-5 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:s(`uiTemplates.editor.wizard.next`)})})]})]}),e(H,{t:s})]}),e(c,{draft:q,expandable:!0,previewMode:T})]})]})}export{K as UITemplateEditor};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,l as n,n as r,p as i}from"./createLucideIcon-DAiYBrnd.js";import{t as a}from"./client-CYntrO2g.js";import{t as o}from"./copy-DEi_W2TM.js";import{n as s,t as c}from"./trash-O30ycMcz.js";import{t as l}from"./ConfirmDialog-BDlnfTdx.js";import{o as u,s as d}from"./index-Tr_BcjkN.js";import{t as f}from"./Table-BUxoz0YR.js";import{n as p}from"./templates-DY68xNys.js";function m({current:m}){let h=d();u(h(`uiTemplates.title`));let[g,_]=t([]),[v,y]=t(!0),[b,x]=t(null),[S,C]=t(null),{requestConfirm:w,dialog:T}=l(),E=()=>{y(!0),p.list().then(_).catch(()=>_([])).finally(()=>y(!1))};n(()=>{E()},[]);let D=async(e,t)=>{if(await w({title:h(`uiTemplates.dialog.delete.title`,{name:t}),message:h(`uiTemplates.dialog.delete.message`)}))try{await p.delete(e),E()}catch(e){if(e instanceof a&&e.status===422)try{let t=JSON.parse(e.message);if(t.details?.profiles?.length){x(t.details.profiles);return}}catch{}}},O=async(e,t)=>{try{let n=await p.profileUsage(e);if(n.length>0){C({id:e,name:t,profiles:n.map(e=>({id:e.id,name:e.name,isActive:e.isActive??!1}))});return}}catch{}window.location.hash=`#/banners/ui-templates/${e}`},k=async(e,t)=>{await p.copy(e,`${t} (Copy)`).catch(()=>null),E()},A=g.length,j=h(A===1?`uiTemplates.countSingular`:`uiTemplates.count`,{n:A});return e(i,{children:[T,b&&r(e(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[e(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>x(null),"aria-hidden":`true`}),e(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[e(`h3`,{class:`text-sm font-semibold text-gray-900`,children:`Cannot delete template`}),e(`p`,{class:`text-sm text-gray-600`,children:`This UI template is used by the following profiles. Delete or reassign those profiles first:`}),e(`ul`,{class:`space-y-1 max-h-48 overflow-y-auto`,children:b.map(t=>e(`li`,{class:`flex items-center gap-2 text-sm`,children:[e(`span`,{class:`text-xs px-1.5 py-0.5 rounded-full font-medium ${t.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:t.isActive?`Active`:`Inactive`}),e(`a`,{href:`#/banners/profiles/${t.id}`,class:`text-blue-600 hover:underline`,onClick:()=>x(null),children:t.name})]},t.id))}),e(`button`,{type:`button`,onClick:()=>x(null),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:h(`common.close`)})]})]}),document.body),S&&r(e(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[e(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>C(null),"aria-hidden":`true`}),e(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[e(`h3`,{class:`text-sm font-semibold text-gray-900`,children:`Template used in profiles`}),e(`p`,{class:`text-sm text-gray-600`,children:`This template is used in the following profiles. After editing, open and save each profile for changes to take effect in their JSON files:`}),e(`ul`,{class:`space-y-1 max-h-48 overflow-y-auto`,children:S.profiles.map(t=>e(`li`,{class:`flex items-center gap-2 text-sm`,children:[e(`span`,{class:`text-xs px-1.5 py-0.5 rounded-full font-medium ${t.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:t.isActive?`Active`:`Inactive`}),e(`span`,{class:`text-gray-700`,children:t.name})]},t.id))}),e(`div`,{class:`flex flex-col gap-2`,children:[e(`button`,{type:`button`,onClick:()=>{let e=S.id;C(null),window.location.hash=`#/banners/ui-templates/${e}`},class:`w-full bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:`Continue to edit`}),e(`button`,{type:`button`,onClick:()=>C(null),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:h(`common.cancel`)})]})]})]}),document.body),e(`div`,{class:`flex justify-between items-center mb-4`,children:[e(`p`,{class:`text-sm text-gray-500`,children:j}),e(`a`,{href:`#/banners/ui-templates/new`,class:`bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:h(`uiTemplates.new`)})]}),e(f,{loading:v,keyFn:e=>e.id,rows:g,emptyText:h(`uiTemplates.empty.title`),search:{placeholder:h(`uiTemplates.search.placeholder`),keys:e=>[e.name]},columns:[{key:`name`,label:h(`uiTemplates.col.name`),render:t=>e(`span`,{class:`font-medium text-sm text-gray-900`,children:t.name})},{key:`positions`,label:h(`uiTemplates.col.positions`),render:t=>{let n=t;return e(`div`,{class:`flex flex-wrap gap-3 text-xs text-gray-500`,children:[e(`span`,{children:[h(`uiTemplates.mainBanner`),` `,e(`span`,{class:`text-gray-700`,children:n.mainBanner.position})]}),e(`span`,{children:[h(`uiTemplates.gpcBanner`),` `,e(`span`,{class:`text-gray-700`,children:n.gpcBanner.position})]}),e(`span`,{children:[h(`uiTemplates.modal`),` `,e(`span`,{class:`text-gray-700`,children:n.preferenceModal.position})]})]})}},{key:`buttons`,label:h(`uiTemplates.col.buttons`),render:t=>e(`div`,{class:`flex flex-wrap gap-1`,children:Object.entries(t.mainBanner.buttons).map(([t,n])=>e(`span`,{class:`text-xs px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full`,children:[n.type,`: `,t]},t))})},{key:`updatedAt`,label:h(`common.updated`),render:t=>e(`span`,{class:`text-xs text-gray-500`,children:new Date(t.updatedAt).toLocaleDateString()})},{key:`actions`,label:``,render:t=>{let n=t;return e(`div`,{class:`flex items-center gap-3 justify-end`,children:[e(`button`,{onClick:()=>k(n.id,n.name),class:`text-gray-400 hover:text-blue-600 transition-colors`,title:h(`common.duplicate`),"aria-label":h(`common.duplicate`),children:e(o,{size:14,"aria-hidden":`true`})}),e(`button`,{onClick:()=>O(n.id,n.name),class:`text-blue-600 hover:text-blue-800 transition-colors`,title:h(`common.edit`),"aria-label":h(`common.edit`),children:e(s,{size:14,"aria-hidden":`true`})}),e(`button`,{onClick:()=>D(n.id,n.name),class:`text-red-400 hover:text-red-600 transition-colors`,title:h(`common.delete`),"aria-label":h(`common.delete`),children:e(c,{size:14,"aria-hidden":`true`})})]})}}]})]})}export{m as UITemplateList};