@plyaz/ui 0.9.1 → 0.10.1

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.
@@ -15,10 +15,10 @@
15
15
  focus-visible:ring-ring/50
16
16
  `,`
17
17
  aria-invalid:border-destructive aria-invalid:ring-destructive/20
18
- `,e),...a,"data-testid":"input"})}function _e({className:e,...t}){return l.jsx("div",{"data-slot":"input-group",role:"group",className:_.cn("group/input-group border-subtle dark:bg-input/30 relative flex w-full items-center rounded-sm border transition-[color,box-shadow] outline-none","h-10 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-3","has-[>[data-align=inline-end]]:[&>input]:pr-3","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-2","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-2","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40","has-[[data-slot=input-group-control]:disabled]:opacity-50 has-[[data-slot=input-group-control]:disabled]:pointer-events-none has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed",e),...t})}const fe=I.cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function ge({className:e,align:t="inline-start",...a}){const r=s=>{var o,c;s.target.closest("button")||(c=(o=s.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||c.focus()},i=s=>{var o,c;if(s.key==="Enter"||s.key===" "){if(s.preventDefault(),s.target.closest("button"))return;(c=(o=s.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||c.focus()}};return l.jsx("div",{role:"button",tabIndex:0,"data-slot":"input-group-addon","data-align":t,className:_.cn(fe({align:t}),e),onClick:r,onKeyDown:i,"aria-label":"Focus input field",...a})}const pe=I.cva("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function ve({className:e,type:t="button",variant:a="default",size:r="xs",...i}){return l.jsx(ce.Button,{type:t,"data-size":r,variant:a,className:_.cn(pe({size:r}),e),...i})}function me({className:e,...t}){return l.jsx("span",{className:_.cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function he({className:e,...t}){return l.jsx(Y,{"data-slot":"input-group-control",className:_.cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function be({className:e,...t}){return l.jsx(se,{"data-slot":"input-group-control",className:_.cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}const xe=10,$=ue.memo(({children:e,className:t="",colors:a=["#FF0080","#7928CA","#0070F3","#38bdf8"],speed:r=1})=>{const i={backgroundImage:`linear-gradient(135deg, ${a.join(", ")}, ${a[0]})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",animationDuration:`${xe/r}s`};return l.jsxs("span",{className:`
18
+ `,e),...a,"data-testid":"input"})}function _e({className:e,...t}){return l.jsx("div",{"data-slot":"input-group",role:"group",className:_.cn("group/input-group border-subtle dark:bg-input/30 relative flex w-full items-center rounded-sm border transition-[color,box-shadow] outline-none","h-10 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-3","has-[>[data-align=inline-end]]:[&>input]:pr-3","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-2","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-2","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40","has-[[data-slot=input-group-control]:disabled]:opacity-50 has-[[data-slot=input-group-control]:disabled]:pointer-events-none has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed",e),...t})}const ge=I.cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function fe({className:e,align:t="inline-start",...a}){const r=s=>{var o,c;s.target.closest("button")||(c=(o=s.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||c.focus()},i=s=>{var o,c;if(s.key==="Enter"||s.key===" "){if(s.preventDefault(),s.target.closest("button"))return;(c=(o=s.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||c.focus()}};return l.jsx("div",{role:"button",tabIndex:0,"data-slot":"input-group-addon","data-align":t,className:_.cn(ge({align:t}),e),onClick:r,onKeyDown:i,"aria-label":"Focus input field",...a})}const pe=I.cva("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function ve({className:e,type:t="button",variant:a="default",size:r="xs",...i}){return l.jsx(ce.Button,{type:t,"data-size":r,variant:a,className:_.cn(pe({size:r}),e),...i})}function me({className:e,...t}){return l.jsx("span",{className:_.cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function he({className:e,...t}){return l.jsx(Y,{"data-slot":"input-group-control",className:_.cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function be({className:e,...t}){return l.jsx(se,{"data-slot":"input-group-control",className:_.cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}const xe=10,$=ue.memo(({children:e,className:t="",colors:a=["#FF0080","#7928CA","#0070F3","#38bdf8"],speed:r=1})=>{const i={backgroundImage:`linear-gradient(135deg, ${a.join(", ")}, ${a[0]})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",animationDuration:`${xe/r}s`};return l.jsxs("span",{className:`
19
19
  relative inline-block
20
20
  ${t}
21
21
  `,"data-testid":"auroraText",children:[l.jsx("span",{className:"sr-only",children:e}),l.jsx("span",{className:`
22
22
  relative animate-aurora bg-clip-text text-transparent
23
23
  bg-[length:200%_auto]
24
- `,style:i,"aria-hidden":"true",children:e})]})});$.displayName="AuroraText";var Ee=Object.defineProperty,n=(e,t)=>Ee(e,"name",{value:t,configurable:!0}),O=new Map,S=new Map;function y(e,t){return`${e}:${JSON.stringify(t??{})}`}n(y,"getFormatterKey");function W(e){const t=typeof e=="string"||typeof e=="number"?new Date(e):e;return t instanceof Date&&!Number.isNaN(t.getTime())?t:null}n(W,"parseDate");function J(e,t="en",a){var s;const r=W(e);if(!r)return"";const i=y(t,a);return O.has(i)||O.set(i,new Intl.DateTimeFormat(t,a)),((s=O.get(i))==null?void 0:s.format(r))??""}n(J,"formatDate");function Q(e,t="en",a){var i;if(typeof e!="number"||Number.isNaN(e))return"";const r=y(t,a);return S.has(r)||S.set(r,new Intl.NumberFormat(t,a)),((i=S.get(r))==null?void 0:i.format(e))??""}n(Q,"formatNumber");var k={defaultLocale:"en",supportedLocales:["en","es","fr","it","pt-BR","pt-PT"],fallbackLocale:"en"};function Ne(){return k.supportedLocales}n(Ne,"getSupportedLanguages");function Ae(){return k.defaultLocale}n(Ae,"getDefaultLanguage");function Re(){return k.fallbackLocale}n(Re,"getFallbackLanguage");function Ie(e){return k.supportedLocales.includes(e)}n(Ie,"isSupportedLanguage");var g=new Map;function ke({value:e,forms:t,lang:a,type:r="cardinal"}){if(!Z(e,t))return"";if(e===0&&t.zero)return L(t.zero,e);const s=ee(a,r).select(e),o=X(t,s)??t.other??Object.values(t)[0];return o?L(o,e):""}n(ke,"pluralize");function C(e,t){return`${e}:${t}`}n(C,"getPluralRulesKey");var Oe=/{count}|#/g;function X(e,t){switch(t){case"zero":return e.zero;case"one":return e.one;case"two":return e.two;case"few":return e.few;case"many":return e.many;case"other":return e.other;default:return}}n(X,"selectTemplate");function Z(e,t){return typeof e=="number"&&t&&typeof t=="object"}n(Z,"isValidInput");function L(e,t){return e.replaceAll(Oe,t.toString())}n(L,"replacePlaceholders");function ee(e,t){const a=C(e,t);if(!g.has(a))try{g.set(a,new Intl.PluralRules(e,{type:t}))}catch{return R(a,t)}return g.get(a)??R(a,t)}n(ee,"getPluralRules");function R(e,t){const a=C("en",t);g.has(a)||g.set(a,new Intl.PluralRules("en",{type:t}));const r=g.get(a)??R(a,t);return g.set(e,r),r}n(R,"getFallbackPluralRules");var D=null;function Se(e){D=e}n(Se,"setTranslationService");function w(){if(!D)throw new Error("Translation service not initialized. Make sure to call setTranslationService() first.");return D}n(w,"getTranslationService");function te(e,t){return t?e.replace(/\{(\w+)\}/g,(a,r)=>t[r]!==void 0?String(t[r]):a):e}n(te,"format");var ae=(e=>(e.AUTH_INVALID_CREDENTIALS="auth.invalid_credentials",e.AUTH_ACCOUNT_LOCKED="auth.account_locked",e.AUTH_EMAIL_NOT_VERIFIED="auth.email_not_verified",e.AUTH_TOKEN_EXPIRED="auth.token_expired",e.AUTH_TOKEN_INVALID="auth.token_invalid",e.AUTH_INSUFFICIENT_PERMISSIONS="auth.insufficient_permissions",e.AUTH_EMAIL_TAKEN="auth.email_taken",e.AUTH_USERNAME_TAKEN="auth.username_taken",e.AUTH_WALLET_SIGNATURE_INVALID="auth.wallet_signature_invalid",e.VALIDATION_ERROR="validation.error",e.REQUIRED_FIELD_MISSING="validation.required_field_missing",e.INVALID_FORMAT="validation.invalid_format",e.INVALID_ENUM_VALUE="validation.invalid_enum_value",e.STRING_TOO_SHORT="validation.string_too_short",e.STRING_TOO_LONG="validation.string_too_long",e.NUMBER_TOO_SMALL="validation.number_too_small",e.NUMBER_TOO_LARGE="validation.number_too_large",e.ARRAY_TOO_SHORT="validation.array_too_short",e.ARRAY_TOO_LONG="validation.array_too_long",e.FILE_TOO_LARGE="validation.file_too_large",e.UNSUPPORTED_FILE_TYPE="validation.unsupported_file_type",e.DB_ENTITY_NOT_FOUND="database.entity_not_found",e.DB_DUPLICATE_ENTRY="database.duplicate_entry",e.DB_RELATION_VIOLATION="database.relation_violation",e.DB_CONNECTION_ERROR="database.connection_error",e.DB_TRANSACTION_FAILED="database.transaction_failed",e.BLOCKCHAIN_CONNECTION_ERROR="blockchain.connection_error",e.TRANSACTION_FAILED="blockchain.transaction_failed",e.WALLET_CONNECTION_ERROR="blockchain.wallet_connection_error",e.CONTRACT_INTERACTION_ERROR="blockchain.contract_interaction_error",e.INSUFFICIENT_FUNDS="blockchain.insufficient_funds",e.INTERNAL_SERVER_ERROR="system.internal_server_error",e.SERVICE_UNAVAILABLE="system.service_unavailable",e.EXTERNAL_SERVICE_ERROR="system.external_service_error",e.RATE_LIMIT_EXCEEDED="system.rate_limit_exceeded",e.FEATURE_DISABLED="system.feature_disabled",e.GENERIC_ERROR="generic.error",e.NOT_FOUND="generic.not_found",e.CONFLICT="generic.conflict",e.TIMEOUT="generic.timeout",e))(ae||{}),U={"auth.invalid_credentials":"errors.auth.invalid_credentials","auth.account_locked":"errors.auth.account_locked","auth.email_not_verified":"errors.auth.email_not_verified","auth.token_expired":"errors.auth.token_expired","auth.token_invalid":"errors.auth.token_invalid","auth.insufficient_permissions":"errors.auth.insufficient_permissions","auth.email_taken":"errors.auth.email_taken","auth.username_taken":"errors.auth.username_taken","auth.wallet_signature_invalid":"errors.auth.wallet_signature_invalid"},V={"validation.error":"errors.validation.error","validation.required_field_missing":"errors.validation.required_field_missing","validation.invalid_format":"errors.validation.invalid_format","validation.invalid_enum_value":"errors.validation.invalid_enum_value","validation.string_too_short":"errors.validation.string_too_short","validation.string_too_long":"errors.validation.string_too_long","validation.number_too_small":"errors.validation.number_too_small","validation.number_too_large":"errors.validation.number_too_large","validation.array_too_short":"errors.validation.array_too_short","validation.array_too_long":"errors.validation.array_too_long","validation.file_too_large":"errors.validation.file_too_large","validation.unsupported_file_type":"errors.validation.unsupported_file_type"},B={"database.entity_not_found":"errors.database.entity_not_found","database.duplicate_entry":"errors.database.duplicate_entry","database.relation_violation":"errors.database.relation_violation","database.connection_error":"errors.database.connection_error","database.transaction_failed":"errors.database.transaction_failed"},j={"blockchain.connection_error":"errors.blockchain.connection_error","blockchain.transaction_failed":"errors.blockchain.transaction_failed","blockchain.wallet_connection_error":"errors.blockchain.wallet_connection_error","blockchain.contract_interaction_error":"errors.blockchain.contract_interaction_error","blockchain.insufficient_funds":"errors.blockchain.insufficient_funds"},G={"system.internal_server_error":"errors.system.internal_server_error","system.service_unavailable":"errors.system.service_unavailable","system.external_service_error":"errors.system.external_service_error","system.rate_limit_exceeded":"errors.system.rate_limit_exceeded","system.feature_disabled":"errors.system.feature_disabled"},z={"generic.error":"errors.general.internal_error","generic.not_found":"errors.general.not_found","generic.conflict":"errors.general.conflict","generic.timeout":"errors.general.timeout"},K={"auth.invalid_credentials":401,"auth.account_locked":423,"auth.email_not_verified":403,"auth.token_expired":401,"auth.token_invalid":401,"auth.insufficient_permissions":403,"auth.email_taken":409,"auth.username_taken":409,"auth.wallet_signature_invalid":401},M={"validation.error":400,"validation.required_field_missing":400,"validation.invalid_format":400,"validation.invalid_enum_value":400,"validation.string_too_short":400,"validation.string_too_long":400,"validation.number_too_small":400,"validation.number_too_large":400,"validation.array_too_short":400,"validation.array_too_long":400,"validation.file_too_large":400,"validation.unsupported_file_type":400},P={"database.entity_not_found":404,"database.duplicate_entry":409,"database.relation_violation":400,"database.connection_error":503,"database.transaction_failed":500},q={"blockchain.connection_error":503,"blockchain.transaction_failed":400,"blockchain.wallet_connection_error":503,"blockchain.contract_interaction_error":400,"blockchain.insufficient_funds":400},H={"system.internal_server_error":500,"system.service_unavailable":503,"system.external_service_error":502,"system.rate_limit_exceeded":429,"system.feature_disabled":503},T={"generic.error":500,"generic.not_found":404,"generic.conflict":409,"generic.timeout":408},p,u=(p=class extends Error{constructor(a,r={}){const{locale:i="en",params:s,details:o,cause:c}=r,A=F(a,i,s);super(A);d(this,"name");d(this,"type");d(this,"code");d(this,"statusCode");d(this,"timestamp");d(this,"details");d(this,"cause");d(this,"correlationId");this.name=this.constructor.name,this.type=a,this.message=A,this.code=a.replace(/\./g,"_").toUpperCase(),this.statusCode=ne(a),this.timestamp=new Date().toISOString(),this.details=o,this.cause=c,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,type:this.type,code:this.code,statusCode:this.statusCode,timestamp:this.timestamp,details:this.details,correlationId:this.correlationId}}static fromJSON(a){const r=new p(a.type);return Object.assign(r,a),r}},n(p,"BaseError"),p),v,Te=(v=class extends u{constructor(t,a={}){super(t,a)}},n(v,"ValidationError"),v),m,Le=(m=class extends u{constructor(t,a={}){super(t,a)}},n(m,"AuthError"),m),h;h=class extends u{constructor(t,a={}){super(t,a)}},n(h,"ApiError");var b;b=class extends u{constructor(t,a={}){super(t,a)}},n(b,"BusinessError");var x,De=(x=class extends u{constructor(t,a={}){super(t,a)}},n(x,"BlockchainError"),x),E;E=class extends u{constructor(t="generic.error",a={}){super(t,a)}},n(E,"GenericError");function F(e,t="en",a){try{const r=re(e);return w().t(r,{lang:t,interpolation:a,defaultValue:`Error: ${e}`})}catch{return w().t("errors.general.internal_error",{lang:t,interpolation:a,defaultValue:"An internal server error occurred"})}}n(F,"translateError");function re(e){return e in U?U[e]:e in V?V[e]:e in B?B[e]:e in j?j[e]:e in G?G[e]:e in z?z[e]:"errors.general.internal_error"}n(re,"getTranslationKeyForErrorType");function ne(e){return e in K?K[e]:e in M?M[e]:e in P?P[e]:e in q?q[e]:e in H?H[e]:e in T?T[e]:T["system.internal_server_error"]}n(ne,"getStatusCodeForType");function we(e,t="en",a){if(typeof e=="string")return te(e,a);if(e instanceof u)return e.message;const r=e;return r.type&&Object.values(ae).includes(r.type)?F(r.type,t,a):e.message||"An unknown error occurred"}n(we,"formatErrorMessage");function ye(e,t){const a=new Date().toISOString();return e instanceof u?{statusCode:e.statusCode,errorCode:e.code,message:e.message,correlationId:t??e.correlationId,timestamp:e.timestamp||a}:{statusCode:500,errorCode:"INTERNAL_SERVER_ERROR",message:e.message||"An internal server error occurred",correlationId:t,timestamp:a}}n(ye,"createErrorResponse");function Ce(e,t){return e instanceof u&&e.type===t}n(Ce,"isErrorType");function Fe(e){return e instanceof Te||e instanceof u&&e.type.startsWith("validation.")}n(Fe,"isValidationError");function Ue(e){return e instanceof Le||e instanceof u&&e.type.startsWith("auth.")}n(Ue,"isAuthError");function Ve(e){return e instanceof De||e instanceof u&&e.type.startsWith("blockchain.")}n(Ve,"isBlockchainError");function Be(e){return e.toJSON()}n(Be,"serializeError");function je(e){return u.fromJSON(e)}n(je,"deserializeError");function Ge(e){return e.map(t=>({field:t.field,message:t.message,errorCode:"VALIDATION_ERROR",context:{valueGiven:t.value,constraints:t.constraints}}))}n(Ge,"createValidationErrorDetails");var f;f=class{constructor(){d(this,"fallbackLocale");this.fallbackLocale="en"}static getInstance(){return f.instance||(f.instance=new f),f.instance}detectLocale(t){return t?this.detectFromRequest(t):this.fallbackLocale}detectFromRequest(t){var s,o,c;const a=(s=t.url.split("?")[1])==null?void 0:s.split("=")[1],r=t.headers.get("accept-language"),i=(c=(o=t.headers.get("cookie"))==null?void 0:o.split("; ").find(A=>A.startsWith("locale=")))==null?void 0:c.split("=")[1];return a??i??this.parseAcceptLanguage(r??"")??this.fallbackLocale}parseAcceptLanguage(t){if(!t)return null;let a=null,r=0;for(const i of t.split(",")){const{lang:s,q:o}=this.parseLangAndQ(i.trim());if(o>r&&(r=o,a=s,o===1))break}return a}parseLangAndQ(t){const a=t.indexOf(";"),r=a===-1?t:t.slice(0,Math.max(0,a));let i=1;if(a!==-1){const s=/q=(?<q>[\d.]+)/.exec(t.slice(a+1));i=s!=null&&s.groups?Number.parseFloat(s.groups.q)||0:1}return{lang:r,q:i}}setFallbackLocale(t){this.fallbackLocale=t}},n(f,"LocaleDetector"),d(f,"instance");var N;N=class{constructor(t){d(this,"namespaces");this.namespaces=t?new Map(t):new Map}addNamespace(t,a){if(!ie(t))throw new Error("Invalid namespace name");this.namespaces.set(t,a)}getNamespace(t){return this.namespaces.get(t)}getAllNamespaces(){return[...this.namespaces.keys()]}mergeNamespaces(t,a){const r=this.namespaces.get(t)??{},i=this.namespaces.get(a)??{};this.namespaces.set(t,{...r,...i})}validateNamespace(t,a){const r=this.namespaces.get(t);return r?a?Object.entries(a).every(([i,s])=>{var c;const o=(c=Object.getOwnPropertyDescriptor(r,i))==null?void 0:c.value;return o!==void 0&&typeof o===s}):!0:!1}},n(N,"NamespaceManager");function ie(e){return/^\w+$/.test(e)}n(ie,"isSafeKey");const ze=I.cva("relative w-full rounded-sm border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive border-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Ke({className:e,variant:t,...a}){return l.jsx("div",{"data-slot":"alert",role:"alert",className:_.cn(ze({variant:t}),e),...a})}function Me({className:e,...t}){return l.jsx("div",{"data-slot":"alert-title",className:_.cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Pe({className:e,...t}){return l.jsx("div",{"data-slot":"alert-description",className:_.cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}const qe=I.cva("inline-flex items-center justify-center rounded-full border px-2 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden hover:opacity-80",{variants:{variant:{default:"bg-orange-gradient text-white",secondary:"border-transparent bg-primary text-secondary",destructive:"bg-destructive text-white",outline:"border-subtle text-secondary"}},defaultVariants:{variant:"default"}});function He({className:e,variant:t,asChild:a=!1,...r}){const i=a?de.Slot:"span";return l.jsx(i,{"data-slot":"badge",className:_.cn(qe({variant:t}),e),...r})}function se({className:e,...t}){return l.jsx("textarea",{"data-slot":"textarea",className:_.cn("border-subtle text-secondary bg-background placeholder:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-sm border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 disabled:placeholder:text-secondary-foreground md:text-sm",e),...t})}exports.Alert=Ke;exports.AlertDescription=Pe;exports.AlertTitle=Me;exports.AuroraText=$;exports.Badge=He;exports.Input=Y;exports.InputGroup=_e;exports.InputGroupAddon=ge;exports.InputGroupButton=ve;exports.InputGroupInput=he;exports.InputGroupText=me;exports.InputGroupTextarea=be;exports.Textarea=se;exports.formatDate=J;exports.formatNumber=Q;
24
+ `,style:i,"aria-hidden":"true",children:e})]})});$.displayName="AuroraText";var Ee=Object.defineProperty,n=(e,t)=>Ee(e,"name",{value:t,configurable:!0}),O=new Map,S=new Map;function D(e,t){return`${e}:${JSON.stringify(t??{})}`}n(D,"getFormatterKey");function W(e){const t=typeof e=="string"||typeof e=="number"?new Date(e):e;return t instanceof Date&&!Number.isNaN(t.getTime())?t:null}n(W,"parseDate");function J(e,t="en",a){var s;const r=W(e);if(!r)return"";const i=D(t,a);return O.has(i)||O.set(i,new Intl.DateTimeFormat(t,a)),((s=O.get(i))==null?void 0:s.format(r))??""}n(J,"formatDate");function Q(e,t="en",a){var i;if(typeof e!="number"||Number.isNaN(e))return"";const r=D(t,a);return S.has(r)||S.set(r,new Intl.NumberFormat(t,a)),((i=S.get(r))==null?void 0:i.format(e))??""}n(Q,"formatNumber");var k={defaultLocale:"en",supportedLocales:["en","es","fr","it","pt-BR","pt-PT"],fallbackLocale:"en"};function Ne(){return k.supportedLocales}n(Ne,"getSupportedLanguages");function Ae(){return k.defaultLocale}n(Ae,"getDefaultLanguage");function Re(){return k.fallbackLocale}n(Re,"getFallbackLanguage");function Ie(e){return k.supportedLocales.includes(e)}n(Ie,"isSupportedLanguage");var f=new Map;function ke({value:e,forms:t,lang:a,type:r="cardinal"}){if(!Z(e,t))return"";if(e===0&&t.zero)return L(t.zero,e);const s=ee(a,r).select(e),o=X(t,s)??t.other??Object.values(t)[0];return o?L(o,e):""}n(ke,"pluralize");function C(e,t){return`${e}:${t}`}n(C,"getPluralRulesKey");var Oe=/{count}|#/g;function X(e,t){switch(t){case"zero":return e.zero;case"one":return e.one;case"two":return e.two;case"few":return e.few;case"many":return e.many;case"other":return e.other;default:return}}n(X,"selectTemplate");function Z(e,t){return typeof e=="number"&&t&&typeof t=="object"}n(Z,"isValidInput");function L(e,t){return e.replaceAll(Oe,t.toString())}n(L,"replacePlaceholders");function ee(e,t){const a=C(e,t);if(!f.has(a))try{f.set(a,new Intl.PluralRules(e,{type:t}))}catch{return R(a,t)}return f.get(a)??R(a,t)}n(ee,"getPluralRules");function R(e,t){const a=C("en",t);f.has(a)||f.set(a,new Intl.PluralRules("en",{type:t}));const r=f.get(a)??R(a,t);return f.set(e,r),r}n(R,"getFallbackPluralRules");var w=null;function Se(e){w=e}n(Se,"setTranslationService");function y(){if(!w)throw new Error("Translation service not initialized. Make sure to call setTranslationService() first.");return w}n(y,"getTranslationService");function te(e,t){return t?e.replace(/\{(\w+)\}/g,(a,r)=>t[r]!==void 0?String(t[r]):a):e}n(te,"format");var ae=(e=>(e.AUTH_INVALID_CREDENTIALS="auth.invalid_credentials",e.AUTH_ACCOUNT_LOCKED="auth.account_locked",e.AUTH_EMAIL_NOT_VERIFIED="auth.email_not_verified",e.AUTH_TOKEN_EXPIRED="auth.token_expired",e.AUTH_TOKEN_INVALID="auth.token_invalid",e.AUTH_INSUFFICIENT_PERMISSIONS="auth.insufficient_permissions",e.AUTH_EMAIL_TAKEN="auth.email_taken",e.AUTH_USERNAME_TAKEN="auth.username_taken",e.AUTH_WALLET_SIGNATURE_INVALID="auth.wallet_signature_invalid",e.VALIDATION_ERROR="validation.error",e.REQUIRED_FIELD_MISSING="validation.required_field_missing",e.INVALID_FORMAT="validation.invalid_format",e.INVALID_ENUM_VALUE="validation.invalid_enum_value",e.STRING_TOO_SHORT="validation.string_too_short",e.STRING_TOO_LONG="validation.string_too_long",e.NUMBER_TOO_SMALL="validation.number_too_small",e.NUMBER_TOO_LARGE="validation.number_too_large",e.ARRAY_TOO_SHORT="validation.array_too_short",e.ARRAY_TOO_LONG="validation.array_too_long",e.FILE_TOO_LARGE="validation.file_too_large",e.UNSUPPORTED_FILE_TYPE="validation.unsupported_file_type",e.DB_ENTITY_NOT_FOUND="database.entity_not_found",e.DB_DUPLICATE_ENTRY="database.duplicate_entry",e.DB_RELATION_VIOLATION="database.relation_violation",e.DB_CONNECTION_ERROR="database.connection_error",e.DB_TRANSACTION_FAILED="database.transaction_failed",e.BLOCKCHAIN_CONNECTION_ERROR="blockchain.connection_error",e.TRANSACTION_FAILED="blockchain.transaction_failed",e.WALLET_CONNECTION_ERROR="blockchain.wallet_connection_error",e.CONTRACT_INTERACTION_ERROR="blockchain.contract_interaction_error",e.INSUFFICIENT_FUNDS="blockchain.insufficient_funds",e.INTERNAL_SERVER_ERROR="system.internal_server_error",e.SERVICE_UNAVAILABLE="system.service_unavailable",e.EXTERNAL_SERVICE_ERROR="system.external_service_error",e.RATE_LIMIT_EXCEEDED="system.rate_limit_exceeded",e.FEATURE_DISABLED="system.feature_disabled",e.GENERIC_ERROR="generic.error",e.NOT_FOUND="generic.not_found",e.CONFLICT="generic.conflict",e.TIMEOUT="generic.timeout",e))(ae||{}),U={"auth.invalid_credentials":"errors.auth.invalid_credentials","auth.account_locked":"errors.auth.account_locked","auth.email_not_verified":"errors.auth.email_not_verified","auth.token_expired":"errors.auth.token_expired","auth.token_invalid":"errors.auth.token_invalid","auth.insufficient_permissions":"errors.auth.insufficient_permissions","auth.email_taken":"errors.auth.email_taken","auth.username_taken":"errors.auth.username_taken","auth.wallet_signature_invalid":"errors.auth.wallet_signature_invalid"},V={"validation.error":"errors.validation.error","validation.required_field_missing":"errors.validation.required_field_missing","validation.invalid_format":"errors.validation.invalid_format","validation.invalid_enum_value":"errors.validation.invalid_enum_value","validation.string_too_short":"errors.validation.string_too_short","validation.string_too_long":"errors.validation.string_too_long","validation.number_too_small":"errors.validation.number_too_small","validation.number_too_large":"errors.validation.number_too_large","validation.array_too_short":"errors.validation.array_too_short","validation.array_too_long":"errors.validation.array_too_long","validation.file_too_large":"errors.validation.file_too_large","validation.unsupported_file_type":"errors.validation.unsupported_file_type"},B={"database.entity_not_found":"errors.database.entity_not_found","database.duplicate_entry":"errors.database.duplicate_entry","database.relation_violation":"errors.database.relation_violation","database.connection_error":"errors.database.connection_error","database.transaction_failed":"errors.database.transaction_failed"},j={"blockchain.connection_error":"errors.blockchain.connection_error","blockchain.transaction_failed":"errors.blockchain.transaction_failed","blockchain.wallet_connection_error":"errors.blockchain.wallet_connection_error","blockchain.contract_interaction_error":"errors.blockchain.contract_interaction_error","blockchain.insufficient_funds":"errors.blockchain.insufficient_funds"},G={"system.internal_server_error":"errors.system.internal_server_error","system.service_unavailable":"errors.system.service_unavailable","system.external_service_error":"errors.system.external_service_error","system.rate_limit_exceeded":"errors.system.rate_limit_exceeded","system.feature_disabled":"errors.system.feature_disabled"},z={"generic.error":"errors.general.internal_error","generic.not_found":"errors.general.not_found","generic.conflict":"errors.general.conflict","generic.timeout":"errors.general.timeout"},K={"auth.invalid_credentials":401,"auth.account_locked":423,"auth.email_not_verified":403,"auth.token_expired":401,"auth.token_invalid":401,"auth.insufficient_permissions":403,"auth.email_taken":409,"auth.username_taken":409,"auth.wallet_signature_invalid":401},M={"validation.error":400,"validation.required_field_missing":400,"validation.invalid_format":400,"validation.invalid_enum_value":400,"validation.string_too_short":400,"validation.string_too_long":400,"validation.number_too_small":400,"validation.number_too_large":400,"validation.array_too_short":400,"validation.array_too_long":400,"validation.file_too_large":400,"validation.unsupported_file_type":400},P={"database.entity_not_found":404,"database.duplicate_entry":409,"database.relation_violation":400,"database.connection_error":503,"database.transaction_failed":500},q={"blockchain.connection_error":503,"blockchain.transaction_failed":400,"blockchain.wallet_connection_error":503,"blockchain.contract_interaction_error":400,"blockchain.insufficient_funds":400},H={"system.internal_server_error":500,"system.service_unavailable":503,"system.external_service_error":502,"system.rate_limit_exceeded":429,"system.feature_disabled":503},T={"generic.error":500,"generic.not_found":404,"generic.conflict":409,"generic.timeout":408},p,u=(p=class extends Error{constructor(a,r={}){const{locale:i="en",params:s,details:o,cause:c}=r,A=F(a,i,s);super(A);d(this,"name");d(this,"type");d(this,"code");d(this,"statusCode");d(this,"timestamp");d(this,"details");d(this,"cause");d(this,"correlationId");this.name=this.constructor.name,this.type=a,this.message=A,this.code=a.replace(/\./g,"_").toUpperCase(),this.statusCode=ne(a),this.timestamp=new Date().toISOString(),this.details=o,this.cause=c,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,type:this.type,code:this.code,statusCode:this.statusCode,timestamp:this.timestamp,details:this.details,correlationId:this.correlationId}}static fromJSON(a){const r=new p(a.type);return Object.assign(r,a),r}},n(p,"BaseError"),p),v,Te=(v=class extends u{constructor(t,a={}){super(t,a)}},n(v,"ValidationError"),v),m,Le=(m=class extends u{constructor(t,a={}){super(t,a)}},n(m,"AuthError"),m),h;h=class extends u{constructor(t,a={}){super(t,a)}},n(h,"ApiError");var b;b=class extends u{constructor(t,a={}){super(t,a)}},n(b,"BusinessError");var x,we=(x=class extends u{constructor(t,a={}){super(t,a)}},n(x,"BlockchainError"),x),E;E=class extends u{constructor(t="generic.error",a={}){super(t,a)}},n(E,"GenericError");function F(e,t="en",a){try{const r=re(e);return y().t(r,{lang:t,interpolation:a,defaultValue:`Error: ${e}`})}catch{return y().t("errors.general.internal_error",{lang:t,interpolation:a,defaultValue:"An internal server error occurred"})}}n(F,"translateError");function re(e){return e in U?U[e]:e in V?V[e]:e in B?B[e]:e in j?j[e]:e in G?G[e]:e in z?z[e]:"errors.general.internal_error"}n(re,"getTranslationKeyForErrorType");function ne(e){return e in K?K[e]:e in M?M[e]:e in P?P[e]:e in q?q[e]:e in H?H[e]:e in T?T[e]:T["system.internal_server_error"]}n(ne,"getStatusCodeForType");function ye(e,t="en",a){if(typeof e=="string")return te(e,a);if(e instanceof u)return e.message;const r=e;return r.type&&Object.values(ae).includes(r.type)?F(r.type,t,a):e.message||"An unknown error occurred"}n(ye,"formatErrorMessage");function De(e,t){const a=new Date().toISOString();return e instanceof u?{statusCode:e.statusCode,errorCode:e.code,message:e.message,correlationId:t??e.correlationId,timestamp:e.timestamp||a}:{statusCode:500,errorCode:"INTERNAL_SERVER_ERROR",message:e.message||"An internal server error occurred",correlationId:t,timestamp:a}}n(De,"createErrorResponse");function Ce(e,t){return e instanceof u&&e.type===t}n(Ce,"isErrorType");function Fe(e){return e instanceof Te||e instanceof u&&e.type.startsWith("validation.")}n(Fe,"isValidationError");function Ue(e){return e instanceof Le||e instanceof u&&e.type.startsWith("auth.")}n(Ue,"isAuthError");function Ve(e){return e instanceof we||e instanceof u&&e.type.startsWith("blockchain.")}n(Ve,"isBlockchainError");function Be(e){return e.toJSON()}n(Be,"serializeError");function je(e){return u.fromJSON(e)}n(je,"deserializeError");function Ge(e){return e.map(t=>({field:t.field,message:t.message,errorCode:"VALIDATION_ERROR",context:{valueGiven:t.value,constraints:t.constraints}}))}n(Ge,"createValidationErrorDetails");var g;g=class{constructor(){d(this,"fallbackLocale");this.fallbackLocale="en"}static getInstance(){return g.instance||(g.instance=new g),g.instance}detectLocale(t){return t?this.detectFromRequest(t):this.fallbackLocale}detectFromRequest(t){var s,o,c;const a=(s=t.url.split("?")[1])==null?void 0:s.split("=")[1],r=t.headers.get("accept-language"),i=(c=(o=t.headers.get("cookie"))==null?void 0:o.split("; ").find(A=>A.startsWith("locale=")))==null?void 0:c.split("=")[1];return a??i??this.parseAcceptLanguage(r??"")??this.fallbackLocale}parseAcceptLanguage(t){if(!t)return null;let a=null,r=0;for(const i of t.split(",")){const{lang:s,q:o}=this.parseLangAndQ(i.trim());if(o>r&&(r=o,a=s,o===1))break}return a}parseLangAndQ(t){const a=t.indexOf(";"),r=a===-1?t:t.slice(0,Math.max(0,a));let i=1;if(a!==-1){const s=/q=(?<q>[\d.]+)/.exec(t.slice(a+1));i=s!=null&&s.groups?Number.parseFloat(s.groups.q)||0:1}return{lang:r,q:i}}setFallbackLocale(t){this.fallbackLocale=t}},n(g,"LocaleDetector"),d(g,"instance");var N;N=class{constructor(t){d(this,"namespaces");this.namespaces=t?new Map(t):new Map}addNamespace(t,a){if(!ie(t))throw new Error("Invalid namespace name");this.namespaces.set(t,a)}getNamespace(t){return this.namespaces.get(t)}getAllNamespaces(){return[...this.namespaces.keys()]}mergeNamespaces(t,a){const r=this.namespaces.get(t)??{},i=this.namespaces.get(a)??{};this.namespaces.set(t,{...r,...i})}validateNamespace(t,a){const r=this.namespaces.get(t);return r?a?Object.entries(a).every(([i,s])=>{var c;const o=(c=Object.getOwnPropertyDescriptor(r,i))==null?void 0:c.value;return o!==void 0&&typeof o===s}):!0:!1}},n(N,"NamespaceManager");function ie(e){return/^\w+$/.test(e)}n(ie,"isSafeKey");const ze=I.cva("relative w-full rounded-sm border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive border-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Ke({className:e,variant:t,...a}){return l.jsx("div",{"data-slot":"alert",role:"alert",className:_.cn(ze({variant:t}),e),...a})}function Me({className:e,...t}){return l.jsx("div",{"data-slot":"alert-title",className:_.cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Pe({className:e,...t}){return l.jsx("div",{"data-slot":"alert-description",className:_.cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}const qe=I.cva("inline-flex items-center justify-center rounded-full border px-2 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden hover:opacity-80",{variants:{variant:{default:"bg-orange-gradient text-white",secondary:"border-transparent bg-primary text-secondary",destructive:"bg-destructive text-white",outline:"border-subtle text-secondary",success:"opacity-80 hover:opacity-60 bg-emerald-600 text-white",info:"opacity-80 hover:opacity-60 bg-blue-600 text-white",warning:"opacity-80 hover:opacity-60 bg-amber-600 text-white",error:"opacity-80 hover:opacity-60 bg-destructive text-white"}},defaultVariants:{variant:"default"}});function He({className:e,variant:t,asChild:a=!1,...r}){const i=a?de.Slot:"span";return l.jsx(i,{"data-slot":"badge",className:_.cn(qe({variant:t}),e),...r})}function se({className:e,...t}){return l.jsx("textarea",{"data-slot":"textarea",className:_.cn("border-subtle text-secondary bg-background placeholder:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-sm border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 disabled:placeholder:text-secondary-foreground md:text-sm",e),...t})}exports.Alert=Ke;exports.AlertDescription=Pe;exports.AlertTitle=Me;exports.AuroraText=$;exports.Badge=He;exports.Input=Y;exports.InputGroup=_e;exports.InputGroupAddon=fe;exports.InputGroupButton=ve;exports.InputGroupInput=he;exports.InputGroupText=me;exports.InputGroupTextarea=be;exports.Textarea=se;exports.formatDate=J;exports.formatNumber=Q;
@@ -5,11 +5,11 @@ import { jsx as l, jsxs as ne } from "react/jsx-runtime";
5
5
  import { cva as k } from "class-variance-authority";
6
6
  import { c as _ } from "./utils-B6yFEsav.js";
7
7
  import { B as ie } from "./Button-B7sEajdG.js";
8
- import { memo as se } from "react";
8
+ import { memo as oe } from "react";
9
9
  import "@radix-ui/react-select";
10
10
  import "lucide-react";
11
11
  import "next-intl";
12
- import { Slot as oe } from "@radix-ui/react-slot";
12
+ import { Slot as se } from "@radix-ui/react-slot";
13
13
  import "@radix-ui/react-separator";
14
14
  function le({ className: e, type: t, ...a }) {
15
15
  return /* @__PURE__ */ l(
@@ -92,15 +92,15 @@ function Je({
92
92
  align: t = "inline-start",
93
93
  ...a
94
94
  }) {
95
- const r = (s) => {
96
- var o, c;
97
- s.target.closest("button") || (c = (o = s.currentTarget.parentElement) == null ? void 0 : o.querySelector("input")) == null || c.focus();
98
- }, i = (s) => {
99
- var o, c;
100
- if (s.key === "Enter" || s.key === " ") {
101
- if (s.preventDefault(), s.target.closest("button"))
95
+ const r = (o) => {
96
+ var s, c;
97
+ o.target.closest("button") || (c = (s = o.currentTarget.parentElement) == null ? void 0 : s.querySelector("input")) == null || c.focus();
98
+ }, i = (o) => {
99
+ var s, c;
100
+ if (o.key === "Enter" || o.key === " ") {
101
+ if (o.preventDefault(), o.target.closest("button"))
102
102
  return;
103
- (c = (o = s.currentTarget.parentElement) == null ? void 0 : o.querySelector("input")) == null || c.focus();
103
+ (c = (s = o.currentTarget.parentElement) == null ? void 0 : s.querySelector("input")) == null || c.focus();
104
104
  }
105
105
  };
106
106
  return /* @__PURE__ */ l(
@@ -187,7 +187,7 @@ function et({ className: e, ...t }) {
187
187
  }
188
188
  );
189
189
  }
190
- const de = 10, _e = se(
190
+ const de = 10, _e = oe(
191
191
  ({
192
192
  children: e,
193
193
  className: t = "",
@@ -229,29 +229,29 @@ const de = 10, _e = se(
229
229
  );
230
230
  _e.displayName = "AuroraText";
231
231
  var fe = Object.defineProperty, n = (e, t) => fe(e, "name", { value: t, configurable: !0 }), O = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
232
- function C(e, t) {
232
+ function D(e, t) {
233
233
  return `${e}:${JSON.stringify(t ?? {})}`;
234
234
  }
235
- n(C, "getFormatterKey");
235
+ n(D, "getFormatterKey");
236
236
  function $(e) {
237
237
  const t = typeof e == "string" || typeof e == "number" ? new Date(e) : e;
238
238
  return t instanceof Date && !Number.isNaN(t.getTime()) ? t : null;
239
239
  }
240
240
  n($, "parseDate");
241
241
  function ge(e, t = "en", a) {
242
- var s;
242
+ var o;
243
243
  const r = $(e);
244
244
  if (!r)
245
245
  return "";
246
- const i = C(t, a);
247
- return O.has(i) || O.set(i, new Intl.DateTimeFormat(t, a)), ((s = O.get(i)) == null ? void 0 : s.format(r)) ?? "";
246
+ const i = D(t, a);
247
+ return O.has(i) || O.set(i, new Intl.DateTimeFormat(t, a)), ((o = O.get(i)) == null ? void 0 : o.format(r)) ?? "";
248
248
  }
249
249
  n(ge, "formatDate");
250
250
  function pe(e, t = "en", a) {
251
251
  var i;
252
252
  if (typeof e != "number" || Number.isNaN(e))
253
253
  return "";
254
- const r = C(t, a);
254
+ const r = D(t, a);
255
255
  return S.has(r) || S.set(r, new Intl.NumberFormat(t, a)), ((i = S.get(r)) == null ? void 0 : i.format(e)) ?? "";
256
256
  }
257
257
  n(pe, "formatNumber");
@@ -287,14 +287,14 @@ function xe({
287
287
  return "";
288
288
  if (e === 0 && t.zero)
289
289
  return L(t.zero, e);
290
- const s = J(a, r).select(e), o = q(t, s) ?? t.other ?? Object.values(t)[0];
291
- return o ? L(o, e) : "";
290
+ const o = J(a, r).select(e), s = q(t, o) ?? t.other ?? Object.values(t)[0];
291
+ return s ? L(s, e) : "";
292
292
  }
293
293
  n(xe, "pluralize");
294
- function y(e, t) {
294
+ function C(e, t) {
295
295
  return `${e}:${t}`;
296
296
  }
297
- n(y, "getPluralRulesKey");
297
+ n(C, "getPluralRulesKey");
298
298
  var Ee = /{count}|#/g;
299
299
  function q(e, t) {
300
300
  switch (t) {
@@ -324,7 +324,7 @@ function L(e, t) {
324
324
  }
325
325
  n(L, "replacePlaceholders");
326
326
  function J(e, t) {
327
- const a = y(e, t);
327
+ const a = C(e, t);
328
328
  if (!g.has(a))
329
329
  try {
330
330
  g.set(a, new Intl.PluralRules(e, { type: t }));
@@ -335,7 +335,7 @@ function J(e, t) {
335
335
  }
336
336
  n(J, "getPluralRules");
337
337
  function A(e, t) {
338
- const a = y("en", t);
338
+ const a = C("en", t);
339
339
  g.has(a) || g.set(a, new Intl.PluralRules("en", { type: t }));
340
340
  const r = g.get(a) ?? A(a, t);
341
341
  return g.set(e, r), r;
@@ -346,14 +346,14 @@ function Ne(e) {
346
346
  w = e;
347
347
  }
348
348
  n(Ne, "setTranslationService");
349
- function D() {
349
+ function y() {
350
350
  if (!w)
351
351
  throw new Error(
352
352
  "Translation service not initialized. Make sure to call setTranslationService() first."
353
353
  );
354
354
  return w;
355
355
  }
356
- n(D, "getTranslationService");
356
+ n(y, "getTranslationService");
357
357
  function Q(e, t) {
358
358
  return t ? e.replace(/\{(\w+)\}/g, (a, r) => t[r] !== void 0 ? String(t[r]) : a) : e;
359
359
  }
@@ -452,7 +452,7 @@ var X = /* @__PURE__ */ ((e) => (e.AUTH_INVALID_CREDENTIALS = "auth.invalid_cred
452
452
  "generic.timeout": 408
453
453
  }, p, u = (p = class extends Error {
454
454
  constructor(a, r = {}) {
455
- const { locale: i = "en", params: s, details: o, cause: c } = r, R = F(a, i, s);
455
+ const { locale: i = "en", params: o, details: s, cause: c } = r, R = F(a, i, o);
456
456
  super(R);
457
457
  d(this, "name");
458
458
  d(this, "type");
@@ -462,7 +462,7 @@ var X = /* @__PURE__ */ ((e) => (e.AUTH_INVALID_CREDENTIALS = "auth.invalid_cred
462
462
  d(this, "details");
463
463
  d(this, "cause");
464
464
  d(this, "correlationId");
465
- this.name = this.constructor.name, this.type = a, this.message = R, this.code = a.replace(/\./g, "_").toUpperCase(), this.statusCode = ee(a), this.timestamp = (/* @__PURE__ */ new Date()).toISOString(), this.details = o, this.cause = c, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
465
+ this.name = this.constructor.name, this.type = a, this.message = R, this.code = a.replace(/\./g, "_").toUpperCase(), this.statusCode = ee(a), this.timestamp = (/* @__PURE__ */ new Date()).toISOString(), this.details = s, this.cause = c, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
466
466
  }
467
467
  // Serialization methods
468
468
  toJSON() {
@@ -515,13 +515,13 @@ E = class extends u {
515
515
  function F(e, t = "en", a) {
516
516
  try {
517
517
  const r = Z(e);
518
- return D().t(r, {
518
+ return y().t(r, {
519
519
  lang: t,
520
520
  interpolation: a,
521
521
  defaultValue: `Error: ${e}`
522
522
  });
523
523
  } catch {
524
- return D().t("errors.general.internal_error", {
524
+ return y().t("errors.general.internal_error", {
525
525
  lang: t,
526
526
  interpolation: a,
527
527
  defaultValue: "An internal server error occurred"
@@ -582,15 +582,15 @@ function we(e) {
582
582
  return e instanceof ke || e instanceof u && e.type.startsWith("blockchain.");
583
583
  }
584
584
  n(we, "isBlockchainError");
585
- function De(e) {
585
+ function ye(e) {
586
586
  return e.toJSON();
587
587
  }
588
- n(De, "serializeError");
589
- function Ce(e) {
588
+ n(ye, "serializeError");
589
+ function De(e) {
590
590
  return u.fromJSON(e);
591
591
  }
592
- n(Ce, "deserializeError");
593
- function ye(e) {
592
+ n(De, "deserializeError");
593
+ function Ce(e) {
594
594
  return e.map((t) => ({
595
595
  field: t.field,
596
596
  message: t.message,
@@ -601,7 +601,7 @@ function ye(e) {
601
601
  }
602
602
  }));
603
603
  }
604
- n(ye, "createValidationErrorDetails");
604
+ n(Ce, "createValidationErrorDetails");
605
605
  var f;
606
606
  f = class {
607
607
  constructor() {
@@ -630,8 +630,8 @@ f = class {
630
630
  * @private
631
631
  */
632
632
  detectFromRequest(t) {
633
- var s, o, c;
634
- const a = (s = t.url.split("?")[1]) == null ? void 0 : s.split("=")[1], r = t.headers.get("accept-language"), i = (c = (o = t.headers.get("cookie")) == null ? void 0 : o.split("; ").find((R) => R.startsWith("locale="))) == null ? void 0 : c.split("=")[1];
633
+ var o, s, c;
634
+ const a = (o = t.url.split("?")[1]) == null ? void 0 : o.split("=")[1], r = t.headers.get("accept-language"), i = (c = (s = t.headers.get("cookie")) == null ? void 0 : s.split("; ").find((R) => R.startsWith("locale="))) == null ? void 0 : c.split("=")[1];
635
635
  return a ?? i ?? this.parseAcceptLanguage(r ?? "") ?? this.fallbackLocale;
636
636
  }
637
637
  /**
@@ -645,8 +645,8 @@ f = class {
645
645
  return null;
646
646
  let a = null, r = 0;
647
647
  for (const i of t.split(",")) {
648
- const { lang: s, q: o } = this.parseLangAndQ(i.trim());
649
- if (o > r && (r = o, a = s, o === 1))
648
+ const { lang: o, q: s } = this.parseLangAndQ(i.trim());
649
+ if (s > r && (r = s, a = o, s === 1))
650
650
  break;
651
651
  }
652
652
  return a;
@@ -655,8 +655,8 @@ f = class {
655
655
  const a = t.indexOf(";"), r = a === -1 ? t : t.slice(0, Math.max(0, a));
656
656
  let i = 1;
657
657
  if (a !== -1) {
658
- const s = /q=(?<q>[\d.]+)/.exec(t.slice(a + 1));
659
- i = s != null && s.groups ? Number.parseFloat(s.groups.q) || 0 : 1;
658
+ const o = /q=(?<q>[\d.]+)/.exec(t.slice(a + 1));
659
+ i = o != null && o.groups ? Number.parseFloat(o.groups.q) || 0 : 1;
660
660
  }
661
661
  return { lang: r, q: i };
662
662
  }
@@ -718,10 +718,10 @@ N = class {
718
718
  */
719
719
  validateNamespace(t, a) {
720
720
  const r = this.namespaces.get(t);
721
- return r ? a ? Object.entries(a).every(([i, s]) => {
721
+ return r ? a ? Object.entries(a).every(([i, o]) => {
722
722
  var c;
723
- const o = (c = Object.getOwnPropertyDescriptor(r, i)) == null ? void 0 : c.value;
724
- return o !== void 0 && typeof o === s;
723
+ const s = (c = Object.getOwnPropertyDescriptor(r, i)) == null ? void 0 : c.value;
724
+ return s !== void 0 && typeof s === o;
725
725
  }) : !0 : !1;
726
726
  }
727
727
  }, n(N, "NamespaceManager");
@@ -789,7 +789,11 @@ const Ue = k(
789
789
  default: "bg-orange-gradient text-white",
790
790
  secondary: "border-transparent bg-primary text-secondary",
791
791
  destructive: "bg-destructive text-white",
792
- outline: "border-subtle text-secondary"
792
+ outline: "border-subtle text-secondary",
793
+ success: "opacity-80 hover:opacity-60 bg-emerald-600 text-white",
794
+ info: "opacity-80 hover:opacity-60 bg-blue-600 text-white",
795
+ warning: "opacity-80 hover:opacity-60 bg-amber-600 text-white",
796
+ error: "opacity-80 hover:opacity-60 bg-destructive text-white"
793
797
  }
794
798
  },
795
799
  defaultVariants: {
@@ -803,7 +807,7 @@ function nt({
803
807
  asChild: a = !1,
804
808
  ...r
805
809
  }) {
806
- return /* @__PURE__ */ l(a ? oe : "span", { "data-slot": "badge", className: _(Ue({ variant: t }), e), ...r });
810
+ return /* @__PURE__ */ l(a ? se : "span", { "data-slot": "badge", className: _(Ue({ variant: t }), e), ...r });
807
811
  }
808
812
  function Ve({ className: e, ...t }) {
809
813
  return /* @__PURE__ */ l(
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),y=require("react"),m=require("lucide-react"),f=require("react-day-picker"),e=require("../utils-IjLH3w2e.cjs");require("../Textarea-DIEPzlTz.cjs");const p=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");function _(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}return o.default=n,Object.freeze(o)}const b=_(y);function w({className:n,classNames:o,showOutsideDays:r=!0,captionLayout:s="label",formatters:g,components:c,...i}){const t=f.getDefaultClassNames();return d.jsx(f.DayPicker,{showOutsideDays:r,className:e.cn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,n),captionLayout:s,formatters:{formatMonthDropdown:a=>a.toLocaleString("default",{month:"short"}),...g},classNames:{root:e.cn("w-fit",t.root),months:e.cn("flex gap-4 flex-col md:flex-row relative",t.months),month:e.cn("flex flex-col w-full gap-4",t.month),nav:e.cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",t.nav),button_previous:e.cn(p.buttonVariants({variant:"outline"}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none rounded-sm border-subtle text-tertiary-foreground",t.button_previous),button_next:e.cn(p.buttonVariants({variant:"outline"}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none rounded-sm border-subtle text-tertiary-foreground",t.button_next),month_caption:e.cn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",t.month_caption),dropdowns:e.cn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",t.dropdowns),dropdown_root:e.cn("relative has-focus:border-ring border border-subtle shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",t.dropdown_root),dropdown:e.cn("absolute bg-popover inset-0 opacity-0",t.dropdown),caption_label:e.cn("select-none font-medium",s==="label"?"text-sm":"text-secondary rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",t.caption_label),table:"w-full border-collapse",weekdays:e.cn("flex",t.weekdays),weekday:e.cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",t.weekday),week:e.cn("flex w-full mt-2",t.week),week_number_header:e.cn("select-none w-(--cell-size)",t.week_number_header),week_number:e.cn("text-[0.8rem] select-none text-muted-foreground",t.week_number),day:e.cn("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",t.day),range_start:e.cn("bg-primary !rounded-l-sm",t.range_start),range_middle:e.cn("rounded-none",t.range_middle),range_end:e.cn("bg-primary !rounded-r-sm",t.range_end),today:e.cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",t.today),outside:e.cn("text-muted-foreground aria-selected:text-muted-foreground",t.outside),disabled:e.cn("text-secondary opacity-40",t.disabled),hidden:e.cn("invisible",t.hidden),...o},components:{Root:({className:a,rootRef:u,...l})=>d.jsx("div",{"data-slot":"calendar",ref:u,className:e.cn(a),...l}),Chevron:({className:a,orientation:u,...l})=>u==="left"?d.jsx(m.ChevronLeftIcon,{className:e.cn("size-4",a),...l}):u==="right"?d.jsx(m.ChevronRightIcon,{className:e.cn("size-4",a),...l}):d.jsx(m.ChevronDownIcon,{className:e.cn("size-4",a),...l}),DayButton:x,WeekNumber:({children:a,...u})=>d.jsx("td",{...u,children:d.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:a})}),...c},...i})}function x({className:n,day:o,modifiers:r,...s}){const g=f.getDefaultClassNames(),c=b.useRef(null);return b.useEffect(()=>{var i;r.focused&&((i=c.current)==null||i.focus())},[r.focused]),d.jsx(p.Button,{ref:c,variant:"ghost",size:"icon","data-day":o.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:e.cn("rounded-sm hover:shadow-none hover:bg-primary data-[selected-single=true]:bg-orange-gradient data-[selected-single=true]:text-primary data-[range-middle=true]:bg-primary data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-orange-gradient data-[range-start=true]:text-primary data-[range-end=true]:bg-orange-gradient data-[range-end=true]:text-primary group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",g.day,n),...s})}exports.Calendar=w;exports.CalendarDayButton=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),y=require("react"),m=require("lucide-react"),f=require("react-day-picker"),e=require("../utils-IjLH3w2e.cjs");require("../Textarea-BvWlVUbA.cjs");const p=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");function _(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}return o.default=n,Object.freeze(o)}const b=_(y);function w({className:n,classNames:o,showOutsideDays:r=!0,captionLayout:s="label",formatters:g,components:c,...i}){const t=f.getDefaultClassNames();return d.jsx(f.DayPicker,{showOutsideDays:r,className:e.cn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,n),captionLayout:s,formatters:{formatMonthDropdown:a=>a.toLocaleString("default",{month:"short"}),...g},classNames:{root:e.cn("w-fit",t.root),months:e.cn("flex gap-4 flex-col md:flex-row relative",t.months),month:e.cn("flex flex-col w-full gap-4",t.month),nav:e.cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",t.nav),button_previous:e.cn(p.buttonVariants({variant:"outline"}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none rounded-sm border-subtle text-tertiary-foreground",t.button_previous),button_next:e.cn(p.buttonVariants({variant:"outline"}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none rounded-sm border-subtle text-tertiary-foreground",t.button_next),month_caption:e.cn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",t.month_caption),dropdowns:e.cn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",t.dropdowns),dropdown_root:e.cn("relative has-focus:border-ring border border-subtle shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",t.dropdown_root),dropdown:e.cn("absolute bg-popover inset-0 opacity-0",t.dropdown),caption_label:e.cn("select-none font-medium",s==="label"?"text-sm":"text-secondary rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",t.caption_label),table:"w-full border-collapse",weekdays:e.cn("flex",t.weekdays),weekday:e.cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",t.weekday),week:e.cn("flex w-full mt-2",t.week),week_number_header:e.cn("select-none w-(--cell-size)",t.week_number_header),week_number:e.cn("text-[0.8rem] select-none text-muted-foreground",t.week_number),day:e.cn("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",t.day),range_start:e.cn("bg-primary !rounded-l-sm",t.range_start),range_middle:e.cn("rounded-none",t.range_middle),range_end:e.cn("bg-primary !rounded-r-sm",t.range_end),today:e.cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",t.today),outside:e.cn("text-muted-foreground aria-selected:text-muted-foreground",t.outside),disabled:e.cn("text-secondary opacity-40",t.disabled),hidden:e.cn("invisible",t.hidden),...o},components:{Root:({className:a,rootRef:u,...l})=>d.jsx("div",{"data-slot":"calendar",ref:u,className:e.cn(a),...l}),Chevron:({className:a,orientation:u,...l})=>u==="left"?d.jsx(m.ChevronLeftIcon,{className:e.cn("size-4",a),...l}):u==="right"?d.jsx(m.ChevronRightIcon,{className:e.cn("size-4",a),...l}):d.jsx(m.ChevronDownIcon,{className:e.cn("size-4",a),...l}),DayButton:x,WeekNumber:({children:a,...u})=>d.jsx("td",{...u,children:d.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:a})}),...c},...i})}function x({className:n,day:o,modifiers:r,...s}){const g=f.getDefaultClassNames(),c=b.useRef(null);return b.useEffect(()=>{var i;r.focused&&((i=c.current)==null||i.focus())},[r.focused]),d.jsx(p.Button,{ref:c,variant:"ghost",size:"icon","data-day":o.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:e.cn("rounded-sm hover:shadow-none hover:bg-primary data-[selected-single=true]:bg-orange-gradient data-[selected-single=true]:text-primary data-[range-middle=true]:bg-primary data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-orange-gradient data-[range-start=true]:text-primary data-[range-end=true]:bg-orange-gradient data-[range-end=true]:text-primary group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",g.day,n),...s})}exports.Calendar=w;exports.CalendarDayButton=x;
@@ -3,7 +3,7 @@ import * as m from "react";
3
3
  import { ChevronLeftIcon as b, ChevronRightIcon as x, ChevronDownIcon as y } from "lucide-react";
4
4
  import { getDefaultClassNames as p, DayPicker as h } from "react-day-picker";
5
5
  import { c as e } from "../utils-B6yFEsav.js";
6
- import "../Textarea-BfrJwucE.js";
6
+ import "../Textarea-CzufjM38.js";
7
7
  import { b as f, B as w } from "../Button-B7sEajdG.js";
8
8
  import "@radix-ui/react-select";
9
9
  import "next-intl";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),q=require("react"),w=require("embla-carousel-react"),m=require("lucide-react"),d=require("../utils-IjLH3w2e.cjs");require("../Textarea-DIEPzlTz.cjs");const v=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");function k(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const s=k(q),b=s.createContext(null);function x(){const t=s.useContext(b);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}function z({orientation:t="horizontal",opts:r,setApi:o,plugins:n,className:c,children:u,...i}){const[N,e]=w({...r,axis:t==="horizontal"?"x":"y"},n),[j,y]=s.useState(!1),[S,P]=s.useState(!1),f=s.useCallback(a=>{a&&(y(a.canScrollPrev()),P(a.canScrollNext()))},[]),C=s.useCallback(()=>{e==null||e.scrollPrev()},[e]),h=s.useCallback(()=>{e==null||e.scrollNext()},[e]),g=s.useCallback(a=>{a.key==="ArrowLeft"?(a.preventDefault(),C()):a.key==="ArrowRight"&&(a.preventDefault(),h())},[C,h]);return s.useEffect(()=>{!e||!o||o(e)},[e,o]),s.useEffect(()=>{if(e)return f(e),e.on("reInit",f),e.on("select",f),()=>{e==null||e.off("select",f)}},[e,f]),l.jsx(b.Provider,{value:{carouselRef:N,api:e,opts:r,orientation:t||((r==null?void 0:r.axis)==="y"?"vertical":"horizontal"),scrollPrev:C,scrollNext:h,canScrollPrev:j,canScrollNext:S},children:l.jsx("div",{onKeyDownCapture:g,className:d.cn("relative",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...i,children:u})})}function R({className:t,...r}){const{carouselRef:o,orientation:n}=x();return l.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:l.jsx("div",{className:d.cn("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}function p({className:t,...r}){const{orientation:o}=x();return l.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:d.cn("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",t),...r})}function D({className:t,variant:r="outline",size:o="icon",...n}){const{orientation:c,scrollPrev:u,canScrollPrev:i}=x();return l.jsxs(v.Button,{"data-slot":"carousel-previous",variant:r,size:o,className:d.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:u,...n,children:[l.jsx(m.ChevronLeft,{}),l.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function O({className:t,variant:r="outline",size:o="icon",...n}){const{orientation:c,scrollNext:u,canScrollNext:i}=x();return l.jsxs(v.Button,{"data-slot":"carousel-next",variant:r,size:o,className:d.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:u,...n,children:[l.jsx(m.ChevronRight,{}),l.jsx("span",{className:"sr-only",children:"Next slide"})]})}exports.Carousel=z;exports.CarouselContent=R;exports.CarouselItem=p;exports.CarouselNext=O;exports.CarouselPrevious=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),q=require("react"),w=require("embla-carousel-react"),m=require("lucide-react"),d=require("../utils-IjLH3w2e.cjs");require("../Textarea-BvWlVUbA.cjs");const v=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");function k(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const s=k(q),b=s.createContext(null);function x(){const t=s.useContext(b);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}function z({orientation:t="horizontal",opts:r,setApi:o,plugins:n,className:c,children:u,...i}){const[N,e]=w({...r,axis:t==="horizontal"?"x":"y"},n),[j,y]=s.useState(!1),[S,P]=s.useState(!1),f=s.useCallback(a=>{a&&(y(a.canScrollPrev()),P(a.canScrollNext()))},[]),C=s.useCallback(()=>{e==null||e.scrollPrev()},[e]),h=s.useCallback(()=>{e==null||e.scrollNext()},[e]),g=s.useCallback(a=>{a.key==="ArrowLeft"?(a.preventDefault(),C()):a.key==="ArrowRight"&&(a.preventDefault(),h())},[C,h]);return s.useEffect(()=>{!e||!o||o(e)},[e,o]),s.useEffect(()=>{if(e)return f(e),e.on("reInit",f),e.on("select",f),()=>{e==null||e.off("select",f)}},[e,f]),l.jsx(b.Provider,{value:{carouselRef:N,api:e,opts:r,orientation:t||((r==null?void 0:r.axis)==="y"?"vertical":"horizontal"),scrollPrev:C,scrollNext:h,canScrollPrev:j,canScrollNext:S},children:l.jsx("div",{onKeyDownCapture:g,className:d.cn("relative",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...i,children:u})})}function R({className:t,...r}){const{carouselRef:o,orientation:n}=x();return l.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:l.jsx("div",{className:d.cn("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}function p({className:t,...r}){const{orientation:o}=x();return l.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:d.cn("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",t),...r})}function D({className:t,variant:r="outline",size:o="icon",...n}){const{orientation:c,scrollPrev:u,canScrollPrev:i}=x();return l.jsxs(v.Button,{"data-slot":"carousel-previous",variant:r,size:o,className:d.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:u,...n,children:[l.jsx(m.ChevronLeft,{}),l.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function O({className:t,variant:r="outline",size:o="icon",...n}){const{orientation:c,scrollNext:u,canScrollNext:i}=x();return l.jsxs(v.Button,{"data-slot":"carousel-next",variant:r,size:o,className:d.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:u,...n,children:[l.jsx(m.ChevronRight,{}),l.jsx("span",{className:"sr-only",children:"Next slide"})]})}exports.Carousel=z;exports.CarouselContent=R;exports.CarouselItem=p;exports.CarouselNext=O;exports.CarouselPrevious=D;
@@ -3,7 +3,7 @@ import * as l from "react";
3
3
  import k from "embla-carousel-react";
4
4
  import { ChevronLeft as z, ChevronRight as g } from "lucide-react";
5
5
  import { c as d } from "../utils-B6yFEsav.js";
6
- import "../Textarea-BfrJwucE.js";
6
+ import "../Textarea-CzufjM38.js";
7
7
  import { B as v } from "../Button-B7sEajdG.js";
8
8
  import "@radix-ui/react-select";
9
9
  import "next-intl";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("react"),m=require("lucide-react"),l=require("../utils-IjLH3w2e.cjs");require("../Textarea-DIEPzlTz.cjs");const O=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");const o=require("./command.cjs.js"),a=require("./popover.cjs.js");function S(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(c,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}return c.default=r,Object.freeze(c)}const w=S(C);function g({options:r,value:c,onValueChange:n,placeholder:s="Select option...",searchPlaceholder:p="Search...",emptyText:f="No option found.",disabled:b=!1,triggerClassName:j,contentClassName:x,buttonVariant:h="outline",buttonSize:q="default"}){const[i,u]=w.useState(!1),d=r.find(t=>t.value===c),v=t=>{const y=t===c?"":t;n==null||n(y),u(!1)};return e.jsxs(a.Popover,{open:i,onOpenChange:u,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(O.Button,{variant:h,size:q,role:"combobox","aria-expanded":i,disabled:b,className:l.cn("w-full justify-between",j),children:[d?d.label:s,e.jsx(m.ChevronsUpDownIcon,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(a.PopoverContent,{className:l.cn("w-full p-0",x),children:e.jsxs(o.Command,{children:[e.jsx(o.CommandInput,{placeholder:p}),e.jsxs(o.CommandList,{children:[e.jsx(o.CommandEmpty,{children:f}),e.jsx(o.CommandGroup,{children:r.map(t=>e.jsxs(o.CommandItem,{value:t.value,disabled:t.disabled,onSelect:()=>v(t.value),children:[e.jsx(m.CheckIcon,{className:l.cn("mr-2 h-4 w-4",c===t.value?"opacity-100":"opacity-0")}),t.label]},t.value))})]})]})})]})}exports.Combobox=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("react"),m=require("lucide-react"),l=require("../utils-IjLH3w2e.cjs");require("../Textarea-BvWlVUbA.cjs");const O=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");const o=require("./command.cjs.js"),a=require("./popover.cjs.js");function S(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(c,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}return c.default=r,Object.freeze(c)}const w=S(C);function g({options:r,value:c,onValueChange:n,placeholder:s="Select option...",searchPlaceholder:p="Search...",emptyText:f="No option found.",disabled:b=!1,triggerClassName:j,contentClassName:x,buttonVariant:h="outline",buttonSize:q="default"}){const[i,u]=w.useState(!1),d=r.find(t=>t.value===c),v=t=>{const y=t===c?"":t;n==null||n(y),u(!1)};return e.jsxs(a.Popover,{open:i,onOpenChange:u,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(O.Button,{variant:h,size:q,role:"combobox","aria-expanded":i,disabled:b,className:l.cn("w-full justify-between",j),children:[d?d.label:s,e.jsx(m.ChevronsUpDownIcon,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(a.PopoverContent,{className:l.cn("w-full p-0",x),children:e.jsxs(o.Command,{children:[e.jsx(o.CommandInput,{placeholder:p}),e.jsxs(o.CommandList,{children:[e.jsx(o.CommandEmpty,{children:f}),e.jsx(o.CommandGroup,{children:r.map(t=>e.jsxs(o.CommandItem,{value:t.value,disabled:t.disabled,onSelect:()=>v(t.value),children:[e.jsx(m.CheckIcon,{className:l.cn("mr-2 h-4 w-4",c===t.value?"opacity-100":"opacity-0")}),t.label]},t.value))})]})]})})]})}exports.Combobox=g;
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
2
  import * as x from "react";
3
3
  import { ChevronsUpDownIcon as y, CheckIcon as N } from "lucide-react";
4
4
  import { c as l } from "../utils-B6yFEsav.js";
5
- import "../Textarea-BfrJwucE.js";
5
+ import "../Textarea-CzufjM38.js";
6
6
  import { B as S } from "../Button-B7sEajdG.js";
7
7
  import "@radix-ui/react-select";
8
8
  import "next-intl";