@lax-wp/design-system 0.3.80 → 0.3.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -35288,7 +35288,7 @@ const jK = Object.keys(qu).filter(
35288
35288
  case "large":
35289
35289
  return "text-base px-3 py-1.5";
35290
35290
  default:
35291
- return "text-sm px-2 py-1";
35291
+ return "text-md px-1.5 py-1";
35292
35292
  }
35293
35293
  }, c = () => {
35294
35294
  switch (e?.toLowerCase()) {
package/dist/index.umd.js CHANGED
@@ -172,7 +172,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
172
172
  `))+1))}const o="#".repeat(i),u=n.enter("headingAtx"),c=n.enter("phrasing");l.move(o+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
173
173
  `,...l.current()});return/^[\t ]/.test(d)&&(d=Go(d.charCodeAt(0))+d.slice(1)),d=d?o+" "+d:o,n.options.closeAtx&&(d+=" "+o),c(),u(),d}M9.peek=QG;function M9(e){return e.value||""}function QG(){return"<"}F9.peek=RG;function F9(e,t,n,r){const i=Wd(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(u=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),u(),e.title&&(u=n.enter(`title${l}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),u()),d+=c.move(")"),o(),d}function RG(){return"!"}z9.peek=eW;function z9(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");const d=n.safe(e.alt,{before:c,after:"]",...u.current()});c+=u.move(d+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return o(),n.stack=h,l(),i==="full"||!d||d!==m?c+=u.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function eW(){return"!"}T9.peek=tW;function T9(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const o=n.unsafe[l],u=n.compilePattern(o);let c;if(o.atBreak)for(;c=u.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return i+r+i}function tW(){return"`"}function N9(e,t){const n=gd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}D9.peek=nW;function D9(e,t,n,r){const i=Wd(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let u,c;if(N9(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let m=o.move("<");return m+=o.move(n.containerPhrasing(e,{before:m,after:">",...o.current()})),m+=o.move(">"),u(),n.stack=h,m}u=n.enter("link"),c=n.enter("label");let d=o.move("[");return d+=o.move(n.containerPhrasing(e,{before:d,after:"](",...o.current()})),d+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(n.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(c=n.enter("destinationRaw"),d+=o.move(n.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${l}`),d+=o.move(" "+i),d+=o.move(n.safe(e.title,{before:d,after:i,...o.current()})),d+=o.move(i),c()),d+=o.move(")"),u(),d}function nW(e,t,n){return N9(e,n)?"<":"["}L9.peek=rW;function L9(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...u.current()});c+=u.move(d+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return o(),n.stack=h,l(),i==="full"||!d||d!==m?c+=u.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function rW(){return"["}function Ud(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function iW(e){const t=Ud(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function lW(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function O9(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function aW(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?lW(n):Ud(n);const u=e.ordered?o==="."?")":".":iW(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),O9(n)===o&&h){let m=-1;for(;++m<e.children.length;){const v=e.children[m];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=u),n.bulletCurrent=o;const d=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),d}function oW(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function sW(e,t,n,r){const i=oW(n);let l=n.bulletCurrent||Ud(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const u=n.createTracker(r);u.move(l+" ".repeat(o-l.length)),u.shift(o);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,u.current()),h);return c(),d;function h(m,v,b){return v?(b?"":" ".repeat(o))+m:(b?l:l+" ".repeat(o-l.length))+m}}function uW(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const cW=Zu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dW(e,t,n,r){return(e.children.some(function(o){return cW(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function fW(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}P9.peek=hW;function P9(e,t,n,r){const i=fW(n),l=n.enter("strong"),o=n.createTracker(r),u=o.move(i+i);let c=o.move(n.containerPhrasing(e,{after:i,before:u,...o.current()}));const d=c.charCodeAt(0),h=Ku(r.before.charCodeAt(r.before.length-1),d,i);h.inside&&(c=Go(d)+c.slice(1));const m=c.charCodeAt(c.length-1),v=Ku(r.after.charCodeAt(0),m,i);v.inside&&(c=c.slice(0,-1)+Go(m));const b=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:v.outside,before:h.outside},u+c+b}function hW(e,t,n){return n.options.strong||"*"}function mW(e,t,n,r){return n.safe(e.value,r)}function pW(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function gW(e,t,n){const r=(O9(n)+(n.options.ruleSpaces?" ":"")).repeat(pW(n));return n.options.ruleSpaces?r.slice(0,-1):r}const H9={blockquote:_G,break:I9,code:UG,definition:XG,emphasis:A9,hardBreak:I9,heading:KG,html:M9,image:F9,imageReference:z9,inlineCode:T9,link:D9,linkReference:L9,list:aW,listItem:sW,paragraph:uW,root:dW,strong:P9,text:mW,thematicBreak:gW};function vW(){return{enter:{table:bW,tableData:B9,tableHeader:B9,tableRow:yW},exit:{codeText:wW,table:xW,tableData:Yd,tableHeader:Yd,tableRow:Yd}}}function bW(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function xW(e){this.exit(e),this.data.inTable=void 0}function yW(e){this.enter({type:"tableRow",children:[]},e)}function Yd(e){this.exit(e)}function B9(e){this.enter({type:"tableCell",children:[]},e)}function wW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,EW));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function EW(e,t){return t==="|"?t:e}function CW(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
174
174
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:o,tableCell:c,tableRow:u}};function o(b,y,x,w){return d(h(b,x,w),b.align)}function u(b,y,x,w){const E=m(b,x,w),A=d([E]);return A.slice(0,A.indexOf(`
175
- `))}function c(b,y,x,w){const E=x.enter("tableCell"),A=x.enter("phrasing"),M=x.containerPhrasing(b,{...w,before:l,after:l});return A(),E(),M}function d(b,y){return HG(b,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function h(b,y,x){const w=b.children;let E=-1;const A=[],M=y.enter("table");for(;++E<w.length;)A[E]=m(w[E],y,x);return M(),A}function m(b,y,x){const w=b.children;let E=-1;const A=[],M=y.enter("tableRow");for(;++E<w.length;)A[E]=c(w[E],b,y,x);return M(),A}function v(b,y,x){let w=H9.inlineCode(b,y,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function SW(){return{exit:{taskListCheckValueChecked:_9,taskListCheckValueUnchecked:_9,paragraph:IW}}}function kW(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:AW}}}function _9(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function IW(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const u=i[l];if(u.type==="paragraph"){o=u;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function AW(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);l&&u.move(o);let c=H9.listItem(e,t,n,{...r,...u.current()});return l&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(h){return h+o}}function MW(){return[aG(),AG(),TG(),vW(),SW()]}function FW(e){return{extensions:[oG(),MG(e),NG(),CW(e),kW()]}}const zW={tokenize:PW,partial:!0},j9={tokenize:HW,partial:!0},V9={tokenize:BW,partial:!0},$9={tokenize:_W,partial:!0},TW={tokenize:jW,partial:!0},G9={name:"wwwAutolink",tokenize:LW,previous:U9},W9={name:"protocolAutolink",tokenize:OW,previous:Y9},Ti={name:"emailAutolink",tokenize:DW,previous:X9},li={};function NW(){return{text:li}}let Il=48;for(;Il<123;)li[Il]=Ti,Il++,Il===58?Il=65:Il===91&&(Il=97);li[43]=Ti,li[45]=Ti,li[46]=Ti,li[95]=Ti,li[72]=[Ti,W9],li[104]=[Ti,W9],li[87]=[Ti,G9],li[119]=[Ti,G9];function DW(e,t,n){const r=this;let i,l;return o;function o(m){return!Xd(m)||!X9.call(r,r.previous)||Zd(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(m))}function u(m){return Xd(m)?(e.consume(m),u):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(TW,h,d)(m):m===45||m===95||Sn(m)?(l=!0,e.consume(m),c):h(m)}function d(m){return e.consume(m),i=!0,c}function h(m){return l&&i&&Mn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function LW(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!U9.call(r,r.previous)||Zd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zW,e.attempt(j9,e.attempt(V9,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function OW(e,t,n){const r=this;let i="",l=!1;return o;function o(m){return(m===72||m===104)&&Y9.call(r,r.previous)&&!Zd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),u):n(m)}function u(m){if(Mn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),u;if(m===58){const v=i.toLowerCase();if(v==="http"||v==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),l?d:(l=!0,c)):n(m)}function d(m){return m===null||_u(m)||Ht(m)||kl(m)||ju(m)?n(m):e.attempt(j9,e.attempt(V9,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function PW(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function HW(e,t,n){let r,i,l;return o;function o(d){return d===46||d===95?e.check($9,c,u)(d):d===null||Ht(d)||kl(d)||d!==45&&ju(d)?c(d):(l=!0,e.consume(d),o)}function u(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),o}function c(d){return i||r||!l?n(d):t(d)}}function BW(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check($9,t,l)(o):o===null||Ht(o)||kl(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function _W(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),l):u===93?(e.consume(u),i):u===60||u===null||Ht(u)||kl(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Ht(u)||kl(u)?t(u):r(u)}function l(u){return Mn(u)?o(u):n(u)}function o(u){return u===59?(e.consume(u),r):Mn(u)?(e.consume(u),o):n(u)}}function jW(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Sn(l)?n(l):t(l)}}function U9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ht(e)}function Y9(e){return!Mn(e)}function X9(e){return!(e===47||Xd(e))}function Xd(e){return e===43||e===45||e===46||e===95||Sn(e)}function Zd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const VW={tokenize:JW,partial:!0};function $W(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YW,continuation:{tokenize:XW},exit:ZW}},text:{91:{name:"gfmFootnoteCall",tokenize:UW},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GW,resolveTo:WW}}}}function GW(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!o||!o._balanced)return n(c);const d=jr(r.sliceSerialize({start:o.end,end:r.now()}));return d.codePointAt(0)!==94||!l.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function WW(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function UW(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(l>999||m===93&&!o||m===null||m===91||Ht(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return i.includes(jr(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Ht(m)||(o=!0),l++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),l++,d):d(m)}}function YW(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,u;return c;function c(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(y)}function h(y){if(o>999||y===93&&!u||y===null||y===91||Ht(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return l=jr(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Ht(y)||(u=!0),o++,e.consume(y),y===92?m:h}function m(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}function v(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(l)||i.push(l),pt(e,b,"gfmFootnoteDefinitionWhitespace")):n(y)}function b(y){return t(y)}}function XW(e,t,n){return e.check(Ho,t,e.attempt(VW,t,n))}function ZW(e){e.exit("gfmFootnoteDefinition")}function JW(e,t,n){const r=this;return pt(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function qW(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,u){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let d=c;for(;d--;)if(o[d][0]==="exit"&&o[d][1].type==="strikethroughSequenceTemporary"&&o[d][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[d][1].end.offset-o[d][1].start.offset){o[c][1].type="strikethroughSequence",o[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[d][1].start),end:Object.assign({},o[c][1].end)},m={type:"strikethroughText",start:Object.assign({},o[d][1].end),end:Object.assign({},o[c][1].start)},v=[["enter",h,u],["enter",o[d][1],u],["exit",o[d][1],u],["enter",m,u]],b=u.parser.constructs.insideSpan.null;b&&lr(v,v.length,0,Vu(b,o.slice(d+1,c),u)),lr(v,v.length,0,[["exit",m,u],["enter",o[c][1],u],["exit",o[c][1],u],["exit",h,u]]),lr(o,d-1,c-d+3,v),c=d+v.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function l(o,u,c){const d=this.previous,h=this.events;let m=0;return v;function v(y){return d===126&&h[h.length-1][1].type!=="characterEscape"?c(y):(o.enter("strikethroughSequenceTemporary"),b(y))}function b(y){const x=ua(d);if(y===126)return m>1?c(y):(o.consume(y),m++,b);if(m<2&&!n)return c(y);const w=o.exit("strikethroughSequenceTemporary"),E=ua(y);return w._open=!E||E===2&&!!x,w._close=!x||x===2&&!!E,u(y)}}}class KW{constructor(){this.map=[]}add(t,n,r){QW(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function QW(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function RW(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function eU(){return{flow:{null:{name:"table",tokenize:tU,resolveAll:nU}}}}function tU(e,t,n){const r=this;let i=0,l=0,o;return u;function u(P){let _=r.events.length-1;for(;_>-1;){const D=r.events[_][1].type;if(D==="lineEnding"||D==="linePrefix")_--;else break}const I=_>-1?r.events[_][1].type:null,V=I==="tableHead"||I==="tableRow"?C:c;return V===C&&r.parser.lazy[r.now().line]?n(P):V(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(o=!0,l+=1),h(P)}function h(P){return P===null?n(P):Ge(P)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b):n(P):ut(P)?pt(e,h,"whitespace")(P):(l+=1,o&&(o=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),m(P)))}function m(P){return P===null||P===124||Ht(P)?(e.exit("data"),h(P)):(e.consume(P),P===92?v:m)}function v(P){return P===92||P===124?(e.consume(P),m):m(P)}function b(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),o=!1,ut(P)?pt(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):y(P))}function y(P){return P===45||P===58?w(P):P===124?(o=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),x):k(P)}function x(P){return ut(P)?pt(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),E):P===45?(l+=1,E(P)):P===null||Ge(P)?z(P):k(P)}function E(P){return P===45?(e.enter("tableDelimiterFiller"),A(P)):k(P)}function A(P){return P===45?(e.consume(P),A):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),M):(e.exit("tableDelimiterFiller"),M(P))}function M(P){return ut(P)?pt(e,z,"whitespace")(P):z(P)}function z(P){return P===124?y(P):P===null||Ge(P)?!o||i!==l?k(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):k(P)}function k(P){return n(P)}function C(P){return e.enter("tableRow"),N(P)}function N(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),N):P===null||Ge(P)?(e.exit("tableRow"),t(P)):ut(P)?pt(e,N,"whitespace")(P):(e.enter("data"),O(P))}function O(P){return P===null||P===124||Ht(P)?(e.exit("data"),N(P)):(e.consume(P),P===92?L:O)}function L(P){return P===92||P===124?(e.consume(P),O):O(P)}}function nU(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],u=!1,c=0,d,h,m;const v=new KW;for(;++n<e.length;){const b=e[n],y=b[1];b[0]==="enter"?y.type==="tableHead"?(u=!1,c!==0&&(Z9(v,t,c,d,h),h=void 0,c=0),d={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},v.add(n,0,[["enter",d,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,m=void 0,l=[0,0,0,0],o=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},v.add(n,0,[["enter",h,t]])),i=y.type==="tableDelimiterRow"?2:h?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],m=Qu(v,t,l,i,void 0,m),l=[0,0,0,0]),o[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],m=Qu(v,t,l,i,void 0,m)),l=o,o=[l[1],n,0,0])):y.type==="tableHead"?(u=!0,c=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(c=n,l[1]!==0?(o[0]=o[1],m=Qu(v,t,l,i,n,m)):o[1]!==0&&(m=Qu(v,t,o,i,n,m)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&Z9(v,t,c,d,h),v.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=RW(t.events,n))}return e}function Qu(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(l.end=Object.assign({},da(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const c=da(t.events,n[1]);if(l={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const d=da(t.events,n[2]),h=da(t.events,n[3]),m={type:u,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const v=t.events[n[2]],b=t.events[n[3]];if(v[1].end=Object.assign({},b[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(l.end=Object.assign({},da(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Z9(e,t,n,r,i){const l=[],o=da(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function da(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const rU={name:"tasklistCheck",tokenize:lU};function iU(){return{text:{91:rU}}}function lU(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),l)}function l(c){return Ht(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(c)}function u(c){return Ge(c)?t(c):ut(c)?e.check({tokenize:aU},t,n)(c):n(c)}}function aU(e,t,n){return pt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function oU(e){return M8([NW(),$W(),qW(e),eU(),iU()])}const sU={};function J9(e){const t=this,n=e||sU,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(oU(n)),l.push(MW()),o.push(FW(n))}const uU=({id:e,value:t="",onChange:n,placeholder:r="Enter markdown content...",rows:i=8,disabled:l=!1,className:o,textareaClassName:u,previewClassName:c,defaultMode:d="markdown",mode:h,label:m,required:v=!1})=>{const[b,y]=a.useState(d),[x,w]=a.useState(!1),E=e||`md-input-${Math.random().toString(36).slice(2,11)}`,A=h??b,M=h!==void 0;return p.jsxs("div",{className:ce("flex flex-col gap-2",o),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[!M&&p.jsx("div",{className:"flex items-center gap-2",children:p.jsxs("div",{className:"inline-flex grow-0 p-1 rounded-lg bg-neutral-100 dark:bg-black-700 w-auto",children:[p.jsx("button",{className:ce("rounded-md p-1 flex items-center justify-center",A==="markdown"?"bg-white dark:bg-black-700 !text-neutral-900 dark:!text-neutral-100":""),onClick:()=>y("markdown"),disabled:l,children:p.jsx(Ae,{variant:"semibold",size:"extra-small",appearance:"subtitle",className:ce(A==="markdown"?"!text-neutral-900 dark:!text-neutral-100":""),children:"Markdown"})}),p.jsx("button",{className:ce("rounded-md p-1 flex items-center justify-center",A==="preview"?"bg-white dark:bg-black-700 !text-neutral-900 dark:!text-neutral-100":""),onClick:()=>y("preview"),disabled:l,children:p.jsx(Ae,{variant:"semibold",size:"extra-small",appearance:"subtitle",className:ce(A==="preview"?"!text-neutral-900 dark:!text-neutral-100":""),children:"Preview"})})]})}),m&&p.jsxs("label",{htmlFor:E,className:"text-xs font-medium text-gray-600 dark:text-gray-300",children:[m,v&&p.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),p.jsx("div",{className:"relative",children:A==="markdown"?p.jsx("textarea",{id:E,value:t,onChange:z=>n(z.target.value),placeholder:r,rows:i,disabled:l,required:v,className:ce("w-full border rounded-lg bg-white dark:bg-black-600","py-2.5 px-3 font-inter font-medium text-sm","text-gray-900 dark:text-gray-100","placeholder:text-gray-400 dark:placeholder:text-gray-500","transition-colors duration-200","focus:ring-2 focus:outline-none resize-vertical","border-gray-300 dark:border-gray-600","focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20",{"bg-gray-50 dark:bg-gray-700 text-gray-400 dark:text-gray-500 cursor-not-allowed":l},u),onClick:z=>z.stopPropagation()}):p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:ce("w-full rounded-lg","py-2.5 px-3 min-h-[calc(2.5rem*var(--rows,8))] max-h-[calc(1rem*var(--rows,8))]","overflow-y-auto text-sm",c),style:{"--rows":i},children:p.jsx("div",{className:"markdown-preview text-gray-900 dark:text-gray-100 [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-4 [&_h1]:mt-2 [&_h2]:text-xl [&_h2]:font-bold [&_h2]:mb-3 [&_h2]:mt-2 [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:mb-2 [&_h3]:mt-2 [&_p]:mb-2 [&_p]:leading-relaxed [&_ul]:list-disc [&_ul]:ml-6 [&_ul]:mb-2 [&_ol]:list-decimal [&_ol]:ml-6 [&_ol]:mb-2 [&_li]:mb-1 [&_code]:bg-gray-100 [&_code]:dark:bg-gray-800 [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-sm [&_code]:font-mono [&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-3 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:mb-2 [&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:dark:border-gray-600 [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:mb-2 [&_a]:text-blue-600 [&_a]:dark:text-blue-400 [&_a]:underline [&_strong]:font-bold [&_em]:italic [&_table]:w-full [&_table]:border-collapse [&_table]:mb-2 [&_th]:border [&_th]:border-gray-300 [&_th]:dark:border-gray-600 [&_th]:px-2 [&_th]:py-1 [&_th]:bg-gray-50 [&_th]:dark:bg-gray-700 [&_th]:font-semibold [&_td]:border [&_td]:border-gray-300 [&_td]:dark:border-gray-600 [&_td]:px-2 [&_td]:py-1 [&_hr]:my-4 [&_hr]:border-gray-300 [&_hr]:dark:border-gray-600",children:p.jsx(b9,{remarkPlugins:[J9],children:t||"*No content to preview*"})})}),p.jsx("button",{onClick:()=>w(!0),className:"absolute bottom-2 right-2 p-1 rounded-md bg-neutral-100 dark:bg-black-600 hover:bg-gray-200 dark:hover:bg-black-500 transition-colors shadow-sm flex items-center justify-center",title:"Expand preview",type:"button",children:p.jsx(dt.OpenInFull,{sx:{fontSize:"16px"},className:"text-neutral-600 dark:text-neutral-400"})})]})}),p.jsx(Zi,{open:x,onCancel:()=>w(!1),title:"Markdown Preview",width:800,footer:null,children:p.jsx("div",{className:"markdown-preview max-h-[70vh] overflow-y-auto text-gray-900 dark:text-gray-100 [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-4 [&_h1]:mt-2 [&_h2]:text-xl [&_h2]:font-bold [&_h2]:mb-3 [&_h2]:mt-2 [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:mb-2 [&_h3]:mt-2 [&_p]:mb-2 [&_p]:leading-relaxed [&_ul]:list-disc [&_ul]:ml-6 [&_ul]:mb-2 [&_ol]:list-decimal [&_ol]:ml-6 [&_ol]:mb-2 [&_li]:mb-1 [&_code]:bg-gray-100 [&_code]:dark:bg-gray-800 [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-sm [&_code]:font-mono [&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-3 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:mb-2 [&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:dark:border-gray-600 [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:mb-2 [&_a]:text-blue-600 [&_a]:dark:text-blue-400 [&_a]:underline [&_strong]:font-bold [&_em]:italic [&_table]:w-full [&_table]:border-collapse [&_table]:mb-2 [&_th]:border [&_th]:border-gray-300 [&_th]:dark:border-gray-600 [&_th]:px-2 [&_th]:py-1 [&_th]:bg-gray-50 [&_th]:dark:bg-gray-700 [&_th]:font-semibold [&_td]:border [&_td]:border-gray-300 [&_td]:dark:border-gray-600 [&_td]:px-2 [&_td]:py-1 [&_hr]:my-4 [&_hr]:border-gray-300 [&_hr]:dark:border-gray-600",children:p.jsx(b9,{remarkPlugins:[J9],children:t||"*No content to preview*"})})})]})};function cU(e){return pi({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function dU(e){return pi({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}const{Dragger:fU}=st.Upload,hU=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`,mU=(e,t=20)=>e?e.length<=t?e:e.slice(0,t-7)+"...."+e.slice(-7):"",q9=a.forwardRef(({id:e,onFileChange:t,description:n,errorMessage:r,disabled:i=!1,defaultFile:l=null,acceptedFiles:o="*",isLoading:u=!1,asBase64:c=!1,toFileServer:d=!1,setFileUploading:h,fileUploading:m=!1,multiple:v=!1,getRealFileName:b=!1,maxSize:y=50*1024*1024,onUpload:x,onDelete:w,wrapperClassName:E,uploadClassName:A,showFileSize:M=!0,formatFileSize:z=hU},k)=>{const[C,N]=a.useState(null),[O,L]=a.useState([]),[P,_]=a.useState("#d9d9d9"),[I,V]=a.useState(!1),[D,F]=a.useState(null),B=a.useCallback(async()=>{if(x)try{const $=await x(O),T=v?$?.map(K=>K?.fileUrl):$?.[0]?.fileUrl,X=b?C?.name:$?.[0]?.fileName;t(T,X),h?.(null)}catch($){console.error("Upload failed:",$),h?.(null)}},[x,O,v,C,b,t,h]),Y={accept:o,multiple:v,showUploadList:!1,disabled:i,onRemove:()=>{L([])},beforeUpload:($,T)=>{if($.size>y){const X=(y/1048576).toFixed(0);return console.error(`File size exceeds ${X}MB limit`),!1}return N($),d?(h?.(e||"field-file-upload"),L(T)):(c?Promise.all((v?T:[$]).map(X=>new Promise(K=>{const j=new FileReader;j.onload=ne=>{K({filename:X.name,content:ne?.target?.result?.split(",")[1]})},j.readAsDataURL(X)}))).then(X=>{t(v?X:X[0])}):t($),N($)),!1}},U=async()=>{if(d&&D&&w)try{await w(D),F(null)}catch($){console.error("Delete failed:",$)}N(null),L([]),t(null)};return a.useEffect(()=>{_(r?"#EF4444":"#d9d9d9")},[r]),a.useEffect(()=>{O.length&&d&&B()},[O,d,B]),a.useEffect(()=>{l?.name&&N(l)},[l]),p.jsxs("div",{ref:k,className:ce("w-full",E),children:[p.jsx("div",{className:"h-32",onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),children:p.jsx(fU,{...Y,className:A,style:{borderColor:I&&!r?"#1890ff":P},disabled:i||m,children:C?p.jsxs("div",{className:"flex items-center justify-between mx-5",title:C?.name||l?.name||"",children:[p.jsxs("div",{className:"flex items-center justify-center gap-4",children:[C?.type==="application/pdf"?p.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:p.jsx(rL,{size:20,fill:"#006CCF"})}):p.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:p.jsx(dt.DescriptionRounded,{sx:{height:"20px",width:"20px",color:"#006CCF"}})}),p.jsxs("div",{className:"text-left",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"font-inter text-md font-medium text-base",children:mU(C?.name||l?.name||"")}),m?p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:"Uploading..."}):M&&C?.size>0?p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:z(C.size)}):null]})]}),u?p.jsx(E6,{size:40,className:"spinner text-primary-600"}):p.jsx("button",{id:`btn-file-upload-${e}`,className:"ml-4",onClick:$=>{$.stopPropagation(),U()},disabled:i,type:"button","aria-label":"Delete file",children:p.jsx(dU,{size:20,className:"text-gray-400"})})]}):p.jsx("div",{className:"flex items-center justify-center",children:p.jsxs("div",{className:"flex-col",children:[p.jsx("div",{className:"mb-4 flex justify-center",children:p.jsx(cU,{size:24,className:"text-gray-400"})}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center justify-center",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:"Click to upload"}),p.jsx(Ae,{size:"small",variant:"medium",className:"ml-1",appearance:"subtitle",children:"or drag and drop"})]}),n?p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:n}):null]})]})})})}),r&&p.jsx(Ae,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:r})]})});q9.displayName="MultiFileUpload";const{Dragger:pU}=st.Upload,gU=200*1024*1024,vU=(e,t,n,r,i)=>{const l={small:"h-24",medium:"h-32",large:"h-40"},o={primary:"border-blue-200 hover:border-blue-400",secondary:"border-gray-200 hover:border-gray-400"};return ce("border-2 border-dashed rounded-lg transition-colors duration-200",l[e],o[t],{"border-red-400 bg-red-50":r,"cursor-not-allowed opacity-50":n,"cursor-pointer":!n})},bU=()=>p.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:p.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),xU=()=>p.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:p.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z",clipRule:"evenodd"})})}),yU=()=>p.jsx("svg",{className:"w-6 h-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),wU=()=>p.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),K9=a.forwardRef(({id:e,onFileSelect:t,onUpload:n,description:r,errorMessage:i,disabled:l=!1,defaultFile:o=null,acceptedFiles:u="*",isLoading:c=!1,asBase64:d=!1,multiple:h=!1,hideSelectedFile:m=!1,onDelete:v,maxSize:b=gU,wrapperClassName:y,uploadClassName:x,size:w="medium",variant:E="primary",uploadIcon:A,deleteIcon:M,fileTypeIcons:z,showFileSize:k=!0,showProgress:C=!1,progress:N=0},O)=>{const[L,P]=a.useState(null),[_,I]=a.useState(!1),V=($,T)=>{if($.size>b){const X=Math.round(b/1048576);return console.error(`File size exceeds the limit of ${X} MB`),st.Upload.LIST_IGNORE}if(m||P($),d){const X=new FileReader;X.onload=K=>{const j=K?.target?.result;t(j,$.name)},X.readAsDataURL($)}else t(h?T:$,$.name);return n&&n(h?T:$),st.Upload.LIST_IGNORE},D=()=>{P(null),t(null),v?.()},F=$=>{if($===0)return"0 Bytes";const T=1024,X=["Bytes","KB","MB","GB"],K=Math.floor(Math.log($)/Math.log(T));return parseFloat(($/Math.pow(T,K)).toFixed(2))+" "+X[K]},B=$=>$.length<=30?$:`${$.slice(0,23)}....${$.slice(-7)}`,Y=$=>$.type==="application/pdf"?z?.pdf||p.jsx(bU,{}):z?.default||p.jsx(xU,{});a.useEffect(()=>{o&&P(o)},[o]);const U={accept:u,multiple:h,showUploadList:!1,disabled:l,beforeUpload:V};return p.jsxs("div",{ref:O,className:ce("w-full",y),children:[p.jsx("div",{className:ce(vU(w,E,l,!!i),x),onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),role:"button",tabIndex:l?-1:0,"aria-label":"File upload area",children:p.jsx(pU,{...U,children:L&&!m?p.jsxs("div",{className:"flex items-center justify-between mx-5",title:L.name,children:[p.jsxs("div",{className:"flex items-center gap-4",children:[Y(L),p.jsxs("div",{className:"text-left",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"text-neutral-900 font-medium",children:B(L.name)}),k&&L.size>0&&p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:F(L.size)}),C&&N>0&&p.jsxs("div",{className:"mt-1",children:[p.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1",children:p.jsx("div",{className:"bg-blue-600 h-1 rounded-full transition-all duration-300",style:{width:`${N}%`}})}),p.jsxs(Ae,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[N,"% uploaded"]})]})]})]}),c?p.jsx("div",{className:"animate-spin",children:p.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}):p.jsx("button",{className:"ml-4 p-1 hover:bg-gray-100 rounded",onClick:$=>{$.stopPropagation(),D()},disabled:l,type:"button","aria-label":"Delete file",children:M||p.jsx(wU,{})})]}):p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("div",{className:"mb-4 flex justify-center",children:A||p.jsx(yU,{})}),p.jsxs("div",{className:"text-center",children:[p.jsxs("div",{className:"flex items-center justify-center gap-1",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"text-blue-600 dark:text-blue-300",appearance:"custom",children:"Click to upload"}),p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:"or drag and drop"})]}),r&&p.jsx(Ae,{size:"small",variant:"medium",className:"text-neutral-400 mt-1",children:r})]})]})})})}),i&&p.jsx(Ae,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:i})]})});K9.displayName="FileUpload";const EU=[...Object.keys(Ms).filter(e=>e?.endsWith("Rounded"))||[],...(X7||[]).map(e=>`flag-${e}`)],CU=e=>{if(e?.startsWith("flag-")){const t=e?.replace("flag-","");return td(t||"")||t}return e.replaceAll(/([A-Z])/g," $1").trim()},SU=({onChange:e,selectedIcon:t,setOpen:n})=>{const[r,i]=a.useState(""),l=(EU||[]).filter(u=>{if(u?.startsWith("flag-")){const c=u?.replace("flag-","");return c?.toLowerCase()?.includes(r?.trim()?.toLowerCase()||"")||td(c||"")?.toLowerCase()?.includes(r?.trim()?.toLowerCase()||"")}return u?.trim()?.toLowerCase()?.includes(r?.trim()?.toLowerCase()||"")}),o=(u,c)=>{if(c.stopPropagation(),t===u){e?.(null);return}e?.(u),n?.(!1)};return p.jsxs("div",{className:"flex flex-col gap-3",children:[p.jsx(I1,{id:"input-field-icon-picker",placeholder:"Search icons...",onChange:u=>i(u||""),fieldSuffix:p.jsx(Ms.Search,{sx:{width:16,height:16,color:"rgb(152 162 179)"}})}),p.jsx(RE.FixedSizeGrid,{columnCount:5,rowCount:Math.ceil((l?.length||0)/5),columnWidth:40,rowHeight:40,width:220,height:240,children:({columnIndex:u,rowIndex:c,style:d})=>{const h=c*5+u,m=l?.[h];return m?p.jsx("div",{style:{...d,padding:"4px"},children:p.jsx(st.Tooltip,{title:CU(m),children:p.jsx(eC.IconButton,{className:ce("flex items-center justify-center !rounded-md hover:bg-neutral-200 dark:hover:bg-black-700",{"!bg-primary-50 dark:!bg-black-800":t===m}),onClick:v=>o(m,v),children:p.jsx(Jd,{iconName:m,sx:{width:20,height:20},className:"text-neutral-900 dark:text-white"})})})}):null}})]})},Jd=({iconName:e,sx:t,className:n,isHovering:r})=>{if(e?.startsWith?.("flag-")){const l=e?.replace("flag-","");return au?.(l||"",r||!1)||p.jsx("div",{children:"-"})}const i=Ms?.[e];return i?p.jsx(i,{sx:t,className:n,isHovering:r}):p.jsx("div",{children:"-"})},kU=({selectedIcon:e,onChange:t,label:n,required:r=!1,allowClear:i=!0,disabled:l=!1,errorMessage:o})=>{const[u,c]=a.useState(!1),d=h=>{h.stopPropagation(),t?.("")};return p.jsx(st.Popover,{arrow:!1,placement:"bottom",trigger:"click",getPopupContainer:h=>h?.parentElement||document.body,open:u,onOpenChange:c,content:p.jsx(SU,{onChange:t,selectedIcon:e,setOpen:c}),children:p.jsxs("div",{className:"flex flex-col gap-1",children:[n?p.jsxs(Ae,{size:"extra-small",variant:"medium",appearance:"body",children:[n,r&&p.jsx("span",{className:"text-red-500",children:"*"})]}):null,p.jsxs("button",{id:`btn-icon-picker-icon-${e?"selected":"unselected"}`,className:`min-w-[83px] py-1.5 px-3 rounded-md border ${l?"cursor-not-allowed opacity-60 bg-neutral-50 dark:bg-black-800":"bg-white dark:bg-black-800"} ${o?"border-red-500":"focus:border-primary-200 "} flex items-center justify-between gap-2`,disabled:l,onClick:h=>{l&&(h.preventDefault(),h.stopPropagation())},children:[e?p.jsx(Jd,{iconName:e,sx:{width:20,height:20},className:"text-neutral-900 dark:text-white"}):p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:"Select Icon"}),e&&i&&!l?p.jsx(Ms.CloseRounded,{sx:{width:20,height:20},className:"hover:bg-neutral-100 dark:hover:bg-black-800 rounded-full transition-colors cursor-pointer text-neutral-400 dark:text-neutral-500",onClick:d}):null]}),o&&p.jsx(Ae,{size:"extra-small",className:"text-red-500 font-medium",children:o})]})})},IU=a.lazy(()=>Promise.resolve({default:e=>p.jsx(a.Suspense,{fallback:p.jsx("div",{className:"min-w-[83px] h-[30px] animate-pulse bg-neutral-100 dark:bg-black-800 rounded-md"}),children:p.jsx(kU,{...e})})})),Q9=a.forwardRef(({status:e,children:t,className:n,size:r="medium","aria-label":i},l)=>{const o=()=>{switch(r){case"small":return"text-xs px-1.5 py-0.5";case"large":return"text-base px-3 py-1.5";default:return"text-sm px-2 py-1"}},u=()=>{switch(e?.toLowerCase()){case"purple":return"bg-purple-50 text-purple-500 border border-purple-100 dark:bg-purple-950 dark:text-purple-400 dark:border-purple-800";case"blue":return"bg-blue-50 text-blue-500 border border-blue-100 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800";case"teal":return"bg-teal-50 text-teal-500 border border-teal-100 dark:bg-teal-950 dark:text-teal-400 dark:border-teal-800";case"green":return"bg-green-50 text-green-500 border border-green-100 dark:bg-green-950 dark:text-green-400 dark:border-green-800";case"yellow":return"bg-yellow-50 text-yellow-600 border border-yellow-100 dark:bg-yellow-950 dark:text-yellow-400 dark:border-yellow-800";case"orange":return"bg-orange-50 text-orange-500 border border-orange-100 dark:bg-orange-950 dark:text-orange-400 dark:border-orange-800";case"peach":return"bg-orange-50 text-orange-400 border border-orange-100 dark:bg-orange-950 dark:text-orange-300 dark:border-orange-800";case"red":return"bg-red-50 text-red-500 border border-red-100 dark:bg-red-950 dark:text-red-400 dark:border-red-800";case"navy":return"bg-slate-50 text-slate-700 border border-slate-100 dark:bg-slate-950 dark:text-slate-400 dark:border-slate-800";case"grey":return"bg-neutral-50 text-neutral-500 border border-neutral-100 dark:bg-neutral-950 dark:text-neutral-400 dark:border-neutral-800";default:return"bg-blue-50 text-blue-600 border border-blue-200 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800"}};return p.jsx("span",{ref:l,className:ce("inline-flex items-center justify-center font-medium rounded-md transition-colors",o(),u(),n),"aria-label":i||`Status: ${e||"default"}`,role:"status",children:t})});Q9.displayName="StatusColorMapping";const R9=a.forwardRef(({status:e="default",children:t,appearance:n="outline",size:r="md",className:i,isRounded:l=!1,capitalize:o=!0,"aria-label":u},c)=>{const d=y=>!y||!o?y:y.replace(/\w\S*/g,x=>x.charAt(0).toUpperCase()+x.substr(1).toLowerCase()),h=()=>{switch(r){case"sm":return"text-xs px-1.5 py-0.5";case"lg":return"text-sm px-3 py-1.5";default:return"text-xs px-2 py-1"}},m=()=>{switch(e){case"primary":case"default":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";case"warning":return"bg-yellow-50 dark:bg-yellow-950 text-yellow-600 dark:text-yellow-300 border border-yellow-300 dark:border-yellow-700";case"error":return"bg-red-50 dark:bg-red-950 text-red-600 dark:text-red-300 border border-red-300 dark:border-red-700";case"neutral":return"bg-neutral-50 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-neutral-300 dark:border-neutral-700";case"success":return"bg-green-50 dark:bg-green-950 text-green-600 dark:text-green-300 border border-green-300 dark:border-green-700";case"info":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";default:return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700"}},v=()=>{switch(e){case"primary":case"default":return"bg-blue-600 dark:bg-blue-700 text-white";case"warning":return"bg-yellow-600 dark:bg-yellow-700 text-white";case"success":return"bg-green-600 dark:bg-green-700 text-white";case"error":return"bg-red-600 dark:bg-red-700 text-white";case"neutral":return"bg-neutral-600 dark:bg-neutral-700 text-white";case"info":return"bg-blue-600 dark:bg-blue-700 text-white";default:return"bg-blue-600 dark:bg-blue-700 text-white"}},b=()=>n==="filled"?v():m();return p.jsx("span",{ref:c,className:ce("inline-flex items-center justify-center font-medium transition-colors",l?"rounded-full":"rounded",h(),b(),i),"aria-label":u||`Badge: ${e}`,role:"status",children:d(t)})});R9.displayName="Badge";const Ru=({title:e,children:t})=>e?p.jsx(p.Fragment,{children:t}):null;Ru.displayName="HelmetTitle";const eb=({children:e,className:t="",title:n,style:r,id:i})=>p.jsxs(p.Fragment,{children:[p.jsx(Ru,{title:n}),p.jsx("div",{className:`bg-white dark:bg-black-800 border border-neutral-200 dark:border-black-600 rounded-lg shadow-100 w-full flex flex-col ${t}`,style:r,id:i,children:e})]});eb.displayName="Card";const qd=e=>e===1||e==="1"||typeof e=="string"&&e.toLowerCase()==="yes"||typeof e=="string"&&e.toLowerCase()==="true"?"Yes":e===0||e==="0"||typeof e=="string"&&e.toLowerCase()==="no"||typeof e=="string"&&e.toLowerCase()==="false"?"No":e?.toString()||"-",ec=(e,t="USD")=>{try{if(e==null)return"";const n=Number(e);if(isNaN(n))return e?.toString()||"";const r=n.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return`${{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$",CHF:"CHF",CNY:"¥",SEK:"kr",NOK:"kr",DKK:"kr",PLN:"zł",CZK:"Kč",HUF:"Ft",RUB:"₽",BRL:"R$",INR:"₹",KRW:"₩",SGD:"S$",HKD:"HK$",NZD:"NZ$",MXN:"$",ZAR:"R",TRY:"₺",ILS:"₪",AED:"د.إ",SAR:"﷼",QAR:"﷼",KWD:"د.ك",BHD:"د.ب",OMR:"﷼",JOD:"د.ا",LBP:"ل.ل",EGP:"£",MAD:"د.م.",TND:"د.ت",DZD:"د.ج",LYD:"ل.د",SDG:"ج.س.",ETB:"Br",KES:"KSh",UGX:"USh",TZS:"TSh",ZMW:"ZK",BWP:"P",ZWL:"Z$",AOA:"Kz",MZN:"MT",GHS:"₵",NGN:"₦",XAF:"FCFA",XOF:"CFA",CDF:"FC",RWF:"RF",BIF:"FBu",KMF:"CF",DJF:"Fdj",SOS:"S",ERN:"Nfk"}[t]||"$"}${r}`}catch{return"-"}},Wo=(e,t={})=>{const{format:n,relative:r=!1,withTime:i=!0,fallback:l="-",skipTimezone:o=!1,onlyTime:u=!1}=t||{};if(!e)return l;try{const c=new Date(e);if(isNaN(c.getTime()))return l;if(r){const b=Math.floor((new Date().getTime()-c.getTime())/1e3);return b<60?"just now":b<3600?`${Math.floor(b/60)} minutes ago`:b<86400?`${Math.floor(b/3600)} hours ago`:b<2592e3?`${Math.floor(b/86400)} days ago`:b<31536e3?`${Math.floor(b/2592e3)} months ago`:`${Math.floor(b/31536e3)} years ago`}const d="MM/dd/yyyy",h="hh:mm a",m=i&&!u;return c.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:i?"2-digit":void 0,minute:i?"2-digit":void 0,hour12:!0})}catch{return l}},tb=e=>typeof e=="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(e),nb=a.forwardRef(({label:e,value:t,className:n,type:r="string",tags:i,tooltip:l,items:o,isModified:u=!1,isChanged:c=!1,size:d="medium",isHighlighted:h=!1,deletedValue:m,highlightColor:v="warning",isSearchActive:b=!1,originalValue:y=!1,showDiff:x=!1,isLiveField:w=!1,deltaChange:E,theme:A="light",onUpload:M,acceptsUpload:z=!1,MasterDataModal:k,riskDetails:C,isRiskAnalysisOpen:N=!1,RiskDetailsCard:O,"aria-label":L},P)=>{const[_,I]=a.useState(!0),[V,D]=a.useState(!1),[F,B]=a.useState(null),[Y,U]=a.useState(!1),$=()=>{I(!_)},T=ae=>{D(!0),B({...ae,value:t})},X=()=>{D(!1),B(null)},K=ae=>{const oe=ae.target.files?.[0];oe&&M&&M(oe),ae.target.value=""},j=()=>{const ae=typeof t=="string"&&tb(t);if(b&&typeof t=="object")return t;if(t||r==="boolean"&&t===0||r==="currency"&&Number(t)>=0){if((t===!0||t==="True")&&!y)return"Yes";if((t===!1||t==="False")&&!y)return"No";if(r==="url")return p.jsx("a",{href:t,className:"text-primary-600 truncate",children:t});if(r==="boolean")return qd(t);if(r==="currency")return ec(t,o?.currency_code)||"-";if(r==="datetime"){const oe=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return Wo(oe,{skipTimezone:!1,withTime:!0})}else if(r==="date"||ae){const oe=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return Wo(oe,{skipTimezone:!0,withTime:!1})}else return r==="percentage"?`${t}%`:typeof t=="string"&&t.length>100?p.jsxs("p",{children:[t.slice(0,_?100:t.length),_?"... ":" ",p.jsx("button",{id:`btn-label-value-${_?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:$,onKeyDown:oe=>{(oe.key==="Enter"||oe.key===" ")&&(oe.preventDefault(),$())},"aria-label":_?"Show more content":"Show less content",type:"button",children:_?"Show more":"Show less"})]}):t}return"-"},ne=()=>{switch(d){case"small":return"extra-small";case"large":return"large";default:return"small"}},se=()=>{switch(v){case"success":return"bg-success-100";case"warning":return"bg-warning-100";case"error":return"bg-error-100";case"info":return"bg-info-100";default:return"bg-warning-100"}};return p.jsxs("div",{ref:P,className:ce("font-medium relative",n),onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),"aria-label":L||`Label: ${e}, Value: ${t}`,children:[p.jsxs(Ae,{variant:"medium",size:ne(),className:"flex gap-1 flex-wrap",appearance:"subtitle",children:[e," ",p.jsx(qn,{labels:i?.map(ae=>({...ae,color:ae.color||"primary"}))}),w&&p.jsx(dt.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),i&&i.length>0&&p.jsx(p.Fragment,{children:i.map(ae=>p.jsx(di,{label:ae.label,color:ae.color,size:"xs",theme:A},`${ae.label}-${ae.value||ae.color}`))}),l&&p.jsx(st.Tooltip,{placement:"top",title:l,children:p.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&ae.preventDefault()},children:p.jsx(pr,{size:14})})})]}),p.jsxs(Ae,{variant:"medium",size:ne(),className:ce("text-- whitespace-normal break-all flex gap-1 pt-0.5",u&&"bg-neutral-50 dark:bg-black-700 p-1 rounded",N&&C?.color&&`bg-${C.color}-50 border-${C.color}-300 px-0.5 rounded-lg`),appearance:"body",children:[x&&m&&t?p.jsxs("div",{className:"flex gap-2",children:[p.jsx("span",{className:"line-through",children:m}),p.jsx("span",{children:j()})]}):c||h?p.jsx("mark",{className:ce("rounded-md py-0.5 px-1",se()),children:j()}):j(),r==="currency"&&E!==0&&E!==void 0&&E!==null&&p.jsxs(Ot.motion.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},transition:{duration:.25},className:ce("inline-flex items-center gap-1 ml-1.5 text-xs font-medium",E>0?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:[p.jsx("span",{className:"flex items-center justify-center w-4 h-4",children:E>0?p.jsx(dt.ArrowUpwardRounded,{sx:{fontSize:16},className:"text-emerald-600 dark:text-emerald-400"}):p.jsx(dt.ArrowDownwardRounded,{sx:{fontSize:16},className:"text-red-600 dark:text-red-400"})}),p.jsx("span",{children:ec(Math.abs(E),o?.currency_code||"USD")})]}),o?.is_master_data&&o?.reference&&t&&p.jsx("button",{onClick:()=>T(o),onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),T(o))},"aria-label":`Search master data for ${e}`,type:"button",className:"cursor-pointer",children:p.jsx(op,{width:20,height:20})}),z&&p.jsx("input",{type:"file",onChange:K,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`})]}),m&&!x&&p.jsx(Ae,{variant:"medium",size:"extra-small",className:"pt-0.5",appearance:"body",children:p.jsx("mark",{className:"rounded-md py-0.5 px-1 bg-error-100",children:p.jsx("del",{children:m||r==="boolean"&&m==="0"?m==="True"?"Yes":m==="False"?"No":r==="boolean"?qd(m):r==="currency"?ec(m,o?.currency_code):r==="date"?Wo(m,{skipTimezone:!0,withTime:!1}):r==="datetime"?Wo(m,{skipTimezone:!0,withTime:!0}):r==="percentage"?`${m}%`:m.length>100?p.jsxs("p",{children:[m.slice(0,_?100:m.length),_?"... ":" ",p.jsx("button",{id:`btn-label-value-${_?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:$,children:_?"Show more":"Show less"})]}):m:"-"})})}),k&&p.jsx(k,{isVisible:V,onClose:X,masterdataInfo:F}),Y&&C&&N&&p.jsx("div",{className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:ae=>ae.stopPropagation(),onMouseDown:ae=>ae.preventDefault(),onKeyDown:ae=>{ae.key==="Escape"&&U(!1)},role:"tooltip","aria-label":"Risk analysis details",tabIndex:0,children:O?p.jsx(O,{riskDetails:C}):p.jsx("div",{className:"shadow-lg p-4",children:p.jsxs("div",{className:"text-sm",children:[p.jsx("h4",{className:"font-semibold mb-2",children:"Risk Details"}),p.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:C.description||"Risk analysis information"})]})})})]})});nb.displayName="LabelValue";const rb=e=>e,AU=(()=>{let e=rb;return{configure(t){e=t},generate(t){return e(t)},reset(){e=rb}}})();function el(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Al(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":el(7));return e.charAt(0).toUpperCase()+e.slice(1)}var tc={exports:{}},nc={exports:{}},kt={};/** @license React v16.13.1
175
+ `))}function c(b,y,x,w){const E=x.enter("tableCell"),A=x.enter("phrasing"),M=x.containerPhrasing(b,{...w,before:l,after:l});return A(),E(),M}function d(b,y){return HG(b,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function h(b,y,x){const w=b.children;let E=-1;const A=[],M=y.enter("table");for(;++E<w.length;)A[E]=m(w[E],y,x);return M(),A}function m(b,y,x){const w=b.children;let E=-1;const A=[],M=y.enter("tableRow");for(;++E<w.length;)A[E]=c(w[E],b,y,x);return M(),A}function v(b,y,x){let w=H9.inlineCode(b,y,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function SW(){return{exit:{taskListCheckValueChecked:_9,taskListCheckValueUnchecked:_9,paragraph:IW}}}function kW(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:AW}}}function _9(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function IW(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const u=i[l];if(u.type==="paragraph"){o=u;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function AW(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);l&&u.move(o);let c=H9.listItem(e,t,n,{...r,...u.current()});return l&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(h){return h+o}}function MW(){return[aG(),AG(),TG(),vW(),SW()]}function FW(e){return{extensions:[oG(),MG(e),NG(),CW(e),kW()]}}const zW={tokenize:PW,partial:!0},j9={tokenize:HW,partial:!0},V9={tokenize:BW,partial:!0},$9={tokenize:_W,partial:!0},TW={tokenize:jW,partial:!0},G9={name:"wwwAutolink",tokenize:LW,previous:U9},W9={name:"protocolAutolink",tokenize:OW,previous:Y9},Ti={name:"emailAutolink",tokenize:DW,previous:X9},li={};function NW(){return{text:li}}let Il=48;for(;Il<123;)li[Il]=Ti,Il++,Il===58?Il=65:Il===91&&(Il=97);li[43]=Ti,li[45]=Ti,li[46]=Ti,li[95]=Ti,li[72]=[Ti,W9],li[104]=[Ti,W9],li[87]=[Ti,G9],li[119]=[Ti,G9];function DW(e,t,n){const r=this;let i,l;return o;function o(m){return!Xd(m)||!X9.call(r,r.previous)||Zd(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(m))}function u(m){return Xd(m)?(e.consume(m),u):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(TW,h,d)(m):m===45||m===95||Sn(m)?(l=!0,e.consume(m),c):h(m)}function d(m){return e.consume(m),i=!0,c}function h(m){return l&&i&&Mn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function LW(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!U9.call(r,r.previous)||Zd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zW,e.attempt(j9,e.attempt(V9,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function OW(e,t,n){const r=this;let i="",l=!1;return o;function o(m){return(m===72||m===104)&&Y9.call(r,r.previous)&&!Zd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),u):n(m)}function u(m){if(Mn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),u;if(m===58){const v=i.toLowerCase();if(v==="http"||v==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),l?d:(l=!0,c)):n(m)}function d(m){return m===null||_u(m)||Ht(m)||kl(m)||ju(m)?n(m):e.attempt(j9,e.attempt(V9,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function PW(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function HW(e,t,n){let r,i,l;return o;function o(d){return d===46||d===95?e.check($9,c,u)(d):d===null||Ht(d)||kl(d)||d!==45&&ju(d)?c(d):(l=!0,e.consume(d),o)}function u(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),o}function c(d){return i||r||!l?n(d):t(d)}}function BW(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check($9,t,l)(o):o===null||Ht(o)||kl(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function _W(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),l):u===93?(e.consume(u),i):u===60||u===null||Ht(u)||kl(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Ht(u)||kl(u)?t(u):r(u)}function l(u){return Mn(u)?o(u):n(u)}function o(u){return u===59?(e.consume(u),r):Mn(u)?(e.consume(u),o):n(u)}}function jW(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Sn(l)?n(l):t(l)}}function U9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ht(e)}function Y9(e){return!Mn(e)}function X9(e){return!(e===47||Xd(e))}function Xd(e){return e===43||e===45||e===46||e===95||Sn(e)}function Zd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const VW={tokenize:JW,partial:!0};function $W(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YW,continuation:{tokenize:XW},exit:ZW}},text:{91:{name:"gfmFootnoteCall",tokenize:UW},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GW,resolveTo:WW}}}}function GW(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!o||!o._balanced)return n(c);const d=jr(r.sliceSerialize({start:o.end,end:r.now()}));return d.codePointAt(0)!==94||!l.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function WW(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function UW(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(l>999||m===93&&!o||m===null||m===91||Ht(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return i.includes(jr(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Ht(m)||(o=!0),l++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),l++,d):d(m)}}function YW(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,u;return c;function c(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(y)}function h(y){if(o>999||y===93&&!u||y===null||y===91||Ht(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return l=jr(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Ht(y)||(u=!0),o++,e.consume(y),y===92?m:h}function m(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}function v(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(l)||i.push(l),pt(e,b,"gfmFootnoteDefinitionWhitespace")):n(y)}function b(y){return t(y)}}function XW(e,t,n){return e.check(Ho,t,e.attempt(VW,t,n))}function ZW(e){e.exit("gfmFootnoteDefinition")}function JW(e,t,n){const r=this;return pt(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function qW(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,u){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let d=c;for(;d--;)if(o[d][0]==="exit"&&o[d][1].type==="strikethroughSequenceTemporary"&&o[d][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[d][1].end.offset-o[d][1].start.offset){o[c][1].type="strikethroughSequence",o[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[d][1].start),end:Object.assign({},o[c][1].end)},m={type:"strikethroughText",start:Object.assign({},o[d][1].end),end:Object.assign({},o[c][1].start)},v=[["enter",h,u],["enter",o[d][1],u],["exit",o[d][1],u],["enter",m,u]],b=u.parser.constructs.insideSpan.null;b&&lr(v,v.length,0,Vu(b,o.slice(d+1,c),u)),lr(v,v.length,0,[["exit",m,u],["enter",o[c][1],u],["exit",o[c][1],u],["exit",h,u]]),lr(o,d-1,c-d+3,v),c=d+v.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function l(o,u,c){const d=this.previous,h=this.events;let m=0;return v;function v(y){return d===126&&h[h.length-1][1].type!=="characterEscape"?c(y):(o.enter("strikethroughSequenceTemporary"),b(y))}function b(y){const x=ua(d);if(y===126)return m>1?c(y):(o.consume(y),m++,b);if(m<2&&!n)return c(y);const w=o.exit("strikethroughSequenceTemporary"),E=ua(y);return w._open=!E||E===2&&!!x,w._close=!x||x===2&&!!E,u(y)}}}class KW{constructor(){this.map=[]}add(t,n,r){QW(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function QW(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function RW(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function eU(){return{flow:{null:{name:"table",tokenize:tU,resolveAll:nU}}}}function tU(e,t,n){const r=this;let i=0,l=0,o;return u;function u(P){let _=r.events.length-1;for(;_>-1;){const D=r.events[_][1].type;if(D==="lineEnding"||D==="linePrefix")_--;else break}const I=_>-1?r.events[_][1].type:null,V=I==="tableHead"||I==="tableRow"?C:c;return V===C&&r.parser.lazy[r.now().line]?n(P):V(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(o=!0,l+=1),h(P)}function h(P){return P===null?n(P):Ge(P)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b):n(P):ut(P)?pt(e,h,"whitespace")(P):(l+=1,o&&(o=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),m(P)))}function m(P){return P===null||P===124||Ht(P)?(e.exit("data"),h(P)):(e.consume(P),P===92?v:m)}function v(P){return P===92||P===124?(e.consume(P),m):m(P)}function b(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),o=!1,ut(P)?pt(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):y(P))}function y(P){return P===45||P===58?w(P):P===124?(o=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),x):k(P)}function x(P){return ut(P)?pt(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),E):P===45?(l+=1,E(P)):P===null||Ge(P)?z(P):k(P)}function E(P){return P===45?(e.enter("tableDelimiterFiller"),A(P)):k(P)}function A(P){return P===45?(e.consume(P),A):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),M):(e.exit("tableDelimiterFiller"),M(P))}function M(P){return ut(P)?pt(e,z,"whitespace")(P):z(P)}function z(P){return P===124?y(P):P===null||Ge(P)?!o||i!==l?k(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):k(P)}function k(P){return n(P)}function C(P){return e.enter("tableRow"),N(P)}function N(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),N):P===null||Ge(P)?(e.exit("tableRow"),t(P)):ut(P)?pt(e,N,"whitespace")(P):(e.enter("data"),O(P))}function O(P){return P===null||P===124||Ht(P)?(e.exit("data"),N(P)):(e.consume(P),P===92?L:O)}function L(P){return P===92||P===124?(e.consume(P),O):O(P)}}function nU(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],u=!1,c=0,d,h,m;const v=new KW;for(;++n<e.length;){const b=e[n],y=b[1];b[0]==="enter"?y.type==="tableHead"?(u=!1,c!==0&&(Z9(v,t,c,d,h),h=void 0,c=0),d={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},v.add(n,0,[["enter",d,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,m=void 0,l=[0,0,0,0],o=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},v.add(n,0,[["enter",h,t]])),i=y.type==="tableDelimiterRow"?2:h?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],m=Qu(v,t,l,i,void 0,m),l=[0,0,0,0]),o[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],m=Qu(v,t,l,i,void 0,m)),l=o,o=[l[1],n,0,0])):y.type==="tableHead"?(u=!0,c=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(c=n,l[1]!==0?(o[0]=o[1],m=Qu(v,t,l,i,n,m)):o[1]!==0&&(m=Qu(v,t,o,i,n,m)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&Z9(v,t,c,d,h),v.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=RW(t.events,n))}return e}function Qu(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(l.end=Object.assign({},da(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const c=da(t.events,n[1]);if(l={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const d=da(t.events,n[2]),h=da(t.events,n[3]),m={type:u,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const v=t.events[n[2]],b=t.events[n[3]];if(v[1].end=Object.assign({},b[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(l.end=Object.assign({},da(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Z9(e,t,n,r,i){const l=[],o=da(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function da(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const rU={name:"tasklistCheck",tokenize:lU};function iU(){return{text:{91:rU}}}function lU(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),l)}function l(c){return Ht(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(c)}function u(c){return Ge(c)?t(c):ut(c)?e.check({tokenize:aU},t,n)(c):n(c)}}function aU(e,t,n){return pt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function oU(e){return M8([NW(),$W(),qW(e),eU(),iU()])}const sU={};function J9(e){const t=this,n=e||sU,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(oU(n)),l.push(MW()),o.push(FW(n))}const uU=({id:e,value:t="",onChange:n,placeholder:r="Enter markdown content...",rows:i=8,disabled:l=!1,className:o,textareaClassName:u,previewClassName:c,defaultMode:d="markdown",mode:h,label:m,required:v=!1})=>{const[b,y]=a.useState(d),[x,w]=a.useState(!1),E=e||`md-input-${Math.random().toString(36).slice(2,11)}`,A=h??b,M=h!==void 0;return p.jsxs("div",{className:ce("flex flex-col gap-2",o),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[!M&&p.jsx("div",{className:"flex items-center gap-2",children:p.jsxs("div",{className:"inline-flex grow-0 p-1 rounded-lg bg-neutral-100 dark:bg-black-700 w-auto",children:[p.jsx("button",{className:ce("rounded-md p-1 flex items-center justify-center",A==="markdown"?"bg-white dark:bg-black-700 !text-neutral-900 dark:!text-neutral-100":""),onClick:()=>y("markdown"),disabled:l,children:p.jsx(Ae,{variant:"semibold",size:"extra-small",appearance:"subtitle",className:ce(A==="markdown"?"!text-neutral-900 dark:!text-neutral-100":""),children:"Markdown"})}),p.jsx("button",{className:ce("rounded-md p-1 flex items-center justify-center",A==="preview"?"bg-white dark:bg-black-700 !text-neutral-900 dark:!text-neutral-100":""),onClick:()=>y("preview"),disabled:l,children:p.jsx(Ae,{variant:"semibold",size:"extra-small",appearance:"subtitle",className:ce(A==="preview"?"!text-neutral-900 dark:!text-neutral-100":""),children:"Preview"})})]})}),m&&p.jsxs("label",{htmlFor:E,className:"text-xs font-medium text-gray-600 dark:text-gray-300",children:[m,v&&p.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),p.jsx("div",{className:"relative",children:A==="markdown"?p.jsx("textarea",{id:E,value:t,onChange:z=>n(z.target.value),placeholder:r,rows:i,disabled:l,required:v,className:ce("w-full border rounded-lg bg-white dark:bg-black-600","py-2.5 px-3 font-inter font-medium text-sm","text-gray-900 dark:text-gray-100","placeholder:text-gray-400 dark:placeholder:text-gray-500","transition-colors duration-200","focus:ring-2 focus:outline-none resize-vertical","border-gray-300 dark:border-gray-600","focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20",{"bg-gray-50 dark:bg-gray-700 text-gray-400 dark:text-gray-500 cursor-not-allowed":l},u),onClick:z=>z.stopPropagation()}):p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:ce("w-full rounded-lg","py-2.5 px-3 min-h-[calc(2.5rem*var(--rows,8))] max-h-[calc(1rem*var(--rows,8))]","overflow-y-auto text-sm",c),style:{"--rows":i},children:p.jsx("div",{className:"markdown-preview text-gray-900 dark:text-gray-100 [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-4 [&_h1]:mt-2 [&_h2]:text-xl [&_h2]:font-bold [&_h2]:mb-3 [&_h2]:mt-2 [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:mb-2 [&_h3]:mt-2 [&_p]:mb-2 [&_p]:leading-relaxed [&_ul]:list-disc [&_ul]:ml-6 [&_ul]:mb-2 [&_ol]:list-decimal [&_ol]:ml-6 [&_ol]:mb-2 [&_li]:mb-1 [&_code]:bg-gray-100 [&_code]:dark:bg-gray-800 [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-sm [&_code]:font-mono [&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-3 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:mb-2 [&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:dark:border-gray-600 [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:mb-2 [&_a]:text-blue-600 [&_a]:dark:text-blue-400 [&_a]:underline [&_strong]:font-bold [&_em]:italic [&_table]:w-full [&_table]:border-collapse [&_table]:mb-2 [&_th]:border [&_th]:border-gray-300 [&_th]:dark:border-gray-600 [&_th]:px-2 [&_th]:py-1 [&_th]:bg-gray-50 [&_th]:dark:bg-gray-700 [&_th]:font-semibold [&_td]:border [&_td]:border-gray-300 [&_td]:dark:border-gray-600 [&_td]:px-2 [&_td]:py-1 [&_hr]:my-4 [&_hr]:border-gray-300 [&_hr]:dark:border-gray-600",children:p.jsx(b9,{remarkPlugins:[J9],children:t||"*No content to preview*"})})}),p.jsx("button",{onClick:()=>w(!0),className:"absolute bottom-2 right-2 p-1 rounded-md bg-neutral-100 dark:bg-black-600 hover:bg-gray-200 dark:hover:bg-black-500 transition-colors shadow-sm flex items-center justify-center",title:"Expand preview",type:"button",children:p.jsx(dt.OpenInFull,{sx:{fontSize:"16px"},className:"text-neutral-600 dark:text-neutral-400"})})]})}),p.jsx(Zi,{open:x,onCancel:()=>w(!1),title:"Markdown Preview",width:800,footer:null,children:p.jsx("div",{className:"markdown-preview max-h-[70vh] overflow-y-auto text-gray-900 dark:text-gray-100 [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-4 [&_h1]:mt-2 [&_h2]:text-xl [&_h2]:font-bold [&_h2]:mb-3 [&_h2]:mt-2 [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:mb-2 [&_h3]:mt-2 [&_p]:mb-2 [&_p]:leading-relaxed [&_ul]:list-disc [&_ul]:ml-6 [&_ul]:mb-2 [&_ol]:list-decimal [&_ol]:ml-6 [&_ol]:mb-2 [&_li]:mb-1 [&_code]:bg-gray-100 [&_code]:dark:bg-gray-800 [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-sm [&_code]:font-mono [&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-3 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:mb-2 [&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:dark:border-gray-600 [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:mb-2 [&_a]:text-blue-600 [&_a]:dark:text-blue-400 [&_a]:underline [&_strong]:font-bold [&_em]:italic [&_table]:w-full [&_table]:border-collapse [&_table]:mb-2 [&_th]:border [&_th]:border-gray-300 [&_th]:dark:border-gray-600 [&_th]:px-2 [&_th]:py-1 [&_th]:bg-gray-50 [&_th]:dark:bg-gray-700 [&_th]:font-semibold [&_td]:border [&_td]:border-gray-300 [&_td]:dark:border-gray-600 [&_td]:px-2 [&_td]:py-1 [&_hr]:my-4 [&_hr]:border-gray-300 [&_hr]:dark:border-gray-600",children:p.jsx(b9,{remarkPlugins:[J9],children:t||"*No content to preview*"})})})]})};function cU(e){return pi({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function dU(e){return pi({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}const{Dragger:fU}=st.Upload,hU=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`,mU=(e,t=20)=>e?e.length<=t?e:e.slice(0,t-7)+"...."+e.slice(-7):"",q9=a.forwardRef(({id:e,onFileChange:t,description:n,errorMessage:r,disabled:i=!1,defaultFile:l=null,acceptedFiles:o="*",isLoading:u=!1,asBase64:c=!1,toFileServer:d=!1,setFileUploading:h,fileUploading:m=!1,multiple:v=!1,getRealFileName:b=!1,maxSize:y=50*1024*1024,onUpload:x,onDelete:w,wrapperClassName:E,uploadClassName:A,showFileSize:M=!0,formatFileSize:z=hU},k)=>{const[C,N]=a.useState(null),[O,L]=a.useState([]),[P,_]=a.useState("#d9d9d9"),[I,V]=a.useState(!1),[D,F]=a.useState(null),B=a.useCallback(async()=>{if(x)try{const $=await x(O),T=v?$?.map(K=>K?.fileUrl):$?.[0]?.fileUrl,X=b?C?.name:$?.[0]?.fileName;t(T,X),h?.(null)}catch($){console.error("Upload failed:",$),h?.(null)}},[x,O,v,C,b,t,h]),Y={accept:o,multiple:v,showUploadList:!1,disabled:i,onRemove:()=>{L([])},beforeUpload:($,T)=>{if($.size>y){const X=(y/1048576).toFixed(0);return console.error(`File size exceeds ${X}MB limit`),!1}return N($),d?(h?.(e||"field-file-upload"),L(T)):(c?Promise.all((v?T:[$]).map(X=>new Promise(K=>{const j=new FileReader;j.onload=ne=>{K({filename:X.name,content:ne?.target?.result?.split(",")[1]})},j.readAsDataURL(X)}))).then(X=>{t(v?X:X[0])}):t($),N($)),!1}},U=async()=>{if(d&&D&&w)try{await w(D),F(null)}catch($){console.error("Delete failed:",$)}N(null),L([]),t(null)};return a.useEffect(()=>{_(r?"#EF4444":"#d9d9d9")},[r]),a.useEffect(()=>{O.length&&d&&B()},[O,d,B]),a.useEffect(()=>{l?.name&&N(l)},[l]),p.jsxs("div",{ref:k,className:ce("w-full",E),children:[p.jsx("div",{className:"h-32",onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),children:p.jsx(fU,{...Y,className:A,style:{borderColor:I&&!r?"#1890ff":P},disabled:i||m,children:C?p.jsxs("div",{className:"flex items-center justify-between mx-5",title:C?.name||l?.name||"",children:[p.jsxs("div",{className:"flex items-center justify-center gap-4",children:[C?.type==="application/pdf"?p.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:p.jsx(rL,{size:20,fill:"#006CCF"})}):p.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:p.jsx(dt.DescriptionRounded,{sx:{height:"20px",width:"20px",color:"#006CCF"}})}),p.jsxs("div",{className:"text-left",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"font-inter text-md font-medium text-base",children:mU(C?.name||l?.name||"")}),m?p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:"Uploading..."}):M&&C?.size>0?p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:z(C.size)}):null]})]}),u?p.jsx(E6,{size:40,className:"spinner text-primary-600"}):p.jsx("button",{id:`btn-file-upload-${e}`,className:"ml-4",onClick:$=>{$.stopPropagation(),U()},disabled:i,type:"button","aria-label":"Delete file",children:p.jsx(dU,{size:20,className:"text-gray-400"})})]}):p.jsx("div",{className:"flex items-center justify-center",children:p.jsxs("div",{className:"flex-col",children:[p.jsx("div",{className:"mb-4 flex justify-center",children:p.jsx(cU,{size:24,className:"text-gray-400"})}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center justify-center",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:"Click to upload"}),p.jsx(Ae,{size:"small",variant:"medium",className:"ml-1",appearance:"subtitle",children:"or drag and drop"})]}),n?p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:n}):null]})]})})})}),r&&p.jsx(Ae,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:r})]})});q9.displayName="MultiFileUpload";const{Dragger:pU}=st.Upload,gU=200*1024*1024,vU=(e,t,n,r,i)=>{const l={small:"h-24",medium:"h-32",large:"h-40"},o={primary:"border-blue-200 hover:border-blue-400",secondary:"border-gray-200 hover:border-gray-400"};return ce("border-2 border-dashed rounded-lg transition-colors duration-200",l[e],o[t],{"border-red-400 bg-red-50":r,"cursor-not-allowed opacity-50":n,"cursor-pointer":!n})},bU=()=>p.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:p.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),xU=()=>p.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:p.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z",clipRule:"evenodd"})})}),yU=()=>p.jsx("svg",{className:"w-6 h-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),wU=()=>p.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),K9=a.forwardRef(({id:e,onFileSelect:t,onUpload:n,description:r,errorMessage:i,disabled:l=!1,defaultFile:o=null,acceptedFiles:u="*",isLoading:c=!1,asBase64:d=!1,multiple:h=!1,hideSelectedFile:m=!1,onDelete:v,maxSize:b=gU,wrapperClassName:y,uploadClassName:x,size:w="medium",variant:E="primary",uploadIcon:A,deleteIcon:M,fileTypeIcons:z,showFileSize:k=!0,showProgress:C=!1,progress:N=0},O)=>{const[L,P]=a.useState(null),[_,I]=a.useState(!1),V=($,T)=>{if($.size>b){const X=Math.round(b/1048576);return console.error(`File size exceeds the limit of ${X} MB`),st.Upload.LIST_IGNORE}if(m||P($),d){const X=new FileReader;X.onload=K=>{const j=K?.target?.result;t(j,$.name)},X.readAsDataURL($)}else t(h?T:$,$.name);return n&&n(h?T:$),st.Upload.LIST_IGNORE},D=()=>{P(null),t(null),v?.()},F=$=>{if($===0)return"0 Bytes";const T=1024,X=["Bytes","KB","MB","GB"],K=Math.floor(Math.log($)/Math.log(T));return parseFloat(($/Math.pow(T,K)).toFixed(2))+" "+X[K]},B=$=>$.length<=30?$:`${$.slice(0,23)}....${$.slice(-7)}`,Y=$=>$.type==="application/pdf"?z?.pdf||p.jsx(bU,{}):z?.default||p.jsx(xU,{});a.useEffect(()=>{o&&P(o)},[o]);const U={accept:u,multiple:h,showUploadList:!1,disabled:l,beforeUpload:V};return p.jsxs("div",{ref:O,className:ce("w-full",y),children:[p.jsx("div",{className:ce(vU(w,E,l,!!i),x),onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),role:"button",tabIndex:l?-1:0,"aria-label":"File upload area",children:p.jsx(pU,{...U,children:L&&!m?p.jsxs("div",{className:"flex items-center justify-between mx-5",title:L.name,children:[p.jsxs("div",{className:"flex items-center gap-4",children:[Y(L),p.jsxs("div",{className:"text-left",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"text-neutral-900 font-medium",children:B(L.name)}),k&&L.size>0&&p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:F(L.size)}),C&&N>0&&p.jsxs("div",{className:"mt-1",children:[p.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1",children:p.jsx("div",{className:"bg-blue-600 h-1 rounded-full transition-all duration-300",style:{width:`${N}%`}})}),p.jsxs(Ae,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[N,"% uploaded"]})]})]})]}),c?p.jsx("div",{className:"animate-spin",children:p.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}):p.jsx("button",{className:"ml-4 p-1 hover:bg-gray-100 rounded",onClick:$=>{$.stopPropagation(),D()},disabled:l,type:"button","aria-label":"Delete file",children:M||p.jsx(wU,{})})]}):p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("div",{className:"mb-4 flex justify-center",children:A||p.jsx(yU,{})}),p.jsxs("div",{className:"text-center",children:[p.jsxs("div",{className:"flex items-center justify-center gap-1",children:[p.jsx(Ae,{size:"small",variant:"medium",className:"text-blue-600 dark:text-blue-300",appearance:"custom",children:"Click to upload"}),p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:"or drag and drop"})]}),r&&p.jsx(Ae,{size:"small",variant:"medium",className:"text-neutral-400 mt-1",children:r})]})]})})})}),i&&p.jsx(Ae,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:i})]})});K9.displayName="FileUpload";const EU=[...Object.keys(Ms).filter(e=>e?.endsWith("Rounded"))||[],...(X7||[]).map(e=>`flag-${e}`)],CU=e=>{if(e?.startsWith("flag-")){const t=e?.replace("flag-","");return td(t||"")||t}return e.replaceAll(/([A-Z])/g," $1").trim()},SU=({onChange:e,selectedIcon:t,setOpen:n})=>{const[r,i]=a.useState(""),l=(EU||[]).filter(u=>{if(u?.startsWith("flag-")){const c=u?.replace("flag-","");return c?.toLowerCase()?.includes(r?.trim()?.toLowerCase()||"")||td(c||"")?.toLowerCase()?.includes(r?.trim()?.toLowerCase()||"")}return u?.trim()?.toLowerCase()?.includes(r?.trim()?.toLowerCase()||"")}),o=(u,c)=>{if(c.stopPropagation(),t===u){e?.(null);return}e?.(u),n?.(!1)};return p.jsxs("div",{className:"flex flex-col gap-3",children:[p.jsx(I1,{id:"input-field-icon-picker",placeholder:"Search icons...",onChange:u=>i(u||""),fieldSuffix:p.jsx(Ms.Search,{sx:{width:16,height:16,color:"rgb(152 162 179)"}})}),p.jsx(RE.FixedSizeGrid,{columnCount:5,rowCount:Math.ceil((l?.length||0)/5),columnWidth:40,rowHeight:40,width:220,height:240,children:({columnIndex:u,rowIndex:c,style:d})=>{const h=c*5+u,m=l?.[h];return m?p.jsx("div",{style:{...d,padding:"4px"},children:p.jsx(st.Tooltip,{title:CU(m),children:p.jsx(eC.IconButton,{className:ce("flex items-center justify-center !rounded-md hover:bg-neutral-200 dark:hover:bg-black-700",{"!bg-primary-50 dark:!bg-black-800":t===m}),onClick:v=>o(m,v),children:p.jsx(Jd,{iconName:m,sx:{width:20,height:20},className:"text-neutral-900 dark:text-white"})})})}):null}})]})},Jd=({iconName:e,sx:t,className:n,isHovering:r})=>{if(e?.startsWith?.("flag-")){const l=e?.replace("flag-","");return au?.(l||"",r||!1)||p.jsx("div",{children:"-"})}const i=Ms?.[e];return i?p.jsx(i,{sx:t,className:n,isHovering:r}):p.jsx("div",{children:"-"})},kU=({selectedIcon:e,onChange:t,label:n,required:r=!1,allowClear:i=!0,disabled:l=!1,errorMessage:o})=>{const[u,c]=a.useState(!1),d=h=>{h.stopPropagation(),t?.("")};return p.jsx(st.Popover,{arrow:!1,placement:"bottom",trigger:"click",getPopupContainer:h=>h?.parentElement||document.body,open:u,onOpenChange:c,content:p.jsx(SU,{onChange:t,selectedIcon:e,setOpen:c}),children:p.jsxs("div",{className:"flex flex-col gap-1",children:[n?p.jsxs(Ae,{size:"extra-small",variant:"medium",appearance:"body",children:[n,r&&p.jsx("span",{className:"text-red-500",children:"*"})]}):null,p.jsxs("button",{id:`btn-icon-picker-icon-${e?"selected":"unselected"}`,className:`min-w-[83px] py-1.5 px-3 rounded-md border ${l?"cursor-not-allowed opacity-60 bg-neutral-50 dark:bg-black-800":"bg-white dark:bg-black-800"} ${o?"border-red-500":"focus:border-primary-200 "} flex items-center justify-between gap-2`,disabled:l,onClick:h=>{l&&(h.preventDefault(),h.stopPropagation())},children:[e?p.jsx(Jd,{iconName:e,sx:{width:20,height:20},className:"text-neutral-900 dark:text-white"}):p.jsx(Ae,{size:"small",variant:"medium",appearance:"subtitle",children:"Select Icon"}),e&&i&&!l?p.jsx(Ms.CloseRounded,{sx:{width:20,height:20},className:"hover:bg-neutral-100 dark:hover:bg-black-800 rounded-full transition-colors cursor-pointer text-neutral-400 dark:text-neutral-500",onClick:d}):null]}),o&&p.jsx(Ae,{size:"extra-small",className:"text-red-500 font-medium",children:o})]})})},IU=a.lazy(()=>Promise.resolve({default:e=>p.jsx(a.Suspense,{fallback:p.jsx("div",{className:"min-w-[83px] h-[30px] animate-pulse bg-neutral-100 dark:bg-black-800 rounded-md"}),children:p.jsx(kU,{...e})})})),Q9=a.forwardRef(({status:e,children:t,className:n,size:r="medium","aria-label":i},l)=>{const o=()=>{switch(r){case"small":return"text-xs px-1.5 py-0.5";case"large":return"text-base px-3 py-1.5";default:return"text-md px-1.5 py-1"}},u=()=>{switch(e?.toLowerCase()){case"purple":return"bg-purple-50 text-purple-500 border border-purple-100 dark:bg-purple-950 dark:text-purple-400 dark:border-purple-800";case"blue":return"bg-blue-50 text-blue-500 border border-blue-100 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800";case"teal":return"bg-teal-50 text-teal-500 border border-teal-100 dark:bg-teal-950 dark:text-teal-400 dark:border-teal-800";case"green":return"bg-green-50 text-green-500 border border-green-100 dark:bg-green-950 dark:text-green-400 dark:border-green-800";case"yellow":return"bg-yellow-50 text-yellow-600 border border-yellow-100 dark:bg-yellow-950 dark:text-yellow-400 dark:border-yellow-800";case"orange":return"bg-orange-50 text-orange-500 border border-orange-100 dark:bg-orange-950 dark:text-orange-400 dark:border-orange-800";case"peach":return"bg-orange-50 text-orange-400 border border-orange-100 dark:bg-orange-950 dark:text-orange-300 dark:border-orange-800";case"red":return"bg-red-50 text-red-500 border border-red-100 dark:bg-red-950 dark:text-red-400 dark:border-red-800";case"navy":return"bg-slate-50 text-slate-700 border border-slate-100 dark:bg-slate-950 dark:text-slate-400 dark:border-slate-800";case"grey":return"bg-neutral-50 text-neutral-500 border border-neutral-100 dark:bg-neutral-950 dark:text-neutral-400 dark:border-neutral-800";default:return"bg-blue-50 text-blue-600 border border-blue-200 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800"}};return p.jsx("span",{ref:l,className:ce("inline-flex items-center justify-center font-medium rounded-md transition-colors",o(),u(),n),"aria-label":i||`Status: ${e||"default"}`,role:"status",children:t})});Q9.displayName="StatusColorMapping";const R9=a.forwardRef(({status:e="default",children:t,appearance:n="outline",size:r="md",className:i,isRounded:l=!1,capitalize:o=!0,"aria-label":u},c)=>{const d=y=>!y||!o?y:y.replace(/\w\S*/g,x=>x.charAt(0).toUpperCase()+x.substr(1).toLowerCase()),h=()=>{switch(r){case"sm":return"text-xs px-1.5 py-0.5";case"lg":return"text-sm px-3 py-1.5";default:return"text-xs px-2 py-1"}},m=()=>{switch(e){case"primary":case"default":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";case"warning":return"bg-yellow-50 dark:bg-yellow-950 text-yellow-600 dark:text-yellow-300 border border-yellow-300 dark:border-yellow-700";case"error":return"bg-red-50 dark:bg-red-950 text-red-600 dark:text-red-300 border border-red-300 dark:border-red-700";case"neutral":return"bg-neutral-50 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-neutral-300 dark:border-neutral-700";case"success":return"bg-green-50 dark:bg-green-950 text-green-600 dark:text-green-300 border border-green-300 dark:border-green-700";case"info":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";default:return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700"}},v=()=>{switch(e){case"primary":case"default":return"bg-blue-600 dark:bg-blue-700 text-white";case"warning":return"bg-yellow-600 dark:bg-yellow-700 text-white";case"success":return"bg-green-600 dark:bg-green-700 text-white";case"error":return"bg-red-600 dark:bg-red-700 text-white";case"neutral":return"bg-neutral-600 dark:bg-neutral-700 text-white";case"info":return"bg-blue-600 dark:bg-blue-700 text-white";default:return"bg-blue-600 dark:bg-blue-700 text-white"}},b=()=>n==="filled"?v():m();return p.jsx("span",{ref:c,className:ce("inline-flex items-center justify-center font-medium transition-colors",l?"rounded-full":"rounded",h(),b(),i),"aria-label":u||`Badge: ${e}`,role:"status",children:d(t)})});R9.displayName="Badge";const Ru=({title:e,children:t})=>e?p.jsx(p.Fragment,{children:t}):null;Ru.displayName="HelmetTitle";const eb=({children:e,className:t="",title:n,style:r,id:i})=>p.jsxs(p.Fragment,{children:[p.jsx(Ru,{title:n}),p.jsx("div",{className:`bg-white dark:bg-black-800 border border-neutral-200 dark:border-black-600 rounded-lg shadow-100 w-full flex flex-col ${t}`,style:r,id:i,children:e})]});eb.displayName="Card";const qd=e=>e===1||e==="1"||typeof e=="string"&&e.toLowerCase()==="yes"||typeof e=="string"&&e.toLowerCase()==="true"?"Yes":e===0||e==="0"||typeof e=="string"&&e.toLowerCase()==="no"||typeof e=="string"&&e.toLowerCase()==="false"?"No":e?.toString()||"-",ec=(e,t="USD")=>{try{if(e==null)return"";const n=Number(e);if(isNaN(n))return e?.toString()||"";const r=n.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return`${{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$",CHF:"CHF",CNY:"¥",SEK:"kr",NOK:"kr",DKK:"kr",PLN:"zł",CZK:"Kč",HUF:"Ft",RUB:"₽",BRL:"R$",INR:"₹",KRW:"₩",SGD:"S$",HKD:"HK$",NZD:"NZ$",MXN:"$",ZAR:"R",TRY:"₺",ILS:"₪",AED:"د.إ",SAR:"﷼",QAR:"﷼",KWD:"د.ك",BHD:"د.ب",OMR:"﷼",JOD:"د.ا",LBP:"ل.ل",EGP:"£",MAD:"د.م.",TND:"د.ت",DZD:"د.ج",LYD:"ل.د",SDG:"ج.س.",ETB:"Br",KES:"KSh",UGX:"USh",TZS:"TSh",ZMW:"ZK",BWP:"P",ZWL:"Z$",AOA:"Kz",MZN:"MT",GHS:"₵",NGN:"₦",XAF:"FCFA",XOF:"CFA",CDF:"FC",RWF:"RF",BIF:"FBu",KMF:"CF",DJF:"Fdj",SOS:"S",ERN:"Nfk"}[t]||"$"}${r}`}catch{return"-"}},Wo=(e,t={})=>{const{format:n,relative:r=!1,withTime:i=!0,fallback:l="-",skipTimezone:o=!1,onlyTime:u=!1}=t||{};if(!e)return l;try{const c=new Date(e);if(isNaN(c.getTime()))return l;if(r){const b=Math.floor((new Date().getTime()-c.getTime())/1e3);return b<60?"just now":b<3600?`${Math.floor(b/60)} minutes ago`:b<86400?`${Math.floor(b/3600)} hours ago`:b<2592e3?`${Math.floor(b/86400)} days ago`:b<31536e3?`${Math.floor(b/2592e3)} months ago`:`${Math.floor(b/31536e3)} years ago`}const d="MM/dd/yyyy",h="hh:mm a",m=i&&!u;return c.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:i?"2-digit":void 0,minute:i?"2-digit":void 0,hour12:!0})}catch{return l}},tb=e=>typeof e=="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(e),nb=a.forwardRef(({label:e,value:t,className:n,type:r="string",tags:i,tooltip:l,items:o,isModified:u=!1,isChanged:c=!1,size:d="medium",isHighlighted:h=!1,deletedValue:m,highlightColor:v="warning",isSearchActive:b=!1,originalValue:y=!1,showDiff:x=!1,isLiveField:w=!1,deltaChange:E,theme:A="light",onUpload:M,acceptsUpload:z=!1,MasterDataModal:k,riskDetails:C,isRiskAnalysisOpen:N=!1,RiskDetailsCard:O,"aria-label":L},P)=>{const[_,I]=a.useState(!0),[V,D]=a.useState(!1),[F,B]=a.useState(null),[Y,U]=a.useState(!1),$=()=>{I(!_)},T=ae=>{D(!0),B({...ae,value:t})},X=()=>{D(!1),B(null)},K=ae=>{const oe=ae.target.files?.[0];oe&&M&&M(oe),ae.target.value=""},j=()=>{const ae=typeof t=="string"&&tb(t);if(b&&typeof t=="object")return t;if(t||r==="boolean"&&t===0||r==="currency"&&Number(t)>=0){if((t===!0||t==="True")&&!y)return"Yes";if((t===!1||t==="False")&&!y)return"No";if(r==="url")return p.jsx("a",{href:t,className:"text-primary-600 truncate",children:t});if(r==="boolean")return qd(t);if(r==="currency")return ec(t,o?.currency_code)||"-";if(r==="datetime"){const oe=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return Wo(oe,{skipTimezone:!1,withTime:!0})}else if(r==="date"||ae){const oe=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return Wo(oe,{skipTimezone:!0,withTime:!1})}else return r==="percentage"?`${t}%`:typeof t=="string"&&t.length>100?p.jsxs("p",{children:[t.slice(0,_?100:t.length),_?"... ":" ",p.jsx("button",{id:`btn-label-value-${_?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:$,onKeyDown:oe=>{(oe.key==="Enter"||oe.key===" ")&&(oe.preventDefault(),$())},"aria-label":_?"Show more content":"Show less content",type:"button",children:_?"Show more":"Show less"})]}):t}return"-"},ne=()=>{switch(d){case"small":return"extra-small";case"large":return"large";default:return"small"}},se=()=>{switch(v){case"success":return"bg-success-100";case"warning":return"bg-warning-100";case"error":return"bg-error-100";case"info":return"bg-info-100";default:return"bg-warning-100"}};return p.jsxs("div",{ref:P,className:ce("font-medium relative",n),onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),"aria-label":L||`Label: ${e}, Value: ${t}`,children:[p.jsxs(Ae,{variant:"medium",size:ne(),className:"flex gap-1 flex-wrap",appearance:"subtitle",children:[e," ",p.jsx(qn,{labels:i?.map(ae=>({...ae,color:ae.color||"primary"}))}),w&&p.jsx(dt.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),i&&i.length>0&&p.jsx(p.Fragment,{children:i.map(ae=>p.jsx(di,{label:ae.label,color:ae.color,size:"xs",theme:A},`${ae.label}-${ae.value||ae.color}`))}),l&&p.jsx(st.Tooltip,{placement:"top",title:l,children:p.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&ae.preventDefault()},children:p.jsx(pr,{size:14})})})]}),p.jsxs(Ae,{variant:"medium",size:ne(),className:ce("text-- whitespace-normal break-all flex gap-1 pt-0.5",u&&"bg-neutral-50 dark:bg-black-700 p-1 rounded",N&&C?.color&&`bg-${C.color}-50 border-${C.color}-300 px-0.5 rounded-lg`),appearance:"body",children:[x&&m&&t?p.jsxs("div",{className:"flex gap-2",children:[p.jsx("span",{className:"line-through",children:m}),p.jsx("span",{children:j()})]}):c||h?p.jsx("mark",{className:ce("rounded-md py-0.5 px-1",se()),children:j()}):j(),r==="currency"&&E!==0&&E!==void 0&&E!==null&&p.jsxs(Ot.motion.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},transition:{duration:.25},className:ce("inline-flex items-center gap-1 ml-1.5 text-xs font-medium",E>0?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:[p.jsx("span",{className:"flex items-center justify-center w-4 h-4",children:E>0?p.jsx(dt.ArrowUpwardRounded,{sx:{fontSize:16},className:"text-emerald-600 dark:text-emerald-400"}):p.jsx(dt.ArrowDownwardRounded,{sx:{fontSize:16},className:"text-red-600 dark:text-red-400"})}),p.jsx("span",{children:ec(Math.abs(E),o?.currency_code||"USD")})]}),o?.is_master_data&&o?.reference&&t&&p.jsx("button",{onClick:()=>T(o),onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),T(o))},"aria-label":`Search master data for ${e}`,type:"button",className:"cursor-pointer",children:p.jsx(op,{width:20,height:20})}),z&&p.jsx("input",{type:"file",onChange:K,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`})]}),m&&!x&&p.jsx(Ae,{variant:"medium",size:"extra-small",className:"pt-0.5",appearance:"body",children:p.jsx("mark",{className:"rounded-md py-0.5 px-1 bg-error-100",children:p.jsx("del",{children:m||r==="boolean"&&m==="0"?m==="True"?"Yes":m==="False"?"No":r==="boolean"?qd(m):r==="currency"?ec(m,o?.currency_code):r==="date"?Wo(m,{skipTimezone:!0,withTime:!1}):r==="datetime"?Wo(m,{skipTimezone:!0,withTime:!0}):r==="percentage"?`${m}%`:m.length>100?p.jsxs("p",{children:[m.slice(0,_?100:m.length),_?"... ":" ",p.jsx("button",{id:`btn-label-value-${_?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:$,children:_?"Show more":"Show less"})]}):m:"-"})})}),k&&p.jsx(k,{isVisible:V,onClose:X,masterdataInfo:F}),Y&&C&&N&&p.jsx("div",{className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:ae=>ae.stopPropagation(),onMouseDown:ae=>ae.preventDefault(),onKeyDown:ae=>{ae.key==="Escape"&&U(!1)},role:"tooltip","aria-label":"Risk analysis details",tabIndex:0,children:O?p.jsx(O,{riskDetails:C}):p.jsx("div",{className:"shadow-lg p-4",children:p.jsxs("div",{className:"text-sm",children:[p.jsx("h4",{className:"font-semibold mb-2",children:"Risk Details"}),p.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:C.description||"Risk analysis information"})]})})})]})});nb.displayName="LabelValue";const rb=e=>e,AU=(()=>{let e=rb;return{configure(t){e=t},generate(t){return e(t)},reset(){e=rb}}})();function el(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Al(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":el(7));return e.charAt(0).toUpperCase()+e.slice(1)}var tc={exports:{}},nc={exports:{}},kt={};/** @license React v16.13.1
176
176
  * react-is.production.min.js
177
177
  *
178
178
  * Copyright (c) Facebook, Inc. and its affiliates.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lax-wp/design-system",
3
3
  "private": false,
4
- "version": "0.3.80",
4
+ "version": "0.3.81",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",