@nocobase/plugin-theme-editor 0.14.0-alpha.7 → 0.14.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,7 @@ var cm=Object.defineProperty,sm=Object.defineProperties;var dm=Object.getOwnProp
32
32
  margin-bottom: `,`;
33
33
  }
34
34
  `])),function(e){return e.hidden?"none":"flex"},function(e){return e.flex},function(e){return tt(e.direction,e.horizontal)},function(e){return e.distribution},function(e){return e.align},function(e){return Kn(e.direction,e.horizontal)&&!e.width&&["space-between","space-around","space-evenly"].includes(e.distribution)?"100%":Co(e.width)},function(e){return Co(e.height)},function(e){return Co(e.padding)},function(e){return Kn(e.direction,e.horizontal)&&Co(e.gap)},function(e){return Xp(e.direction,e.horizontal)&&Co(e.gap)});const Np=()=>o.jsxs(ae,{gap:12,children:[o.jsxs(ae,{horizontal:!0,gap:24,children:[o.jsx(i.Progress,{percent:70,status:"exception",type:"dashboard"}),o.jsx(i.Progress,{percent:80,status:"exception",type:"circle"})]}),o.jsx(i.Progress,{percent:50,status:"exception"})]}),Rn={demo:o.jsx(Np,{}),tokens:["colorError"],key:"danger"},Up=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,type:"dashboard"}),o.jsx(i.Progress,{percent:80,type:"circle"}),o.jsx(i.Progress,{steps:8,percent:30})]}),jp={demo:o.jsx(Up,{}),tokens:["colorInfo"],key:"info"},Vp=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,status:"exception"}),o.jsx(i.Progress,{percent:100}),o.jsx(i.Progress,{percent:50,showInfo:!1}),o.jsx(i.Progress,{steps:8})]}),Yp={demo:o.jsx(Vp,{}),tokens:["colorFillSecondary","colorText","colorBgContainer"],key:"default"},qp=()=>{const{token:e}=i.theme.useToken();return o.jsxs("div",{style:{padding:24,background:e.colorBgLayout},children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,status:"exception"}),o.jsx(i.Progress,{percent:100}),o.jsx(i.Progress,{percent:50,showInfo:!1}),o.jsx(i.Progress,{steps:8})]})},Zp={demo:o.jsx(qp,{}),tokens:["colorFillSecondary","colorText","colorBgContainer"],key:"layout"},Qp=()=>o.jsxs(ae,{gap:12,children:[o.jsxs(ae,{horizontal:!0,gap:24,children:[o.jsx(i.Progress,{percent:70,status:"success",type:"dashboard"}),o.jsx(i.Progress,{percent:80,status:"success",type:"circle"})]}),o.jsx(i.Progress,{percent:50,status:"success"})]}),ea={demo:o.jsx(Qp,{}),tokens:["colorSuccess"],key:"success"},Kp=[Yp,jp,Rn,ea,Zp],Jp=()=>o.jsxs(i.Space,{children:[o.jsxs(i.Radio.Group,{defaultValue:"a",buttonStyle:"solid",children:[o.jsx(i.Radio.Button,{value:"a",checked:!0,children:"Hangzhou"}),o.jsx(i.Radio.Button,{value:"b",children:"Shanghai"})]}),o.jsxs("div",{children:[o.jsx(i.Radio.Button,{children:"Apple"}),o.jsx(i.Radio.Button,{checked:!0,children:"Orange"})]})]}),Rp={demo:o.jsx(Jp,{}),tokens:["colorPrimaryActive","colorPrimaryHover"],key:"button"},eu=()=>o.jsx(i.Radio,{disabled:!0,children:"Radio"}),ou={demo:o.jsx(eu,{}),tokens:["colorBgContainerDisabled"],key:"disabled"},ru=()=>o.jsx(i.Radio,{checked:!0,children:"Radio"}),oa={demo:o.jsx(ru,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"},tu=[oa,Rp,ou],nu=()=>o.jsx(i.Rate,{}),au=[{demo:o.jsx(nu,{}),tokens:["colorFillContent"],key:"default"}],iu=()=>o.jsx(i.Result,{status:"error",title:"Demo示意",subTitle:"status 为 error"}),lu={demo:o.jsx(iu,{}),tokens:["colorError"],key:"danger"},cu=()=>o.jsx(i.Result,{status:"info",title:"Demo示意",subTitle:"status 为info"}),su={demo:o.jsx(cu,{}),tokens:["colorInfo"],key:"info"},du=()=>o.jsx(i.Result,{status:"success",title:"Successfully Purchased Cloud Server ECS!",subTitle:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.",extra:[o.jsx(i.Button,{type:"primary",children:"Go Console"},"console"),o.jsx(i.Button,{children:"Buy Again"},"buy")]}),pu={demo:o.jsx(du,{}),tokens:["colorSuccess"],key:"result"},uu=()=>o.jsx(i.Result,{title:"Demo示意",subTitle:"背景色为 colorFillAlter",children:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."}),gu={demo:o.jsx(uu,{}),tokens:["colorFillAlter"],key:"resultWithDesc"},hu=()=>o.jsx(i.Result,{status:"warning",title:"Demo示意",subTitle:"status 为warning"}),ra={demo:o.jsx(hu,{}),tokens:["colorWarning"],key:"warning"},fu=[pu,su,ra,lu,gu],mu=()=>o.jsx(i.Segmented,{options:["Daily","Weekly","Monthly","Quarterly","Yearly"]}),vu=[{demo:o.jsx(mu,{}),key:"default",tokens:[]}],ko=i.Select._InternalPanelDoNotUseOrYouWillBeFired,lo=[];for(let e=10;e<36;e++)lo.push({value:e.toString(36)+e,label:e.toString(36)+e});const yu=e=>{console.log(`selected ${e}`)},bu=()=>o.jsx(ko,{mode:"multiple",allowClear:!0,style:{width:"100%"},status:"error",options:lo,placeholder:"Please select",defaultValue:["a10","c12"],onChange:yu}),Su={demo:o.jsx(bu,{}),tokens:["colorError","colorErrorOutline","colorErrorBorder","colorErrorHover"],key:"danger"},xu=()=>o.jsx(ko,{mode:"multiple",allowClear:!0,style:{width:"100%"},disabled:!0,options:lo,placeholder:"Please select",defaultValue:["a10","c12"]}),Cu={demo:o.jsx(xu,{}),tokens:["colorBgContainerDisabled","colorTextDisabled"],key:"disabled"},ku=e=>{console.log(`selected ${e}`)},wu=()=>o.jsx(ko,{allowClear:!0,style:{width:"100%"},options:lo,placeholder:"Please select",value:["a10","c12"],onChange:ku}),Eu={demo:o.jsx(wu,{}),tokens:["colorIcon","colorIconHover"],key:"icon"},{Option:oo,_InternalPanelDoNotUseOrYouWillBeFired:nr}=i.Select;function Tu(){}const Bu=()=>o.jsxs(i.Space,{align:"start",children:[o.jsxs(nr,{defaultValue:"lucy",style:{width:120},onChange:Tu,children:[o.jsx(oo,{value:"jack",children:"Jack"})," ",o.jsx(oo,{value:"lucy",children:"Lucy"}),o.jsx(oo,{value:"disabled",disabled:!0,children:"Disabled"}),o.jsx(oo,{value:"Yiminghe",children:"yiminghe"})]}),o.jsx(nr,{defaultValue:"lucy",style:{width:120},disabled:!0,children:o.jsx(oo,{value:"lucy",children:"Lucy"})}),o.jsx(nr,{defaultValue:"lucy",style:{width:120},loading:!0,children:o.jsx(oo,{value:"lucy",children:"Lucy"})}),o.jsx(nr,{defaultValue:"lucy",style:{width:120},allowClear:!0,children:o.jsx(oo,{value:"lucy",children:"Lucy"})})]}),Du={demo:o.jsx(Bu,{}),tokens:["controlOutline","colorPrimary","colorPrimaryHover","colorText","colorBgElevated","colorBgContainer"],key:"select"},Hu=e=>{console.log(`selected ${e}`)},Au=()=>o.jsx(ko,{mode:"multiple",allowClear:!0,style:{width:"100%"},options:lo,listHeight:200,placeholder:"Please select",defaultValue:["a10","c12","e14"],onChange:Hu}),Mu={demo:o.jsx(Au,{}),tokens:["colorPrimary","colorFillSecondary"],key:"selectTag"},Iu=e=>{console.log(`selected ${e}`)},Pu=()=>o.jsx(ko,{mode:"multiple",allowClear:!0,style:{width:"100%"},status:"warning",options:lo,placeholder:"Please select",defaultValue:["a10","c12"],onChange:Iu}),zu=[Du,Mu,Su,{demo:o.jsx(Pu,{}),tokens:["colorWarningHover","colorWarningOutline"],key:"warning"},Eu,Cu],Lu=()=>o.jsx(i.Skeleton,{active:!0}),$u=[{demo:o.jsx(Lu,{}),tokens:["colorFillContent","colorTextPlaceholder"],key:"default"}],Ou=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Slider,{defaultValue:30}),o.jsx(i.Slider,{range:!0,defaultValue:[20,50]})]}),Fu={demo:o.jsx(Ou,{}),tokens:["colorFillSecondary","colorFillContentHover","colorBgContainer","colorPrimary","colorPrimaryHover","colorPrimaryBorderHover","colorPrimaryBorder"],key:"default"},_u=()=>{const{token:e}=i.theme.useToken();return o.jsxs("div",{style:{padding:12,background:e.colorFillSecondary},children:[o.jsx(i.Slider,{defaultValue:30}),o.jsx(i.Slider,{range:!0,defaultValue:[20,50]})]})},Wu=[Fu,{demo:o.jsx(_u,{}),tokens:["colorFillSecondary","colorFillContentHover","colorBgContainer","colorPrimary","colorPrimaryHover","colorPrimaryBorderHover","colorPrimaryBorder"],key:"sliderInBg"}],Xu=()=>o.jsxs(i.Space,{children:["Space",o.jsx(i.Button,{type:"primary",children:"Button"}),o.jsx(i.Upload,{children:o.jsxs(i.Button,{children:[o.jsx(H.UploadOutlined,{})," Click to Upload"]})}),o.jsx(i.Popconfirm,{title:"Are you sure delete this task?",okText:"Yes",cancelText:"No",children:o.jsx(i.Button,{children:"Confirm"})})]}),Gu=[{demo:o.jsx(Xu,{}),key:"default"}],Nu=()=>o.jsx(i.Spin,{}),Uu=[{demo:o.jsx(Nu,{}),tokens:["colorPrimary","colorBgContainer"],key:"default"}],ju=()=>o.jsxs(i.Row,{gutter:16,children:[o.jsx(i.Col,{span:12,children:o.jsx(i.Statistic,{title:"Active Users",value:112893})}),o.jsxs(i.Col,{span:12,children:[o.jsx(i.Statistic,{title:"Account Balance (CNY)",value:112893,precision:2}),o.jsx(i.Button,{style:{marginTop:16},type:"primary",children:"Recharge"})]}),o.jsx(i.Col,{span:12,children:o.jsx(i.Statistic,{title:"Active Users",value:112893,loading:!0})})]}),Vu=[{demo:o.jsx(ju,{}),tokens:["colorPrimary"],key:"default"}],{Step:ta}=i.Steps,Yu=()=>o.jsxs(i.Steps,{current:1,children:[o.jsx(ta,{title:"Error",status:"error",description:"This is a description."}),o.jsx(ta,{status:"error",title:"In Progress",subTitle:"Left 00:00:08",description:"This is a description."})]}),qu={demo:o.jsx(Yu,{}),tokens:["colorError"],key:"danger"},{Step:nt}=i.Steps,Zu=()=>o.jsxs(i.Steps,{current:1,children:[o.jsx(nt,{title:"Finished",description:"This is a description."}),o.jsx(nt,{title:"In Progress",subTitle:"Left 00:00:08",description:"This is a description."}),o.jsx(nt,{title:"Waiting",description:"This is a description."})]}),na={demo:o.jsx(Zu,{}),tokens:["colorPrimary","colorBgContainer"],key:"default"},Qu=[na,qu];function Ku(){}const Ju=()=>o.jsx(i.Switch,{defaultChecked:!0,onChange:Ku}),Ru=[{demo:o.jsx(Ju,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"}],eg=[{title:"Name",dataIndex:"name",filters:[{text:"Joe",value:"Joe"},{text:"Jim",value:"Jim"},{text:"Submenu",value:"Submenu",children:[{text:"Green",value:"Green"},{text:"Black",value:"Black"}]}],onFilter:(e,r)=>r.name.indexOf(String(e))===0,sorter:(e,r)=>e.name.length-r.name.length,sortDirections:["descend"]},{title:"Age",dataIndex:"age",defaultSortOrder:"descend",sorter:(e,r)=>e.age-r.age},{title:"Address",dataIndex:"address",filters:[{text:"London",value:"London"},{text:"New York",value:"New York"}],onFilter:(e,r)=>r.address.indexOf(String(e))===0}],og=[{key:"1",name:"John Brown",age:32,address:"New York No. 1 Lake Park"},{key:"2",name:"Jim Green",age:42,address:"London No. 1 Lake Park"},{key:"3",name:"Joe Black",age:32,address:"Sidney No. 1 Lake Park"},{key:"4",name:"Jim Red",age:32,address:"London No. 2 Lake Park"}],rg=(e,r,t,n)=>{console.log("params",e,r,t,n)},tg=()=>o.jsx(i.Table,{columns:eg,dataSource:og,onChange:rg}),ng={demo:o.jsx(tg,{}),tokens:["colorFillSecondary","colorFillContentHover","colorFillContent","colorFillAlter"],key:"filterTable"},ag=[{title:"Name",dataIndex:"name",key:"name",render:e=>o.jsx("a",{children:e})},{title:"Age",dataIndex:"age",key:"age"},{title:"Address",dataIndex:"address",key:"address"},{title:"Tags",key:"tags",dataIndex:"tags",render:e=>o.jsx(o.Fragment,{children:e.map(r=>{let t=r.length>5?"geekblue":"green";return r==="loser"&&(t="volcano"),o.jsx(i.Tag,{color:t,children:r.toUpperCase()},r)})})},{title:"Action",key:"action",render:(e,r)=>o.jsxs(i.Space,{size:"middle",children:[o.jsxs("a",{children:["Invite ",r.name]})," ",o.jsx("a",{children:"Delete"})]})}],ig=[{key:"1",name:"John Brown",age:32,address:"New York No. 1 Lake Park",tags:["nice","developer"]},{key:"2",name:"Jim Green",age:42,address:"London No. 1 Lake Park",tags:["loser"]},{key:"3",name:"Joe Black",age:32,address:"Sidney No. 1 Lake Park",tags:["cool","teacher"]}],lg=()=>o.jsx(i.Table,{columns:ag,dataSource:ig,pagination:!1}),cg=[{demo:o.jsx(lg,{}),tokens:["colorPrimaryActive","colorBgContainer"],key:"table"},ng],{TabPane:at}=i.Tabs,sg=()=>o.jsxs(i.Tabs,{type:"card",defaultActiveKey:"1",children:[o.jsx(at,{tab:"Tab 1",children:"Content of Tab Pane 1"},"1"),o.jsx(at,{tab:"Tab 2",children:"Content of Tab Pane 2"},"2"),o.jsx(at,{tab:"Tab 3",children:"Content of Tab Pane 3"},"3")]}),dg={demo:o.jsx(sg,{}),tokens:["colorFillAlter"],key:"cardTabs"},{TabPane:it}=i.Tabs;function pg(){}const ug=()=>o.jsxs(i.Tabs,{defaultActiveKey:"1",onChange:pg,children:[o.jsx(it,{tab:"Tab 1",children:"Content of Tab Pane 1"},"1"),o.jsx(it,{tab:"Tab 2",children:"Content of Tab Pane 2"},"2"),o.jsx(it,{tab:"Tab 3",children:"Content of Tab Pane 3"},"3")]}),aa={demo:o.jsx(ug,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive","colorBgContainer"],key:"default"},gg=[aa,dg],hg=()=>o.jsx(i.Tag,{closable:!0,children:"Error"}),fg={demo:o.jsx(hg,{}),tokens:["colorFillAlter","colorIcon","colorIconHover"],key:"closable"},mg=()=>o.jsx(i.Tag,{color:"error",children:"Error"}),ia={demo:o.jsx(mg,{}),tokens:["colorError","colorErrorBg","colorErrorBorder"],key:"error"},vg=()=>o.jsx(i.Tag,{color:"processing",children:"Info"}),yg={demo:o.jsx(vg,{}),tokens:["colorInfo","colorInfoBg","colorInfoBorder"],key:"info"},{CheckableTag:la}=i.Tag,bg=()=>o.jsxs("div",{children:[o.jsx(la,{checked:!0,children:"Error"}),o.jsx(la,{checked:!1,children:"Error"})]}),Sg={demo:o.jsx(bg,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive"],key:"multiTags"},xg=()=>o.jsx(i.Tag,{color:"success",children:"Success"}),ca={demo:o.jsx(xg,{}),tokens:["colorSuccess","colorSuccessBg","colorSuccessBorder"],key:"success"},Cg=()=>{const{token:e}=i.theme.useToken();return o.jsxs(i.Space,{direction:"vertical",children:[o.jsxs("div",{style:{padding:12},children:[o.jsx(i.Tag,{color:"magenta",children:"magenta"}),o.jsx(i.Tag,{color:"red",children:"red"}),o.jsx(i.Tag,{color:"volcano",children:"volcano"}),o.jsx(i.Tag,{color:"orange",children:"orange"}),o.jsx(i.Tag,{color:"gold",children:"gold"}),o.jsx(i.Tag,{color:"lime",children:"lime"}),o.jsx(i.Tag,{color:"green",children:"green"}),o.jsx(i.Tag,{color:"cyan",children:"cyan"}),o.jsx(i.Tag,{color:"blue",children:"blue"}),o.jsx(i.Tag,{color:"geekblue",children:"geekblue"}),o.jsx(i.Tag,{color:"purple",children:"purple"})]}),o.jsx(i.Divider,{}),o.jsxs("div",{style:{background:e.colorFillSecondary,padding:12},children:[o.jsx(i.Tag,{color:"magenta",children:"magenta"}),o.jsx(i.Tag,{color:"red",children:"red"}),o.jsx(i.Tag,{color:"volcano",children:"volcano"}),o.jsx(i.Tag,{color:"orange",children:"orange"}),o.jsx(i.Tag,{color:"gold",children:"gold"}),o.jsx(i.Tag,{color:"lime",children:"lime"}),o.jsx(i.Tag,{color:"green",children:"green"}),o.jsx(i.Tag,{color:"cyan",children:"cyan"}),o.jsx(i.Tag,{color:"blue",children:"blue"}),o.jsx(i.Tag,{color:"geekblue",children:"geekblue"}),o.jsx(i.Tag,{color:"purple",children:"purple"})]})]})},kg={demo:o.jsx(Cg,{}),tokens:["blue-1","blue-3","blue-6","blue-7","cyan-1","cyan-3","cyan-6","cyan-7","geekblue-1","geekblue-3","geekblue-6","geekblue-7","gold-1","gold-3","gold-6","gold-7","green-1","green-3","green-6","green-7","lime-1","lime-3","lime-6","lime-7","magenta-1","magenta-3","magenta-6","magenta-7","orange-1","orange-3","orange-6","orange-7","pink-1","pink-3","pink-6","pink-7","purple-1","purple-3","purple-6","purple-7","volcano-1","volcano-3","volcano-6","volcano-7","yellow-1","yellow-3","yellow-6","yellow-7","red-1","red-3","red-6","red-7"],key:"default"},wg=()=>o.jsx(i.Tag,{color:"warning",children:"Warning"}),sa={demo:o.jsx(wg,{}),tokens:["colorWarning","colorWarningBg","colorWarningBorder"],key:"warning"},Eg=[kg,ia,yg,ca,sa,Sg,fg],Tg=()=>o.jsx(i.TimePicker._InternalPanelDoNotUseOrYouWillBeFired,{}),Bg=[{demo:o.jsx(Tg,{}),tokens:["colorPrimary"],key:"default"}],Dg=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{color:"red",children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Technical testing 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Network problems being solved 2015-09-01"})]}),da={demo:o.jsx(Dg,{}),tokens:["colorError"],key:"danger"},Hg=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{color:"green",children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Technical testing 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Network problems being solved 2015-09-01"})]}),pa={demo:o.jsx(Hg,{}),tokens:["colorSuccess"],key:"success"},Ag=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{children:"Technical testing 2015-09-01"})]}),Mg=[{demo:o.jsx(Ag,{}),tokens:["colorPrimary","colorText","colorSplit","colorBgContainer"],key:"default"},da,pa],Ig=()=>o.jsxs("div",{children:[o.jsx(i.Tooltip._InternalPanelDoNotUseOrYouWillBeFired,{title:"prompt text"}),o.jsx("span",{children:"Tooltip will show on mouse enter."})]}),Pg=[{demo:o.jsx(Ig,{}),tokens:["colorBgSpotlight","colorTextLightSolid"],key:"default"}],wo=[];for(let e=0;e<20;e++)wo.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const zg=wo.filter(e=>+e.key>10).map(e=>e.key),Lg=()=>{const[e,r]=h.useState(zg),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:wo,titles:["Source","Target"],targetKeys:e,status:"error",selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},$g={demo:o.jsx(Lg,{}),tokens:["colorError"],key:"danger"},lt=[];for(let e=0;e<20;e++)lt.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const Og=lt.filter(e=>+e.key>10).map(e=>e.key),Fg=()=>{const[e,r]=h.useState(Og),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:lt,titles:["Source","Target"],targetKeys:e,disabled:!0,selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},_g={demo:o.jsx(Fg,{}),tokens:["colorBgContainerDisabled"],key:"disabled"},Wg=wo.filter(e=>+e.key>10).map(e=>e.key),Xg=()=>{const[e,r]=h.useState(Wg),[t,n]=h.useState(["1","2"]),a=()=>{};return o.jsx(i.Transfer,{dataSource:wo,titles:["Source","Target"],targetKeys:e,selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},Gg={demo:o.jsx(Xg,{}),tokens:["controlItemBgActiveHover","controlItemBgActive","colorBgContainer"],key:"default"},ct=[];for(let e=0;e<20;e++)ct.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const Ng=ct.filter(e=>+e.key>10).map(e=>e.key),Ug=()=>{const[e,r]=h.useState(Ng),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:ct,titles:["Source","Target"],targetKeys:e,status:"warning",selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},jg=[Gg,{demo:o.jsx(Ug,{}),tokens:["colorWarning"],key:"warning"},$g,_g],Vg=[{title:"parent 1",key:"0-0",children:[{title:"parent 1-0",key:"0-0-0",disabled:!0,children:[{title:"leaf",key:"0-0-0-0",disableCheckbox:!0},{title:"leaf",key:"0-0-0-1"}]},{title:"parent 1-1",key:"0-0-1",children:[{title:o.jsx("span",{style:{color:"#1890ff"},children:"sss"}),key:"0-0-1-0"}]}]}],Yg=()=>o.jsx(i.Tree,{disabled:!0,checkable:!0,defaultExpandedKeys:["0-0-0","0-0-1"],defaultSelectedKeys:["0-0-0","0-0-1"],defaultCheckedKeys:["0-0-0","0-0-1"],treeData:Vg}),qg={demo:o.jsx(Yg,{}),tokens:["colorTextDisabled","colorBgContainerDisabled"],key:"disabled"},Zg=[{title:"parent 1",key:"0-0",children:[{title:"parent 1-0",key:"0-0-0",disabled:!0,children:[{title:"leaf",key:"0-0-0-0",disableCheckbox:!0},{title:"leaf",key:"0-0-0-1"}]},{title:"parent 1-1",key:"0-0-1",children:[{title:o.jsx("span",{style:{color:"#1890ff"},children:"sss"}),key:"0-0-1-0"}]}]}],Qg=()=>o.jsx(i.Tree,{checkable:!0,defaultExpandedKeys:["0-0-0","0-0-1"],defaultSelectedKeys:["0-0-0","0-0-1"],defaultCheckedKeys:["0-0-0","0-0-1"],treeData:Zg}),Kg=[{demo:o.jsx(Qg,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"},qg],{TreeNode:co,_InternalPanelDoNotUseOrYouWillBeFired:Jg}=i.TreeSelect,Rg=()=>{const[e,r]=h.useState(void 0),t=()=>{r(e)};return o.jsx(Jg,{disabled:!0,showSearch:!0,style:{width:"100%"},value:e,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Please select",allowClear:!0,treeDefaultExpandAll:!0,onChange:t,children:o.jsxs(co,{value:"parent 1",title:"parent 1",children:[o.jsxs(co,{value:"parent 1-0",title:"parent 1-0",children:[o.jsx(co,{value:"leaf1",title:"leaf1"}),o.jsx(co,{value:"leaf2",title:"leaf2"})]}),o.jsx(co,{value:"parent 1-1",title:"parent 1-1",children:o.jsx(co,{value:"leaf3",title:"leaf3"})})]})})},eh={demo:o.jsx(Rg,{}),tokens:["colorTextDisabled","colorBgContainerDisabled"],key:"disabled"},{TreeNode:so,_InternalPanelDoNotUseOrYouWillBeFired:oh}=i.TreeSelect,rh=()=>{const[e,r]=h.useState(void 0),t=()=>{r(e)};return o.jsx(oh,{showSearch:!0,style:{width:"100%"},value:e,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Please select",allowClear:!0,treeDefaultExpandAll:!0,onChange:t,children:o.jsxs(so,{value:"parent 1",title:"parent 1",children:[o.jsxs(so,{value:"parent 1-0",title:"parent 1-0",children:[o.jsx(so,{value:"leaf1",title:"leaf1"}),o.jsx(so,{value:"leaf2",title:"leaf2"})]}),o.jsx(so,{value:"parent 1-1",title:"parent 1-1",children:o.jsx(so,{value:"leaf3",title:"leaf3"})})]})})},th=[{demo:o.jsx(rh,{}),tokens:["colorPrimary","colorPrimaryActive","controlOutline","colorBgElevated","colorBgContainer"],key:"default"},eh],{Title:nh}=i.Typography,ah=()=>o.jsx(nh,{level:4,children:"Heading 4"}),ih={demo:o.jsx(ah,{}),tokens:["fontSizeHeading4"],key:"heading4"},{Title:lh,Text:ch}=i.Typography,sh=()=>o.jsxs("div",{children:[o.jsx(lh,{type:"danger",level:4,children:"Error Title"}),o.jsx(ch,{type:"danger",children:"error Text"})]}),dh={demo:o.jsx(sh,{}),tokens:["colorError","colorErrorHover","colorErrorActive"],key:"error"},{Title:ph,Text:uh}=i.Typography,gh=()=>o.jsxs("div",{children:[o.jsx(ph,{type:"success",level:4,children:"Success Title"}),o.jsx(uh,{type:"success",children:"success Text"})]}),hh={demo:o.jsx(gh,{}),tokens:["colorSuccess"],key:"success"},{Title:fh,Paragraph:st,Text:ua,Link:dt}=i.Typography,mh=()=>o.jsxs(i.Typography,{children:[o.jsx(fh,{level:4,children:"《故乡》 "}),o.jsx(st,{children:"——鲁迅"}),o.jsxs(st,{children:[o.jsx(ua,{strong:!0,children:"深蓝的天空中挂着一轮金黄的圆月"}),",下面是海边的沙地,都种着一望无际的碧绿的西瓜,其间有一个十一二岁的少年,项带银圈,手捏一柄钢叉,",o.jsx(ua,{mark:!0,children:"向一匹猹尽力的刺去"}),",那猹却将身一扭,反从他的胯下逃走了。"]}),o.jsx(st,{children:o.jsxs("ul",{children:[o.jsx("li",{children:o.jsx(dt,{href:"#",children:"狂人日记"})}),o.jsx("li",{children:o.jsx(dt,{href:"#",children:"呐喊"})}),o.jsx("li",{children:o.jsx(dt,{href:"#",children:"彷徨"})})]})})]}),vh={demo:o.jsx(mh,{}),tokens:["colorSuccess"],key:"default"},{Title:yh,Text:bh}=i.Typography,Sh=()=>o.jsxs("div",{children:[o.jsx(yh,{type:"warning",level:4,children:"Error Title"}),o.jsx(bh,{type:"warning",children:"error Text"})]}),xh=[vh,ih,dh,{demo:o.jsx(Sh,{}),tokens:["colorWarning"],key:"warning"},hh],Ch=()=>o.jsx("div",{children:o.jsx(i.Upload,{name:"avatar",listType:"picture-card",className:"avatar-uploader",showUploadList:!1,action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",children:o.jsxs("div",{children:[o.jsx(H.PlusOutlined,{}),o.jsx("div",{style:{marginTop:8},children:"Upload"})]})})}),kh={demo:o.jsx(Ch,{}),tokens:["colorFillAlter"],key:"avatar"},wh=()=>o.jsxs("div",{children:[o.jsx(i.Upload,{defaultFileList:[{uid:"3",name:"zzz.png",status:"error",response:"Server Error 500",url:"http://www.baidu.com/zzz.png"}],children:o.jsx(i.Button,{icon:o.jsx(H.UploadOutlined,{}),children:"Upload"})}),o.jsx(i.Upload,{listType:"picture",defaultFileList:[{uid:"3",name:"zzz.png",status:"error",response:"Server Error 500"}],children:o.jsx(i.Button,{icon:o.jsx(H.UploadOutlined,{}),children:"Upload"})})]}),ga={demo:o.jsx(wh,{}),tokens:["colorError","colorErrorBg"],key:"danger"},Eh={name:"file",action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",headers:{authorization:"authorization-text"},onChange(e){e.file.status==="done"?i.message.success(`${e.file.name} file uploaded successfully`):e.file.status==="error"&&i.message.error(`${e.file.name} file upload failed.`)}},Th=()=>o.jsx(i.Upload,W(P({},Eh),{children:o.jsx(i.Button,{icon:o.jsx(H.UploadOutlined,{}),children:"Click to Upload"})})),ha={Alert:ml,Anchor:Sl,AutoComplete:kl,Avatar:El,Badge:Il,Breadcrumb:zl,Button:Gl,Calendar:Vl,Card:Jl,Carousel:ec,Cascader:sc,Checkbox:gc,Collapse:fc,DatePicker:Ec,Descriptions:Bc,Dropdown:zc,Empty:$c,Form:Uc,Grid:Yc,Icon:Zc,Image:Rc,InputNumber:ks,Input:us,List:Ts,Mentions:Ws,Modal:fd,Notification:Dd,Pagination:Pd,Popconfirm:Od,Popover:Wd,Radio:tu,Rate:au,Select:zu,Skeleton:$u,Slider:Wu,Spin:Uu,Statistic:Vu,Switch:Ru,Table:cg,Tabs:gg,Tag:Eg,TimePicker:Bg,Timeline:Mg,Tooltip:Pg,Transfer:jg,TreeSelect:th,Tree:Kg,Typography:xh,Upload:[{demo:o.jsx(Th,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive"],key:"upload"},ga,kh],Divider:Hc,Space:Gu,Menu:js,Steps:Qu,Segmented:vu,Drawer:Mc,Message:nd,Result:fu,Progress:Kp},pt={_lang:"zh-CN",followPrimary:"跟随主色",reset:"重置",next:"下一步",groupView:"分组显示",fill:"填充",border:"描边",background:"背景",text:"文本",demo:{overview:"概览",components:"组件",relatedTokens:"关联 Token"}},fa=h.createContext(pt),Me=()=>h.useContext(fa),Bh={_lang:"en-US",followPrimary:"Follow Brand Color",reset:"Reset",next:"Next",groupView:"Group View",fill:"Fill",border:"Border",background:"Background",text:"Text",demo:{overview:"Overview",components:"Components",relatedTokens:"Related Tokens"}};function Dh(e){if(Array.isArray(e))return e}function Hh(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,a,l,c,s=[],p=!0,d=!1;try{if(l=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;p=!1}else for(;!(p=(n=l.call(t)).done)&&(s.push(n.value),s.length!==r);p=!0);}catch(g){d=!0,a=g}finally{try{if(!p&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(d)throw a}}return s}}function ma(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Ah(e,r){if(e){if(typeof e=="string")return ma(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ma(e,r)}}function Mh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ut(e,r){return Dh(e)||Hh(e,r)||Ah(e,r)||Mh()}function va(e){var r=T.useRef();r.current=e;var t=T.useCallback(function(){for(var n,a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return(n=r.current)===null||n===void 0?void 0:n.call.apply(n,[r].concat(l))},[]);return t}function Ih(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ya=Ih()?T.useLayoutEffect:T.useEffect,Ph=function(r,t){var n=T.useRef(!0);ya(function(){return r(n.current)},t),ya(function(){return n.current=!1,function(){n.current=!0}},[])},ba=function(r,t){Ph(function(n){if(!n)return r()},t)};function Sa(e){var r=T.useRef(!1),t=T.useState(e),n=ut(t,2),a=n[0],l=n[1];T.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]);function c(s,p){p&&r.current||l(s)}return[a,c]}function gt(e){return e!==void 0}function ht(e,r){var t=r||{},n=t.defaultValue,a=t.value,l=t.onChange,c=t.postState,s=Sa(function(){return gt(a)?a:gt(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),p=ut(s,2),d=p[0],g=p[1],u=a!==void 0?a:d,f=c?c(u):u,C=va(l),b=Sa([u]),y=ut(b,2),m=y[0],S=y[1];ba(function(){var k=m[0];d!==k&&C(d,k)},[m]),ba(function(){gt(a)||g(a)},[a]);var x=va(function(k,w){g(k,w),S([u],w)});return[f,x]}const Ue=e=>e?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACPTkDJAAAAZUlEQVRIDe2VMQoAMAgDa9/g/1/oIzrpZBCh2dLFkkoDF0Fz99OdiOjks+2/7S8fRRmMMIVoRGSoYzvvqF8ZIMKlC1GhQBc6IkPzq32QmdAzkEGihpWOSPsAss8HegYySNSw0hE9WQ4StafZFqkAAAAASUVORK5CYII=)":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==)",zh=de("ColorPreview",()=>({".previewer-color-preview":{width:20,height:20,position:"relative",borderRadius:"50%",padding:0,display:"inline-block","&::before":{content:'""',width:"100%",height:"100%",borderRadius:"50%",top:0,insetInlineStart:0,position:"absolute",zIndex:2,backgroundColor:"var(--antd-token-previewer-color-preview)",boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)"}}})),xa=l=>{var c=l,{color:e,style:r,className:t,dark:n}=c,a=Fo(c,["color","style","className","dark"]);const[s,p]=zh();return s(o.jsx("div",W(P({},a),{className:R("previewer-color-preview",t,p),style:P({"--antd-token-previewer-color-preview":e},r),children:o.jsx("div",{style:{content:'""',width:18,height:18,borderRadius:"50%",top:1,insetInlineStart:1,position:"absolute",zIndex:1,background:`${Ue(n)} 0% 0% / 20px`}})})))},Ca=(e,r=0)=>{const t=h.useRef(0),n=h.useCallback((...a)=>{cancelAnimationFrame(t.current);const l=performance.now(),c=s=>{s-l<r?t.current=requestAnimationFrame(c):e(...a)};t.current=requestAnimationFrame(c)},[e,r]);return h.useEffect(()=>()=>cancelAnimationFrame(t.current),[]),n};function po(){return(po=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function ft(e,r){if(e==null)return{};var t,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r.indexOf(t=l[n])>=0||(a[t]=e[t]);return a}function mt(e){var r=h.useRef(e),t=h.useRef(function(n){r.current&&r.current(n)});return r.current=e,t.current}var uo=function(e,r,t){return r===void 0&&(r=0),t===void 0&&(t=1),e>t?t:e<r?r:e},Eo=function(e){return"touches"in e},vt=function(e){return e&&e.ownerDocument.defaultView||self},ka=function(e,r,t){var n=e.getBoundingClientRect(),a=Eo(r)?function(l,c){for(var s=0;s<l.length;s++)if(l[s].identifier===c)return l[s];return l[0]}(r.touches,t):r;return{left:uo((a.pageX-(n.left+vt(e).pageXOffset))/n.width),top:uo((a.pageY-(n.top+vt(e).pageYOffset))/n.height)}},wa=function(e){!Eo(e)&&e.preventDefault()},yt=h.memo(function(e){var r=e.onMove,t=e.onKey,n=ft(e,["onMove","onKey"]),a=h.useRef(null),l=mt(r),c=mt(t),s=h.useRef(null),p=h.useRef(!1),d=h.useMemo(function(){var C=function(m){wa(m),(Eo(m)?m.touches.length>0:m.buttons>0)&&a.current?l(ka(a.current,m,s.current)):y(!1)},b=function(){return y(!1)};function y(m){var S=p.current,x=vt(a.current),k=m?x.addEventListener:x.removeEventListener;k(S?"touchmove":"mousemove",C),k(S?"touchend":"mouseup",b)}return[function(m){var S=m.nativeEvent,x=a.current;if(x&&(wa(S),!function(w,M){return M&&!Eo(w)}(S,p.current)&&x)){if(Eo(S)){p.current=!0;var k=S.changedTouches||[];k.length&&(s.current=k[0].identifier)}x.focus(),l(ka(x,S,s.current)),y(!0)}},function(m){var S=m.which||m.keyCode;S<37||S>40||(m.preventDefault(),c({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},y]},[c,l]),g=d[0],u=d[1],f=d[2];return h.useEffect(function(){return f},[f]),h.createElement("div",po({},n,{onTouchStart:g,onMouseDown:g,className:"react-colorful__interactive",ref:a,onKeyDown:u,tabIndex:0,role:"slider"}))}),To=function(e){return e.filter(Boolean).join(" ")},bt=function(e){var r=e.color,t=e.left,n=e.top,a=n===void 0?.5:n,l=To(["react-colorful__pointer",e.className]);return h.createElement("div",{className:l,style:{top:100*a+"%",left:100*t+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:r}}))},ge=function(e,r,t){return r===void 0&&(r=0),t===void 0&&(t=Math.pow(10,r)),Math.round(t*e)/t},Lh=function(e){return Ba(St(e))},St=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ge(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?ge(parseInt(e.substring(6,8),16)/255,2):1}},$h=function(e){return Oh(Ta(e))},Ea=function(e){var r=e.s,t=e.v,n=e.a,a=(200-r)*t/100;return{h:ge(e.h),s:ge(a>0&&a<200?r*t/100/(a<=100?a:200-a)*100:0),l:ge(a/2),a:ge(n,2)}},xt=function(e){var r=Ea(e);return"hsl("+r.h+", "+r.s+"%, "+r.l+"%)"},Ct=function(e){var r=Ea(e);return"hsla("+r.h+", "+r.s+"%, "+r.l+"%, "+r.a+")"},Ta=function(e){var r=e.h,t=e.s,n=e.v,a=e.a;r=r/360*6,t/=100,n/=100;var l=Math.floor(r),c=n*(1-t),s=n*(1-(r-l)*t),p=n*(1-(1-r+l)*t),d=l%6;return{r:ge(255*[n,s,c,c,p,n][d]),g:ge(255*[p,n,n,s,c,c][d]),b:ge(255*[c,c,p,n,n,s][d]),a:ge(a,2)}},ar=function(e){var r=e.toString(16);return r.length<2?"0"+r:r},Oh=function(e){var r=e.r,t=e.g,n=e.b,a=e.a,l=a<1?ar(ge(255*a)):"";return"#"+ar(r)+ar(t)+ar(n)+l},Ba=function(e){var r=e.r,t=e.g,n=e.b,a=e.a,l=Math.max(r,t,n),c=l-Math.min(r,t,n),s=c?l===r?(t-n)/c:l===t?2+(n-r)/c:4+(r-t)/c:0;return{h:ge(60*(s<0?s+6:s)),s:ge(l?c/l*100:0),v:ge(l/255*100),a}},Da=h.memo(function(e){var r=e.hue,t=e.onChange,n=To(["react-colorful__hue",e.className]);return h.createElement("div",{className:n},h.createElement(yt,{onMove:function(a){t({h:360*a.left})},onKey:function(a){t({h:uo(r+360*a.left,0,360)})},"aria-label":"Hue","aria-valuenow":ge(r),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(bt,{className:"react-colorful__hue-pointer",left:r/360,color:xt({h:r,s:100,v:100,a:1})})))}),Ha=h.memo(function(e){var r=e.hsva,t=e.onChange,n={backgroundColor:xt({h:r.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:n},h.createElement(yt,{onMove:function(a){t({s:100*a.left,v:100-100*a.top})},onKey:function(a){t({s:uo(r.s+100*a.left,0,100),v:uo(r.v-100*a.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ge(r.s)+"%, Brightness "+ge(r.v)+"%"},h.createElement(bt,{className:"react-colorful__saturation-pointer",top:1-r.v/100,left:r.s/100,color:xt(r)})))}),kt=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},Fh=function(e,r){return e.toLowerCase()===r.toLowerCase()||kt(St(e),St(r))};function Aa(e,r,t){var n=mt(t),a=h.useState(function(){return e.toHsva(r)}),l=a[0],c=a[1],s=h.useRef({color:r,hsva:l});h.useEffect(function(){if(!e.equal(r,s.current.color)){var d=e.toHsva(r);s.current={hsva:d,color:r},c(d)}},[r,e]),h.useEffect(function(){var d;kt(l,s.current.hsva)||e.equal(d=e.fromHsva(l),s.current.color)||(s.current={hsva:l,color:d},n(d))},[l,e,n]);var p=h.useCallback(function(d){c(function(g){return Object.assign({},g,d)})},[]);return[l,p]}var _h=typeof window!="undefined"?h.useLayoutEffect:h.useEffect,Wh=function(){return typeof __webpack_nonce__!="undefined"?__webpack_nonce__:void 0},Ma=new Map,Ia=function(e){_h(function(){var r=e.current?e.current.ownerDocument:document;if(r!==void 0&&!Ma.has(r)){var t=r.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Ma.set(r,t);var n=Wh();n&&t.setAttribute("nonce",n),r.head.appendChild(t)}},[])},Xh=function(e){var r=e.className,t=e.colorModel,n=e.color,a=n===void 0?t.defaultColor:n,l=e.onChange,c=ft(e,["className","colorModel","color","onChange"]),s=h.useRef(null);Ia(s);var p=Aa(t,a,l),d=p[0],g=p[1],u=To(["react-colorful",r]);return h.createElement("div",po({},c,{ref:s,className:u}),h.createElement(Ha,{hsva:d,onChange:g}),h.createElement(Da,{hue:d.h,onChange:g,className:"react-colorful__last-control"}))},Gh={defaultColor:"000",toHsva:Lh,fromHsva:function(e){return $h({h:e.h,s:e.s,v:e.v,a:1})},equal:Fh},Nh=function(e){return h.createElement(Xh,po({},e,{colorModel:Gh}))},Uh=function(e){var r=e.className,t=e.hsva,n=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+Ct(Object.assign({},t,{a:0}))+", "+Ct(Object.assign({},t,{a:1}))+")"},l=To(["react-colorful__alpha",r]),c=ge(100*t.a);return h.createElement("div",{className:l},h.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),h.createElement(yt,{onMove:function(s){n({a:s.left})},onKey:function(s){n({a:uo(t.a+s.left)})},"aria-label":"Alpha","aria-valuetext":c+"%","aria-valuenow":c,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(bt,{className:"react-colorful__alpha-pointer",left:t.a,color:Ct(t)})))},jh=function(e){var r=e.className,t=e.colorModel,n=e.color,a=n===void 0?t.defaultColor:n,l=e.onChange,c=ft(e,["className","colorModel","color","onChange"]),s=h.useRef(null);Ia(s);var p=Aa(t,a,l),d=p[0],g=p[1],u=To(["react-colorful",r]);return h.createElement("div",po({},c,{ref:s,className:u}),h.createElement(Ha,{hsva:d,onChange:g}),h.createElement(Da,{hue:d.h,onChange:g}),h.createElement(Uh,{hsva:d,onChange:g,className:"react-colorful__last-control"}))},Vh={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Ba,fromHsva:Ta,equal:kt},Yh=function(e){return h.createElement(jh,po({},e,{colorModel:Vh}))};function ir(e){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ir(e)}var qh=/^\s+/,Zh=/\s+$/;function B(e,r){if(e=e||"",r=r||{},e instanceof B)return e;if(!(this instanceof B))return new B(e,r);var t=Qh(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||t.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}B.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),t,n,a,l,c,s;return t=r.r/255,n=r.g/255,a=r.b/255,t<=.03928?l=t/12.92:l=Math.pow((t+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*l+.7152*c+.0722*s},setAlpha:function(r){return this._a=Fa(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=za(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=za(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+a+"%)":"hsva("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var r=Pa(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=Pa(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+a+"%)":"hsla("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(r){return La(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return ef(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(te(this._r,255)*100)+"%",g:Math.round(te(this._g,255)*100)+"%",b:Math.round(te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%)":"rgba("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:gf[La(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var t="#"+$a(this._r,this._g,this._b,this._a),n=t,a=this._gradientType?"GradientType = 1, ":"";if(r){var l=B(r);n="#"+$a(l._r,l._g,l._b,l._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+n+")"},toString:function(r){var t=!!r;r=r||this._format;var n=!1,a=this._a<1&&this._a>=0,l=!t&&a&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return l?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return B(this.toString())},_applyModification:function(r,t){var n=r.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(nf,arguments)},brighten:function(){return this._applyModification(af,arguments)},darken:function(){return this._applyModification(lf,arguments)},desaturate:function(){return this._applyModification(of,arguments)},saturate:function(){return this._applyModification(rf,arguments)},greyscale:function(){return this._applyModification(tf,arguments)},spin:function(){return this._applyModification(cf,arguments)},_applyCombination:function(r,t){return r.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(pf,arguments)},complement:function(){return this._applyCombination(sf,arguments)},monochromatic:function(){return this._applyCombination(uf,arguments)},splitcomplement:function(){return this._applyCombination(df,arguments)},triad:function(){return this._applyCombination(Oa,[3])},tetrad:function(){return this._applyCombination(Oa,[4])}},B.fromRatio=function(e,r){if(ir(e)=="object"){var t={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?t[n]=e[n]:t[n]=Bo(e[n]));e=t}return B(e,r)};function Qh(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,l=null,c=!1,s=!1;return typeof e=="string"&&(e=vf(e)),ir(e)=="object"&&(ze(e.r)&&ze(e.g)&&ze(e.b)?(r=Kh(e.r,e.g,e.b),c=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ze(e.h)&&ze(e.s)&&ze(e.v)?(n=Bo(e.s),a=Bo(e.v),r=Rh(e.h,n,a),c=!0,s="hsv"):ze(e.h)&&ze(e.s)&&ze(e.l)&&(n=Bo(e.s),l=Bo(e.l),r=Jh(e.h,n,l),c=!0,s="hsl"),e.hasOwnProperty("a")&&(t=e.a)),t=Fa(t),{ok:c,format:e.format||s,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}function Kh(e,r,t){return{r:te(e,255)*255,g:te(r,255)*255,b:te(t,255)*255}}function Pa(e,r,t){e=te(e,255),r=te(r,255),t=te(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l,c,s=(n+a)/2;if(n==a)l=c=0;else{var p=n-a;switch(c=s>.5?p/(2-n-a):p/(n+a),n){case e:l=(r-t)/p+(r<t?6:0);break;case r:l=(t-e)/p+2;break;case t:l=(e-r)/p+4;break}l/=6}return{h:l,s:c,l:s}}function Jh(e,r,t){var n,a,l;e=te(e,360),r=te(r,100),t=te(t,100);function c(d,g,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?d+(g-d)*6*u:u<1/2?g:u<2/3?d+(g-d)*(2/3-u)*6:d}if(r===0)n=a=l=t;else{var s=t<.5?t*(1+r):t+r-t*r,p=2*t-s;n=c(p,s,e+1/3),a=c(p,s,e),l=c(p,s,e-1/3)}return{r:n*255,g:a*255,b:l*255}}function za(e,r,t){e=te(e,255),r=te(r,255),t=te(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l,c,s=n,p=n-a;if(c=n===0?0:p/n,n==a)l=0;else{switch(n){case e:l=(r-t)/p+(r<t?6:0);break;case r:l=(t-e)/p+2;break;case t:l=(e-r)/p+4;break}l/=6}return{h:l,s:c,v:s}}function Rh(e,r,t){e=te(e,360)*6,r=te(r,100),t=te(t,100);var n=Math.floor(e),a=e-n,l=t*(1-r),c=t*(1-a*r),s=t*(1-(1-a)*r),p=n%6,d=[t,c,l,l,s,t][p],g=[s,t,t,c,l,l][p],u=[l,l,s,t,t,c][p];return{r:d*255,g:g*255,b:u*255}}function La(e,r,t,n){var a=[Te(Math.round(e).toString(16)),Te(Math.round(r).toString(16)),Te(Math.round(t).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function ef(e,r,t,n,a){var l=[Te(Math.round(e).toString(16)),Te(Math.round(r).toString(16)),Te(Math.round(t).toString(16)),Te(_a(n))];return a&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)&&l[3].charAt(0)==l[3].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function $a(e,r,t,n){var a=[Te(_a(n)),Te(Math.round(e).toString(16)),Te(Math.round(r).toString(16)),Te(Math.round(t).toString(16))];return a.join("")}B.equals=function(e,r){return!e||!r?!1:B(e).toRgbString()==B(r).toRgbString()},B.random=function(){return B.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function of(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.s-=r/100,t.s=lr(t.s),B(t)}function rf(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.s+=r/100,t.s=lr(t.s),B(t)}function tf(e){return B(e).desaturate(100)}function nf(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.l+=r/100,t.l=lr(t.l),B(t)}function af(e,r){r=r===0?0:r||10;var t=B(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),B(t)}function lf(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.l-=r/100,t.l=lr(t.l),B(t)}function cf(e,r){var t=B(e).toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,B(t)}function sf(e){var r=B(e).toHsl();return r.h=(r.h+180)%360,B(r)}function Oa(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var t=B(e).toHsl(),n=[B(e)],a=360/r,l=1;l<r;l++)n.push(B({h:(t.h+l*a)%360,s:t.s,l:t.l}));return n}function df(e){var r=B(e).toHsl(),t=r.h;return[B(e),B({h:(t+72)%360,s:r.s,l:r.l}),B({h:(t+216)%360,s:r.s,l:r.l})]}function pf(e,r,t){r=r||6,t=t||30;var n=B(e).toHsl(),a=360/t,l=[B(e)];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,l.push(B(n));return l}function uf(e,r){r=r||6;for(var t=B(e).toHsv(),n=t.h,a=t.s,l=t.v,c=[],s=1/r;r--;)c.push(B({h:n,s:a,v:l})),l=(l+s)%1;return c}B.mix=function(e,r,t){t=t===0?0:t||50;var n=B(e).toRgb(),a=B(r).toRgb(),l=t/100,c={r:(a.r-n.r)*l+n.r,g:(a.g-n.g)*l+n.g,b:(a.b-n.b)*l+n.b,a:(a.a-n.a)*l+n.a};return B(c)},B.readability=function(e,r){var t=B(e),n=B(r);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)},B.isReadable=function(e,r,t){var n=B.readability(e,r),a,l;switch(l=!1,a=yf(t),a.level+a.size){case"AAsmall":case"AAAlarge":l=n>=4.5;break;case"AAlarge":l=n>=3;break;case"AAAsmall":l=n>=7;break}return l},B.mostReadable=function(e,r,t){var n=null,a=0,l,c,s,p;t=t||{},c=t.includeFallbackColors,s=t.level,p=t.size;for(var d=0;d<r.length;d++)l=B.readability(e,r[d]),l>a&&(a=l,n=B(r[d]));return B.isReadable(e,n,{level:s,size:p})||!c?n:(t.includeFallbackColors=!1,B.mostReadable(e,["#fff","#000"],t))};var wt=B.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},gf=B.hexNames=hf(wt);function hf(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}function Fa(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function te(e,r){ff(e)&&(e="100%");var t=mf(e);return e=Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function lr(e){return Math.min(1,Math.max(0,e))}function xe(e){return parseInt(e,16)}function ff(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function mf(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Te(e){return e.length==1?"0"+e:""+e}function Bo(e){return e<=1&&(e=e*100+"%"),e}function _a(e){return Math.round(parseFloat(e)*255).toString(16)}function Wa(e){return xe(e)/255}var Be=function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",t="(?:"+r+")|(?:"+e+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",a="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ze(e){return!!Be.CSS_UNIT.exec(e)}function vf(e){e=e.replace(qh,"").replace(Zh,"").toLowerCase();var r=!1;if(wt[e])e=wt[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Be.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Be.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Be.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Be.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Be.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Be.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Be.hex8.exec(e))?{r:xe(t[1]),g:xe(t[2]),b:xe(t[3]),a:Wa(t[4]),format:r?"name":"hex8"}:(t=Be.hex6.exec(e))?{r:xe(t[1]),g:xe(t[2]),b:xe(t[3]),format:r?"name":"hex"}:(t=Be.hex4.exec(e))?{r:xe(t[1]+""+t[1]),g:xe(t[2]+""+t[2]),b:xe(t[3]+""+t[3]),a:Wa(t[4]+""+t[4]),format:r?"name":"hex8"}:(t=Be.hex3.exec(e))?{r:xe(t[1]+""+t[1]),g:xe(t[2]+""+t[2]),b:xe(t[3]+""+t[3]),format:r?"name":"hex"}:!1}function yf(e){var r,t;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),t=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:r,size:t}}const{useToken:bf}=i.theme,Sf=de("ColorPanel",e=>({".color-panel":{padding:12,backgroundColor:"#fff",borderRadius:12,border:"1px solid rgba(0, 0, 0, 0.06)",boxShadow:e.boxShadow,width:224,boxSizing:"border-box",".color-panel-mode":{display:"flex",alignItems:"center",marginBottom:6},".color-panel-preview":{width:24,height:24,borderRadius:4,boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)",flex:"none",overflow:"hidden",background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==) 0% 0% / 32px"},".color-panel-preset-colors":{paddingTop:12,display:"flex",flexWrap:"wrap",width:200},".color-panel-preset-color-btn":{borderRadius:4,width:20,height:20,border:"none",outline:"none",margin:4,cursor:"pointer",boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)"},".color-panel-mode-title":{color:e.colorTextPlaceholder,marginTop:2,fontSize:12,textAlign:"center"},".color-panel-rgba-input":{display:"flex",alignItems:"center","&-part":{flex:1,width:0,display:"flex",flexDirection:"column",alignItems:"center","&-title":{color:e.colorTextPlaceholder,marginTop:2,fontSize:12},"&:not(:last-child)":{marginRight:4},[`${e.rootCls}-input-number`]:{width:"100%",input:{fontSize:12,padding:"0 4px"}}}}}})),Et=(e,r=!1)=>r?B(e).toHex8():B(e).toHex(),Xa=({value:e,onChange:r,alpha:t})=>{const[n,a]=h.useState(e),l=h.useRef(!1),c=d=>{a(d.target.value),r==null||r(Et(d.target.value,t))},s=d=>{l.current=!1,a(Et(d.target.value,t))},p=()=>{l.current=!0};return h.useEffect(()=>{l.current||a(Et(e,t))},[e,t]),o.jsxs("div",{children:[o.jsx(i.Input,{prefix:"#",size:"small",value:n,onFocus:p,onChange:c,onBlur:s}),o.jsxs("div",{className:"color-panel-mode-title",children:["HEX",t?"8":""]})]})},xf=({value:e,onChange:r,alpha:t})=>{const[n,a]=ht(e!=null?e:{r:0,g:0,b:0,a:1},{value:e,onChange:r});return o.jsx("div",{className:"color-panel-rgba-input",children:o.jsxs(i.ConfigProvider,{theme:{components:{InputNumber:{handleWidth:12}}},children:[o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.r,onChange:l=>a(W(P({},n),{r:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"R"})]}),o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.g,onChange:l=>a(W(P({},n),{g:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"G"})]}),o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.b,onChange:l=>a(W(P({},n),{b:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"B"})]}),t&&o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:1,step:.01,size:"small",value:n.a,onChange:l=>a(W(P({},n),{a:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"A"})]})]})})},Cf=["HEX","HEX8","RGB","RGBA"],Tt=(e,r)=>{switch(r){case"HEX":return B(e).toHexString();case"HEX8":return B(e).toHex8String();case"RGBA":case"RGB":default:return B(e).toRgbString()}},Ga=({color:e,onChange:r,alpha:t,style:n})=>{const{token:a}=bf(),[l,c]=Sf(),[s,p]=h.useState("HEX"),d=h.useMemo(()=>[a.blue,a.purple,a.cyan,a.green,a.magenta,a.pink,a.red,a.orange,a.yellow,a.volcano,a.geekblue,a.gold,a.lime,"#000"],[]),g=u=>{p(u),r(Tt(e,u))};return l(o.jsxs("div",{className:R(c,"color-panel"),style:n,children:[(s==="HEX"||s==="RGB")&&o.jsx(Nh,{style:{height:160},color:B(e).toHex(),onChange:u=>{r(Tt(u,s))}}),(s==="RGBA"||s==="HEX8")&&o.jsx(Yh,{style:{height:160},color:B(e).toRgb(),onChange:u=>{r(Tt(u,s))}}),o.jsxs("div",{style:{marginTop:12},children:[o.jsxs("div",{className:"color-panel-mode",children:[o.jsx("div",{className:"color-panel-preview",children:o.jsx("div",{style:{backgroundColor:e,width:"100%",height:"100%"}})}),o.jsx(i.Select,{"data-testid":"antd-select",value:s,onChange:g,options:Cf.filter(u=>t||u==="HEX"||u==="RGB").map(u=>({value:u,key:u})),size:"small",bordered:!1,dropdownMatchSelectWidth:!1})]}),s==="HEX"&&o.jsx(Xa,{value:B(e).toHex(),onChange:u=>r==null?void 0:r(B(u).toHexString())}),s==="HEX8"&&o.jsx(Xa,{alpha:!0,value:B(e).toHex8(),onChange:u=>r==null?void 0:r(B(u).toHex8String())}),(s==="RGBA"||s==="RGB")&&o.jsx(xf,{alpha:s==="RGBA",value:B(e).toRgb(),onChange:u=>r==null?void 0:r(B(u).toRgbString())})]}),o.jsx("div",{className:"color-panel-preset-colors",children:d.map(u=>o.jsx("button",{className:"color-panel-preset-color-btn",style:{backgroundColor:u},onClick:()=>r(u)},u))})]}))};function Na(e){return e.startsWith("rgb")||e.startsWith("#")}const kf=de("TokenInput",e=>({".previewer-token-input":{[`${e.rootCls}-input-group-addon, ${e.rootCls}-input-number-group-addon`]:{border:"0 !important",color:"rgba(0, 0, 0, 0.25) !important",fontSize:`${e.fontSizeSM}px !important`,padding:"0 !important",backgroundColor:"transparent !important","&:first-child":{paddingInlineStart:0},"&:last-child":{paddingInlineEnd:0}},[`${e.rootCls}-input-group-wrapper, ${e.rootCls}-input-number-group-wrapper`]:{padding:0,height:24,width:"100%",input:{fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,padding:`2px ${e.paddingXS}px`,height:24}},[`${e.rootCls}-input-group-wrapper ${e.rootCls}-input, ${e.rootCls}-input-number-group-wrapper ${e.rootCls}-input-number`]:{background:"white",borderRadius:`${e.borderRadiusLG}px !important`,whiteSpace:"nowrap",textOverflow:"ellipsis"},"&&-light":{[`${e.rootCls}-input-group-addon, ${e.rootCls}-input-number-group-addon`]:{backgroundColor:e.colorBgContainer},[`${e.rootCls}-input-group-wrapper ${e.rootCls}-input,
35
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ut(e,r){return Dh(e)||Hh(e,r)||Ah(e,r)||Mh()}function va(e){var r=T.useRef();r.current=e;var t=T.useCallback(function(){for(var n,a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return(n=r.current)===null||n===void 0?void 0:n.call.apply(n,[r].concat(l))},[]);return t}function Ih(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ya=Ih()?T.useLayoutEffect:T.useEffect,Ph=function(r,t){var n=T.useRef(!0);ya(function(){return r(n.current)},t),ya(function(){return n.current=!1,function(){n.current=!0}},[])},ba=function(r,t){Ph(function(n){if(!n)return r()},t)};function Sa(e){var r=T.useRef(!1),t=T.useState(e),n=ut(t,2),a=n[0],l=n[1];T.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]);function c(s,p){p&&r.current||l(s)}return[a,c]}function gt(e){return e!==void 0}function ht(e,r){var t=r||{},n=t.defaultValue,a=t.value,l=t.onChange,c=t.postState,s=Sa(function(){return gt(a)?a:gt(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),p=ut(s,2),d=p[0],g=p[1],u=a!==void 0?a:d,f=c?c(u):u,C=va(l),b=Sa([u]),y=ut(b,2),m=y[0],S=y[1];ba(function(){var k=m[0];d!==k&&C(d,k)},[m]),ba(function(){gt(a)||g(a)},[a]);var x=va(function(k,w){g(k,w),S([u],w)});return[f,x]}const Ue=e=>e?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACPTkDJAAAAZUlEQVRIDe2VMQoAMAgDa9/g/1/oIzrpZBCh2dLFkkoDF0Fz99OdiOjks+2/7S8fRRmMMIVoRGSoYzvvqF8ZIMKlC1GhQBc6IkPzq32QmdAzkEGihpWOSPsAss8HegYySNSw0hE9WQ4StafZFqkAAAAASUVORK5CYII=)":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==)",zh=de("ColorPreview",()=>({".previewer-color-preview":{width:20,height:20,position:"relative",borderRadius:"50%",padding:0,display:"inline-block","&::before":{content:'""',width:"100%",height:"100%",borderRadius:"50%",top:0,insetInlineStart:0,position:"absolute",zIndex:2,backgroundColor:"var(--antd-token-previewer-color-preview)",boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)"}}})),xa=l=>{var c=l,{color:e,style:r,className:t,dark:n}=c,a=Fo(c,["color","style","className","dark"]);const[s,p]=zh();return s(o.jsx("div",W(P({},a),{className:R("previewer-color-preview",t,p),style:P({"--antd-token-previewer-color-preview":e},r),children:o.jsx("div",{style:{content:'""',width:18,height:18,borderRadius:"50%",top:1,insetInlineStart:1,position:"absolute",zIndex:1,background:`${Ue(n)} 0% 0% / 20px`}})})))},Ca=(e,r=0)=>{const t=h.useRef(0),n=h.useCallback((...a)=>{cancelAnimationFrame(t.current);const l=performance.now(),c=s=>{s-l<r?t.current=requestAnimationFrame(c):e(...a)};t.current=requestAnimationFrame(c)},[e,r]);return h.useEffect(()=>()=>cancelAnimationFrame(t.current),[]),n};function po(){return(po=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function ft(e,r){if(e==null)return{};var t,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r.indexOf(t=l[n])>=0||(a[t]=e[t]);return a}function mt(e){var r=h.useRef(e),t=h.useRef(function(n){r.current&&r.current(n)});return r.current=e,t.current}var uo=function(e,r,t){return r===void 0&&(r=0),t===void 0&&(t=1),e>t?t:e<r?r:e},Eo=function(e){return"touches"in e},vt=function(e){return e&&e.ownerDocument.defaultView||self},ka=function(e,r,t){var n=e.getBoundingClientRect(),a=Eo(r)?function(l,c){for(var s=0;s<l.length;s++)if(l[s].identifier===c)return l[s];return l[0]}(r.touches,t):r;return{left:uo((a.pageX-(n.left+vt(e).pageXOffset))/n.width),top:uo((a.pageY-(n.top+vt(e).pageYOffset))/n.height)}},wa=function(e){!Eo(e)&&e.preventDefault()},yt=h.memo(function(e){var r=e.onMove,t=e.onKey,n=ft(e,["onMove","onKey"]),a=h.useRef(null),l=mt(r),c=mt(t),s=h.useRef(null),p=h.useRef(!1),d=h.useMemo(function(){var C=function(m){wa(m),(Eo(m)?m.touches.length>0:m.buttons>0)&&a.current?l(ka(a.current,m,s.current)):y(!1)},b=function(){return y(!1)};function y(m){var S=p.current,x=vt(a.current),k=m?x.addEventListener:x.removeEventListener;k(S?"touchmove":"mousemove",C),k(S?"touchend":"mouseup",b)}return[function(m){var S=m.nativeEvent,x=a.current;if(x&&(wa(S),!function(w,M){return M&&!Eo(w)}(S,p.current)&&x)){if(Eo(S)){p.current=!0;var k=S.changedTouches||[];k.length&&(s.current=k[0].identifier)}x.focus(),l(ka(x,S,s.current)),y(!0)}},function(m){var S=m.which||m.keyCode;S<37||S>40||(m.preventDefault(),c({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},y]},[c,l]),g=d[0],u=d[1],f=d[2];return h.useEffect(function(){return f},[f]),h.createElement("div",po({},n,{onTouchStart:g,onMouseDown:g,className:"react-colorful__interactive",ref:a,onKeyDown:u,tabIndex:0,role:"slider"}))}),To=function(e){return e.filter(Boolean).join(" ")},bt=function(e){var r=e.color,t=e.left,n=e.top,a=n===void 0?.5:n,l=To(["react-colorful__pointer",e.className]);return h.createElement("div",{className:l,style:{top:100*a+"%",left:100*t+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:r}}))},ge=function(e,r,t){return r===void 0&&(r=0),t===void 0&&(t=Math.pow(10,r)),Math.round(t*e)/t},Lh=function(e){return Ba(St(e))},St=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ge(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?ge(parseInt(e.substring(6,8),16)/255,2):1}},$h=function(e){return Oh(Ta(e))},Ea=function(e){var r=e.s,t=e.v,n=e.a,a=(200-r)*t/100;return{h:ge(e.h),s:ge(a>0&&a<200?r*t/100/(a<=100?a:200-a)*100:0),l:ge(a/2),a:ge(n,2)}},xt=function(e){var r=Ea(e);return"hsl("+r.h+", "+r.s+"%, "+r.l+"%)"},Ct=function(e){var r=Ea(e);return"hsla("+r.h+", "+r.s+"%, "+r.l+"%, "+r.a+")"},Ta=function(e){var r=e.h,t=e.s,n=e.v,a=e.a;r=r/360*6,t/=100,n/=100;var l=Math.floor(r),c=n*(1-t),s=n*(1-(r-l)*t),p=n*(1-(1-r+l)*t),d=l%6;return{r:ge(255*[n,s,c,c,p,n][d]),g:ge(255*[p,n,n,s,c,c][d]),b:ge(255*[c,c,p,n,n,s][d]),a:ge(a,2)}},ar=function(e){var r=e.toString(16);return r.length<2?"0"+r:r},Oh=function(e){var r=e.r,t=e.g,n=e.b,a=e.a,l=a<1?ar(ge(255*a)):"";return"#"+ar(r)+ar(t)+ar(n)+l},Ba=function(e){var r=e.r,t=e.g,n=e.b,a=e.a,l=Math.max(r,t,n),c=l-Math.min(r,t,n),s=c?l===r?(t-n)/c:l===t?2+(n-r)/c:4+(r-t)/c:0;return{h:ge(60*(s<0?s+6:s)),s:ge(l?c/l*100:0),v:ge(l/255*100),a}},Da=h.memo(function(e){var r=e.hue,t=e.onChange,n=To(["react-colorful__hue",e.className]);return h.createElement("div",{className:n},h.createElement(yt,{onMove:function(a){t({h:360*a.left})},onKey:function(a){t({h:uo(r+360*a.left,0,360)})},"aria-label":"Hue","aria-valuenow":ge(r),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(bt,{className:"react-colorful__hue-pointer",left:r/360,color:xt({h:r,s:100,v:100,a:1})})))}),Ha=h.memo(function(e){var r=e.hsva,t=e.onChange,n={backgroundColor:xt({h:r.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:n},h.createElement(yt,{onMove:function(a){t({s:100*a.left,v:100-100*a.top})},onKey:function(a){t({s:uo(r.s+100*a.left,0,100),v:uo(r.v-100*a.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ge(r.s)+"%, Brightness "+ge(r.v)+"%"},h.createElement(bt,{className:"react-colorful__saturation-pointer",top:1-r.v/100,left:r.s/100,color:xt(r)})))}),kt=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},Fh=function(e,r){return e.toLowerCase()===r.toLowerCase()||kt(St(e),St(r))};function Aa(e,r,t){var n=mt(t),a=h.useState(function(){return e.toHsva(r)}),l=a[0],c=a[1],s=h.useRef({color:r,hsva:l});h.useEffect(function(){if(!e.equal(r,s.current.color)){var d=e.toHsva(r);s.current={hsva:d,color:r},c(d)}},[r,e]),h.useEffect(function(){var d;kt(l,s.current.hsva)||e.equal(d=e.fromHsva(l),s.current.color)||(s.current={hsva:l,color:d},n(d))},[l,e,n]);var p=h.useCallback(function(d){c(function(g){return Object.assign({},g,d)})},[]);return[l,p]}var _h=typeof window!="undefined"?h.useLayoutEffect:h.useEffect,Wh=function(){return typeof __webpack_nonce__!="undefined"?__webpack_nonce__:void 0},Ma=new Map,Ia=function(e){_h(function(){var r=e.current?e.current.ownerDocument:document;if(r!==void 0&&!Ma.has(r)){var t=r.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Ma.set(r,t);var n=Wh();n&&t.setAttribute("nonce",n),r.head.appendChild(t)}},[])},Xh=function(e){var r=e.className,t=e.colorModel,n=e.color,a=n===void 0?t.defaultColor:n,l=e.onChange,c=ft(e,["className","colorModel","color","onChange"]),s=h.useRef(null);Ia(s);var p=Aa(t,a,l),d=p[0],g=p[1],u=To(["react-colorful",r]);return h.createElement("div",po({},c,{ref:s,className:u}),h.createElement(Ha,{hsva:d,onChange:g}),h.createElement(Da,{hue:d.h,onChange:g,className:"react-colorful__last-control"}))},Gh={defaultColor:"000",toHsva:Lh,fromHsva:function(e){return $h({h:e.h,s:e.s,v:e.v,a:1})},equal:Fh},Nh=function(e){return h.createElement(Xh,po({},e,{colorModel:Gh}))},Uh=function(e){var r=e.className,t=e.hsva,n=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+Ct(Object.assign({},t,{a:0}))+", "+Ct(Object.assign({},t,{a:1}))+")"},l=To(["react-colorful__alpha",r]),c=ge(100*t.a);return h.createElement("div",{className:l},h.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),h.createElement(yt,{onMove:function(s){n({a:s.left})},onKey:function(s){n({a:uo(t.a+s.left)})},"aria-label":"Alpha","aria-valuetext":c+"%","aria-valuenow":c,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(bt,{className:"react-colorful__alpha-pointer",left:t.a,color:Ct(t)})))},jh=function(e){var r=e.className,t=e.colorModel,n=e.color,a=n===void 0?t.defaultColor:n,l=e.onChange,c=ft(e,["className","colorModel","color","onChange"]),s=h.useRef(null);Ia(s);var p=Aa(t,a,l),d=p[0],g=p[1],u=To(["react-colorful",r]);return h.createElement("div",po({},c,{ref:s,className:u}),h.createElement(Ha,{hsva:d,onChange:g}),h.createElement(Da,{hue:d.h,onChange:g}),h.createElement(Uh,{hsva:d,onChange:g,className:"react-colorful__last-control"}))},Vh={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Ba,fromHsva:Ta,equal:kt},Yh=function(e){return h.createElement(jh,po({},e,{colorModel:Vh}))};function ir(e){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ir(e)}var qh=/^\s+/,Zh=/\s+$/;function B(e,r){if(e=e||"",r=r||{},e instanceof B)return e;if(!(this instanceof B))return new B(e,r);var t=Qh(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||t.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}B.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),t,n,a,l,c,s;return t=r.r/255,n=r.g/255,a=r.b/255,t<=.03928?l=t/12.92:l=Math.pow((t+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*l+.7152*c+.0722*s},setAlpha:function(r){return this._a=Fa(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=za(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=za(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+a+"%)":"hsva("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var r=Pa(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=Pa(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+a+"%)":"hsla("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(r){return La(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return ef(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(te(this._r,255)*100)+"%",g:Math.round(te(this._g,255)*100)+"%",b:Math.round(te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%)":"rgba("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:gf[La(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var t="#"+$a(this._r,this._g,this._b,this._a),n=t,a=this._gradientType?"GradientType = 1, ":"";if(r){var l=B(r);n="#"+$a(l._r,l._g,l._b,l._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+n+")"},toString:function(r){var t=!!r;r=r||this._format;var n=!1,a=this._a<1&&this._a>=0,l=!t&&a&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return l?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return B(this.toString())},_applyModification:function(r,t){var n=r.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(nf,arguments)},brighten:function(){return this._applyModification(af,arguments)},darken:function(){return this._applyModification(lf,arguments)},desaturate:function(){return this._applyModification(of,arguments)},saturate:function(){return this._applyModification(rf,arguments)},greyscale:function(){return this._applyModification(tf,arguments)},spin:function(){return this._applyModification(cf,arguments)},_applyCombination:function(r,t){return r.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(pf,arguments)},complement:function(){return this._applyCombination(sf,arguments)},monochromatic:function(){return this._applyCombination(uf,arguments)},splitcomplement:function(){return this._applyCombination(df,arguments)},triad:function(){return this._applyCombination(Oa,[3])},tetrad:function(){return this._applyCombination(Oa,[4])}},B.fromRatio=function(e,r){if(ir(e)=="object"){var t={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?t[n]=e[n]:t[n]=Bo(e[n]));e=t}return B(e,r)};function Qh(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,l=null,c=!1,s=!1;return typeof e=="string"&&(e=vf(e)),ir(e)=="object"&&(ze(e.r)&&ze(e.g)&&ze(e.b)?(r=Kh(e.r,e.g,e.b),c=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ze(e.h)&&ze(e.s)&&ze(e.v)?(n=Bo(e.s),a=Bo(e.v),r=Rh(e.h,n,a),c=!0,s="hsv"):ze(e.h)&&ze(e.s)&&ze(e.l)&&(n=Bo(e.s),l=Bo(e.l),r=Jh(e.h,n,l),c=!0,s="hsl"),e.hasOwnProperty("a")&&(t=e.a)),t=Fa(t),{ok:c,format:e.format||s,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}function Kh(e,r,t){return{r:te(e,255)*255,g:te(r,255)*255,b:te(t,255)*255}}function Pa(e,r,t){e=te(e,255),r=te(r,255),t=te(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l,c,s=(n+a)/2;if(n==a)l=c=0;else{var p=n-a;switch(c=s>.5?p/(2-n-a):p/(n+a),n){case e:l=(r-t)/p+(r<t?6:0);break;case r:l=(t-e)/p+2;break;case t:l=(e-r)/p+4;break}l/=6}return{h:l,s:c,l:s}}function Jh(e,r,t){var n,a,l;e=te(e,360),r=te(r,100),t=te(t,100);function c(d,g,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?d+(g-d)*6*u:u<1/2?g:u<2/3?d+(g-d)*(2/3-u)*6:d}if(r===0)n=a=l=t;else{var s=t<.5?t*(1+r):t+r-t*r,p=2*t-s;n=c(p,s,e+1/3),a=c(p,s,e),l=c(p,s,e-1/3)}return{r:n*255,g:a*255,b:l*255}}function za(e,r,t){e=te(e,255),r=te(r,255),t=te(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l,c,s=n,p=n-a;if(c=n===0?0:p/n,n==a)l=0;else{switch(n){case e:l=(r-t)/p+(r<t?6:0);break;case r:l=(t-e)/p+2;break;case t:l=(e-r)/p+4;break}l/=6}return{h:l,s:c,v:s}}function Rh(e,r,t){e=te(e,360)*6,r=te(r,100),t=te(t,100);var n=Math.floor(e),a=e-n,l=t*(1-r),c=t*(1-a*r),s=t*(1-(1-a)*r),p=n%6,d=[t,c,l,l,s,t][p],g=[s,t,t,c,l,l][p],u=[l,l,s,t,t,c][p];return{r:d*255,g:g*255,b:u*255}}function La(e,r,t,n){var a=[Te(Math.round(e).toString(16)),Te(Math.round(r).toString(16)),Te(Math.round(t).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function ef(e,r,t,n,a){var l=[Te(Math.round(e).toString(16)),Te(Math.round(r).toString(16)),Te(Math.round(t).toString(16)),Te(_a(n))];return a&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)&&l[3].charAt(0)==l[3].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function $a(e,r,t,n){var a=[Te(_a(n)),Te(Math.round(e).toString(16)),Te(Math.round(r).toString(16)),Te(Math.round(t).toString(16))];return a.join("")}B.equals=function(e,r){return!e||!r?!1:B(e).toRgbString()==B(r).toRgbString()},B.random=function(){return B.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function of(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.s-=r/100,t.s=lr(t.s),B(t)}function rf(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.s+=r/100,t.s=lr(t.s),B(t)}function tf(e){return B(e).desaturate(100)}function nf(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.l+=r/100,t.l=lr(t.l),B(t)}function af(e,r){r=r===0?0:r||10;var t=B(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),B(t)}function lf(e,r){r=r===0?0:r||10;var t=B(e).toHsl();return t.l-=r/100,t.l=lr(t.l),B(t)}function cf(e,r){var t=B(e).toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,B(t)}function sf(e){var r=B(e).toHsl();return r.h=(r.h+180)%360,B(r)}function Oa(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var t=B(e).toHsl(),n=[B(e)],a=360/r,l=1;l<r;l++)n.push(B({h:(t.h+l*a)%360,s:t.s,l:t.l}));return n}function df(e){var r=B(e).toHsl(),t=r.h;return[B(e),B({h:(t+72)%360,s:r.s,l:r.l}),B({h:(t+216)%360,s:r.s,l:r.l})]}function pf(e,r,t){r=r||6,t=t||30;var n=B(e).toHsl(),a=360/t,l=[B(e)];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,l.push(B(n));return l}function uf(e,r){r=r||6;for(var t=B(e).toHsv(),n=t.h,a=t.s,l=t.v,c=[],s=1/r;r--;)c.push(B({h:n,s:a,v:l})),l=(l+s)%1;return c}B.mix=function(e,r,t){t=t===0?0:t||50;var n=B(e).toRgb(),a=B(r).toRgb(),l=t/100,c={r:(a.r-n.r)*l+n.r,g:(a.g-n.g)*l+n.g,b:(a.b-n.b)*l+n.b,a:(a.a-n.a)*l+n.a};return B(c)},B.readability=function(e,r){var t=B(e),n=B(r);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)},B.isReadable=function(e,r,t){var n=B.readability(e,r),a,l;switch(l=!1,a=yf(t),a.level+a.size){case"AAsmall":case"AAAlarge":l=n>=4.5;break;case"AAlarge":l=n>=3;break;case"AAAsmall":l=n>=7;break}return l},B.mostReadable=function(e,r,t){var n=null,a=0,l,c,s,p;t=t||{},c=t.includeFallbackColors,s=t.level,p=t.size;for(var d=0;d<r.length;d++)l=B.readability(e,r[d]),l>a&&(a=l,n=B(r[d]));return B.isReadable(e,n,{level:s,size:p})||!c?n:(t.includeFallbackColors=!1,B.mostReadable(e,["#fff","#000"],t))};var wt=B.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},gf=B.hexNames=hf(wt);function hf(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}function Fa(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function te(e,r){ff(e)&&(e="100%");var t=mf(e);return e=Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function lr(e){return Math.min(1,Math.max(0,e))}function xe(e){return parseInt(e,16)}function ff(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function mf(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Te(e){return e.length==1?"0"+e:""+e}function Bo(e){return e<=1&&(e=e*100+"%"),e}function _a(e){return Math.round(parseFloat(e)*255).toString(16)}function Wa(e){return xe(e)/255}var Be=function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",t="(?:"+r+")|(?:"+e+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",a="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ze(e){return!!Be.CSS_UNIT.exec(e)}function vf(e){e=e.replace(qh,"").replace(Zh,"").toLowerCase();var r=!1;if(wt[e])e=wt[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Be.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Be.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Be.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Be.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Be.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Be.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Be.hex8.exec(e))?{r:xe(t[1]),g:xe(t[2]),b:xe(t[3]),a:Wa(t[4]),format:r?"name":"hex8"}:(t=Be.hex6.exec(e))?{r:xe(t[1]),g:xe(t[2]),b:xe(t[3]),format:r?"name":"hex"}:(t=Be.hex4.exec(e))?{r:xe(t[1]+""+t[1]),g:xe(t[2]+""+t[2]),b:xe(t[3]+""+t[3]),a:Wa(t[4]+""+t[4]),format:r?"name":"hex8"}:(t=Be.hex3.exec(e))?{r:xe(t[1]+""+t[1]),g:xe(t[2]+""+t[2]),b:xe(t[3]+""+t[3]),format:r?"name":"hex"}:!1}function yf(e){var r,t;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),t=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:r,size:t}}const{useToken:bf}=i.theme,Sf=de("ColorPanel",e=>({".color-panel":{padding:12,backgroundColor:"#fff",borderRadius:12,border:"1px solid rgba(0, 0, 0, 0.06)",boxShadow:e.boxShadow,width:224,boxSizing:"border-box",".color-panel-mode":{display:"flex",alignItems:"center",marginBottom:6},".color-panel-preview":{width:24,height:24,borderRadius:4,boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)",flex:"none",overflow:"hidden",background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==) 0% 0% / 32px"},".color-panel-preset-colors":{paddingTop:12,display:"flex",flexWrap:"wrap",width:200},".color-panel-preset-color-btn":{borderRadius:4,width:20,height:20,border:"none",outline:"none",margin:4,cursor:"pointer",boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)"},".color-panel-mode-title":{color:e.colorTextPlaceholder,marginTop:2,fontSize:12,textAlign:"center"},".color-panel-rgba-input":{display:"flex",alignItems:"center","&-part":{flex:1,width:0,display:"flex",flexDirection:"column",alignItems:"center","&-title":{color:e.colorTextPlaceholder,marginTop:2,fontSize:12},"&:not(:last-child)":{marginRight:4},[`${e.rootCls}-input-number`]:{width:"100%",input:{fontSize:12,padding:"0 4px"}}}}}})),Et=(e,r=!1)=>r?B(e).toHex8():B(e).toHex(),Xa=({value:e,onChange:r,alpha:t})=>{const[n,a]=h.useState(e),l=h.useRef(!1),c=d=>{a(d.target.value),r==null||r(Et(d.target.value,t))},s=d=>{l.current=!1,a(Et(d.target.value,t))},p=()=>{l.current=!0};return h.useEffect(()=>{l.current||a(Et(e,t))},[e,t]),o.jsxs("div",{children:[o.jsx(i.Input,{prefix:"#",size:"small",value:n,onFocus:p,onChange:c,onBlur:s}),o.jsxs("div",{className:"color-panel-mode-title",children:["HEX",t?"8":""]})]})},xf=({value:e,onChange:r,alpha:t})=>{const[n,a]=ht(e!=null?e:{r:0,g:0,b:0,a:1},{value:e,onChange:r});return o.jsx("div",{className:"color-panel-rgba-input",children:o.jsxs(i.ConfigProvider,{theme:{components:{InputNumber:{handleWidth:12}}},children:[o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.r,onChange:l=>a(W(P({},n),{r:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"R"})]}),o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.g,onChange:l=>a(W(P({},n),{g:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"G"})]}),o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.b,onChange:l=>a(W(P({},n),{b:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"B"})]}),t&&o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:1,step:.01,size:"small",value:n.a,onChange:l=>a(W(P({},n),{a:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"A"})]})]})})},Cf=["HEX","HEX8","RGB","RGBA"],Tt=(e,r)=>{switch(r){case"HEX":return B(e).toHexString();case"HEX8":return B(e).toHex8String();case"RGBA":case"RGB":default:return B(e).toRgbString()}},Ga=({color:e,onChange:r,alpha:t,style:n})=>{const{token:a}=bf(),[l,c]=Sf(),[s,p]=h.useState("HEX"),d=h.useMemo(()=>[a.blue,a.purple,a.cyan,a.green,a.magenta,a.pink,a.red,a.orange,a.yellow,a.volcano,a.geekblue,a.gold,a.lime,"#000"],[]),g=u=>{p(u),r(Tt(e,u))};return l(o.jsxs("div",{className:R(c,"color-panel"),style:n,children:[(s==="HEX"||s==="RGB")&&o.jsx(Nh,{style:{height:160},color:B(e).toHex(),onChange:u=>{r(Tt(u,s))}}),(s==="RGBA"||s==="HEX8")&&o.jsx(Yh,{style:{height:160},color:B(e).toRgb(),onChange:u=>{r(Tt(u,s))}}),o.jsxs("div",{style:{marginTop:12},children:[o.jsxs("div",{className:"color-panel-mode",children:[o.jsx("div",{className:"color-panel-preview",children:o.jsx("div",{style:{backgroundColor:e,width:"100%",height:"100%"}})}),o.jsx(i.Select,{value:s,onChange:g,options:Cf.filter(u=>t||u==="HEX"||u==="RGB").map(u=>({value:u,key:u})),size:"small",bordered:!1,dropdownMatchSelectWidth:!1})]}),s==="HEX"&&o.jsx(Xa,{value:B(e).toHex(),onChange:u=>r==null?void 0:r(B(u).toHexString())}),s==="HEX8"&&o.jsx(Xa,{alpha:!0,value:B(e).toHex8(),onChange:u=>r==null?void 0:r(B(u).toHex8String())}),(s==="RGBA"||s==="RGB")&&o.jsx(xf,{alpha:s==="RGBA",value:B(e).toRgb(),onChange:u=>r==null?void 0:r(B(u).toRgbString())})]}),o.jsx("div",{className:"color-panel-preset-colors",children:d.map(u=>o.jsx("button",{className:"color-panel-preset-color-btn",style:{backgroundColor:u},onClick:()=>r(u)},u))})]}))};function Na(e){return e.startsWith("rgb")||e.startsWith("#")}const kf=de("TokenInput",e=>({".previewer-token-input":{[`${e.rootCls}-input-group-addon, ${e.rootCls}-input-number-group-addon`]:{border:"0 !important",color:"rgba(0, 0, 0, 0.25) !important",fontSize:`${e.fontSizeSM}px !important`,padding:"0 !important",backgroundColor:"transparent !important","&:first-child":{paddingInlineStart:0},"&:last-child":{paddingInlineEnd:0}},[`${e.rootCls}-input-group-wrapper, ${e.rootCls}-input-number-group-wrapper`]:{padding:0,height:24,width:"100%",input:{fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,padding:`2px ${e.paddingXS}px`,height:24}},[`${e.rootCls}-input-group-wrapper ${e.rootCls}-input, ${e.rootCls}-input-number-group-wrapper ${e.rootCls}-input-number`]:{background:"white",borderRadius:`${e.borderRadiusLG}px !important`,whiteSpace:"nowrap",textOverflow:"ellipsis"},"&&-light":{[`${e.rootCls}-input-group-addon, ${e.rootCls}-input-number-group-addon`]:{backgroundColor:e.colorBgContainer},[`${e.rootCls}-input-group-wrapper ${e.rootCls}-input,
36
36
  ${e.rootCls}-input-number-group-wrapper ${e.rootCls}-input-number-input`]:{background:e.colorFillAlter}},"&&-readonly":{input:{cursor:"text",color:e.colorText}}}})),Ua=({value:e,theme:r,onChange:t,light:n,readonly:a,onReset:l,canReset:c,hideTheme:s})=>{const p=h.useRef(e||""),[d,g]=h.useState(e||""),u=c!=null?c:p.current!==d,f=Me(),[C,b]=kf();h.useEffect(()=>{e!==void 0&&g(e)},[e]);const y=Ca(w=>{t==null||t(w)},500),m=w=>{a||(g(w),y(w))},S=()=>{l?l():m(p.current)},x=!a&&o.jsx("span",{style:{display:"flex",alignItems:"center",minWidth:s?"":80},children:u||s?o.jsx(i.Button,{style:{fontSize:12},onClick:S,type:"link",size:"small",disabled:!u,children:f.reset}):o.jsx("span",{style:{padding:"0 8px"},children:r==null?void 0:r.name})});let k;return typeof p.current=="string"&&Na(p.current)?k=o.jsx(i.Input,{bordered:!1,addonAfter:x,value:String(d),disabled:a,addonBefore:o.jsx(i.Dropdown,{trigger:["click"],overlay:o.jsx(Ga,{alpha:!0,color:String(d),onChange:w=>{m(w)}}),children:o.jsx(xa,{color:String(d),dark:(r==null?void 0:r.key)==="dark",style:{cursor:"pointer",marginInlineEnd:8,verticalAlign:"top"}})}),onChange:w=>{m(w.target.value)}}):typeof p.current=="number"?k=o.jsx(i.InputNumber,{addonAfter:x,bordered:!1,value:d,disabled:a,onChange:w=>{m(Number(w))}}):k=o.jsx(i.Input,{addonAfter:x,bordered:!1,value:String(d),disabled:a,onChange:w=>{m(typeof e=="number"?Number(w.target.value):w.target.value)}}),C(o.jsx("div",{className:R("previewer-token-input",b,{"previewer-token-input-light":n,"previewer-token-input-readonly":a}),children:k}))};function je(e,r){if(e)return r.reduce((t,n)=>{if(t)return t[n]},e)}const{Panel:wf}=i.Collapse,Ef=c=>{var s=c,{info:e,visible:r,tokenName:t,style:n,dark:a}=s,l=Fo(s,["info","visible","tokenName","style","dark"]);return typeof e=="string"&&Na(e)?o.jsx(xa,{dark:a,color:String(e),style:P({display:r?"block":"none"},n)}):e.toString().length<6&&String(e)!==""?o.jsx("div",W(P({style:P({height:20,overflow:"hidden",backgroundColor:"rgba(0,0,0,0.04)",borderRadius:"8px",display:r?"block":"none",padding:"0 6px",lineHeight:"20px"},n)},l),{children:e})):null},Tf=({selected:e,toggleSelected:r})=>o.jsx(Ir,{style:{color:e?"#1890ff":void 0,cursor:"pointer",fontSize:16,transition:"color 0.3s",marginInlineStart:12,verticalAlign:"middle"},onClick:()=>r(!e)}),Bf=de("TokenItem",e=>({[`${e.rootCls}-collapse.previewer-token-item-collapse`]:{[`.previewer-token-item${e.rootCls}-collapse-item`]:{transition:`background-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"4px !important"},[`&:not(${e.rootCls}-collapse-item-active):hover`]:{backgroundColor:"#f5f5f5"},[`> ${e.rootCls}-collapse-header`]:{padding:"12px 8px"},[`${e.rootCls}-collapse-header-text`]:{flex:1,width:0},[`${e.rootCls}-collapse-content-box`]:{padding:"0 4px"},[`${e.rootCls}-collapse-expand-icon`]:{paddingInlineEnd:`${e.paddingXXS}px !important`},".previewer-token-count":{height:16,fontSize:e.fontSizeSM,lineHeight:"16px",borderRadius:100,paddingInline:e.paddingXXS*1.5,color:e.colorTextSecondary,backgroundColor:e.colorFillAlter},".previewer-token-item-name":{transition:"color 0.3s"},".previewer-token-item-highlighted.previewer-token-item-name":{color:`${e.colorPrimary} !important`},"&:hover .previewer-token-preview":{"> .previewer-color-preview:not(:last-child)":{transform:"translateX(-100%)",marginInlineEnd:4}},".previewer-token-preview":{display:"flex",alignItems:"center",position:"relative","> .previewer-color-preview":{position:"absolute",insetInlineEnd:0,top:0,bottom:0,margin:"auto"},"> .previewer-color-preview:not(:last-child)":{transform:"translateX(-50%)",marginInlineEnd:0,transition:"transform 0.3s, margin-right 0.3s"},"> *:not(:last-child)":{marginInlineEnd:4}}}}})),ja=e=>`previewer-token-panel-item-${e}`,Df=({tokenName:e,active:r,onActiveChange:t,onTokenChange:n,tokenPath:a,selectedTokens:l,themes:c,onTokenSelect:s,enableTokenSelect:p,hideUsageCount:d,fallback:g})=>{const[u,f]=h.useState(!1),[C,b]=Bf();h.useEffect(()=>{r&&f(!0)},[r]);const y=(S,x)=>{n==null||n(S,e,x)},m=h.useMemo(()=>to(e).length,[e]);return C(o.jsx("div",{onMouseEnter:()=>t==null?void 0:t(!1),children:o.jsx(i.Collapse,{collapsible:"header",ghost:!0,onChange:S=>f(S.length>0),className:R("previewer-token-item-collapse",b),expandIcon:({isActive:S})=>o.jsx(H.CaretRightOutlined,{rotate:S?90:0,style:{fontSize:12,cursor:"pointer"}}),activeKey:u?e:void 0,children:o.jsx(wf,{className:"previewer-token-item",header:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},id:ja(e),children:[o.jsxs("span",{style:{flex:1,width:0,display:"flex",overflow:"hidden",alignItems:"center"},children:[o.jsx("span",{title:e,className:R("previewer-token-item-name",{"previewer-token-item-highlighted":r}),style:{marginInlineEnd:"5px",overflow:"hidden",textOverflow:"ellipsis"},children:e}),!d&&o.jsx("span",{className:"previewer-token-count",children:m})]}),!u&&o.jsx("div",{className:"previewer-token-preview",style:{minWidth:c.length*20+(c.length-1)*4},children:c.map(({config:S,key:x},k)=>{var w,M;return o.jsx(Ef,{dark:x==="dark",tokenName:e,info:(M=(w=je(S,[...a,e]))!=null?w:g==null?void 0:g(S)[e])!=null?M:"",visible:!u,style:{zIndex:10-k}},x)})})]}),extra:p?o.jsx(Tf,{selected:!!(l!=null&&l.includes(e)),toggleSelected:()=>{s==null||s(e)}}):void 0,children:o.jsx(i.Space,{direction:"vertical",style:{background:"#fafafa",borderRadius:4,padding:8,width:"100%"},children:c.map(S=>{var x;return o.jsx("div",{children:o.jsx(Ua,{hideTheme:c.length===1,theme:S,onChange:k=>y(S,k),value:(x=je(S.config,[...a,e]))!=null?x:g==null?void 0:g(S.config)[e]})},S.key)})})},e)})}))},{Panel:Hf}=i.Collapse,Va={seed:o.jsx(H.BulbOutlined,{}),colorText:o.jsx(H.FontColorsOutlined,{}),colorBg:o.jsx(H.BgColorsOutlined,{}),colorSplit:o.jsx(H.BorderHorizontalOutlined,{}),colorFill:o.jsx(H.HighlightOutlined,{}),colorCommon:o.jsx(H.FormatPainterOutlined,{}),space:o.jsx(cl,{}),font:o.jsx(H.FontSizeOutlined,{}),line:o.jsx(H.AlignLeftOutlined,{}),screen:o.jsx(H.TabletOutlined,{}),motion:o.jsx(il,{}),radius:o.jsx(H.RadiusSettingOutlined,{}),control:o.jsx(H.ControlOutlined,{}),others:o.jsx(H.FileUnknownOutlined,{})},Ya={seed:"Seed Token",colorCommon:"Common Color 通用颜色",colorText:"Text Color 文本颜色",colorBg:"Background Color 背景颜色",colorFill:"Fill Color 填充颜色",colorSplit:"Split Color 分割线颜色",space:"Space 间距",font:"Font 文本",line:"Line 线",screen:"Screen 屏幕",motion:"Motion 动画",radius:"Radius 圆角",control:"Control 控件",others:"Others 未分类"},Af=de("TokenCard",e=>({".token-card":{width:"100%",height:"auto",borderRadius:e.borderRadiusLG,border:"1px solid rgba(0,0,0,0.09)",marginBottom:e.marginSM,[`${e.rootCls}-collapse.token-card-collapse`]:{[`> ${e.rootCls}-collapse-item > ${e.rootCls}-collapse-content > ${e.rootCls}-collapse-content-box`]:{padding:{_skip_check_:!0,value:`0 ${e.paddingXS}px 12px !important`}}}},[`.token-card ${e.rootCls}-input-group >${e.rootCls}-input:not(:first-child):not(:last-child)`]:{background:"white",borderRadius:e.borderRadiusLG}})),Bt=({title:e,icon:r,tokenArr:t,keyword:n,hideUseless:a,defaultOpen:l,open:c,onOpenChange:s,activeToken:p,onActiveTokenChange:d,onTokenChange:g,tokenPath:u,selectedTokens:f,themes:C,onTokenSelect:b,enableTokenSelect:y,hideUsageCount:m,fallback:S,placeholder:x})=>{const[k,w]=Af(),[M,X]=ht(!1,{onChange:s,defaultValue:l,value:c});return k(o.jsx("div",{className:R("token-card",w),children:o.jsx(i.Collapse,{ghost:!0,expandIcon:({isActive:Y})=>o.jsx(H.CaretRightOutlined,{rotate:Y?450:360,style:{fontSize:12,color:"rgba(0,0,0,0.45)"}}),expandIconPosition:"right",className:"token-card-collapse",activeKey:M?"1":void 0,onChange:Y=>{X(Y.length>0)},children:o.jsxs(Hf,{header:o.jsxs(i.Space,{size:"small",children:[o.jsx("span",{children:e}),o.jsx("span",{children:r})]}),children:[t.filter(Y=>(!n||Y.toLowerCase().includes(n.toLowerCase()))&&(!a||to(Y).length>0)).map(Y=>o.jsx(Df,{tokenPath:u,onActiveChange:Z=>d==null?void 0:d(Z?Y:void 0),active:p===Y,tokenName:Y,onTokenChange:g,themes:C,selectedTokens:f,onTokenSelect:b,enableTokenSelect:y,hideUsageCount:m,fallback:S},Y)),t.length===0&&x]},"1")})}))};function he(e,r){Mf(e)&&(e="100%");var t=If(e);return e=r===360?e:Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*r),10)/100),Math.abs(e-r)<1e-6?1:(r===360?e=(e<0?e%r+r:e%r)/parseFloat(String(r)):e=e%r/parseFloat(String(r)),e)}function cr(e){return Math.min(1,Math.max(0,e))}function Mf(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function If(e){return typeof e=="string"&&e.indexOf("%")!==-1}function qa(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function sr(e){return e<=1?"".concat(Number(e)*100,"%"):e}function ro(e){return e.length===1?"0"+e:String(e)}function Pf(e,r,t){return{r:he(e,255)*255,g:he(r,255)*255,b:he(t,255)*255}}function Za(e,r,t){e=he(e,255),r=he(r,255),t=he(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l=0,c=0,s=(n+a)/2;if(n===a)c=0,l=0;else{var p=n-a;switch(c=s>.5?p/(2-n-a):p/(n+a),n){case e:l=(r-t)/p+(r<t?6:0);break;case r:l=(t-e)/p+2;break;case t:l=(e-r)/p+4;break}l/=6}return{h:l,s:c,l:s}}function Dt(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*(6*t):t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function zf(e,r,t){var n,a,l;if(e=he(e,360),r=he(r,100),t=he(t,100),r===0)a=t,l=t,n=t;else{var c=t<.5?t*(1+r):t+r-t*r,s=2*t-c;n=Dt(s,c,e+1/3),a=Dt(s,c,e),l=Dt(s,c,e-1/3)}return{r:n*255,g:a*255,b:l*255}}function Ht(e,r,t){e=he(e,255),r=he(r,255),t=he(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l=0,c=n,s=n-a,p=n===0?0:s/n;if(n===a)l=0;else{switch(n){case e:l=(r-t)/s+(r<t?6:0);break;case r:l=(t-e)/s+2;break;case t:l=(e-r)/s+4;break}l/=6}return{h:l,s:p,v:c}}function Lf(e,r,t){e=he(e,360)*6,r=he(r,100),t=he(t,100);var n=Math.floor(e),a=e-n,l=t*(1-r),c=t*(1-a*r),s=t*(1-(1-a)*r),p=n%6,d=[t,c,l,l,s,t][p],g=[s,t,t,c,l,l][p],u=[l,l,s,t,t,c][p];return{r:d*255,g:g*255,b:u*255}}function At(e,r,t,n){var a=[ro(Math.round(e).toString(16)),ro(Math.round(r).toString(16)),ro(Math.round(t).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function $f(e,r,t,n,a){var l=[ro(Math.round(e).toString(16)),ro(Math.round(r).toString(16)),ro(Math.round(t).toString(16)),ro(Of(n))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function Of(e){return Math.round(parseFloat(e)*255).toString(16)}function Qa(e){return Ce(e)/255}function Ce(e){return parseInt(e,16)}function Ff(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Mt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function go(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,l=null,c=!1,s=!1;return typeof e=="string"&&(e=Xf(e)),typeof e=="object"&&(Le(e.r)&&Le(e.g)&&Le(e.b)?(r=Pf(e.r,e.g,e.b),c=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Le(e.h)&&Le(e.s)&&Le(e.v)?(n=sr(e.s),a=sr(e.v),r=Lf(e.h,n,a),c=!0,s="hsv"):Le(e.h)&&Le(e.s)&&Le(e.l)&&(n=sr(e.s),l=sr(e.l),r=zf(e.h,n,l),c=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=qa(t),{ok:c,format:e.format||s,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}var _f="[-\\+]?\\d+%?",Wf="[-\\+]?\\d*\\.\\d+%?",Ve="(?:".concat(Wf,")|(?:").concat(_f,")"),It="[\\s|\\(]+(".concat(Ve,")[,|\\s]+(").concat(Ve,")[,|\\s]+(").concat(Ve,")\\s*\\)?"),Pt="[\\s|\\(]+(".concat(Ve,")[,|\\s]+(").concat(Ve,")[,|\\s]+(").concat(Ve,")[,|\\s]+(").concat(Ve,")\\s*\\)?"),De={CSS_UNIT:new RegExp(Ve),rgb:new RegExp("rgb"+It),rgba:new RegExp("rgba"+Pt),hsl:new RegExp("hsl"+It),hsla:new RegExp("hsla"+Pt),hsv:new RegExp("hsv"+It),hsva:new RegExp("hsva"+Pt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Xf(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var r=!1;if(Mt[e])e=Mt[e],r=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=De.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=De.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=De.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=De.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=De.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=De.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=De.hex8.exec(e),t?{r:Ce(t[1]),g:Ce(t[2]),b:Ce(t[3]),a:Qa(t[4]),format:r?"name":"hex8"}:(t=De.hex6.exec(e),t?{r:Ce(t[1]),g:Ce(t[2]),b:Ce(t[3]),format:r?"name":"hex"}:(t=De.hex4.exec(e),t?{r:Ce(t[1]+t[1]),g:Ce(t[2]+t[2]),b:Ce(t[3]+t[3]),a:Qa(t[4]+t[4]),format:r?"name":"hex8"}:(t=De.hex3.exec(e),t?{r:Ce(t[1]+t[1]),g:Ce(t[2]+t[2]),b:Ce(t[3]+t[3]),format:r?"name":"hex"}:!1)))))))))}function Le(e){return!!De.CSS_UNIT.exec(String(e))}var He=function(){function e(r,t){r===void 0&&(r=""),t===void 0&&(t={});var n;if(r instanceof e)return r;typeof r=="number"&&(r=Ff(r)),this.originalInput=r;var a=go(r);this.originalInput=r,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=t.format)!==null&&n!==void 0?n:a.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},e.prototype.getLuminance=function(){var r=this.toRgb(),t,n,a,l=r.r/255,c=r.g/255,s=r.b/255;return l<=.03928?t=l/12.92:t=Math.pow((l+.055)/1.055,2.4),c<=.03928?n=c/12.92:n=Math.pow((c+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),.2126*t+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(r){return this.a=qa(r),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var r=this.toHsl().s;return r===0},e.prototype.toHsv=function(){var r=Ht(this.r,this.g,this.b);return{h:r.h*360,s:r.s,v:r.v,a:this.a}},e.prototype.toHsvString=function(){var r=Ht(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this.a===1?"hsv(".concat(t,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var r=Za(this.r,this.g,this.b);return{h:r.h*360,s:r.s,l:r.l,a:this.a}},e.prototype.toHslString=function(){var r=Za(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this.a===1?"hsl(".concat(t,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(r){return r===void 0&&(r=!1),At(this.r,this.g,this.b,r)},e.prototype.toHexString=function(r){return r===void 0&&(r=!1),"#"+this.toHex(r)},e.prototype.toHex8=function(r){return r===void 0&&(r=!1),$f(this.r,this.g,this.b,this.a,r)},e.prototype.toHex8String=function(r){return r===void 0&&(r=!1),"#"+this.toHex8(r)},e.prototype.toHexShortString=function(r){return r===void 0&&(r=!1),this.a===1?this.toHexString(r):this.toHex8String(r)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var r=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(r,", ").concat(t,", ").concat(n,")"):"rgba(".concat(r,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var r=function(t){return"".concat(Math.round(he(t,255)*100),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var r=function(t){return Math.round(he(t,255)*100)};return this.a===1?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var r="#"+At(this.r,this.g,this.b,!1),t=0,n=Object.entries(Mt);t<n.length;t++){var a=n[t],l=a[0],c=a[1];if(r===c)return l}return!1},e.prototype.toString=function(r){var t=!!r;r=r!=null?r:this.format;var n=!1,a=this.a<1&&this.a>=0,l=!t&&a&&(r.startsWith("hex")||r==="name");return l?r==="name"&&this.a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l+=r/100,t.l=cr(t.l),new e(t)},e.prototype.brighten=function(r){r===void 0&&(r=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),new e(t)},e.prototype.darken=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l-=r/100,t.l=cr(t.l),new e(t)},e.prototype.tint=function(r){return r===void 0&&(r=10),this.mix("white",r)},e.prototype.shade=function(r){return r===void 0&&(r=10),this.mix("black",r)},e.prototype.desaturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s-=r/100,t.s=cr(t.s),new e(t)},e.prototype.saturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s+=r/100,t.s=cr(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(r){var t=this.toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,new e(t)},e.prototype.mix=function(r,t){t===void 0&&(t=50);var n=this.toRgb(),a=new e(r).toRgb(),l=t/100,c={r:(a.r-n.r)*l+n.r,g:(a.g-n.g)*l+n.g,b:(a.b-n.b)*l+n.b,a:(a.a-n.a)*l+n.a};return new e(c)},e.prototype.analogous=function(r,t){r===void 0&&(r=6),t===void 0&&(t=30);var n=this.toHsl(),a=360/t,l=[this];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,l.push(new e(n));return l},e.prototype.complement=function(){var r=this.toHsl();return r.h=(r.h+180)%360,new e(r)},e.prototype.monochromatic=function(r){r===void 0&&(r=6);for(var t=this.toHsv(),n=t.h,a=t.s,l=t.v,c=[],s=1/r;r--;)c.push(new e({h:n,s:a,v:l})),l=(l+s)%1;return c},e.prototype.splitcomplement=function(){var r=this.toHsl(),t=r.h;return[this,new e({h:(t+72)%360,s:r.s,l:r.l}),new e({h:(t+216)%360,s:r.s,l:r.l})]},e.prototype.onBackground=function(r){var t=this.toRgb(),n=new e(r).toRgb(),a=t.a+n.a*(1-t.a);return new e({r:(t.r*t.a+n.r*n.a*(1-t.a))/a,g:(t.g*t.a+n.g*n.a*(1-t.a))/a,b:(t.b*t.a+n.b*n.a*(1-t.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(r){for(var t=this.toHsl(),n=t.h,a=[this],l=360/r,c=1;c<r;c++)a.push(new e({h:(n+c*l)%360,s:t.s,l:t.l}));return a},e.prototype.equals=function(r){return this.toRgbString()===new e(r).toRgbString()},e}(),dr=2,Ka=.16,Gf=.05,Nf=.05,Uf=.15,Ja=5,Ra=4,jf=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ei(e){var r=e.r,t=e.g,n=e.b,a=Ht(r,t,n);return{h:a.h*360,s:a.s,v:a.v}}function pr(e){var r=e.r,t=e.g,n=e.b;return"#".concat(At(r,t,n,!1))}function Vf(e,r,t){var n=t/100,a={r:(r.r-e.r)*n+e.r,g:(r.g-e.g)*n+e.g,b:(r.b-e.b)*n+e.b};return a}function oi(e,r,t){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=t?Math.round(e.h)-dr*r:Math.round(e.h)+dr*r:n=t?Math.round(e.h)+dr*r:Math.round(e.h)-dr*r,n<0?n+=360:n>=360&&(n-=360),n}function ri(e,r,t){if(e.h===0&&e.s===0)return e.s;var n;return t?n=e.s-Ka*r:r===Ra?n=e.s+Ka:n=e.s+Gf*r,n>1&&(n=1),t&&r===Ja&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function ti(e,r,t){var n;return t?n=e.v+Nf*r:n=e.v-Uf*r,n>1&&(n=1),Number(n.toFixed(2))}function ur(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],n=go(e),a=Ja;a>0;a-=1){var l=ei(n),c=pr(go({h:oi(l,a,!0),s:ri(l,a,!0),v:ti(l,a,!0)}));t.push(c)}t.push(pr(n));for(var s=1;s<=Ra;s+=1){var p=ei(n),d=pr(go({h:oi(p,s),s:ri(p,s),v:ti(p,s)}));t.push(d)}return r.theme==="dark"?jf.map(function(g){var u=g.index,f=g.opacity,C=pr(Vf(go(r.backgroundColor||"#141414"),go(t[u]),f*100));return C}):t}var zt={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Lt={},$t={};Object.keys(zt).forEach(function(e){Lt[e]=ur(zt[e]),Lt[e].primary=Lt[e][5],$t[e]=ur(zt[e],{theme:"dark",backgroundColor:"#141414"}),$t[e].primary=$t[e][5]});const Yf=e=>{const{controlHeight:r}=e;return{controlHeightSM:r*.75,controlHeightXS:r*.5,controlHeightLG:r*1.25}};function qf(e){const{sizeUnit:r,sizeStep:t}=e;return{sizeXXL:r*(t+8),sizeXL:r*(t+4),sizeLG:r*(t+2),sizeMD:r*(t+1),sizeMS:r*t,size:r*t,sizeSM:r*(t-1),sizeXS:r*(t-2),sizeXXS:r*(t-3)}}const ni={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Do=Object.assign(Object.assign({},ni),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
37
37
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
38
38
  'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});function Zf(e,r){let{generateColorPalettes:t,generateNeutralColorPalettes:n}=r;const{colorSuccess:a,colorWarning:l,colorError:c,colorInfo:s,colorPrimary:p,colorBgBase:d,colorTextBase:g}=e,u=t(p),f=t(a),C=t(l),b=t(c),y=t(s),m=n(d,g),S=e.colorLink||e.colorInfo,x=t(S);return Object.assign(Object.assign({},m),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:b[1],colorErrorBgHover:b[2],colorErrorBorder:b[3],colorErrorBorderHover:b[4],colorErrorHover:b[5],colorError:b[6],colorErrorActive:b[7],colorErrorTextHover:b[8],colorErrorText:b[9],colorErrorTextActive:b[10],colorWarningBg:C[1],colorWarningBgHover:C[2],colorWarningBorder:C[3],colorWarningBorderHover:C[4],colorWarningHover:C[4],colorWarning:C[6],colorWarningActive:C[7],colorWarningTextHover:C[8],colorWarningText:C[9],colorWarningTextActive:C[10],colorInfoBg:y[1],colorInfoBgHover:y[2],colorInfoBorder:y[3],colorInfoBorderHover:y[4],colorInfoHover:y[4],colorInfo:y[6],colorInfoActive:y[7],colorInfoTextHover:y[8],colorInfoText:y[9],colorInfoTextActive:y[10],colorLinkHover:x[4],colorLink:x[6],colorLinkActive:x[7],colorBgMask:new He("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const Qf=e=>{let r=e,t=e,n=e,a=e;return e<6&&e>=5?r=e+1:e<16&&e>=6?r=e+2:e>=16&&(r=16),e<7&&e>=5?t=4:e<8&&e>=7?t=5:e<14&&e>=8?t=6:e<16&&e>=14?t=7:e>=16&&(t=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e>16?16:e,borderRadiusXS:n,borderRadiusSM:t,borderRadiusLG:r,borderRadiusOuter:a}};function Kf(e){const{motionUnit:r,motionBase:t,borderRadius:n,lineWidth:a}=e;return Object.assign({motionDurationFast:`${(t+r).toFixed(1)}s`,motionDurationMid:`${(t+r*2).toFixed(1)}s`,motionDurationSlow:`${(t+r*3).toFixed(1)}s`,lineWidthBold:a+1},Qf(n))}const $e=(e,r)=>new He(e).setAlpha(r).toRgbString(),Ho=(e,r)=>new He(e).darken(r).toHexString(),Jf=e=>{const r=ur(e);return{1:r[0],2:r[1],3:r[2],4:r[3],5:r[4],6:r[5],7:r[6],8:r[4],9:r[5],10:r[6]}},Rf=(e,r)=>{const t=e||"#fff",n=r||"#000";return{colorBgBase:t,colorTextBase:n,colorText:$e(n,.88),colorTextSecondary:$e(n,.65),colorTextTertiary:$e(n,.45),colorTextQuaternary:$e(n,.25),colorFill:$e(n,.15),colorFillSecondary:$e(n,.06),colorFillTertiary:$e(n,.04),colorFillQuaternary:$e(n,.02),colorBgLayout:Ho(t,4),colorBgContainer:Ho(t,0),colorBgElevated:Ho(t,0),colorBgSpotlight:$e(n,.85),colorBorder:Ho(t,15),colorBorderSecondary:Ho(t,6)}};function e0(e){const r=new Array(10).fill(null).map((t,n)=>{const a=n-1,l=e*Math.pow(2.71828,a/5),c=n>1?Math.floor(l):Math.ceil(l);return Math.floor(c/2)*2});return r[1]=e,r.map(t=>{const n=t+8;return{size:t,lineHeight:n/t}})}const o0=e=>{const r=e0(e),t=r.map(a=>a.size),n=r.map(a=>a.lineHeight);return{fontSizeSM:t[0],fontSize:t[1],fontSizeLG:t[2],fontSizeXL:t[3],fontSizeHeading1:t[6],fontSizeHeading2:t[5],fontSizeHeading3:t[4],fontSizeHeading4:t[3],fontSizeHeading5:t[2],lineHeight:n[1],lineHeightLG:n[2],lineHeightSM:n[0],lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function ai(e){const r=Object.keys(ni).map(t=>{const n=ur(e[t]);return new Array(10).fill(1).reduce((a,l,c)=>(a[`${t}-${c+1}`]=n[c],a[`${t}${c+1}`]=n[c],a),{})}).reduce((t,n)=>(t=Object.assign(Object.assign({},t),n),t),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),r),Zf(e,{generateColorPalettes:Jf,generateNeutralColorPalettes:Rf})),o0(e.fontSize)),qf(e)),Yf(e)),Kf(e))}function Ot(e){return e>=0&&e<=255}function gr(e,r){const{r:t,g:n,b:a,a:l}=new He(e).toRgb();if(l<1)return e;const{r:c,g:s,b:p}=new He(r).toRgb();for(let d=.01;d<=1;d+=.01){const g=Math.round((t-c*(1-d))/d),u=Math.round((n-s*(1-d))/d),f=Math.round((a-p*(1-d))/d);if(Ot(g)&&Ot(u)&&Ot(f))return new He({r:g,g:u,b:f,a:Math.round(d*100)/100}).toRgbString()}return new He({r:t,g:n,b:a,a:1}).toRgbString()}var r0=globalThis&&globalThis.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};function Ft(e){const{override:r}=e,t=r0(e,["override"]),n=Object.assign({},r);Object.keys(Do).forEach(f=>{delete n[f]});const a=Object.assign(Object.assign({},t),n),l=480,c=576,s=768,p=992,d=1200,g=1600;if(a.motion===!1){const f="0s";a.motionDurationFast=f,a.motionDurationMid=f,a.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},a),{colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:gr(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:gr(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:gr(a.colorWarningBg,a.colorBgContainer),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.lineWidth*4,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:gr(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
@@ -1,12 +1,13 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.14.0-alpha.7",
2
+ "@nocobase/client": "0.14.0-alpha.8",
3
3
  "react": "18.2.0",
4
4
  "antd": "5.8.6",
5
5
  "lodash": "4.17.21",
6
- "@nocobase/server": "0.14.0-alpha.7",
6
+ "@nocobase/server": "0.14.0-alpha.8",
7
7
  "@ant-design/cssinjs": "1.13.2",
8
8
  "@ant-design/icons": "5.1.4",
9
- "@nocobase/utils": "0.14.0-alpha.7",
9
+ "@nocobase/utils": "0.14.0-alpha.8",
10
10
  "react-i18next": "11.18.6",
11
+ "@nocobase/database": "0.14.0-alpha.8",
11
12
  "@emotion/css": "11.11.2"
12
13
  };
@@ -15,7 +15,6 @@ declare const locale: {
15
15
  'Add new theme': string;
16
16
  'Edit based on current theme': string;
17
17
  'Create a brand new theme': string;
18
- 'Default theme of antd': string;
19
18
  Dark: string;
20
19
  Compact: string;
21
20
  'Compact dark': string;
@@ -37,8 +37,6 @@ const locale = {
37
37
  "Add new theme": "\u6DFB\u52A0\u65B0\u4E3B\u9898",
38
38
  "Edit based on current theme": "\u57FA\u4E8E\u5F53\u524D\u4E3B\u9898\u8FDB\u884C\u7F16\u8F91",
39
39
  "Create a brand new theme": "\u521B\u5EFA\u4E00\u4E2A\u5168\u65B0\u7684\u4E3B\u9898",
40
- // 内置主题的名字
41
- "Default theme of antd": "antd \u9ED8\u8BA4\u4E3B\u9898",
42
40
  Dark: "\u6697\u9ED1",
43
41
  Compact: "\u7D27\u51D1",
44
42
  "Compact dark": "\u7D27\u51D1\u6697\u9ED1",
@@ -1,6 +1,6 @@
1
1
  import { ThemeItem } from '../types';
2
2
  /** antd 默认主题 */
3
- export declare const antd: Omit<ThemeItem, 'id'>;
3
+ export declare const defaultTheme: Omit<ThemeItem, 'id'>;
4
4
  export declare const dark: Omit<ThemeItem, 'id'>;
5
5
  export declare const compact: Omit<ThemeItem, 'id'>;
6
6
  /** 同时包含 `紧凑` 和 `暗黑` 两种模式 */
@@ -17,18 +17,19 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
  var builtinThemes_exports = {};
19
19
  __export(builtinThemes_exports, {
20
- antd: () => antd,
21
20
  compact: () => compact,
22
21
  compactDark: () => compactDark,
23
- dark: () => dark
22
+ dark: () => dark,
23
+ defaultTheme: () => defaultTheme
24
24
  });
25
25
  module.exports = __toCommonJS(builtinThemes_exports);
26
- const antd = {
26
+ const defaultTheme = {
27
27
  config: {
28
- name: "Default theme of antd"
28
+ name: "Default"
29
29
  },
30
30
  optional: true,
31
- isBuiltIn: true
31
+ isBuiltIn: true,
32
+ uid: "default"
32
33
  };
33
34
  const dark = {
34
35
  config: {
@@ -37,7 +38,8 @@ const dark = {
37
38
  algorithm: "darkAlgorithm"
38
39
  },
39
40
  optional: true,
40
- isBuiltIn: true
41
+ isBuiltIn: true,
42
+ uid: "dark"
41
43
  };
42
44
  const compact = {
43
45
  config: {
@@ -46,7 +48,8 @@ const compact = {
46
48
  algorithm: "compactAlgorithm"
47
49
  },
48
50
  optional: true,
49
- isBuiltIn: true
51
+ isBuiltIn: true,
52
+ uid: "compact"
50
53
  };
51
54
  const compactDark = {
52
55
  config: {
@@ -55,12 +58,13 @@ const compactDark = {
55
58
  algorithm: ["compactAlgorithm", "darkAlgorithm"]
56
59
  },
57
60
  optional: true,
58
- isBuiltIn: true
61
+ isBuiltIn: true,
62
+ uid: "compact_dark"
59
63
  };
60
64
  // Annotate the CommonJS export names for ESM import in node:
61
65
  0 && (module.exports = {
62
- antd,
63
66
  compact,
64
67
  compactDark,
65
- dark
68
+ dark,
69
+ defaultTheme
66
70
  });
@@ -0,0 +1,5 @@
1
+ import { Migration } from '@nocobase/server';
2
+ export default class ThemeEditorMigration extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
@@ -0,0 +1,79 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var theme_editor_exports = {};
19
+ __export(theme_editor_exports, {
20
+ default: () => ThemeEditorMigration
21
+ });
22
+ module.exports = __toCommonJS(theme_editor_exports);
23
+ var import_server = require("@nocobase/server");
24
+ var import_utils = require("@nocobase/utils");
25
+ var import_builtinThemes = require("../builtinThemes");
26
+ class ThemeEditorMigration extends import_server.Migration {
27
+ async up() {
28
+ const result = await this.app.version.satisfies("<0.14.0-alpha.8");
29
+ if (!result) {
30
+ return;
31
+ }
32
+ const repository = this.db.getRepository("themeConfig");
33
+ if (!repository) {
34
+ return;
35
+ }
36
+ const collection = this.db.getCollection("themeConfig");
37
+ await collection.sync();
38
+ const themes = {
39
+ [import_builtinThemes.defaultTheme.uid]: import_builtinThemes.defaultTheme,
40
+ [import_builtinThemes.dark.uid]: import_builtinThemes.dark,
41
+ [import_builtinThemes.compact.uid]: import_builtinThemes.compact,
42
+ [import_builtinThemes.compactDark.uid]: import_builtinThemes.compactDark
43
+ };
44
+ const items = await repository.find();
45
+ for (const item of items) {
46
+ if (item.uid) {
47
+ if (themes[item.uid]) {
48
+ delete themes[item.uid];
49
+ }
50
+ continue;
51
+ }
52
+ const config = item.get("config");
53
+ if (config.name === "Default theme of antd") {
54
+ item.set("uid", import_builtinThemes.defaultTheme.uid);
55
+ config.name = import_builtinThemes.defaultTheme.config.name;
56
+ item.set("config", config);
57
+ item.changed("config", true);
58
+ delete themes[import_builtinThemes.defaultTheme.uid];
59
+ } else if (config.name === import_builtinThemes.dark.config.name) {
60
+ item.set("uid", import_builtinThemes.dark.uid);
61
+ delete themes[import_builtinThemes.dark.uid];
62
+ } else if (config.name === import_builtinThemes.compact.config.name) {
63
+ item.set("uid", import_builtinThemes.compact.uid);
64
+ delete themes[import_builtinThemes.compact.uid];
65
+ } else if (config.name === import_builtinThemes.compactDark.config.name) {
66
+ item.set("uid", import_builtinThemes.compactDark.uid);
67
+ delete themes[import_builtinThemes.compactDark.uid];
68
+ } else {
69
+ item.set("uid", (0, import_utils.uid)());
70
+ }
71
+ await item.save();
72
+ }
73
+ if (Object.values(themes).length > 0) {
74
+ await repository.create({ values: Object.values(themes) });
75
+ }
76
+ }
77
+ async down() {
78
+ }
79
+ }
@@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server';
2
2
  export declare class ThemeEditorPlugin extends Plugin {
3
3
  theme: any;
4
4
  afterAdd(): void;
5
- beforeLoad(): void;
5
+ beforeLoad(): Promise<void>;
6
6
  load(): Promise<void>;
7
7
  install(options?: InstallOptions): Promise<void>;
8
8
  afterEnable(): Promise<void>;
@@ -22,12 +22,20 @@ __export(plugin_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(plugin_exports);
24
24
  var import_server = require("@nocobase/server");
25
+ var import_path = require("path");
25
26
  var import_builtinThemes = require("./builtinThemes");
26
27
  class ThemeEditorPlugin extends import_server.Plugin {
27
28
  theme;
28
29
  afterAdd() {
29
30
  }
30
- beforeLoad() {
31
+ async beforeLoad() {
32
+ this.db.addMigrations({
33
+ namespace: "theme-editor",
34
+ directory: (0, import_path.resolve)(__dirname, "./migrations"),
35
+ context: {
36
+ plugin: this
37
+ }
38
+ });
31
39
  }
32
40
  async load() {
33
41
  this.db.collection({
@@ -46,10 +54,14 @@ class ThemeEditorPlugin extends import_server.Plugin {
46
54
  {
47
55
  type: "boolean",
48
56
  name: "isBuiltIn"
57
+ },
58
+ {
59
+ type: "uid",
60
+ name: "uid"
49
61
  }
50
62
  ]
51
63
  });
52
- this.app.acl.allow("themeConfig", "list", "loggedIn");
64
+ this.app.acl.allow("themeConfig", "list", "public");
53
65
  this.app.acl.registerSnippet({
54
66
  name: `pm.${this.name}.themeConfig`,
55
67
  actions: ["themeConfig:*"]
@@ -62,7 +74,7 @@ class ThemeEditorPlugin extends import_server.Plugin {
62
74
  }
63
75
  if (await themeRepo.count() === 0) {
64
76
  await themeRepo.create({
65
- values: [import_builtinThemes.antd, import_builtinThemes.dark, import_builtinThemes.compact, import_builtinThemes.compactDark]
77
+ values: [import_builtinThemes.defaultTheme, import_builtinThemes.dark, import_builtinThemes.compact, import_builtinThemes.compactDark]
66
78
  });
67
79
  }
68
80
  }
package/dist/types.d.ts CHANGED
@@ -10,6 +10,7 @@ export interface ThemeItem {
10
10
  /** 主题是否可选 */
11
11
  optional: boolean;
12
12
  isBuiltIn?: boolean;
13
+ uid?: string;
13
14
  }
14
15
  export type Theme = {
15
16
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-theme-editor",
3
- "version": "0.14.0-alpha.7",
3
+ "version": "0.14.0-alpha.8",
4
4
  "main": "dist/server/index.js",
5
5
  "displayName": "Theme editor",
6
6
  "displayName.zh-CN": "主题编辑器",
@@ -30,5 +30,5 @@
30
30
  "@nocobase/test": "0.x",
31
31
  "@nocobase/utils": "0.x"
32
32
  },
33
- "gitHead": "dc958417d27ed0753439bcef192be91a03dfc30f"
33
+ "gitHead": "59c82fef6e34707802b5841f5ec4d9b3b6b68abb"
34
34
  }