From e3948283350f06524fafbf4a37e72e1517f34ffb Mon Sep 17 00:00:00 2001 From: nstrayer Date: Mon, 6 Nov 2023 19:36:26 +0000 Subject: [PATCH] Commit build assets --- .../{index-6e409b25.js => index-f1413a39.js} | 2 +- inst/editor/build/index.html | 2 +- .../vscode-extension/shinyuieditor-0.5.1.vsix | Bin 7212220 -> 7212220 bytes 3 files changed, 2 insertions(+), 2 deletions(-) rename inst/editor/build/assets/{index-6e409b25.js => index-f1413a39.js} (99%) diff --git a/inst/editor/build/assets/index-6e409b25.js b/inst/editor/build/assets/index-f1413a39.js similarity index 99% rename from inst/editor/build/assets/index-6e409b25.js rename to inst/editor/build/assets/index-f1413a39.js index f9fc4fa91..f7f15b63f 100644 --- a/inst/editor/build/assets/index-6e409b25.js +++ b/inst/editor/build/assets/index-f1413a39.js @@ -161,7 +161,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho Plugins prop is no longer supported. Instead, mount it with "Sortable.mount(new MultiDrag())" Please read the updated README.md at https://github.com/SortableJS/react-sortablejs. - `)}componentDidMount(){if(this.ref.current===null)return;const vA=this.makeOptions();nA(rA).create(this.ref.current,vA)}componentDidUpdate(vA){vA.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:vA,style:CA,className:xA,id:IA}=this.props,OA={style:CA,className:xA,id:IA},PA=!vA||vA===null?"div":vA;return(0,AA.createElement)(PA,{ref:this.ref,...OA},this.getChildren())}getChildren(){const{children:vA,dataIdAttr:CA,selectedClass:xA="sortable-selected",chosenClass:IA="sortable-chosen",dragClass:OA="sortable-drag",fallbackClass:PA="sortable-falback",ghostClass:$A="sortable-ghost",swapClass:jA="sortable-swap-highlight",filter:MA="sortable-filter",list:RA}=this.props;if(!vA||vA==null)return null;const HA=CA||"data-id";return AA.Children.map(vA,(DA,kA)=>{if(DA===void 0)return;const _A=RA[kA]||{},{className:mA}=DA.props,bA=typeof MA=="string"&&{[MA.replace(".","")]:!!_A.filtered},FA=nA(tA)(mA,{[xA]:_A.selected,[IA]:_A.chosen,...bA});return(0,AA.cloneElement)(DA,{[HA]:DA.key,className:FA})})}get sortable(){const vA=this.ref.current;if(vA===null)return null;const CA=Object.keys(vA).find(xA=>xA.includes("Sortable"));return CA?vA[CA]:null}makeOptions(){const vA=["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"],CA=["onChange","onClone","onFilter","onSort"],xA=EA(this.props);return vA.forEach(OA=>xA[OA]=this.prepareOnHandlerPropAndDOM(OA)),CA.forEach(OA=>xA[OA]=this.prepareOnHandlerProp(OA)),{...xA,onMove:(OA,PA)=>{const{onMove:$A}=this.props,jA=OA.willInsertAfter||-1;if(!$A)return jA;const MA=$A(OA,PA,this.sortable,QA);return typeof MA>"u"?!1:MA}}}prepareOnHandlerPropAndDOM(vA){return CA=>{this.callOnHandlerProp(CA,vA),this[vA](CA)}}prepareOnHandlerProp(vA){return CA=>{this.callOnHandlerProp(CA,vA)}}callOnHandlerProp(vA,CA){const xA=this.props[CA];xA&&xA(vA,this.sortable,QA)}onAdd(vA){const{list:CA,setList:xA,clone:IA}=this.props,OA=[...QA.dragging.props.list],PA=pA(vA,OA);sA(PA);const $A=fA(PA,CA,vA,IA).map(jA=>Object.assign(jA,{selected:!1}));xA($A,this.sortable,QA)}onRemove(vA){const{list:CA,setList:xA}=this.props,IA=wA(vA),OA=pA(vA,CA);cA(OA);let PA=[...CA];if(vA.pullMode!=="clone")PA=gA(OA,PA);else{let $A=OA;switch(IA){case"multidrag":$A=OA.map((jA,MA)=>({...jA,element:vA.clones[MA]}));break;case"normal":$A=OA.map(jA=>({...jA,element:vA.clone}));break;case"swap":default:nA(eA)(!0,`mode "${IA}" cannot clone. Please remove "props.clone" from when using the "${IA}" plugin`)}sA($A),OA.forEach(jA=>{const MA=jA.oldIndex,RA=this.props.clone(jA.item,vA);PA.splice(MA,1,RA)})}PA=PA.map($A=>Object.assign($A,{selected:!1})),xA(PA,this.sortable,QA)}onUpdate(vA){const{list:CA,setList:xA}=this.props,IA=pA(vA,CA);sA(IA),cA(IA);const OA=uA(IA,CA);return xA(OA,this.sortable,QA)}onStart(){QA.dragging=this}onEnd(){QA.dragging=null}onChoose(vA){const{list:CA,setList:xA}=this.props,IA=CA.map((OA,PA)=>{let $A=OA;return PA===vA.oldIndex&&($A=Object.assign(OA,{chosen:!0})),$A});xA(IA,this.sortable,QA)}onUnchoose(vA){const{list:CA,setList:xA}=this.props,IA=CA.map((OA,PA)=>{let $A=OA;return PA===vA.oldIndex&&($A=Object.assign($A,{chosen:!1})),$A});xA(IA,this.sortable,QA)}onSpill(vA){const{removeOnSpill:CA,revertOnSpill:xA}=this.props;CA&&!xA&&lA(vA.item)}onSelect(vA){const{list:CA,setList:xA}=this.props,IA=CA.map(OA=>Object.assign(OA,{selected:!1}));vA.newIndicies.forEach(OA=>{const PA=OA.index;if(PA===-1){console.log(`"${vA.type}" had indice of "${OA.index}", which is probably -1 and doesn't usually happen here.`),console.log(vA);return}IA[PA].selected=!0}),xA(IA,this.sortable,QA)}onDeselect(vA){const{list:CA,setList:xA}=this.props,IA=CA.map(OA=>Object.assign(OA,{selected:!1}));vA.newIndicies.forEach(OA=>{const PA=OA.index;PA!==-1&&(IA[PA].selected=!0)}),xA(IA,this.sortable,QA)}}gt(dA,"defaultProps",{clone:vA=>vA});var yA={};iA($.exports,yA)})(dist);var distExports=dist.exports;const accentBarStyles={warning:"bg-warning",error:"bg-danger",success:"bg-success",info:"bg-rstudio-blue"};function ControlledPopup({isOpen:$,onClose:rA,children:tA,content:AA,accent:eA,description:nA,...oA}){return jsxs(Tooltip,{open:$,onOpenChange:()=>rA(),...oA,children:[jsx(TooltipTrigger,{asChild:!0,noToggle:!0,children:tA}),jsx(TooltipContent,{children:jsxs("div",{className:mergeClasses("p-2 rounded-standard bg-rstudio-white w-64 relative"),"aria-label":nA,children:[eA&&jsx("div",{className:mergeClasses("absolute -left-2 -top-2 -bottom-2 w-[6px]",accentBarStyles[eA])}),AA]})})]})}function KeyInput($){const{displayedValue:rA,isInvalid:tA,onNewValue:AA,isSameAsOtherKey:eA}=useKeyInput($);return jsx("span",{className:mergeClasses("block relative",eA&&'after:absolute after:content-["Duplicate_key"] after:block after:text-rstudio-white after:rounded after:min-w-fit after:p-1 after:border after:z-20 after:bg-danger/90'),children:jsx("input",{title:"Key Field",className:mergeClasses("min-w-0 w-full placeholder:text-rstudio-white placeholder:text-xs",tA&&"bg-danger/30 transition-colors duration-500 delay-300"),"aria-invalid":tA,"aria-label":"List item key",type:"text",value:rA,placeholder:eA?"Duplicate":"Required",onChange:nA=>{nA.stopPropagation(),AA(nA.target.value)}})})}function useKeyInput({keyValue:$,onUpdate:rA,allElements:tA,index:AA}){const[eA,nA]=React.useState($),[oA,iA]=React.useState($);oA!==$&&(iA($),nA($));const lA=tA.filter((uA,gA)=>gA!==AA).map(uA=>uA.key),aA=eA==="",sA=lA.includes(eA),cA=aA||sA;function pA(uA){nA(uA),!(uA===""||lA.some(fA=>fA.toLowerCase()===uA.toLowerCase()))&&rA(uA)}return{displayedValue:eA,isInvalid:cA,isSameAsOtherKey:sA,onNewValue:pA}}function swapKeysForObject($,rA,tA){const AA=Object.entries($),eA=AA.findIndex(([nA])=>nA===rA);return AA[eA][0]=tA,AA.reduce((nA,[oA,iA])=>(nA[oA]=iA,nA),{})}function namedListToItemTypeArray($){return Array.isArray($)?$.map((rA,tA)=>({id:tA,key:rA,value:rA})):Object.keys($).map((rA,tA)=>({id:tA,key:rA,value:$[rA]}))}function getKeyValueMismatches($){const rA=Object.entries($).filter(([tA,AA])=>typeof AA=="string"&&tA!==AA).map(([tA,AA],eA)=>({key:tA,value:AA,id:eA}));return rA.length===0?null:rA}function isValueOnlyMode($){return Array.isArray($)}function useListState({value:$,onChange:rA,newItemValue:tA}){const[AA,eA]=React.useState(null),nA=isValueOnlyMode($)?"value-only":"key-value",oA=React.useCallback(gA=>{if(isValueOnlyMode($)){const wA=[...$];wA.splice(gA,1),rA(wA);return}const fA={...$};delete fA[Object.keys(fA)[gA]],rA(fA)},[rA,$]),iA=React.useCallback(()=>{const gA=isValueOnlyMode($)?$.length:Object.keys($).length,fA=typeof tA=="function"?tA(gA+1):tA;isValueOnlyMode($)?rA([...$,fA.value]):rA({...$,[fA.key]:fA.value})},[tA,rA,$]),lA=React.useCallback(gA=>{gA.length!==0&&rA(itemTypeArrayToNamedList(gA,nA))},[nA,rA]),aA=React.useCallback(({index:gA,newKey:fA})=>{if(isValueOnlyMode($))throw new Error("Cannot update key in value-only mode");const wA=Object.keys($)[gA];if(fA!==wA&&fA in $)throw new Error(`Key ${fA} already exists`);const BA=swapKeysForObject($,wA,fA);rA(BA)},[rA,$]),sA=React.useCallback(({index:gA,newValue:fA})=>{if(isValueOnlyMode($)){const EA=[...$];EA[gA]=fA,rA(EA);return}const wA={...$},BA=Object.keys($)[gA];wA[BA]=fA,rA(wA)},[rA,$]),cA=gA=>{if(gA){if(isValueOnlyMode($))throw new Error("Trying to simplify a value-only list");const fA=getKeyValueMismatches($);if(fA!==null){eA(fA);return}}pA(gA?"value-only":"key-value")},pA=React.useCallback(gA=>{const fA=isValueOnlyMode($);if(gA===(fA?"value-only":"key-value"))throw new Error("Trying to update to the same list mode");const wA=fA?$.reduce((BA,EA)=>(BA[EA]=EA,BA),{}):Object.values($);rA(wA),eA(null)},[rA,$]),uA=()=>{eA(null)};return{flatList:namedListToItemTypeArray($),reorderItems:lA,deleteItem:oA,addItem:iA,updateKey:aA,updateValue:sA,swapKeyValueMode:pA,listMode:nA,onValueModeToggle:cA,keyValueMismatches:AA,onCancelSimplify:uA}}function itemTypeArrayToNamedList($,rA){return rA==="value-only"?$.map(tA=>tA.value):$.reduce((tA,{key:AA,value:eA})=>(tA[AA]=eA,tA),{})}function NamedListInput({id:$,label:rA,value:tA,onChange:AA,newItemValue:eA=nA=>({key:"Value"+nA,value:"value"+nA})}){const{flatList:nA,addItem:oA,deleteItem:iA,reorderItems:lA,updateKey:aA,updateValue:sA,swapKeyValueMode:cA,listMode:pA,onValueModeToggle:uA,keyValueMismatches:gA,onCancelSimplify:fA}=useListState({value:tA,onChange:AA,newItemValue:eA}),[wA,BA]=React.useState(!1),EA=nA.length===0,QA=jsxs("div",{className:"w-fit flex flex-col items-center my-2","aria-labelledby":makeLabelId($),"aria-label":rA,children:[jsx(ListItem,{valueOnlyMode:pA==="value-only",className:"text-center -my-1","aria-label":"Columns field labels",children:pA==="value-only"?jsx("span",{className:"col-start-2",children:"Value"}):jsxs(Fragment,{children:[jsx("span",{className:"col-start-2",children:"Key"}),jsx("span",{className:"col-start-4",children:"Value"})]})}),jsx(distExports.ReactSortable,{list:nA,setList:lA,handle:".NamedListDragHandle",children:nA.map((yA,hA)=>jsxs(ListItem,{valueOnlyMode:pA==="value-only",className:mergeClasses("my-1",gA&&gA.find(vA=>vA.key===yA.key)?"bg-danger/30":null),"aria-label":"List item",children:[jsx("div",{className:"NamedListDragHandle grid place-items-center cursor-ns-resize",title:"Reorder list",children:jsx(MdDragHandle,{})}),pA==="value-only"?jsx("input",{title:"Value Field",className:"min-w-0",type:"text","aria-label":"List item value",value:yA.value,onChange:vA=>{sA({index:hA,newValue:vA.target.value})}}):jsxs(Fragment,{children:[jsx(KeyInput,{allElements:nA,index:hA,keyValue:yA.key,onUpdate:vA=>{aA({index:hA,newKey:vA})}}),jsx("span",{className:"mb-[1px]",children:":"}),jsx("input",{title:"Value Field",className:"min-w-0",type:"text","aria-label":"List item value",value:yA.value,onChange:vA=>{sA({index:hA,newValue:vA.target.value})}})]}),jsx(Button,{className:"grid place-content-center p-0 area[delete] hover:scale-110 mb-[2px]",onClick:()=>iA(yA.id),variant:["icon","transparent"],title:`Delete ${yA.value}`,children:jsx(SvgTrash,{})})]},hA))})]}),dA=gA!==null;return jsx(ControlledPopup,{isOpen:wA,onClose:()=>{BA(!1),fA()},description:`Settings panel for ${rA} argument`,placement:"right-start",accent:dA?"warning":"info",offset:{mainAxis:9,crossAxis:-23},content:jsxs(Fragment,{children:[jsxs("h2",{className:"bold text-base mb-3",children:["Settings for ",rA," argument"]}),jsxs("div",{className:"flex gap-2 justify-between items-center ",children:[jsx("label",{htmlFor:"keyAndValueModeCheckbox",children:"Keys and Value Mode"}),jsx("input",{className:"transform[translateY(1px)] border mt-[2px]",id:"keyAndValueModeCheckbox",type:"checkbox",checked:pA==="key-value",disabled:dA,onChange:yA=>{uA(!yA.target.checked)}})]}),jsx("span",{className:"text-xs text-gray-700 italic",children:"Should the list be displayed as just values or as key-value pairs? Key value pairs will allow you to choose a different display name for each value."}),dA&&jsxs(Fragment,{children:[jsx("hr",{}),jsxs("p",{children:["There are some"," ",jsx("span",{className:"bg-danger/30 px-1 py-[2px] rounded",children:"mismatches"})," ","between keys and values preventing simplification to value-only mode. Merge to just the values?"]}),jsxs("div",{className:"flex justify-around mt-2",children:[jsxs(Button,{onClick:()=>{cA("value-only"),fA()},children:[jsx(ArrowsCollapse$1,{className:"text-lg"})," Merge"]}),jsxs(Button,{onClick:fA,variant:"secondary",children:[" ",jsx(X$1,{className:"text-lg"}),"Cancel"]})]})]})]}),children:jsxs("div",{className:"relative",children:[jsx(Button,{className:"absolute right-0 bottom-100",variant:["icon","transparent"],onClick:()=>{BA(yA=>!yA),fA()},"aria-label":`Open settings for ${rA} argument`,children:jsx(Gear$1,{})}),EA?jsx("div",{className:"text-gray-500 text-xs bg-rstudio-white rounded italic w-full h-[23px] my-1 grid place-content-center ",children:"Empty list"}):QA,jsx(Button,{className:"text-icon -mt-1 p-1 bg-red-400 w-full",onClick:()=>oA(),variant:"transparent",title:"Add new item","aria-label":"Add new item to list",children:jsx(FaPlus,{})})]})})}function ListItem({valueOnlyMode:$,className:rA,...tA}){return jsx("div",{className:mergeClasses(rA,$?"grid-cols-[15px_1fr_15px]":"grid-cols-[15px_1fr_auto_1fr_15px]","w-100 grid ","gap-1 p-1 items-center rounded [&.sortable-chosen]:outline","[&.sortable-chosen]:outline-offset-[-2px] [&.sortable-chosen]:outline-rstudio-grey/30 [&.sortable-chosen]:shadow-lg"),...tA})}const styles$d="",DEFAULT_DROPDOWN_CHOICE="__DEFAULT-DROPDOWN-CHOICE__";function DropdownSelect({id:$,label:rA,choices:tA,onChange:AA,value:eA}){React.useEffect(()=>{eA===DEFAULT_DROPDOWN_CHOICE&&AA(tA[0]),tA.length>0&&!tA.includes(eA)&&AA(tA[0])},[AA,tA,eA]);const nA=iA=>{const lA=iA.target.selectedIndex;AA(tA[lA])},oA=removeDuplicates(tA);return oA.length===0?jsx("select",{title:`${rA} selector`,"aria-labelledby":makeLabelId($),"aria-label":rA,className:"OptionsDropdown SUE-Input",placeholder:"No available options"}):jsx("select",{title:`${rA} selector`,"aria-labelledby":makeLabelId($),className:"OptionsDropdown SUE-Input",onChange:nA,value:eA,children:oA.map(iA=>jsx("option",{value:iA,children:iA},iA))})}function walkUiNode($,rA){function tA(AA){var oA;if(rA(AA)===!1)return;const nA=AA.namedArgs;for(const iA in nA){const lA=nA[iA];isShinyUiNode(lA)&&tA(lA)}isParentNode(AA)&&((oA=AA.children)==null||oA.forEach(tA))}tA($)}function getAllInputOutputIdsInApp($){const rA=[];return walkUiNode($,tA=>{const AA=tA.namedArgs,eA=AA.id||AA.outputId||AA.inputId;typeof eA=="string"&&rA.push(eA)}),rA}function useUpdateServerCode(){const $=useDispatch(),rA=useCurrentAppInfo(),tA=rA.mode==="MAIN"?rA.app.code:null;return React.useCallback(eA=>{if(tA===null)throw new Error("Tried to update server code when no app template");$(SET_APP_CODE_TEMPLATE(eA(tA)))},[tA,$])}function generateFullAppScript($){const{ui_tree:rA}=$;return generateUiScript({ui_tree:rA,language:$.language,...$.app})}function useCurrentServerNodes(){const $=useCurrentAppInfo(),rA=useTsParser(),[tA,AA]=React.useState(null);return React.useEffect(()=>{if($.mode!=="MAIN")return;const eA=generateFullAppScript($);rA(eA).then(nA=>{const oA=$.language==="R"?getRServerLocations(nA.server_node):getPythonServerLocations(nA.server_node);if(!oA)throw new Error("Could not parse app scripts");AA(oA)})},[$,rA]),tA}function updateServerWithNewId({oldId:$,newId:rA,positions:tA,appScript:AA,language:eA}){const nA=new RegExp(eA==="R"?`(input|output)(\\$)(${$})(\\W)`:`(input|output)(\\[)(${$})(\\])`,"g"),oA=AA.match(nA);if(oA===null)throw new Error(`No matches found for ${$} in app script`);if(tA&&oA.length!==tA.length)throw new Error(`Expected ${tA.length} matches for ${$} in app script but got ${oA==null?void 0:oA.length}`);return AA.replace(nA,`$1$2${rA}$4`)}function IdInput({id:$,label:rA,value:tA,onChange:AA,inputOrOutput:eA}){const nA=useCurrentAppInfo(),oA=useUpdateServerCode(),iA=useCurrentServerNodes(),[lA,aA]=React.useState(null),[sA,cA]=React.useState(tA),[pA,uA]=React.useState(null),gA=getLocationsInServerOfId(tA,iA),fA=gA!==null;if(React.useEffect(()=>{aA(fA?"synced":"unsynced")},[fA]),nA.mode!=="MAIN")return null;const{ui_tree:wA,language:BA}=nA,EA=getAllInputOutputIdsInApp(wA),QA=hA=>{const vA=EA.includes(hA)&&hA!==tA;if(hA=hA.replace(/ /g,"_"),cA(hA),vA){uA(`The id ${hA} is already taken`);return}if(hA===""){uA("ID cannot be empty");return}AA(hA),uA(null),lA==="synced"&&gA!==null&&oA(CA=>updateServerWithNewId({oldId:tA,newId:hA,positions:gA,appScript:CA,language:BA}))},dA=pA!==null,yA={className:"SUE-Input","aria-label":rA,"aria-labelledby":makeLabelId($),"aria-invalid":dA,autoComplete:"off",id:$,value:sA,onChange:hA=>{QA(hA.target.value)}};return jsxs(Fragment,{children:[jsxs("div",{className:"flex items-center gap-1",children:[jsx("input",{...yA,type:"text"}),fA&&jsxs(Tooltip,{placement:"right-start",children:[jsx(TooltipTrigger,{asChild:!0,children:jsxs("div",{className:"relative",children:[jsx(Link45deg$1,{className:mergeClasses("text-xl relative ",lA==="synced"?["text-rstudio-blue"]:["text-danger after:block after:absolute after:w-px after:bg-danger"]),onClick:()=>{aA(hA=>hA==="unsynced"?"synced":"unsynced")}}),lA==="unsynced"&&jsx("div",{className:"bg-danger/50 w-[2px] absolute left-[50%] top-1 bottom-1 pointer-events-none",style:{transform:"rotate(320deg)"}})]})}),jsxs(TooltipContent,{className:"max-w-xs",children:[jsx("p",{className:"my-1",children:lA==="synced"?"Changing ID will cause uses of this ID in server code to update.":"ID syncing is disabled. Changes to this ID will not be reflected in server code."}),jsxs("p",{className:"my-1",children:["Click to ",lA==="synced"?"disable":"enable"," ","syncing."]})]})]})]}),pA&&jsx("div",{className:"text-danger",children:jsx("small",{children:pA})})]})}function getLocationsInServerOfId($,rA){if(rA===null)return null;const{inputNodes:tA,outputNodes:AA}=rA;return tA.has($)?tA.get($).map(getNodePosition):AA.has($)?AA.get($).map(getNodePosition):null}const existingValuesContext=React.createContext({existingValues:new Set,warningMsg:$=>`The value ${$} is already taken`});function StringInput({id:$,label:rA,value:tA,onChange:AA,longform:eA}){const nA=React.useContext(existingValuesContext),oA=nA==null?void 0:nA.existingValues.has(tA),iA={className:"SUE-Input","aria-label":rA,"aria-labelledby":makeLabelId($),"aria-invalid":oA,id:$,value:tA,onChange:lA=>{const aA=lA.target.value;AA(aA)}};return jsxs(Fragment,{children:[eA?jsx("textarea",{...iA,className:"h-24 w-100 flex-grow"}):jsx("input",{...iA,type:"text"}),oA&&jsx("div",{className:"text-danger",children:jsx("small",{children:nA.warningMsg(tA)})})]})}function SettingsInputElement($){switch($.inputType){case"string":return jsx(StringInput,{...$});case"number":return jsx(NumberInput,{...$});case"cssMeasure":return jsx(CSSUnitInput,{...$});case"boolean":return jsx(BooleanInput,{...$});case"list":return jsx(NamedListInput,{...$});case"dropdown":return jsx(DropdownSelect,{...$});case"radio":return jsx(RadioInputs,{...$});case"id":return jsx(IdInput,{...$});default:return jsxs("div",{children:["I don't know how to render the input of type ",$.inputType," yet! Sorry."]})}}function valueIsType($,rA){if($===void 0)return!0;if(rA==="number")return typeof $=="number"||typeof $=="string"&&!isNaN(Number($));if(rA==="string"||rA==="id")return typeof $=="string";if(rA==="cssMeasure")return isCSSMeasure($);if(rA==="boolean")return typeof $=="boolean";if(rA==="list")return isNamedList($);if(rA==="dropdown"||rA==="radio")return typeof $=="string";if(rA==="string-array")return Array.isArray($)&&typeof $[0]=="string";if(rA==="ui-node")return isShinyUiNode($);if(rA==="omitted")return!0;throw new Error("Unimplemented argument type check",rA)}const SettingsInput$1="";function SettingsInput({onUpdate:$,...rA}){const tA=rA.value===void 0,AA=rA.optional,eA=makeLabelId(rA.name),nA=rA.label??rA.name,oA=()=>$({type:"UPDATE",value:rA.defaultValue}),iA=sA=>$({type:"UPDATE",value:sA}),lA=()=>$({type:"REMOVE"});let aA;return rA.value===void 0?rA.optional?aA=jsx(UnsetArgumentMessage,{labelledBy:eA}):aA=jsx(MissingRequiredArgumentMessage,{name:rA.name,onReset:oA}):valueIsType(rA.value,rA.inputType)?aA=jsx(SettingsInputElement,{label:nA,id:rA.name,onChange:iA,...rA}):aA=jsx(MismatchedTypeMessage,{name:rA.name,onReset:oA}),jsx(InputLabelWrapper,{argumentIsUnset:tA,className:rA.fill_space?"flex flex-col flex-grow":"",optionalField:AA?jsx("input",{type:"checkbox",checked:!tA,title:`Use ${rA.name} argument`,"aria-label":`Use ${rA.name} argument`,onChange:tA?oA:lA}):null,label:nA,labelId:eA,mainInput:aA})}function InputLabelWrapper({argumentIsUnset:$=!1,className:rA,optionalField:tA,label:AA,labelId:eA,mainInput:nA}){return jsxs("div",{className:mergeClasses("SUE-SettingsInput",rA),children:[jsxs("div",{className:"info","data-unset":$,children:[tA,jsx("label",{id:eA,children:AA})]}),nA]})}function MismatchedTypeMessage({name:$,onReset:rA}){return jsxs("div",{className:"mismatched-argument-types",children:["Argument for ",$," of unsupported type.",jsx(Button,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:rA,children:"Reset"})]})}function MissingRequiredArgumentMessage({name:$,onReset:rA}){return jsxs("div",{className:"missing-required-argument-message",children:['Required argument "',$,'" not provided.',jsx(Button,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:rA,children:"Reset"})]})}function UnsetArgumentMessage({labelledBy:$}){return jsx("input",{className:"unset-argument SUE-Input","aria-labelledby":$,placeholder:"Default",disabled:!0})}function cleanIconName($){let AA=$.split("-").map(eA=>eA.charAt(0).toUpperCase()+eA.slice(1)).join("");return/[0-9]/.test(AA.charAt(0))&&(AA="Icon"+AA),AA}const BsIcon=({icon_name:$,...rA})=>{let tA="icon_name";try{tA=cleanIconName($)}catch{return jsxs("span",{children:["Failed to find ",jsx("strong",{children:$})]})}if(!(tA in icons$1))return jsxs("span",{children:["Failed to find ",jsx("strong",{children:$})]});const AA=icons$1[tA];return jsx(AA,{...rA})},allBsIconNames=["0-circle-fill","0-circle","0-square-fill","0-square","1-circle-fill","1-circle","1-square-fill","1-square","123","2-circle-fill","2-circle","2-square-fill","2-square","3-circle-fill","3-circle","3-square-fill","3-square","4-circle-fill","4-circle","4-square-fill","4-square","5-circle-fill","5-circle","5-square-fill","5-square","6-circle-fill","6-circle","6-square-fill","6-square","7-circle-fill","7-circle","7-square-fill","7-square","8-circle-fill","8-circle","8-square-fill","8-square","9-circle-fill","9-circle","9-square-fill","9-square","activity","airplane-engines-fill","airplane-engines","airplane-fill","airplane","alarm-fill","alarm","alexa","align-bottom","align-center","align-end","align-middle","align-start","align-top","alipay","alt","amd","android","android2","app-indicator","app","apple","archive-fill","archive","arrow-90deg-down","arrow-90deg-left","arrow-90deg-right","arrow-90deg-up","arrow-bar-down","arrow-bar-left","arrow-bar-right","arrow-bar-up","arrow-clockwise","arrow-counterclockwise","arrow-down-circle-fill","arrow-down-circle","arrow-down-left-circle-fill","arrow-down-left-circle","arrow-down-left-square-fill","arrow-down-left-square","arrow-down-left","arrow-down-right-circle-fill","arrow-down-right-circle","arrow-down-right-square-fill","arrow-down-right-square","arrow-down-right","arrow-down-short","arrow-down-square-fill","arrow-down-square","arrow-down-up","arrow-down","arrow-left-circle-fill","arrow-left-circle","arrow-left-right","arrow-left-short","arrow-left-square-fill","arrow-left-square","arrow-left","arrow-repeat","arrow-return-left","arrow-return-right","arrow-right-circle-fill","arrow-right-circle","arrow-right-short","arrow-right-square-fill","arrow-right-square","arrow-right","arrow-through-heart-fill","arrow-through-heart","arrow-up-circle-fill","arrow-up-circle","arrow-up-left-circle-fill","arrow-up-left-circle","arrow-up-left-square-fill","arrow-up-left-square","arrow-up-left","arrow-up-right-circle-fill","arrow-up-right-circle","arrow-up-right-square-fill","arrow-up-right-square","arrow-up-right","arrow-up-short","arrow-up-square-fill","arrow-up-square","arrow-up","arrows-angle-contract","arrows-angle-expand","arrows-collapse","arrows-expand","arrows-fullscreen","arrows-move","aspect-ratio-fill","aspect-ratio","asterisk","at","award-fill","award","back","backspace-fill","backspace-reverse-fill","backspace-reverse","backspace","badge-3d-fill","badge-3d","badge-4k-fill","badge-4k","badge-8k-fill","badge-8k","badge-ad-fill","badge-ad","badge-ar-fill","badge-ar","badge-cc-fill","badge-cc","badge-hd-fill","badge-hd","badge-sd-fill","badge-sd","badge-tm-fill","badge-tm","badge-vo-fill","badge-vo","badge-vr-fill","badge-vr","badge-wc-fill","badge-wc","bag-check-fill","bag-check","bag-dash-fill","bag-dash","bag-fill","bag-heart-fill","bag-heart","bag-plus-fill","bag-plus","bag-x-fill","bag-x","bag","balloon-fill","balloon-heart-fill","balloon-heart","balloon","bandaid-fill","bandaid","bank","bank2","bar-chart-fill","bar-chart-line-fill","bar-chart-line","bar-chart-steps","bar-chart","basket-fill","basket","basket2-fill","basket2","basket3-fill","basket3","battery-charging","battery-full","battery-half","battery","behance","bell-fill","bell-slash-fill","bell-slash","bell","bezier","bezier2","bicycle","binoculars-fill","binoculars","blockquote-left","blockquote-right","bluetooth","body-text","book-fill","book-half","book","bookmark-check-fill","bookmark-check","bookmark-dash-fill","bookmark-dash","bookmark-fill","bookmark-heart-fill","bookmark-heart","bookmark-plus-fill","bookmark-plus","bookmark-star-fill","bookmark-star","bookmark-x-fill","bookmark-x","bookmark","bookmarks-fill","bookmarks","bookshelf","boombox-fill","boombox","bootstrap-fill","bootstrap-reboot","bootstrap","border-all","border-bottom","border-center","border-inner","border-left","border-middle","border-outer","border-right","border-style","border-top","border-width","border","bounding-box-circles","bounding-box","box-arrow-down-left","box-arrow-down-right","box-arrow-down","box-arrow-in-down-left","box-arrow-in-down-right","box-arrow-in-down","box-arrow-in-left","box-arrow-in-right","box-arrow-in-up-left","box-arrow-in-up-right","box-arrow-in-up","box-arrow-left","box-arrow-right","box-arrow-up-left","box-arrow-up-right","box-arrow-up","box-fill","box-seam-fill","box-seam","box","box2-fill","box2-heart-fill","box2-heart","box2","boxes","braces-asterisk","braces","bricks","briefcase-fill","briefcase","brightness-alt-high-fill","brightness-alt-high","brightness-alt-low-fill","brightness-alt-low","brightness-high-fill","brightness-high","brightness-low-fill","brightness-low","broadcast-pin","broadcast","browser-chrome","browser-edge","browser-firefox","browser-safari","brush-fill","brush","bucket-fill","bucket","bug-fill","bug","building-add","building-check","building-dash","building-down","building-exclamation","building-fill-add","building-fill-check","building-fill-dash","building-fill-down","building-fill-exclamation","building-fill-gear","building-fill-lock","building-fill-slash","building-fill-up","building-fill-x","building-fill","building-gear","building-lock","building-slash","building-up","building-x","building","buildings-fill","buildings","bullseye","bus-front-fill","bus-front","c-circle-fill","c-circle","c-square-fill","c-square","calculator-fill","calculator","calendar-check-fill","calendar-check","calendar-date-fill","calendar-date","calendar-day-fill","calendar-day","calendar-event-fill","calendar-event","calendar-fill","calendar-heart-fill","calendar-heart","calendar-minus-fill","calendar-minus","calendar-month-fill","calendar-month","calendar-plus-fill","calendar-plus","calendar-range-fill","calendar-range","calendar-week-fill","calendar-week","calendar-x-fill","calendar-x","calendar","calendar2-check-fill","calendar2-check","calendar2-date-fill","calendar2-date","calendar2-day-fill","calendar2-day","calendar2-event-fill","calendar2-event","calendar2-fill","calendar2-heart-fill","calendar2-heart","calendar2-minus-fill","calendar2-minus","calendar2-month-fill","calendar2-month","calendar2-plus-fill","calendar2-plus","calendar2-range-fill","calendar2-range","calendar2-week-fill","calendar2-week","calendar2-x-fill","calendar2-x","calendar2","calendar3-event-fill","calendar3-event","calendar3-fill","calendar3-range-fill","calendar3-range","calendar3-week-fill","calendar3-week","calendar3","calendar4-event","calendar4-range","calendar4-week","calendar4","camera-fill","camera-reels-fill","camera-reels","camera-video-fill","camera-video-off-fill","camera-video-off","camera-video","camera","camera2","capslock-fill","capslock","capsule-pill","capsule","car-front-fill","car-front","card-checklist","card-heading","card-image","card-list","card-text","caret-down-fill","caret-down-square-fill","caret-down-square","caret-down","caret-left-fill","caret-left-square-fill","caret-left-square","caret-left","caret-right-fill","caret-right-square-fill","caret-right-square","caret-right","caret-up-fill","caret-up-square-fill","caret-up-square","caret-up","cart-check-fill","cart-check","cart-dash-fill","cart-dash","cart-fill","cart-plus-fill","cart-plus","cart-x-fill","cart-x","cart","cart2","cart3","cart4","cash-coin","cash-stack","cash","cassette-fill","cassette","cast","cc-circle-fill","cc-circle","cc-square-fill","cc-square","chat-dots-fill","chat-dots","chat-fill","chat-heart-fill","chat-heart","chat-left-dots-fill","chat-left-dots","chat-left-fill","chat-left-heart-fill","chat-left-heart","chat-left-quote-fill","chat-left-quote","chat-left-text-fill","chat-left-text","chat-left","chat-quote-fill","chat-quote","chat-right-dots-fill","chat-right-dots","chat-right-fill","chat-right-heart-fill","chat-right-heart","chat-right-quote-fill","chat-right-quote","chat-right-text-fill","chat-right-text","chat-right","chat-square-dots-fill","chat-square-dots","chat-square-fill","chat-square-heart-fill","chat-square-heart","chat-square-quote-fill","chat-square-quote","chat-square-text-fill","chat-square-text","chat-square","chat-text-fill","chat-text","chat","check-all","check-circle-fill","check-circle","check-lg","check-square-fill","check-square","check","check2-all","check2-circle","check2-square","check2","chevron-bar-contract","chevron-bar-down","chevron-bar-expand","chevron-bar-left","chevron-bar-right","chevron-bar-up","chevron-compact-down","chevron-compact-left","chevron-compact-right","chevron-compact-up","chevron-contract","chevron-double-down","chevron-double-left","chevron-double-right","chevron-double-up","chevron-down","chevron-expand","chevron-left","chevron-right","chevron-up","circle-fill","circle-half","circle-square","circle","clipboard-check-fill","clipboard-check","clipboard-data-fill","clipboard-data","clipboard-fill","clipboard-heart-fill","clipboard-heart","clipboard-minus-fill","clipboard-minus","clipboard-plus-fill","clipboard-plus","clipboard-pulse","clipboard-x-fill","clipboard-x","clipboard","clipboard2-check-fill","clipboard2-check","clipboard2-data-fill","clipboard2-data","clipboard2-fill","clipboard2-heart-fill","clipboard2-heart","clipboard2-minus-fill","clipboard2-minus","clipboard2-plus-fill","clipboard2-plus","clipboard2-pulse-fill","clipboard2-pulse","clipboard2-x-fill","clipboard2-x","clipboard2","clock-fill","clock-history","clock","cloud-arrow-down-fill","cloud-arrow-down","cloud-arrow-up-fill","cloud-arrow-up","cloud-check-fill","cloud-check","cloud-download-fill","cloud-download","cloud-drizzle-fill","cloud-drizzle","cloud-fill","cloud-fog-fill","cloud-fog","cloud-fog2-fill","cloud-fog2","cloud-hail-fill","cloud-hail","cloud-haze-fill","cloud-haze","cloud-haze2-fill","cloud-haze2","cloud-lightning-fill","cloud-lightning-rain-fill","cloud-lightning-rain","cloud-lightning","cloud-minus-fill","cloud-minus","cloud-moon-fill","cloud-moon","cloud-plus-fill","cloud-plus","cloud-rain-fill","cloud-rain-heavy-fill","cloud-rain-heavy","cloud-rain","cloud-slash-fill","cloud-slash","cloud-sleet-fill","cloud-sleet","cloud-snow-fill","cloud-snow","cloud-sun-fill","cloud-sun","cloud-upload-fill","cloud-upload","cloud","clouds-fill","clouds","cloudy-fill","cloudy","code-slash","code-square","code","coin","collection-fill","collection-play-fill","collection-play","collection","columns-gap","columns","command","compass-fill","compass","cone-striped","cone","controller","cpu-fill","cpu","credit-card-2-back-fill","credit-card-2-back","credit-card-2-front-fill","credit-card-2-front","credit-card-fill","credit-card","crop","cup-fill","cup-hot-fill","cup-hot","cup-straw","cup","currency-bitcoin","currency-dollar","currency-euro","currency-exchange","currency-pound","currency-rupee","currency-yen","cursor-fill","cursor-text","cursor","dash-circle-dotted","dash-circle-fill","dash-circle","dash-lg","dash-square-dotted","dash-square-fill","dash-square","dash","database-add","database-check","database-dash","database-down","database-exclamation","database-fill-add","database-fill-check","database-fill-dash","database-fill-down","database-fill-exclamation","database-fill-gear","database-fill-lock","database-fill-slash","database-fill-up","database-fill-x","database-fill","database-gear","database-lock","database-slash","database-up","database-x","database","device-hdd-fill","device-hdd","device-ssd-fill","device-ssd","diagram-2-fill","diagram-2","diagram-3-fill","diagram-3","diamond-fill","diamond-half","diamond","dice-1-fill","dice-1","dice-2-fill","dice-2","dice-3-fill","dice-3","dice-4-fill","dice-4","dice-5-fill","dice-5","dice-6-fill","dice-6","disc-fill","disc","discord","display-fill","display","displayport-fill","displayport","distribute-horizontal","distribute-vertical","door-closed-fill","door-closed","door-open-fill","door-open","dot","download","dpad-fill","dpad","dribbble","dropbox","droplet-fill","droplet-half","droplet","ear-fill","ear","earbuds","easel-fill","easel","easel2-fill","easel2","easel3-fill","easel3","egg-fill","egg-fried","egg","eject-fill","eject","emoji-angry-fill","emoji-angry","emoji-dizzy-fill","emoji-dizzy","emoji-expressionless-fill","emoji-expressionless","emoji-frown-fill","emoji-frown","emoji-heart-eyes-fill","emoji-heart-eyes","emoji-kiss-fill","emoji-kiss","emoji-laughing-fill","emoji-laughing","emoji-neutral-fill","emoji-neutral","emoji-smile-fill","emoji-smile-upside-down-fill","emoji-smile-upside-down","emoji-smile","emoji-sunglasses-fill","emoji-sunglasses","emoji-wink-fill","emoji-wink","envelope-at-fill","envelope-at","envelope-check-fill","envelope-check","envelope-dash-fill","envelope-dash","envelope-exclamation-fill","envelope-exclamation","envelope-fill","envelope-heart-fill","envelope-heart","envelope-open-fill","envelope-open-heart-fill","envelope-open-heart","envelope-open","envelope-paper-fill","envelope-paper-heart-fill","envelope-paper-heart","envelope-paper","envelope-plus-fill","envelope-plus","envelope-slash-fill","envelope-slash","envelope-x-fill","envelope-x","envelope","eraser-fill","eraser","escape","ethernet","ev-front-fill","ev-front","ev-station-fill","ev-station","exclamation-circle-fill","exclamation-circle","exclamation-diamond-fill","exclamation-diamond","exclamation-lg","exclamation-octagon-fill","exclamation-octagon","exclamation-square-fill","exclamation-square","exclamation-triangle-fill","exclamation-triangle","exclamation","exclude","explicit-fill","explicit","eye-fill","eye-slash-fill","eye-slash","eye","eyedropper","eyeglasses","facebook","fan","fast-forward-btn-fill","fast-forward-btn","fast-forward-circle-fill","fast-forward-circle","fast-forward-fill","fast-forward","file-arrow-down-fill","file-arrow-down","file-arrow-up-fill","file-arrow-up","file-bar-graph-fill","file-bar-graph","file-binary-fill","file-binary","file-break-fill","file-break","file-check-fill","file-check","file-code-fill","file-code","file-diff-fill","file-diff","file-earmark-arrow-down-fill","file-earmark-arrow-down","file-earmark-arrow-up-fill","file-earmark-arrow-up","file-earmark-bar-graph-fill","file-earmark-bar-graph","file-earmark-binary-fill","file-earmark-binary","file-earmark-break-fill","file-earmark-break","file-earmark-check-fill","file-earmark-check","file-earmark-code-fill","file-earmark-code","file-earmark-diff-fill","file-earmark-diff","file-earmark-easel-fill","file-earmark-easel","file-earmark-excel-fill","file-earmark-excel","file-earmark-fill","file-earmark-font-fill","file-earmark-font","file-earmark-image-fill","file-earmark-image","file-earmark-lock-fill","file-earmark-lock","file-earmark-lock2-fill","file-earmark-lock2","file-earmark-medical-fill","file-earmark-medical","file-earmark-minus-fill","file-earmark-minus","file-earmark-music-fill","file-earmark-music","file-earmark-pdf-fill","file-earmark-pdf","file-earmark-person-fill","file-earmark-person","file-earmark-play-fill","file-earmark-play","file-earmark-plus-fill","file-earmark-plus","file-earmark-post-fill","file-earmark-post","file-earmark-ppt-fill","file-earmark-ppt","file-earmark-richtext-fill","file-earmark-richtext","file-earmark-ruled-fill","file-earmark-ruled","file-earmark-slides-fill","file-earmark-slides","file-earmark-spreadsheet-fill","file-earmark-spreadsheet","file-earmark-text-fill","file-earmark-text","file-earmark-word-fill","file-earmark-word","file-earmark-x-fill","file-earmark-x","file-earmark-zip-fill","file-earmark-zip","file-earmark","file-easel-fill","file-easel","file-excel-fill","file-excel","file-fill","file-font-fill","file-font","file-image-fill","file-image","file-lock-fill","file-lock","file-lock2-fill","file-lock2","file-medical-fill","file-medical","file-minus-fill","file-minus","file-music-fill","file-music","file-pdf-fill","file-pdf","file-person-fill","file-person","file-play-fill","file-play","file-plus-fill","file-plus","file-post-fill","file-post","file-ppt-fill","file-ppt","file-richtext-fill","file-richtext","file-ruled-fill","file-ruled","file-slides-fill","file-slides","file-spreadsheet-fill","file-spreadsheet","file-text-fill","file-text","file-word-fill","file-word","file-x-fill","file-x","file-zip-fill","file-zip","file","files-alt","files","filetype-aac","filetype-ai","filetype-bmp","filetype-cs","filetype-css","filetype-csv","filetype-doc","filetype-docx","filetype-exe","filetype-gif","filetype-heic","filetype-html","filetype-java","filetype-jpg","filetype-js","filetype-json","filetype-jsx","filetype-key","filetype-m4p","filetype-md","filetype-mdx","filetype-mov","filetype-mp3","filetype-mp4","filetype-otf","filetype-pdf","filetype-php","filetype-png","filetype-ppt","filetype-pptx","filetype-psd","filetype-py","filetype-raw","filetype-rb","filetype-sass","filetype-scss","filetype-sh","filetype-sql","filetype-svg","filetype-tiff","filetype-tsx","filetype-ttf","filetype-txt","filetype-wav","filetype-woff","filetype-xls","filetype-xlsx","filetype-xml","filetype-yml","film","filter-circle-fill","filter-circle","filter-left","filter-right","filter-square-fill","filter-square","filter","fingerprint","fire","flag-fill","flag","flower1","flower2","flower3","folder-check","folder-fill","folder-minus","folder-plus","folder-symlink-fill","folder-symlink","folder-x","folder","folder2-open","folder2","fonts","forward-fill","forward","front","fuel-pump-diesel-fill","fuel-pump-diesel","fuel-pump-fill","fuel-pump","fullscreen-exit","fullscreen","funnel-fill","funnel","gear-fill","gear-wide-connected","gear-wide","gear","gem","gender-ambiguous","gender-female","gender-male","gender-trans","geo-alt-fill","geo-alt","geo-fill","geo","gift-fill","gift","git","github","globe-americas","globe-asia-australia","globe-central-south-asia","globe-europe-africa","globe","globe2","google-play","google","gpu-card","graph-down-arrow","graph-down","graph-up-arrow","graph-up","grid-1x2-fill","grid-1x2","grid-3x2-gap-fill","grid-3x2-gap","grid-3x2","grid-3x3-gap-fill","grid-3x3-gap","grid-3x3","grid-fill","grid","grip-horizontal","grip-vertical","h-circle-fill","h-circle","h-square-fill","h-square","hammer","hand-index-fill","hand-index-thumb-fill","hand-index-thumb","hand-index","hand-thumbs-down-fill","hand-thumbs-down","hand-thumbs-up-fill","hand-thumbs-up","handbag-fill","handbag","hash","hdd-fill","hdd-network-fill","hdd-network","hdd-rack-fill","hdd-rack","hdd-stack-fill","hdd-stack","hdd","hdmi-fill","hdmi","headphones","headset-vr","headset","heart-arrow","heart-fill","heart-half","heart-pulse-fill","heart-pulse","heart","heartbreak-fill","heartbreak","hearts","heptagon-fill","heptagon-half","heptagon","hexagon-fill","hexagon-half","hexagon","hospital-fill","hospital","hourglass-bottom","hourglass-split","hourglass-top","hourglass","house-add-fill","house-add","house-check-fill","house-check","house-dash-fill","house-dash","house-door-fill","house-door","house-down-fill","house-down","house-exclamation-fill","house-exclamation","house-fill","house-gear-fill","house-gear","house-heart-fill","house-heart","house-lock-fill","house-lock","house-slash-fill","house-slash","house-up-fill","house-up","house-x-fill","house-x","house","houses-fill","houses","hr","hurricane","hypnotize","image-alt","image-fill","image","images","inbox-fill","inbox","inboxes-fill","inboxes","incognito","indent","infinity","info-circle-fill","info-circle","info-lg","info-square-fill","info-square","info","input-cursor-text","input-cursor","instagram","intersect","journal-album","journal-arrow-down","journal-arrow-up","journal-bookmark-fill","journal-bookmark","journal-check","journal-code","journal-medical","journal-minus","journal-plus","journal-richtext","journal-text","journal-x","journal","journals","joystick","justify-left","justify-right","justify","kanban-fill","kanban","key-fill","key","keyboard-fill","keyboard","ladder","lamp-fill","lamp","laptop-fill","laptop","layer-backward","layer-forward","layers-fill","layers-half","layers","layout-sidebar-inset-reverse","layout-sidebar-inset","layout-sidebar-reverse","layout-sidebar","layout-split","layout-text-sidebar-reverse","layout-text-sidebar","layout-text-window-reverse","layout-text-window","layout-three-columns","layout-wtf","life-preserver","lightbulb-fill","lightbulb-off-fill","lightbulb-off","lightbulb","lightning-charge-fill","lightning-charge","lightning-fill","lightning","line","link-45deg","link","linkedin","list-check","list-columns-reverse","list-columns","list-nested","list-ol","list-stars","list-task","list-ul","list","lock-fill","lock","lungs-fill","lungs","magic","magnet-fill","magnet","mailbox","mailbox2","map-fill","map","markdown-fill","markdown","mask","mastodon","medium","megaphone-fill","megaphone","memory","menu-app-fill","menu-app","menu-button-fill","menu-button-wide-fill","menu-button-wide","menu-button","menu-down","menu-up","messenger","meta","mic-fill","mic-mute-fill","mic-mute","mic","microsoft-teams","microsoft","minecart-loaded","minecart","modem-fill","modem","moisture","moon-fill","moon-stars-fill","moon-stars","moon","mortarboard-fill","mortarboard","motherboard-fill","motherboard","mouse-fill","mouse","mouse2-fill","mouse2","mouse3-fill","mouse3","music-note-beamed","music-note-list","music-note","music-player-fill","music-player","newspaper","nintendo-switch","node-minus-fill","node-minus","node-plus-fill","node-plus","nut-fill","nut","nvidia","octagon-fill","octagon-half","octagon","optical-audio-fill","optical-audio","option","outlet","p-circle-fill","p-circle","p-square-fill","p-square","paint-bucket","palette-fill","palette","palette2","paperclip","paragraph","pass-fill","pass","patch-check-fill","patch-check","patch-exclamation-fill","patch-exclamation","patch-minus-fill","patch-minus","patch-plus-fill","patch-plus","patch-question-fill","patch-question","pause-btn-fill","pause-btn","pause-circle-fill","pause-circle","pause-fill","pause","paypal","pc-display-horizontal","pc-display","pc-horizontal","pc","pci-card","peace-fill","peace","pen-fill","pen","pencil-fill","pencil-square","pencil","pentagon-fill","pentagon-half","pentagon","people-fill","people","percent","person-add","person-badge-fill","person-badge","person-bounding-box","person-check-fill","person-check","person-circle","person-dash-fill","person-dash","person-down","person-exclamation","person-fill-add","person-fill-check","person-fill-dash","person-fill-down","person-fill-exclamation","person-fill-gear","person-fill-lock","person-fill-slash","person-fill-up","person-fill-x","person-fill","person-gear","person-heart","person-hearts","person-lines-fill","person-lock","person-plus-fill","person-plus","person-rolodex","person-slash","person-square","person-up","person-vcard-fill","person-vcard","person-video","person-video2","person-video3","person-workspace","person-x-fill","person-x","person","phone-fill","phone-flip","phone-landscape-fill","phone-landscape","phone-vibrate-fill","phone-vibrate","phone","pie-chart-fill","pie-chart","piggy-bank-fill","piggy-bank","pin-angle-fill","pin-angle","pin-fill","pin-map-fill","pin-map","pin","pinterest","pip-fill","pip","play-btn-fill","play-btn","play-circle-fill","play-circle","play-fill","play","playstation","plug-fill","plug","plugin","plus-circle-dotted","plus-circle-fill","plus-circle","plus-lg","plus-slash-minus","plus-square-dotted","plus-square-fill","plus-square","plus","postage-fill","postage-heart-fill","postage-heart","postage","postcard-fill","postcard-heart-fill","postcard-heart","postcard","power","prescription","prescription2","printer-fill","printer","projector-fill","projector","puzzle-fill","puzzle","qr-code-scan","qr-code","question-circle-fill","question-circle","question-diamond-fill","question-diamond","question-lg","question-octagon-fill","question-octagon","question-square-fill","question-square","question","quora","quote","r-circle-fill","r-circle","r-square-fill","r-square","radioactive","rainbow","receipt-cutoff","receipt","reception-0","reception-1","reception-2","reception-3","reception-4","record-btn-fill","record-btn","record-circle-fill","record-circle","record-fill","record","record2-fill","record2","recycle","reddit","regex","repeat-1","repeat","reply-all-fill","reply-all","reply-fill","reply","rewind-btn-fill","rewind-btn","rewind-circle-fill","rewind-circle","rewind-fill","rewind","robot","rocket-fill","rocket-takeoff-fill","rocket-takeoff","rocket","router-fill","router","rss-fill","rss","rulers","safe-fill","safe","safe2-fill","safe2","save-fill","save","save2-fill","save2","scissors","scooter","screwdriver","sd-card-fill","sd-card","search-heart-fill","search-heart","search","segmented-nav","send-check-fill","send-check","send-dash-fill","send-dash","send-exclamation-fill","send-exclamation","send-fill","send-plus-fill","send-plus","send-slash-fill","send-slash","send-x-fill","send-x","send","server","share-fill","share","shield-check","shield-exclamation","shield-fill-check","shield-fill-exclamation","shield-fill-minus","shield-fill-plus","shield-fill-x","shield-fill","shield-lock-fill","shield-lock","shield-minus","shield-plus","shield-shaded","shield-slash-fill","shield-slash","shield-x","shield","shift-fill","shift","shop-window","shop","shuffle","sign-dead-end-fill","sign-dead-end","sign-do-not-enter-fill","sign-do-not-enter","sign-intersection-fill","sign-intersection-side-fill","sign-intersection-side","sign-intersection-t-fill","sign-intersection-t","sign-intersection-y-fill","sign-intersection-y","sign-intersection","sign-merge-left-fill","sign-merge-left","sign-merge-right-fill","sign-merge-right","sign-no-left-turn-fill","sign-no-left-turn","sign-no-parking-fill","sign-no-parking","sign-no-right-turn-fill","sign-no-right-turn","sign-railroad-fill","sign-railroad","sign-stop-fill","sign-stop-lights-fill","sign-stop-lights","sign-stop","sign-turn-left-fill","sign-turn-left","sign-turn-right-fill","sign-turn-right","sign-turn-slight-left-fill","sign-turn-slight-left","sign-turn-slight-right-fill","sign-turn-slight-right","sign-yield-fill","sign-yield","signal","signpost-2-fill","signpost-2","signpost-fill","signpost-split-fill","signpost-split","signpost","sim-fill","sim","sina-weibo","skip-backward-btn-fill","skip-backward-btn","skip-backward-circle-fill","skip-backward-circle","skip-backward-fill","skip-backward","skip-end-btn-fill","skip-end-btn","skip-end-circle-fill","skip-end-circle","skip-end-fill","skip-end","skip-forward-btn-fill","skip-forward-btn","skip-forward-circle-fill","skip-forward-circle","skip-forward-fill","skip-forward","skip-start-btn-fill","skip-start-btn","skip-start-circle-fill","skip-start-circle","skip-start-fill","skip-start","skype","slack","slash-circle-fill","slash-circle","slash-lg","slash-square-fill","slash-square","slash","sliders","sliders2-vertical","sliders2","smartwatch","snapchat","snow","snow2","snow3","sort-alpha-down-alt","sort-alpha-down","sort-alpha-up-alt","sort-alpha-up","sort-down-alt","sort-down","sort-numeric-down-alt","sort-numeric-down","sort-numeric-up-alt","sort-numeric-up","sort-up-alt","sort-up","soundwave","speaker-fill","speaker","speedometer","speedometer2","spellcheck","spotify","square-fill","square-half","square","stack-overflow","stack","star-fill","star-half","star","stars","steam","stickies-fill","stickies","sticky-fill","sticky","stop-btn-fill","stop-btn","stop-circle-fill","stop-circle","stop-fill","stop","stoplights-fill","stoplights","stopwatch-fill","stopwatch","strava","stripe","subscript","subtract","suit-club-fill","suit-club","suit-diamond-fill","suit-diamond","suit-heart-fill","suit-heart","suit-spade-fill","suit-spade","sun-fill","sun","sunglasses","sunrise-fill","sunrise","sunset-fill","sunset","superscript","symmetry-horizontal","symmetry-vertical","table","tablet-fill","tablet-landscape-fill","tablet-landscape","tablet","tag-fill","tag","tags-fill","tags","taxi-front-fill","taxi-front","telegram","telephone-fill","telephone-forward-fill","telephone-forward","telephone-inbound-fill","telephone-inbound","telephone-minus-fill","telephone-minus","telephone-outbound-fill","telephone-outbound","telephone-plus-fill","telephone-plus","telephone-x-fill","telephone-x","telephone","tencent-qq","terminal-dash","terminal-fill","terminal-plus","terminal-split","terminal-x","terminal","text-center","text-indent-left","text-indent-right","text-left","text-paragraph","text-right","text-wrap","textarea-resize","textarea-t","textarea","thermometer-half","thermometer-high","thermometer-low","thermometer-snow","thermometer-sun","thermometer","three-dots-vertical","three-dots","thunderbolt-fill","thunderbolt","ticket-detailed-fill","ticket-detailed","ticket-fill","ticket-perforated-fill","ticket-perforated","ticket","tiktok","toggle-off","toggle-on","toggle2-off","toggle2-on","toggles","toggles2","tools","tornado","train-freight-front-fill","train-freight-front","train-front-fill","train-front","train-lightrail-front-fill","train-lightrail-front","translate","trash-fill","trash","trash2-fill","trash2","trash3-fill","trash3","tree-fill","tree","trello","triangle-fill","triangle-half","triangle","trophy-fill","trophy","tropical-storm","truck-flatbed","truck-front-fill","truck-front","truck","tsunami","tv-fill","tv","twitch","twitter","type-bold","type-h1","type-h2","type-h3","type-italic","type-strikethrough","type-underline","type","ubuntu","ui-checks-grid","ui-checks","ui-radios-grid","ui-radios","umbrella-fill","umbrella","unindent","union","unity","universal-access-circle","universal-access","unlock-fill","unlock","upc-scan","upc","upload","usb-c-fill","usb-c","usb-drive-fill","usb-drive","usb-fill","usb-micro-fill","usb-micro","usb-mini-fill","usb-mini","usb-plug-fill","usb-plug","usb-symbol","usb","valentine","valentine2","vector-pen","view-list","view-stacked","vimeo","vinyl-fill","vinyl","virus","virus2","voicemail","volume-down-fill","volume-down","volume-mute-fill","volume-mute","volume-off-fill","volume-off","volume-up-fill","volume-up","vr","wallet-fill","wallet","wallet2","watch","water","webcam-fill","webcam","wechat","whatsapp","wifi-1","wifi-2","wifi-off","wifi","wikipedia","wind","window-dash","window-desktop","window-dock","window-fullscreen","window-plus","window-sidebar","window-split","window-stack","window-x","window","windows","wordpress","wrench-adjustable-circle-fill","wrench-adjustable-circle","wrench-adjustable","wrench","x-circle-fill","x-circle","x-diamond-fill","x-diamond","x-lg","x-octagon-fill","x-octagon","x-square-fill","x-square","x","xbox","yelp","yin-yang","youtube","zoom-in","zoom-out"];function IconSelector({initialValue:$,onIconSelect:rA}){const[tA,AA]=reactExports.useState(!1),[eA,nA]=reactExports.useState($),[oA,iA]=reactExports.useState(null),lA=reactExports.useRef([]),{x:aA,y:sA,strategy:cA,refs:pA,context:uA}=useFloating({whileElementsMounted:P$1,open:tA,onOpenChange:AA,placement:"bottom-start",middleware:[b$3({padding:10}),B$1({apply({availableHeight:CA,elements:xA}){Object.assign(xA.floating.style,{maxHeight:`${CA}px`})},padding:10})]}),gA=useRole(uA,{role:"listbox"}),fA=useDismiss(uA),wA=useListNavigation(uA,{listRef:lA,activeIndex:oA,onNavigate:iA,virtual:!0,loop:!0}),{getReferenceProps:BA,getFloatingProps:EA,getItemProps:QA}=useInteractions([gA,fA,wA]);function dA(CA){let xA=CA.target.value;xA=xA.replace(/\s+/g,"-"),AlphaNumericRegex.test(xA)&&nA(xA),xA?(AA(!0),iA(0)):AA(!1)}const yA=CA=>{nA(CA),AA(!1),rA(CA),iA(null)},hA=FilterIconsList(eA),vA=hA===null?null:hA[oA??0];return jsxs("div",{className:mergeClasses("flex items-center gap-2 pl-2"),children:[jsx(BsIcon,{icon_name:vA??"bootstrap",className:"w-4"}),jsx("input",{...BA({ref:pA.setReference,onChange:dA,value:eA,placeholder:"Search for icon...","aria-autocomplete":"list",className:"w-40",onKeyDown(CA){CA.key==="Enter"&&oA!=null&&hA&&hA[oA]&&yA(hA[oA])}})}),jsx(FloatingPortal,{children:tA&&jsx(FloatingFocusManager,{context:uA,initialFocus:-1,visuallyHiddenDismiss:!0,children:jsx("div",{...EA({ref:pA.setFloating,className:"z-10 flex flex-col w-40 max-h-96 overflow-auto rounded bg-white shadow-md",style:{position:cA,left:aA??0,top:sA??0}}),role:"listbox",children:hA?hA.map((CA,xA)=>jsx(IconResult,{...QA({ref(IA){lA.current[xA]=IA},onClick(){yA(CA)}}),active:oA===xA,icon:CA,divider:xA!==hA.length-1},CA)):jsx(IconResult,{icon:"EmojiFrown",active:!1,label:"No results"})})})})]})}const IconResult=reactExports.forwardRef(({icon:$,label:rA,active:tA,divider:AA,...eA},nA)=>{const oA=reactExports.useId();return jsxs(Fragment,{children:[jsxs("div",{ref:nA,role:"option",id:oA,className:mergeClasses("grid grid-cols-[20px_1fr] gap-1 cursor-pointer px-3 py-2 items-center","[&[aria-selected='true']]:bg-rstudio-blue [&[aria-selected='true']]:text-white"),"aria-selected":tA,"aria-label":$,...eA,children:[jsx(BsIcon,{icon_name:$}),jsx("span",{children:rA??$})]}),AA&&jsx(ListDivider,{})]})});function ListDivider(){return jsx("div",{className:"bg-light-grey h-[1px] text-transparent select-none",children:"divider"})}const AlphaNumericRegex=/^[A-Za-z0-9-]*$/;function FilterIconsList($){const rA=allBsIconNames.filter(tA=>tA.toLowerCase().startsWith($.toLowerCase()));return rA.length>0?rA:null}const ValueBox=({namedArgs:$,children:rA,path:tA,wrapperProps:AA})=>{var nA;const eA=$.showcase_layout==="right";return jsx("div",{className:"flex-1 relative",style:{"--font-color":"var(--rstudio-white","--selected-outline-color":"black"},...AA,children:jsxs("div",{className:mergeClasses("bg-primary text-white h-100 grid gap-md p-md overflow-auto",eA?"grid-cols-[7fr_3fr]":"grid-cols-[3fr_7fr]"),children:[jsx("div",{className:mergeClasses("p-sm col-start-1 row-start-1 min-w-0",eA?"col-start-2":"col-start-1"),children:jsx(BsIcon,{className:"w-100 h-100",icon_name:$.showcase_icon??"question-circle"})}),jsxs("div",{className:mergeClasses("flex flex-col justify-center row-start-1 min-w-0",eA?"col-start-1":"col-start-2"),children:[jsx("h5",{className:"",children:$.title}),jsx("div",{children:jsx(DropWatcherPanel,{className:((nA=$.value)==null?void 0:nA.id)==="textNode"?"text-[1.5rem]":"",existing_node:$.value,child_loc:"value",parentPath:tA,visibleWhenEmpty:!0,messageOnHover:$.value?"Replace value":"Drop a value node here",placeHolder:jsx(EmptyValuePlaceholder,{}),parentNodeType:"value_box"})}),jsx(ChildrenWithDropNodes,{children:rA,parentPath:tA,parentid:"value_box",messageOnHover:"Add node to value box"})]})]})})};function EmptyValuePlaceholder(){return jsxs(Tooltip,{children:[jsx(TooltipTrigger,{asChild:!0,children:jsx("div",{className:"opacity-70 italic h-10 border grid place-content-center",children:"No value present"})}),jsx(TooltipContent,{children:"Drag content here to set the value box's main value field."})]})}const bslibValueBoxInfo=addEditorInfoToUiNode(value_box,{iconSrc:icon$a,UiComponent:ValueBox,settingsFormRender:({settings:$,onSettingsChange:rA,inputs:tA})=>jsxs("div",{children:[jsx(InputLabelWrapper,{label:`Showcase ${$.showcase_icon?"Icon":"Value"}`,labelId:"showcase-icon",mainInput:$.showcase_icon?jsx(IconSelector,{initialValue:$.showcase_icon,onIconSelect:AA=>{rA==null||rA("showcase_icon",{type:"UPDATE",value:AA})}}):jsx(PopoverButton,{className:"w-100 h-[25px]",use_markdown:!0,popoverContent:`Replace current showcase value with an icon from the + `)}componentDidMount(){if(this.ref.current===null)return;const vA=this.makeOptions();nA(rA).create(this.ref.current,vA)}componentDidUpdate(vA){vA.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:vA,style:CA,className:xA,id:IA}=this.props,OA={style:CA,className:xA,id:IA},PA=!vA||vA===null?"div":vA;return(0,AA.createElement)(PA,{ref:this.ref,...OA},this.getChildren())}getChildren(){const{children:vA,dataIdAttr:CA,selectedClass:xA="sortable-selected",chosenClass:IA="sortable-chosen",dragClass:OA="sortable-drag",fallbackClass:PA="sortable-falback",ghostClass:$A="sortable-ghost",swapClass:jA="sortable-swap-highlight",filter:MA="sortable-filter",list:RA}=this.props;if(!vA||vA==null)return null;const HA=CA||"data-id";return AA.Children.map(vA,(DA,kA)=>{if(DA===void 0)return;const _A=RA[kA]||{},{className:mA}=DA.props,bA=typeof MA=="string"&&{[MA.replace(".","")]:!!_A.filtered},FA=nA(tA)(mA,{[xA]:_A.selected,[IA]:_A.chosen,...bA});return(0,AA.cloneElement)(DA,{[HA]:DA.key,className:FA})})}get sortable(){const vA=this.ref.current;if(vA===null)return null;const CA=Object.keys(vA).find(xA=>xA.includes("Sortable"));return CA?vA[CA]:null}makeOptions(){const vA=["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"],CA=["onChange","onClone","onFilter","onSort"],xA=EA(this.props);return vA.forEach(OA=>xA[OA]=this.prepareOnHandlerPropAndDOM(OA)),CA.forEach(OA=>xA[OA]=this.prepareOnHandlerProp(OA)),{...xA,onMove:(OA,PA)=>{const{onMove:$A}=this.props,jA=OA.willInsertAfter||-1;if(!$A)return jA;const MA=$A(OA,PA,this.sortable,QA);return typeof MA>"u"?!1:MA}}}prepareOnHandlerPropAndDOM(vA){return CA=>{this.callOnHandlerProp(CA,vA),this[vA](CA)}}prepareOnHandlerProp(vA){return CA=>{this.callOnHandlerProp(CA,vA)}}callOnHandlerProp(vA,CA){const xA=this.props[CA];xA&&xA(vA,this.sortable,QA)}onAdd(vA){const{list:CA,setList:xA,clone:IA}=this.props,OA=[...QA.dragging.props.list],PA=pA(vA,OA);sA(PA);const $A=fA(PA,CA,vA,IA).map(jA=>Object.assign(jA,{selected:!1}));xA($A,this.sortable,QA)}onRemove(vA){const{list:CA,setList:xA}=this.props,IA=wA(vA),OA=pA(vA,CA);cA(OA);let PA=[...CA];if(vA.pullMode!=="clone")PA=gA(OA,PA);else{let $A=OA;switch(IA){case"multidrag":$A=OA.map((jA,MA)=>({...jA,element:vA.clones[MA]}));break;case"normal":$A=OA.map(jA=>({...jA,element:vA.clone}));break;case"swap":default:nA(eA)(!0,`mode "${IA}" cannot clone. Please remove "props.clone" from when using the "${IA}" plugin`)}sA($A),OA.forEach(jA=>{const MA=jA.oldIndex,RA=this.props.clone(jA.item,vA);PA.splice(MA,1,RA)})}PA=PA.map($A=>Object.assign($A,{selected:!1})),xA(PA,this.sortable,QA)}onUpdate(vA){const{list:CA,setList:xA}=this.props,IA=pA(vA,CA);sA(IA),cA(IA);const OA=uA(IA,CA);return xA(OA,this.sortable,QA)}onStart(){QA.dragging=this}onEnd(){QA.dragging=null}onChoose(vA){const{list:CA,setList:xA}=this.props,IA=CA.map((OA,PA)=>{let $A=OA;return PA===vA.oldIndex&&($A=Object.assign(OA,{chosen:!0})),$A});xA(IA,this.sortable,QA)}onUnchoose(vA){const{list:CA,setList:xA}=this.props,IA=CA.map((OA,PA)=>{let $A=OA;return PA===vA.oldIndex&&($A=Object.assign($A,{chosen:!1})),$A});xA(IA,this.sortable,QA)}onSpill(vA){const{removeOnSpill:CA,revertOnSpill:xA}=this.props;CA&&!xA&&lA(vA.item)}onSelect(vA){const{list:CA,setList:xA}=this.props,IA=CA.map(OA=>Object.assign(OA,{selected:!1}));vA.newIndicies.forEach(OA=>{const PA=OA.index;if(PA===-1){console.log(`"${vA.type}" had indice of "${OA.index}", which is probably -1 and doesn't usually happen here.`),console.log(vA);return}IA[PA].selected=!0}),xA(IA,this.sortable,QA)}onDeselect(vA){const{list:CA,setList:xA}=this.props,IA=CA.map(OA=>Object.assign(OA,{selected:!1}));vA.newIndicies.forEach(OA=>{const PA=OA.index;PA!==-1&&(IA[PA].selected=!0)}),xA(IA,this.sortable,QA)}}gt(dA,"defaultProps",{clone:vA=>vA});var yA={};iA($.exports,yA)})(dist);var distExports=dist.exports;const accentBarStyles={warning:"bg-warning",error:"bg-danger",success:"bg-success",info:"bg-rstudio-blue"};function ControlledPopup({isOpen:$,onClose:rA,children:tA,content:AA,accent:eA,description:nA,...oA}){return jsxs(Tooltip,{open:$,onOpenChange:()=>rA(),...oA,children:[jsx(TooltipTrigger,{asChild:!0,noToggle:!0,children:tA}),jsx(TooltipContent,{children:jsxs("div",{className:mergeClasses("p-2 rounded-standard bg-rstudio-white w-64 relative"),"aria-label":nA,children:[eA&&jsx("div",{className:mergeClasses("absolute -left-2 -top-2 -bottom-2 w-[6px]",accentBarStyles[eA])}),AA]})})]})}function KeyInput($){const{displayedValue:rA,isInvalid:tA,onNewValue:AA,isSameAsOtherKey:eA}=useKeyInput($);return jsx("span",{className:mergeClasses("block relative",eA&&'after:absolute after:content-["Duplicate_key"] after:block after:text-rstudio-white after:rounded after:min-w-fit after:p-1 after:border after:z-20 after:bg-danger/90'),children:jsx("input",{title:"Key Field",className:mergeClasses("min-w-0 w-full placeholder:text-rstudio-white placeholder:text-xs",tA&&"bg-danger/30 transition-colors duration-500 delay-300"),"aria-invalid":tA,"aria-label":"List item key",type:"text",value:rA,placeholder:eA?"Duplicate":"Required",onChange:nA=>{nA.stopPropagation(),AA(nA.target.value)}})})}function useKeyInput({keyValue:$,onUpdate:rA,allElements:tA,index:AA}){const[eA,nA]=React.useState($),[oA,iA]=React.useState($);oA!==$&&(iA($),nA($));const lA=tA.filter((uA,gA)=>gA!==AA).map(uA=>uA.key),aA=eA==="",sA=lA.includes(eA),cA=aA||sA;function pA(uA){nA(uA),!(uA===""||lA.some(fA=>fA.toLowerCase()===uA.toLowerCase()))&&rA(uA)}return{displayedValue:eA,isInvalid:cA,isSameAsOtherKey:sA,onNewValue:pA}}function swapKeysForObject($,rA,tA){const AA=Object.entries($),eA=AA.findIndex(([nA])=>nA===rA);return AA[eA][0]=tA,AA.reduce((nA,[oA,iA])=>(nA[oA]=iA,nA),{})}function namedListToItemTypeArray($){return Array.isArray($)?$.map((rA,tA)=>({id:tA,key:rA,value:rA})):Object.keys($).map((rA,tA)=>({id:tA,key:rA,value:$[rA]}))}function getKeyValueMismatches($){const rA=Object.entries($).filter(([tA,AA])=>typeof AA=="string"&&tA!==AA).map(([tA,AA],eA)=>({key:tA,value:AA,id:eA}));return rA.length===0?null:rA}function isValueOnlyMode($){return Array.isArray($)}function useListState({value:$,onChange:rA,newItemValue:tA}){const[AA,eA]=React.useState(null),nA=isValueOnlyMode($)?"value-only":"key-value",oA=React.useCallback(gA=>{if(isValueOnlyMode($)){const wA=[...$];wA.splice(gA,1),rA(wA);return}const fA={...$};delete fA[Object.keys(fA)[gA]],rA(fA)},[rA,$]),iA=React.useCallback(()=>{const gA=isValueOnlyMode($)?$.length:Object.keys($).length,fA=typeof tA=="function"?tA(gA+1):tA;isValueOnlyMode($)?rA([...$,fA.value]):rA({...$,[fA.key]:fA.value})},[tA,rA,$]),lA=React.useCallback(gA=>{gA.length!==0&&rA(itemTypeArrayToNamedList(gA,nA))},[nA,rA]),aA=React.useCallback(({index:gA,newKey:fA})=>{if(isValueOnlyMode($))throw new Error("Cannot update key in value-only mode");const wA=Object.keys($)[gA];if(fA!==wA&&fA in $)throw new Error(`Key ${fA} already exists`);const BA=swapKeysForObject($,wA,fA);rA(BA)},[rA,$]),sA=React.useCallback(({index:gA,newValue:fA})=>{if(isValueOnlyMode($)){const EA=[...$];EA[gA]=fA,rA(EA);return}const wA={...$},BA=Object.keys($)[gA];wA[BA]=fA,rA(wA)},[rA,$]),cA=gA=>{if(gA){if(isValueOnlyMode($))throw new Error("Trying to simplify a value-only list");const fA=getKeyValueMismatches($);if(fA!==null){eA(fA);return}}pA(gA?"value-only":"key-value")},pA=React.useCallback(gA=>{const fA=isValueOnlyMode($);if(gA===(fA?"value-only":"key-value"))throw new Error("Trying to update to the same list mode");const wA=fA?$.reduce((BA,EA)=>(BA[EA]=EA,BA),{}):Object.values($);rA(wA),eA(null)},[rA,$]),uA=()=>{eA(null)};return{flatList:namedListToItemTypeArray($),reorderItems:lA,deleteItem:oA,addItem:iA,updateKey:aA,updateValue:sA,swapKeyValueMode:pA,listMode:nA,onValueModeToggle:cA,keyValueMismatches:AA,onCancelSimplify:uA}}function itemTypeArrayToNamedList($,rA){return rA==="value-only"?$.map(tA=>tA.value):$.reduce((tA,{key:AA,value:eA})=>(tA[AA]=eA,tA),{})}function NamedListInput({id:$,label:rA,value:tA,onChange:AA,newItemValue:eA=nA=>({key:"Value"+nA,value:"value"+nA})}){const{flatList:nA,addItem:oA,deleteItem:iA,reorderItems:lA,updateKey:aA,updateValue:sA,swapKeyValueMode:cA,listMode:pA,onValueModeToggle:uA,keyValueMismatches:gA,onCancelSimplify:fA}=useListState({value:tA,onChange:AA,newItemValue:eA}),[wA,BA]=React.useState(!1),EA=nA.length===0,QA=jsxs("div",{className:"w-fit flex flex-col items-center my-2","aria-labelledby":makeLabelId($),"aria-label":rA,children:[jsx(ListItem,{valueOnlyMode:pA==="value-only",className:"text-center -my-1","aria-label":"Columns field labels",children:pA==="value-only"?jsx("span",{className:"col-start-2",children:"Value"}):jsxs(Fragment,{children:[jsx("span",{className:"col-start-2",children:"Key"}),jsx("span",{className:"col-start-4",children:"Value"})]})}),jsx(distExports.ReactSortable,{list:nA,setList:lA,handle:".NamedListDragHandle",children:nA.map((yA,hA)=>jsxs(ListItem,{valueOnlyMode:pA==="value-only",className:mergeClasses("my-1",gA&&gA.find(vA=>vA.key===yA.key)?"bg-danger/30":null),"aria-label":"List item",children:[jsx("div",{className:"NamedListDragHandle grid place-items-center cursor-ns-resize",title:"Reorder list",children:jsx(MdDragHandle,{})}),pA==="value-only"?jsx("input",{title:"Value Field",className:"min-w-0",type:"text","aria-label":"List item value",value:yA.value,onChange:vA=>{sA({index:hA,newValue:vA.target.value})}}):jsxs(Fragment,{children:[jsx(KeyInput,{allElements:nA,index:hA,keyValue:yA.key,onUpdate:vA=>{aA({index:hA,newKey:vA})}}),jsx("span",{className:"mb-[1px]",children:":"}),jsx("input",{title:"Value Field",className:"min-w-0",type:"text","aria-label":"List item value",value:yA.value,onChange:vA=>{sA({index:hA,newValue:vA.target.value})}})]}),jsx(Button,{className:"grid place-content-center p-0 area[delete] hover:scale-110 mb-[2px]",onClick:()=>iA(yA.id),variant:["icon","transparent"],title:`Delete ${yA.value}`,children:jsx(SvgTrash,{})})]},hA))})]}),dA=gA!==null;return jsx(ControlledPopup,{isOpen:wA,onClose:()=>{BA(!1),fA()},description:`Settings panel for ${rA} argument`,placement:"right-start",accent:dA?"warning":"info",offset:{mainAxis:9,crossAxis:-23},content:jsxs(Fragment,{children:[jsxs("h2",{className:"bold text-base mb-3",children:["Settings for ",rA," argument"]}),jsxs("div",{className:"flex gap-2 justify-between items-center ",children:[jsx("label",{htmlFor:"keyAndValueModeCheckbox",children:"Keys and Value Mode"}),jsx("input",{className:"transform[translateY(1px)] border mt-[2px]",id:"keyAndValueModeCheckbox",type:"checkbox",checked:pA==="key-value",disabled:dA,onChange:yA=>{uA(!yA.target.checked)}})]}),jsx("span",{className:"text-xs text-gray-700 italic",children:"Should the list be displayed as just values or as key-value pairs? Key value pairs will allow you to choose a different display name for each value."}),dA&&jsxs(Fragment,{children:[jsx("hr",{}),jsxs("p",{children:["There are some"," ",jsx("span",{className:"bg-danger/30 px-1 py-[2px] rounded",children:"mismatches"})," ","between keys and values preventing simplification to value-only mode. Merge to just the values?"]}),jsxs("div",{className:"flex justify-around mt-2",children:[jsxs(Button,{onClick:()=>{cA("value-only"),fA()},children:[jsx(ArrowsCollapse$1,{className:"text-lg"})," Merge"]}),jsxs(Button,{onClick:fA,variant:"secondary",children:[" ",jsx(X$1,{className:"text-lg"}),"Cancel"]})]})]})]}),children:jsxs("div",{className:"relative",children:[jsx(Button,{className:"absolute right-0 bottom-100",variant:["icon","transparent"],onClick:()=>{BA(yA=>!yA),fA()},"aria-label":`Open settings for ${rA} argument`,children:jsx(Gear$1,{})}),EA?jsx("div",{className:"text-gray-500 text-xs bg-rstudio-white rounded italic w-full h-[23px] my-1 grid place-content-center ",children:"Empty list"}):QA,jsx(Button,{className:"text-icon -mt-1 p-1 bg-red-400 w-full",onClick:()=>oA(),variant:"transparent",title:"Add new item","aria-label":"Add new item to list",children:jsx(FaPlus,{})})]})})}function ListItem({valueOnlyMode:$,className:rA,...tA}){return jsx("div",{className:mergeClasses(rA,$?"grid-cols-[15px_1fr_15px]":"grid-cols-[15px_1fr_auto_1fr_15px]","w-100 grid ","gap-1 p-1 items-center rounded [&.sortable-chosen]:outline","[&.sortable-chosen]:outline-offset-[-2px] [&.sortable-chosen]:outline-rstudio-grey/30 [&.sortable-chosen]:shadow-lg"),...tA})}const styles$d="",DEFAULT_DROPDOWN_CHOICE="__DEFAULT-DROPDOWN-CHOICE__";function DropdownSelect({id:$,label:rA,choices:tA,onChange:AA,value:eA}){React.useEffect(()=>{eA===DEFAULT_DROPDOWN_CHOICE&&AA(tA[0]),tA.length>0&&!tA.includes(eA)&&AA(tA[0])},[AA,tA,eA]);const nA=iA=>{const lA=iA.target.selectedIndex;AA(tA[lA])},oA=removeDuplicates(tA);return oA.length===0?jsx("select",{title:`${rA} selector`,"aria-labelledby":makeLabelId($),"aria-label":rA,className:"OptionsDropdown SUE-Input",placeholder:"No available options"}):jsx("select",{title:`${rA} selector`,"aria-labelledby":makeLabelId($),className:"OptionsDropdown SUE-Input",onChange:nA,value:eA,children:oA.map(iA=>jsx("option",{value:iA,children:iA},iA))})}function walkUiNode($,rA){function tA(AA){var oA;if(rA(AA)===!1)return;const nA=AA.namedArgs;for(const iA in nA){const lA=nA[iA];isShinyUiNode(lA)&&tA(lA)}isParentNode(AA)&&((oA=AA.children)==null||oA.forEach(tA))}tA($)}function getAllInputOutputIdsInApp($){const rA=[];return walkUiNode($,tA=>{const AA=tA.namedArgs,eA=AA.id||AA.outputId||AA.inputId;typeof eA=="string"&&rA.push(eA)}),rA}function useUpdateServerCode(){const $=useDispatch(),rA=useCurrentAppInfo(),tA=rA.mode==="MAIN"?rA.app.code:null;return React.useCallback(eA=>{if(tA===null)throw new Error("Tried to update server code when no app template");$(SET_APP_CODE_TEMPLATE(eA(tA)))},[tA,$])}function generateFullAppScript($){const{ui_tree:rA}=$;return generateUiScript({ui_tree:rA,language:$.language,...$.app})}function useCurrentServerNodes(){const $=useCurrentAppInfo(),rA=useTsParser(),[tA,AA]=React.useState(null);return React.useEffect(()=>{if($.mode!=="MAIN")return;const eA=generateFullAppScript($);rA(eA).then(nA=>{const oA=$.language==="R"?getRServerLocations(nA.server_node):getPythonServerLocations(nA.server_node);if(!oA)throw new Error("Could not parse app scripts");AA(oA)})},[$,rA]),tA}function updateServerWithNewId({oldId:$,newId:rA,positions:tA,appScript:AA,language:eA}){const nA=new RegExp(eA==="R"?`(input|output)(\\$)(${$})(\\W)`:`(input|output)(\\[)(${$})(\\])`,"g"),oA=AA.match(nA);if(oA===null)throw new Error(`No matches found for ${$} in app script`);if(tA&&oA.length!==tA.length)throw new Error(`Expected ${tA.length} matches for ${$} in app script but got ${oA==null?void 0:oA.length}`);return AA.replace(nA,`$1$2${rA}$4`)}function IdInput({id:$,label:rA,value:tA,onChange:AA,inputOrOutput:eA}){const nA=useCurrentAppInfo(),oA=useUpdateServerCode(),iA=useCurrentServerNodes(),[lA,aA]=React.useState(null),[sA,cA]=React.useState(null),[pA,uA]=React.useState(null),gA=getLocationsInServerOfId(tA,iA),fA=gA!==null;if(React.useEffect(()=>{aA(fA?"synced":"unsynced")},[fA]),nA.mode!=="MAIN")return null;const{ui_tree:wA,language:BA}=nA,EA=getAllInputOutputIdsInApp(wA),QA=yA=>{const hA=yA.target.value.replace(/ /g,"_"),vA=EA.includes(hA)&&hA!==tA,CA=hA==="";if(vA&&cA(`The id ${hA} is already taken`),CA&&cA("ID cannot be empty"),vA||CA){uA(hA);return}AA(hA),cA(null),uA(null),lA==="synced"&&gA!==null&&oA(xA=>updateServerWithNewId({oldId:tA,newId:hA,positions:gA,appScript:xA,language:BA}))},dA=typeof pA=="string";return jsxs(Fragment,{children:[jsxs("div",{className:"flex items-center gap-1",children:[jsx("input",{className:"SUE-Input","aria-label":rA,"aria-labelledby":makeLabelId($),"aria-invalid":dA,id:$,value:dA?pA:tA,onChange:QA,type:"text"}),fA&&jsxs(Tooltip,{placement:"right-start",children:[jsx(TooltipTrigger,{asChild:!0,children:jsxs("div",{className:"relative",children:[jsx(Link45deg$1,{className:mergeClasses("text-xl relative ",lA==="synced"?["text-rstudio-blue"]:["text-danger after:block after:absolute after:w-px after:bg-danger"]),onClick:()=>{aA(yA=>yA==="unsynced"?"synced":"unsynced")}}),lA==="unsynced"&&jsx("div",{className:"bg-danger/50 w-[2px] absolute left-[50%] top-1 bottom-1 pointer-events-none",style:{transform:"rotate(320deg)"}})]})}),jsxs(TooltipContent,{className:"max-w-xs",children:[jsx("p",{className:"my-1",children:lA==="synced"?"Changing ID will cause uses of this ID in server code to update.":"ID syncing is disabled. Changes to this ID will not be reflected in server code."}),jsxs("p",{className:"my-1",children:["Click to ",lA==="synced"?"disable":"enable"," ","syncing."]})]})]})]}),sA&&jsx("div",{className:"text-danger",children:jsx("small",{children:sA})})]})}function getLocationsInServerOfId($,rA){if(rA===null)return null;const{inputNodes:tA,outputNodes:AA}=rA;return tA.has($)?tA.get($).map(getNodePosition):AA.has($)?AA.get($).map(getNodePosition):null}const existingValuesContext=React.createContext({existingValues:new Set,warningMsg:$=>`The value ${$} is already taken`});function StringInput({id:$,label:rA,value:tA,onChange:AA,longform:eA}){const nA=React.useContext(existingValuesContext),oA=nA==null?void 0:nA.existingValues.has(tA),iA={className:"SUE-Input","aria-label":rA,"aria-labelledby":makeLabelId($),"aria-invalid":oA,id:$,value:tA,onChange:lA=>{const aA=lA.target.value;AA(aA)}};return jsxs(Fragment,{children:[eA?jsx("textarea",{...iA,className:"h-24 w-100 flex-grow"}):jsx("input",{...iA,type:"text"}),oA&&jsx("div",{className:"text-danger",children:jsx("small",{children:nA.warningMsg(tA)})})]})}function SettingsInputElement($){switch($.inputType){case"string":return jsx(StringInput,{...$});case"number":return jsx(NumberInput,{...$});case"cssMeasure":return jsx(CSSUnitInput,{...$});case"boolean":return jsx(BooleanInput,{...$});case"list":return jsx(NamedListInput,{...$});case"dropdown":return jsx(DropdownSelect,{...$});case"radio":return jsx(RadioInputs,{...$});case"id":return jsx(IdInput,{...$});default:return jsxs("div",{children:["I don't know how to render the input of type ",$.inputType," yet! Sorry."]})}}function valueIsType($,rA){if($===void 0)return!0;if(rA==="number")return typeof $=="number"||typeof $=="string"&&!isNaN(Number($));if(rA==="string"||rA==="id")return typeof $=="string";if(rA==="cssMeasure")return isCSSMeasure($);if(rA==="boolean")return typeof $=="boolean";if(rA==="list")return isNamedList($);if(rA==="dropdown"||rA==="radio")return typeof $=="string";if(rA==="string-array")return Array.isArray($)&&typeof $[0]=="string";if(rA==="ui-node")return isShinyUiNode($);if(rA==="omitted")return!0;throw new Error("Unimplemented argument type check",rA)}const SettingsInput$1="";function SettingsInput({onUpdate:$,...rA}){const tA=rA.value===void 0,AA=rA.optional,eA=makeLabelId(rA.name),nA=rA.label??rA.name,oA=()=>$({type:"UPDATE",value:rA.defaultValue}),iA=sA=>$({type:"UPDATE",value:sA}),lA=()=>$({type:"REMOVE"});let aA;return rA.value===void 0?rA.optional?aA=jsx(UnsetArgumentMessage,{labelledBy:eA}):aA=jsx(MissingRequiredArgumentMessage,{name:rA.name,onReset:oA}):valueIsType(rA.value,rA.inputType)?aA=jsx(SettingsInputElement,{label:nA,id:rA.name,onChange:iA,...rA}):aA=jsx(MismatchedTypeMessage,{name:rA.name,onReset:oA}),jsx(InputLabelWrapper,{argumentIsUnset:tA,className:rA.fill_space?"flex flex-col flex-grow":"",optionalField:AA?jsx("input",{type:"checkbox",checked:!tA,title:`Use ${rA.name} argument`,"aria-label":`Use ${rA.name} argument`,onChange:tA?oA:lA}):null,label:nA,labelId:eA,mainInput:aA})}function InputLabelWrapper({argumentIsUnset:$=!1,className:rA,optionalField:tA,label:AA,labelId:eA,mainInput:nA}){return jsxs("div",{className:mergeClasses("SUE-SettingsInput",rA),children:[jsxs("div",{className:"info","data-unset":$,children:[tA,jsx("label",{id:eA,children:AA})]}),nA]})}function MismatchedTypeMessage({name:$,onReset:rA}){return jsxs("div",{className:"mismatched-argument-types",children:["Argument for ",$," of unsupported type.",jsx(Button,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:rA,children:"Reset"})]})}function MissingRequiredArgumentMessage({name:$,onReset:rA}){return jsxs("div",{className:"missing-required-argument-message",children:['Required argument "',$,'" not provided.',jsx(Button,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:rA,children:"Reset"})]})}function UnsetArgumentMessage({labelledBy:$}){return jsx("input",{className:"unset-argument SUE-Input","aria-labelledby":$,placeholder:"Default",disabled:!0})}function cleanIconName($){let AA=$.split("-").map(eA=>eA.charAt(0).toUpperCase()+eA.slice(1)).join("");return/[0-9]/.test(AA.charAt(0))&&(AA="Icon"+AA),AA}const BsIcon=({icon_name:$,...rA})=>{let tA="icon_name";try{tA=cleanIconName($)}catch{return jsxs("span",{children:["Failed to find ",jsx("strong",{children:$})]})}if(!(tA in icons$1))return jsxs("span",{children:["Failed to find ",jsx("strong",{children:$})]});const AA=icons$1[tA];return jsx(AA,{...rA})},allBsIconNames=["0-circle-fill","0-circle","0-square-fill","0-square","1-circle-fill","1-circle","1-square-fill","1-square","123","2-circle-fill","2-circle","2-square-fill","2-square","3-circle-fill","3-circle","3-square-fill","3-square","4-circle-fill","4-circle","4-square-fill","4-square","5-circle-fill","5-circle","5-square-fill","5-square","6-circle-fill","6-circle","6-square-fill","6-square","7-circle-fill","7-circle","7-square-fill","7-square","8-circle-fill","8-circle","8-square-fill","8-square","9-circle-fill","9-circle","9-square-fill","9-square","activity","airplane-engines-fill","airplane-engines","airplane-fill","airplane","alarm-fill","alarm","alexa","align-bottom","align-center","align-end","align-middle","align-start","align-top","alipay","alt","amd","android","android2","app-indicator","app","apple","archive-fill","archive","arrow-90deg-down","arrow-90deg-left","arrow-90deg-right","arrow-90deg-up","arrow-bar-down","arrow-bar-left","arrow-bar-right","arrow-bar-up","arrow-clockwise","arrow-counterclockwise","arrow-down-circle-fill","arrow-down-circle","arrow-down-left-circle-fill","arrow-down-left-circle","arrow-down-left-square-fill","arrow-down-left-square","arrow-down-left","arrow-down-right-circle-fill","arrow-down-right-circle","arrow-down-right-square-fill","arrow-down-right-square","arrow-down-right","arrow-down-short","arrow-down-square-fill","arrow-down-square","arrow-down-up","arrow-down","arrow-left-circle-fill","arrow-left-circle","arrow-left-right","arrow-left-short","arrow-left-square-fill","arrow-left-square","arrow-left","arrow-repeat","arrow-return-left","arrow-return-right","arrow-right-circle-fill","arrow-right-circle","arrow-right-short","arrow-right-square-fill","arrow-right-square","arrow-right","arrow-through-heart-fill","arrow-through-heart","arrow-up-circle-fill","arrow-up-circle","arrow-up-left-circle-fill","arrow-up-left-circle","arrow-up-left-square-fill","arrow-up-left-square","arrow-up-left","arrow-up-right-circle-fill","arrow-up-right-circle","arrow-up-right-square-fill","arrow-up-right-square","arrow-up-right","arrow-up-short","arrow-up-square-fill","arrow-up-square","arrow-up","arrows-angle-contract","arrows-angle-expand","arrows-collapse","arrows-expand","arrows-fullscreen","arrows-move","aspect-ratio-fill","aspect-ratio","asterisk","at","award-fill","award","back","backspace-fill","backspace-reverse-fill","backspace-reverse","backspace","badge-3d-fill","badge-3d","badge-4k-fill","badge-4k","badge-8k-fill","badge-8k","badge-ad-fill","badge-ad","badge-ar-fill","badge-ar","badge-cc-fill","badge-cc","badge-hd-fill","badge-hd","badge-sd-fill","badge-sd","badge-tm-fill","badge-tm","badge-vo-fill","badge-vo","badge-vr-fill","badge-vr","badge-wc-fill","badge-wc","bag-check-fill","bag-check","bag-dash-fill","bag-dash","bag-fill","bag-heart-fill","bag-heart","bag-plus-fill","bag-plus","bag-x-fill","bag-x","bag","balloon-fill","balloon-heart-fill","balloon-heart","balloon","bandaid-fill","bandaid","bank","bank2","bar-chart-fill","bar-chart-line-fill","bar-chart-line","bar-chart-steps","bar-chart","basket-fill","basket","basket2-fill","basket2","basket3-fill","basket3","battery-charging","battery-full","battery-half","battery","behance","bell-fill","bell-slash-fill","bell-slash","bell","bezier","bezier2","bicycle","binoculars-fill","binoculars","blockquote-left","blockquote-right","bluetooth","body-text","book-fill","book-half","book","bookmark-check-fill","bookmark-check","bookmark-dash-fill","bookmark-dash","bookmark-fill","bookmark-heart-fill","bookmark-heart","bookmark-plus-fill","bookmark-plus","bookmark-star-fill","bookmark-star","bookmark-x-fill","bookmark-x","bookmark","bookmarks-fill","bookmarks","bookshelf","boombox-fill","boombox","bootstrap-fill","bootstrap-reboot","bootstrap","border-all","border-bottom","border-center","border-inner","border-left","border-middle","border-outer","border-right","border-style","border-top","border-width","border","bounding-box-circles","bounding-box","box-arrow-down-left","box-arrow-down-right","box-arrow-down","box-arrow-in-down-left","box-arrow-in-down-right","box-arrow-in-down","box-arrow-in-left","box-arrow-in-right","box-arrow-in-up-left","box-arrow-in-up-right","box-arrow-in-up","box-arrow-left","box-arrow-right","box-arrow-up-left","box-arrow-up-right","box-arrow-up","box-fill","box-seam-fill","box-seam","box","box2-fill","box2-heart-fill","box2-heart","box2","boxes","braces-asterisk","braces","bricks","briefcase-fill","briefcase","brightness-alt-high-fill","brightness-alt-high","brightness-alt-low-fill","brightness-alt-low","brightness-high-fill","brightness-high","brightness-low-fill","brightness-low","broadcast-pin","broadcast","browser-chrome","browser-edge","browser-firefox","browser-safari","brush-fill","brush","bucket-fill","bucket","bug-fill","bug","building-add","building-check","building-dash","building-down","building-exclamation","building-fill-add","building-fill-check","building-fill-dash","building-fill-down","building-fill-exclamation","building-fill-gear","building-fill-lock","building-fill-slash","building-fill-up","building-fill-x","building-fill","building-gear","building-lock","building-slash","building-up","building-x","building","buildings-fill","buildings","bullseye","bus-front-fill","bus-front","c-circle-fill","c-circle","c-square-fill","c-square","calculator-fill","calculator","calendar-check-fill","calendar-check","calendar-date-fill","calendar-date","calendar-day-fill","calendar-day","calendar-event-fill","calendar-event","calendar-fill","calendar-heart-fill","calendar-heart","calendar-minus-fill","calendar-minus","calendar-month-fill","calendar-month","calendar-plus-fill","calendar-plus","calendar-range-fill","calendar-range","calendar-week-fill","calendar-week","calendar-x-fill","calendar-x","calendar","calendar2-check-fill","calendar2-check","calendar2-date-fill","calendar2-date","calendar2-day-fill","calendar2-day","calendar2-event-fill","calendar2-event","calendar2-fill","calendar2-heart-fill","calendar2-heart","calendar2-minus-fill","calendar2-minus","calendar2-month-fill","calendar2-month","calendar2-plus-fill","calendar2-plus","calendar2-range-fill","calendar2-range","calendar2-week-fill","calendar2-week","calendar2-x-fill","calendar2-x","calendar2","calendar3-event-fill","calendar3-event","calendar3-fill","calendar3-range-fill","calendar3-range","calendar3-week-fill","calendar3-week","calendar3","calendar4-event","calendar4-range","calendar4-week","calendar4","camera-fill","camera-reels-fill","camera-reels","camera-video-fill","camera-video-off-fill","camera-video-off","camera-video","camera","camera2","capslock-fill","capslock","capsule-pill","capsule","car-front-fill","car-front","card-checklist","card-heading","card-image","card-list","card-text","caret-down-fill","caret-down-square-fill","caret-down-square","caret-down","caret-left-fill","caret-left-square-fill","caret-left-square","caret-left","caret-right-fill","caret-right-square-fill","caret-right-square","caret-right","caret-up-fill","caret-up-square-fill","caret-up-square","caret-up","cart-check-fill","cart-check","cart-dash-fill","cart-dash","cart-fill","cart-plus-fill","cart-plus","cart-x-fill","cart-x","cart","cart2","cart3","cart4","cash-coin","cash-stack","cash","cassette-fill","cassette","cast","cc-circle-fill","cc-circle","cc-square-fill","cc-square","chat-dots-fill","chat-dots","chat-fill","chat-heart-fill","chat-heart","chat-left-dots-fill","chat-left-dots","chat-left-fill","chat-left-heart-fill","chat-left-heart","chat-left-quote-fill","chat-left-quote","chat-left-text-fill","chat-left-text","chat-left","chat-quote-fill","chat-quote","chat-right-dots-fill","chat-right-dots","chat-right-fill","chat-right-heart-fill","chat-right-heart","chat-right-quote-fill","chat-right-quote","chat-right-text-fill","chat-right-text","chat-right","chat-square-dots-fill","chat-square-dots","chat-square-fill","chat-square-heart-fill","chat-square-heart","chat-square-quote-fill","chat-square-quote","chat-square-text-fill","chat-square-text","chat-square","chat-text-fill","chat-text","chat","check-all","check-circle-fill","check-circle","check-lg","check-square-fill","check-square","check","check2-all","check2-circle","check2-square","check2","chevron-bar-contract","chevron-bar-down","chevron-bar-expand","chevron-bar-left","chevron-bar-right","chevron-bar-up","chevron-compact-down","chevron-compact-left","chevron-compact-right","chevron-compact-up","chevron-contract","chevron-double-down","chevron-double-left","chevron-double-right","chevron-double-up","chevron-down","chevron-expand","chevron-left","chevron-right","chevron-up","circle-fill","circle-half","circle-square","circle","clipboard-check-fill","clipboard-check","clipboard-data-fill","clipboard-data","clipboard-fill","clipboard-heart-fill","clipboard-heart","clipboard-minus-fill","clipboard-minus","clipboard-plus-fill","clipboard-plus","clipboard-pulse","clipboard-x-fill","clipboard-x","clipboard","clipboard2-check-fill","clipboard2-check","clipboard2-data-fill","clipboard2-data","clipboard2-fill","clipboard2-heart-fill","clipboard2-heart","clipboard2-minus-fill","clipboard2-minus","clipboard2-plus-fill","clipboard2-plus","clipboard2-pulse-fill","clipboard2-pulse","clipboard2-x-fill","clipboard2-x","clipboard2","clock-fill","clock-history","clock","cloud-arrow-down-fill","cloud-arrow-down","cloud-arrow-up-fill","cloud-arrow-up","cloud-check-fill","cloud-check","cloud-download-fill","cloud-download","cloud-drizzle-fill","cloud-drizzle","cloud-fill","cloud-fog-fill","cloud-fog","cloud-fog2-fill","cloud-fog2","cloud-hail-fill","cloud-hail","cloud-haze-fill","cloud-haze","cloud-haze2-fill","cloud-haze2","cloud-lightning-fill","cloud-lightning-rain-fill","cloud-lightning-rain","cloud-lightning","cloud-minus-fill","cloud-minus","cloud-moon-fill","cloud-moon","cloud-plus-fill","cloud-plus","cloud-rain-fill","cloud-rain-heavy-fill","cloud-rain-heavy","cloud-rain","cloud-slash-fill","cloud-slash","cloud-sleet-fill","cloud-sleet","cloud-snow-fill","cloud-snow","cloud-sun-fill","cloud-sun","cloud-upload-fill","cloud-upload","cloud","clouds-fill","clouds","cloudy-fill","cloudy","code-slash","code-square","code","coin","collection-fill","collection-play-fill","collection-play","collection","columns-gap","columns","command","compass-fill","compass","cone-striped","cone","controller","cpu-fill","cpu","credit-card-2-back-fill","credit-card-2-back","credit-card-2-front-fill","credit-card-2-front","credit-card-fill","credit-card","crop","cup-fill","cup-hot-fill","cup-hot","cup-straw","cup","currency-bitcoin","currency-dollar","currency-euro","currency-exchange","currency-pound","currency-rupee","currency-yen","cursor-fill","cursor-text","cursor","dash-circle-dotted","dash-circle-fill","dash-circle","dash-lg","dash-square-dotted","dash-square-fill","dash-square","dash","database-add","database-check","database-dash","database-down","database-exclamation","database-fill-add","database-fill-check","database-fill-dash","database-fill-down","database-fill-exclamation","database-fill-gear","database-fill-lock","database-fill-slash","database-fill-up","database-fill-x","database-fill","database-gear","database-lock","database-slash","database-up","database-x","database","device-hdd-fill","device-hdd","device-ssd-fill","device-ssd","diagram-2-fill","diagram-2","diagram-3-fill","diagram-3","diamond-fill","diamond-half","diamond","dice-1-fill","dice-1","dice-2-fill","dice-2","dice-3-fill","dice-3","dice-4-fill","dice-4","dice-5-fill","dice-5","dice-6-fill","dice-6","disc-fill","disc","discord","display-fill","display","displayport-fill","displayport","distribute-horizontal","distribute-vertical","door-closed-fill","door-closed","door-open-fill","door-open","dot","download","dpad-fill","dpad","dribbble","dropbox","droplet-fill","droplet-half","droplet","ear-fill","ear","earbuds","easel-fill","easel","easel2-fill","easel2","easel3-fill","easel3","egg-fill","egg-fried","egg","eject-fill","eject","emoji-angry-fill","emoji-angry","emoji-dizzy-fill","emoji-dizzy","emoji-expressionless-fill","emoji-expressionless","emoji-frown-fill","emoji-frown","emoji-heart-eyes-fill","emoji-heart-eyes","emoji-kiss-fill","emoji-kiss","emoji-laughing-fill","emoji-laughing","emoji-neutral-fill","emoji-neutral","emoji-smile-fill","emoji-smile-upside-down-fill","emoji-smile-upside-down","emoji-smile","emoji-sunglasses-fill","emoji-sunglasses","emoji-wink-fill","emoji-wink","envelope-at-fill","envelope-at","envelope-check-fill","envelope-check","envelope-dash-fill","envelope-dash","envelope-exclamation-fill","envelope-exclamation","envelope-fill","envelope-heart-fill","envelope-heart","envelope-open-fill","envelope-open-heart-fill","envelope-open-heart","envelope-open","envelope-paper-fill","envelope-paper-heart-fill","envelope-paper-heart","envelope-paper","envelope-plus-fill","envelope-plus","envelope-slash-fill","envelope-slash","envelope-x-fill","envelope-x","envelope","eraser-fill","eraser","escape","ethernet","ev-front-fill","ev-front","ev-station-fill","ev-station","exclamation-circle-fill","exclamation-circle","exclamation-diamond-fill","exclamation-diamond","exclamation-lg","exclamation-octagon-fill","exclamation-octagon","exclamation-square-fill","exclamation-square","exclamation-triangle-fill","exclamation-triangle","exclamation","exclude","explicit-fill","explicit","eye-fill","eye-slash-fill","eye-slash","eye","eyedropper","eyeglasses","facebook","fan","fast-forward-btn-fill","fast-forward-btn","fast-forward-circle-fill","fast-forward-circle","fast-forward-fill","fast-forward","file-arrow-down-fill","file-arrow-down","file-arrow-up-fill","file-arrow-up","file-bar-graph-fill","file-bar-graph","file-binary-fill","file-binary","file-break-fill","file-break","file-check-fill","file-check","file-code-fill","file-code","file-diff-fill","file-diff","file-earmark-arrow-down-fill","file-earmark-arrow-down","file-earmark-arrow-up-fill","file-earmark-arrow-up","file-earmark-bar-graph-fill","file-earmark-bar-graph","file-earmark-binary-fill","file-earmark-binary","file-earmark-break-fill","file-earmark-break","file-earmark-check-fill","file-earmark-check","file-earmark-code-fill","file-earmark-code","file-earmark-diff-fill","file-earmark-diff","file-earmark-easel-fill","file-earmark-easel","file-earmark-excel-fill","file-earmark-excel","file-earmark-fill","file-earmark-font-fill","file-earmark-font","file-earmark-image-fill","file-earmark-image","file-earmark-lock-fill","file-earmark-lock","file-earmark-lock2-fill","file-earmark-lock2","file-earmark-medical-fill","file-earmark-medical","file-earmark-minus-fill","file-earmark-minus","file-earmark-music-fill","file-earmark-music","file-earmark-pdf-fill","file-earmark-pdf","file-earmark-person-fill","file-earmark-person","file-earmark-play-fill","file-earmark-play","file-earmark-plus-fill","file-earmark-plus","file-earmark-post-fill","file-earmark-post","file-earmark-ppt-fill","file-earmark-ppt","file-earmark-richtext-fill","file-earmark-richtext","file-earmark-ruled-fill","file-earmark-ruled","file-earmark-slides-fill","file-earmark-slides","file-earmark-spreadsheet-fill","file-earmark-spreadsheet","file-earmark-text-fill","file-earmark-text","file-earmark-word-fill","file-earmark-word","file-earmark-x-fill","file-earmark-x","file-earmark-zip-fill","file-earmark-zip","file-earmark","file-easel-fill","file-easel","file-excel-fill","file-excel","file-fill","file-font-fill","file-font","file-image-fill","file-image","file-lock-fill","file-lock","file-lock2-fill","file-lock2","file-medical-fill","file-medical","file-minus-fill","file-minus","file-music-fill","file-music","file-pdf-fill","file-pdf","file-person-fill","file-person","file-play-fill","file-play","file-plus-fill","file-plus","file-post-fill","file-post","file-ppt-fill","file-ppt","file-richtext-fill","file-richtext","file-ruled-fill","file-ruled","file-slides-fill","file-slides","file-spreadsheet-fill","file-spreadsheet","file-text-fill","file-text","file-word-fill","file-word","file-x-fill","file-x","file-zip-fill","file-zip","file","files-alt","files","filetype-aac","filetype-ai","filetype-bmp","filetype-cs","filetype-css","filetype-csv","filetype-doc","filetype-docx","filetype-exe","filetype-gif","filetype-heic","filetype-html","filetype-java","filetype-jpg","filetype-js","filetype-json","filetype-jsx","filetype-key","filetype-m4p","filetype-md","filetype-mdx","filetype-mov","filetype-mp3","filetype-mp4","filetype-otf","filetype-pdf","filetype-php","filetype-png","filetype-ppt","filetype-pptx","filetype-psd","filetype-py","filetype-raw","filetype-rb","filetype-sass","filetype-scss","filetype-sh","filetype-sql","filetype-svg","filetype-tiff","filetype-tsx","filetype-ttf","filetype-txt","filetype-wav","filetype-woff","filetype-xls","filetype-xlsx","filetype-xml","filetype-yml","film","filter-circle-fill","filter-circle","filter-left","filter-right","filter-square-fill","filter-square","filter","fingerprint","fire","flag-fill","flag","flower1","flower2","flower3","folder-check","folder-fill","folder-minus","folder-plus","folder-symlink-fill","folder-symlink","folder-x","folder","folder2-open","folder2","fonts","forward-fill","forward","front","fuel-pump-diesel-fill","fuel-pump-diesel","fuel-pump-fill","fuel-pump","fullscreen-exit","fullscreen","funnel-fill","funnel","gear-fill","gear-wide-connected","gear-wide","gear","gem","gender-ambiguous","gender-female","gender-male","gender-trans","geo-alt-fill","geo-alt","geo-fill","geo","gift-fill","gift","git","github","globe-americas","globe-asia-australia","globe-central-south-asia","globe-europe-africa","globe","globe2","google-play","google","gpu-card","graph-down-arrow","graph-down","graph-up-arrow","graph-up","grid-1x2-fill","grid-1x2","grid-3x2-gap-fill","grid-3x2-gap","grid-3x2","grid-3x3-gap-fill","grid-3x3-gap","grid-3x3","grid-fill","grid","grip-horizontal","grip-vertical","h-circle-fill","h-circle","h-square-fill","h-square","hammer","hand-index-fill","hand-index-thumb-fill","hand-index-thumb","hand-index","hand-thumbs-down-fill","hand-thumbs-down","hand-thumbs-up-fill","hand-thumbs-up","handbag-fill","handbag","hash","hdd-fill","hdd-network-fill","hdd-network","hdd-rack-fill","hdd-rack","hdd-stack-fill","hdd-stack","hdd","hdmi-fill","hdmi","headphones","headset-vr","headset","heart-arrow","heart-fill","heart-half","heart-pulse-fill","heart-pulse","heart","heartbreak-fill","heartbreak","hearts","heptagon-fill","heptagon-half","heptagon","hexagon-fill","hexagon-half","hexagon","hospital-fill","hospital","hourglass-bottom","hourglass-split","hourglass-top","hourglass","house-add-fill","house-add","house-check-fill","house-check","house-dash-fill","house-dash","house-door-fill","house-door","house-down-fill","house-down","house-exclamation-fill","house-exclamation","house-fill","house-gear-fill","house-gear","house-heart-fill","house-heart","house-lock-fill","house-lock","house-slash-fill","house-slash","house-up-fill","house-up","house-x-fill","house-x","house","houses-fill","houses","hr","hurricane","hypnotize","image-alt","image-fill","image","images","inbox-fill","inbox","inboxes-fill","inboxes","incognito","indent","infinity","info-circle-fill","info-circle","info-lg","info-square-fill","info-square","info","input-cursor-text","input-cursor","instagram","intersect","journal-album","journal-arrow-down","journal-arrow-up","journal-bookmark-fill","journal-bookmark","journal-check","journal-code","journal-medical","journal-minus","journal-plus","journal-richtext","journal-text","journal-x","journal","journals","joystick","justify-left","justify-right","justify","kanban-fill","kanban","key-fill","key","keyboard-fill","keyboard","ladder","lamp-fill","lamp","laptop-fill","laptop","layer-backward","layer-forward","layers-fill","layers-half","layers","layout-sidebar-inset-reverse","layout-sidebar-inset","layout-sidebar-reverse","layout-sidebar","layout-split","layout-text-sidebar-reverse","layout-text-sidebar","layout-text-window-reverse","layout-text-window","layout-three-columns","layout-wtf","life-preserver","lightbulb-fill","lightbulb-off-fill","lightbulb-off","lightbulb","lightning-charge-fill","lightning-charge","lightning-fill","lightning","line","link-45deg","link","linkedin","list-check","list-columns-reverse","list-columns","list-nested","list-ol","list-stars","list-task","list-ul","list","lock-fill","lock","lungs-fill","lungs","magic","magnet-fill","magnet","mailbox","mailbox2","map-fill","map","markdown-fill","markdown","mask","mastodon","medium","megaphone-fill","megaphone","memory","menu-app-fill","menu-app","menu-button-fill","menu-button-wide-fill","menu-button-wide","menu-button","menu-down","menu-up","messenger","meta","mic-fill","mic-mute-fill","mic-mute","mic","microsoft-teams","microsoft","minecart-loaded","minecart","modem-fill","modem","moisture","moon-fill","moon-stars-fill","moon-stars","moon","mortarboard-fill","mortarboard","motherboard-fill","motherboard","mouse-fill","mouse","mouse2-fill","mouse2","mouse3-fill","mouse3","music-note-beamed","music-note-list","music-note","music-player-fill","music-player","newspaper","nintendo-switch","node-minus-fill","node-minus","node-plus-fill","node-plus","nut-fill","nut","nvidia","octagon-fill","octagon-half","octagon","optical-audio-fill","optical-audio","option","outlet","p-circle-fill","p-circle","p-square-fill","p-square","paint-bucket","palette-fill","palette","palette2","paperclip","paragraph","pass-fill","pass","patch-check-fill","patch-check","patch-exclamation-fill","patch-exclamation","patch-minus-fill","patch-minus","patch-plus-fill","patch-plus","patch-question-fill","patch-question","pause-btn-fill","pause-btn","pause-circle-fill","pause-circle","pause-fill","pause","paypal","pc-display-horizontal","pc-display","pc-horizontal","pc","pci-card","peace-fill","peace","pen-fill","pen","pencil-fill","pencil-square","pencil","pentagon-fill","pentagon-half","pentagon","people-fill","people","percent","person-add","person-badge-fill","person-badge","person-bounding-box","person-check-fill","person-check","person-circle","person-dash-fill","person-dash","person-down","person-exclamation","person-fill-add","person-fill-check","person-fill-dash","person-fill-down","person-fill-exclamation","person-fill-gear","person-fill-lock","person-fill-slash","person-fill-up","person-fill-x","person-fill","person-gear","person-heart","person-hearts","person-lines-fill","person-lock","person-plus-fill","person-plus","person-rolodex","person-slash","person-square","person-up","person-vcard-fill","person-vcard","person-video","person-video2","person-video3","person-workspace","person-x-fill","person-x","person","phone-fill","phone-flip","phone-landscape-fill","phone-landscape","phone-vibrate-fill","phone-vibrate","phone","pie-chart-fill","pie-chart","piggy-bank-fill","piggy-bank","pin-angle-fill","pin-angle","pin-fill","pin-map-fill","pin-map","pin","pinterest","pip-fill","pip","play-btn-fill","play-btn","play-circle-fill","play-circle","play-fill","play","playstation","plug-fill","plug","plugin","plus-circle-dotted","plus-circle-fill","plus-circle","plus-lg","plus-slash-minus","plus-square-dotted","plus-square-fill","plus-square","plus","postage-fill","postage-heart-fill","postage-heart","postage","postcard-fill","postcard-heart-fill","postcard-heart","postcard","power","prescription","prescription2","printer-fill","printer","projector-fill","projector","puzzle-fill","puzzle","qr-code-scan","qr-code","question-circle-fill","question-circle","question-diamond-fill","question-diamond","question-lg","question-octagon-fill","question-octagon","question-square-fill","question-square","question","quora","quote","r-circle-fill","r-circle","r-square-fill","r-square","radioactive","rainbow","receipt-cutoff","receipt","reception-0","reception-1","reception-2","reception-3","reception-4","record-btn-fill","record-btn","record-circle-fill","record-circle","record-fill","record","record2-fill","record2","recycle","reddit","regex","repeat-1","repeat","reply-all-fill","reply-all","reply-fill","reply","rewind-btn-fill","rewind-btn","rewind-circle-fill","rewind-circle","rewind-fill","rewind","robot","rocket-fill","rocket-takeoff-fill","rocket-takeoff","rocket","router-fill","router","rss-fill","rss","rulers","safe-fill","safe","safe2-fill","safe2","save-fill","save","save2-fill","save2","scissors","scooter","screwdriver","sd-card-fill","sd-card","search-heart-fill","search-heart","search","segmented-nav","send-check-fill","send-check","send-dash-fill","send-dash","send-exclamation-fill","send-exclamation","send-fill","send-plus-fill","send-plus","send-slash-fill","send-slash","send-x-fill","send-x","send","server","share-fill","share","shield-check","shield-exclamation","shield-fill-check","shield-fill-exclamation","shield-fill-minus","shield-fill-plus","shield-fill-x","shield-fill","shield-lock-fill","shield-lock","shield-minus","shield-plus","shield-shaded","shield-slash-fill","shield-slash","shield-x","shield","shift-fill","shift","shop-window","shop","shuffle","sign-dead-end-fill","sign-dead-end","sign-do-not-enter-fill","sign-do-not-enter","sign-intersection-fill","sign-intersection-side-fill","sign-intersection-side","sign-intersection-t-fill","sign-intersection-t","sign-intersection-y-fill","sign-intersection-y","sign-intersection","sign-merge-left-fill","sign-merge-left","sign-merge-right-fill","sign-merge-right","sign-no-left-turn-fill","sign-no-left-turn","sign-no-parking-fill","sign-no-parking","sign-no-right-turn-fill","sign-no-right-turn","sign-railroad-fill","sign-railroad","sign-stop-fill","sign-stop-lights-fill","sign-stop-lights","sign-stop","sign-turn-left-fill","sign-turn-left","sign-turn-right-fill","sign-turn-right","sign-turn-slight-left-fill","sign-turn-slight-left","sign-turn-slight-right-fill","sign-turn-slight-right","sign-yield-fill","sign-yield","signal","signpost-2-fill","signpost-2","signpost-fill","signpost-split-fill","signpost-split","signpost","sim-fill","sim","sina-weibo","skip-backward-btn-fill","skip-backward-btn","skip-backward-circle-fill","skip-backward-circle","skip-backward-fill","skip-backward","skip-end-btn-fill","skip-end-btn","skip-end-circle-fill","skip-end-circle","skip-end-fill","skip-end","skip-forward-btn-fill","skip-forward-btn","skip-forward-circle-fill","skip-forward-circle","skip-forward-fill","skip-forward","skip-start-btn-fill","skip-start-btn","skip-start-circle-fill","skip-start-circle","skip-start-fill","skip-start","skype","slack","slash-circle-fill","slash-circle","slash-lg","slash-square-fill","slash-square","slash","sliders","sliders2-vertical","sliders2","smartwatch","snapchat","snow","snow2","snow3","sort-alpha-down-alt","sort-alpha-down","sort-alpha-up-alt","sort-alpha-up","sort-down-alt","sort-down","sort-numeric-down-alt","sort-numeric-down","sort-numeric-up-alt","sort-numeric-up","sort-up-alt","sort-up","soundwave","speaker-fill","speaker","speedometer","speedometer2","spellcheck","spotify","square-fill","square-half","square","stack-overflow","stack","star-fill","star-half","star","stars","steam","stickies-fill","stickies","sticky-fill","sticky","stop-btn-fill","stop-btn","stop-circle-fill","stop-circle","stop-fill","stop","stoplights-fill","stoplights","stopwatch-fill","stopwatch","strava","stripe","subscript","subtract","suit-club-fill","suit-club","suit-diamond-fill","suit-diamond","suit-heart-fill","suit-heart","suit-spade-fill","suit-spade","sun-fill","sun","sunglasses","sunrise-fill","sunrise","sunset-fill","sunset","superscript","symmetry-horizontal","symmetry-vertical","table","tablet-fill","tablet-landscape-fill","tablet-landscape","tablet","tag-fill","tag","tags-fill","tags","taxi-front-fill","taxi-front","telegram","telephone-fill","telephone-forward-fill","telephone-forward","telephone-inbound-fill","telephone-inbound","telephone-minus-fill","telephone-minus","telephone-outbound-fill","telephone-outbound","telephone-plus-fill","telephone-plus","telephone-x-fill","telephone-x","telephone","tencent-qq","terminal-dash","terminal-fill","terminal-plus","terminal-split","terminal-x","terminal","text-center","text-indent-left","text-indent-right","text-left","text-paragraph","text-right","text-wrap","textarea-resize","textarea-t","textarea","thermometer-half","thermometer-high","thermometer-low","thermometer-snow","thermometer-sun","thermometer","three-dots-vertical","three-dots","thunderbolt-fill","thunderbolt","ticket-detailed-fill","ticket-detailed","ticket-fill","ticket-perforated-fill","ticket-perforated","ticket","tiktok","toggle-off","toggle-on","toggle2-off","toggle2-on","toggles","toggles2","tools","tornado","train-freight-front-fill","train-freight-front","train-front-fill","train-front","train-lightrail-front-fill","train-lightrail-front","translate","trash-fill","trash","trash2-fill","trash2","trash3-fill","trash3","tree-fill","tree","trello","triangle-fill","triangle-half","triangle","trophy-fill","trophy","tropical-storm","truck-flatbed","truck-front-fill","truck-front","truck","tsunami","tv-fill","tv","twitch","twitter","type-bold","type-h1","type-h2","type-h3","type-italic","type-strikethrough","type-underline","type","ubuntu","ui-checks-grid","ui-checks","ui-radios-grid","ui-radios","umbrella-fill","umbrella","unindent","union","unity","universal-access-circle","universal-access","unlock-fill","unlock","upc-scan","upc","upload","usb-c-fill","usb-c","usb-drive-fill","usb-drive","usb-fill","usb-micro-fill","usb-micro","usb-mini-fill","usb-mini","usb-plug-fill","usb-plug","usb-symbol","usb","valentine","valentine2","vector-pen","view-list","view-stacked","vimeo","vinyl-fill","vinyl","virus","virus2","voicemail","volume-down-fill","volume-down","volume-mute-fill","volume-mute","volume-off-fill","volume-off","volume-up-fill","volume-up","vr","wallet-fill","wallet","wallet2","watch","water","webcam-fill","webcam","wechat","whatsapp","wifi-1","wifi-2","wifi-off","wifi","wikipedia","wind","window-dash","window-desktop","window-dock","window-fullscreen","window-plus","window-sidebar","window-split","window-stack","window-x","window","windows","wordpress","wrench-adjustable-circle-fill","wrench-adjustable-circle","wrench-adjustable","wrench","x-circle-fill","x-circle","x-diamond-fill","x-diamond","x-lg","x-octagon-fill","x-octagon","x-square-fill","x-square","x","xbox","yelp","yin-yang","youtube","zoom-in","zoom-out"];function IconSelector({initialValue:$,onIconSelect:rA}){const[tA,AA]=reactExports.useState(!1),[eA,nA]=reactExports.useState($),[oA,iA]=reactExports.useState(null),lA=reactExports.useRef([]),{x:aA,y:sA,strategy:cA,refs:pA,context:uA}=useFloating({whileElementsMounted:P$1,open:tA,onOpenChange:AA,placement:"bottom-start",middleware:[b$3({padding:10}),B$1({apply({availableHeight:CA,elements:xA}){Object.assign(xA.floating.style,{maxHeight:`${CA}px`})},padding:10})]}),gA=useRole(uA,{role:"listbox"}),fA=useDismiss(uA),wA=useListNavigation(uA,{listRef:lA,activeIndex:oA,onNavigate:iA,virtual:!0,loop:!0}),{getReferenceProps:BA,getFloatingProps:EA,getItemProps:QA}=useInteractions([gA,fA,wA]);function dA(CA){let xA=CA.target.value;xA=xA.replace(/\s+/g,"-"),AlphaNumericRegex.test(xA)&&nA(xA),xA?(AA(!0),iA(0)):AA(!1)}const yA=CA=>{nA(CA),AA(!1),rA(CA),iA(null)},hA=FilterIconsList(eA),vA=hA===null?null:hA[oA??0];return jsxs("div",{className:mergeClasses("flex items-center gap-2 pl-2"),children:[jsx(BsIcon,{icon_name:vA??"bootstrap",className:"w-4"}),jsx("input",{...BA({ref:pA.setReference,onChange:dA,value:eA,placeholder:"Search for icon...","aria-autocomplete":"list",className:"w-40",onKeyDown(CA){CA.key==="Enter"&&oA!=null&&hA&&hA[oA]&&yA(hA[oA])}})}),jsx(FloatingPortal,{children:tA&&jsx(FloatingFocusManager,{context:uA,initialFocus:-1,visuallyHiddenDismiss:!0,children:jsx("div",{...EA({ref:pA.setFloating,className:"z-10 flex flex-col w-40 max-h-96 overflow-auto rounded bg-white shadow-md",style:{position:cA,left:aA??0,top:sA??0}}),role:"listbox",children:hA?hA.map((CA,xA)=>jsx(IconResult,{...QA({ref(IA){lA.current[xA]=IA},onClick(){yA(CA)}}),active:oA===xA,icon:CA,divider:xA!==hA.length-1},CA)):jsx(IconResult,{icon:"EmojiFrown",active:!1,label:"No results"})})})})]})}const IconResult=reactExports.forwardRef(({icon:$,label:rA,active:tA,divider:AA,...eA},nA)=>{const oA=reactExports.useId();return jsxs(Fragment,{children:[jsxs("div",{ref:nA,role:"option",id:oA,className:mergeClasses("grid grid-cols-[20px_1fr] gap-1 cursor-pointer px-3 py-2 items-center","[&[aria-selected='true']]:bg-rstudio-blue [&[aria-selected='true']]:text-white"),"aria-selected":tA,"aria-label":$,...eA,children:[jsx(BsIcon,{icon_name:$}),jsx("span",{children:rA??$})]}),AA&&jsx(ListDivider,{})]})});function ListDivider(){return jsx("div",{className:"bg-light-grey h-[1px] text-transparent select-none",children:"divider"})}const AlphaNumericRegex=/^[A-Za-z0-9-]*$/;function FilterIconsList($){const rA=allBsIconNames.filter(tA=>tA.toLowerCase().startsWith($.toLowerCase()));return rA.length>0?rA:null}const ValueBox=({namedArgs:$,children:rA,path:tA,wrapperProps:AA})=>{var nA;const eA=$.showcase_layout==="right";return jsx("div",{className:"flex-1 relative",style:{"--font-color":"var(--rstudio-white","--selected-outline-color":"black"},...AA,children:jsxs("div",{className:mergeClasses("bg-primary text-white h-100 grid gap-md p-md overflow-auto",eA?"grid-cols-[7fr_3fr]":"grid-cols-[3fr_7fr]"),children:[jsx("div",{className:mergeClasses("p-sm col-start-1 row-start-1 min-w-0",eA?"col-start-2":"col-start-1"),children:jsx(BsIcon,{className:"w-100 h-100",icon_name:$.showcase_icon??"question-circle"})}),jsxs("div",{className:mergeClasses("flex flex-col justify-center row-start-1 min-w-0",eA?"col-start-1":"col-start-2"),children:[jsx("h5",{className:"",children:$.title}),jsx("div",{children:jsx(DropWatcherPanel,{className:((nA=$.value)==null?void 0:nA.id)==="textNode"?"text-[1.5rem]":"",existing_node:$.value,child_loc:"value",parentPath:tA,visibleWhenEmpty:!0,messageOnHover:$.value?"Replace value":"Drop a value node here",placeHolder:jsx(EmptyValuePlaceholder,{}),parentNodeType:"value_box"})}),jsx(ChildrenWithDropNodes,{children:rA,parentPath:tA,parentid:"value_box",messageOnHover:"Add node to value box"})]})]})})};function EmptyValuePlaceholder(){return jsxs(Tooltip,{children:[jsx(TooltipTrigger,{asChild:!0,children:jsx("div",{className:"opacity-70 italic h-10 border grid place-content-center",children:"No value present"})}),jsx(TooltipContent,{children:"Drag content here to set the value box's main value field."})]})}const bslibValueBoxInfo=addEditorInfoToUiNode(value_box,{iconSrc:icon$a,UiComponent:ValueBox,settingsFormRender:({settings:$,onSettingsChange:rA,inputs:tA})=>jsxs("div",{children:[jsx(InputLabelWrapper,{label:`Showcase ${$.showcase_icon?"Icon":"Value"}`,labelId:"showcase-icon",mainInput:$.showcase_icon?jsx(IconSelector,{initialValue:$.showcase_icon,onIconSelect:AA=>{rA==null||rA("showcase_icon",{type:"UPDATE",value:AA})}}):jsx(PopoverButton,{className:"w-100 h-[25px]",use_markdown:!0,popoverContent:`Replace current showcase value with an icon from the bsicons package.`,onClick:()=>{rA==null||rA("showcase_icon",{type:"UPDATE",value:"database"})},children:"Replace with icon"})}),jsx(InputLabelWrapper,{label:"Showcase Direction",labelId:"showcase-direction",mainInput:jsx(RadioInputs,{id:"showcase-direction",label:"Showcase Direction",value:$.showcase_layout??"left",onChange:AA=>{rA==null||rA("showcase_layout",AA==="left"?{type:"REMOVE"}:{type:"UPDATE",value:AA})},optionsPerColumn:2,choices:{left:{label:"Left"},right:{label:"Right"}}})}),Object.values(tA)]})}),styles$c="",icon$7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEA0lEQVR4nO3du24cZRyG8ceIQ0FKuINtEBEHK1IqXwEIylUiKmwp0KO5iK3ScZATGoQ1JQi4ATehiAMSEc223EGIFFMsxcyCZaEVG++7M//V82vGa49X32c9+400I8/sLRYLpE17YegBaDcZliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliJeHHoA62ra+eVv7QO3gAPgTeDatse0YU+Ax8ApcAKcXfzhbDoZYkxrq75iHQMPgc+Am9SPCro53KSb00PguEpMF5VbsS74DvgAOAe+oPt0/zabTp78n1/uV77lk9b3AuP7573XCaNp59eA63Sr8CfAYdPOXwc+3PgIg6qGdUwX1R/A+7Pp5Jdhh7M5/QfjAfCgaedfAz/QzfUecDjk2NZR8VD4Lt0f+Jwdi+qyfm7vAc+Aj+nmXkLFsG732y93Oaql2XTyK/BV//L2qn3HpGJYB/3220FHsV3LuR6s3GtEKoa132/PVu61Wx71Ww+FQS8BzKaT86EHsi2z6eRZ/+XLgw5kDRXDUgGGpQjDUkTVE6T/dc1wtCqNdVPKhsW/l0zG9l7bfO/R8lCoiMor1iYuHG/lIvSG368EVyxFGJYiDEsRhqUIw1KEYSnCsBRhWIqofILUSzoj5oqliMorlpd0RswVSxGGpQjDUoRhKcKwFGFYijAsRRiWIiqfIPWSzoi5Yimi8orlJZ0RKxvWVW/4us3/Tt7EzWmr/Te1h0JFGJYiDEsRFcP6C6Bp52XubndV/b3foXtqRQkVw1ree3R/5V675Xq/fTzoKNZQMazTfntr0FFs13Kupyv3GpGKYZ302ztNO3970JFsQdPO3wLu9C9PVu07JhXDOgPuA68APzbt/J1hh5PTf3B+opvrfQrdgrzqCdJD4DW6Z8z83LTzz4FvgN9n08mfg47sipp2/irwBvAR8CndLbi/p9BzdAD2FotSVwoun4E+ptgf/Dncm00nR8t5V3nEXMVD4UVHwA3gLt2z/Z4OOprNeEo3l7vAjdl0cjTscJ5PuRVLNVRfsTRShqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYi/gbCBJi6eIkmgAAAAABJRU5ErkJggg==",InputOutputTitle=({type:$,name:rA,className:tA})=>jsxs("code",{className:tA,children:[jsxs("span",{style:{opacity:.55},children:[$,"$"]}),jsx("span",{children:rA})]}),dtDTOutputInfo=addEditorInfoToUiNode(output_dt,{iconSrc:icon$7,UiComponent:({namedArgs:$,path:rA,wrapperProps:tA})=>jsx("div",{className:"dtDTOutput",...tA,children:jsxs("div",{className:"faux-table",style:{"--table-w":$.width,"--table-h":$.height},children:[jsxs("div",{className:"faux-header",children:["Table: ",jsx(InputOutputTitle,{type:"output",name:$.outputId})]}),jsx("div",{className:"faux-table-body",children:table_cells})]})})}),NUM_COLS=4,NUM_ROWS=25,table_cells=seqArray(NUM_ROWS).map($=>jsx("div",{className:"faux-row",children:seqArray(NUM_COLS).map(rA=>jsx("div",{className:"faux-cell",children:"i"},rA))},$)),gridAwareNodeNamesTuple=["grid_card","grid_card_plot","grid_card_text"],gridItemNodes=new Set(gridAwareNodeNamesTuple);function isValidGridItem($){return gridItemNodes.has($.id)}const validGridContainerNodeNames=["grid_page","grid_container"];function isValidGridContainer($){return validGridContainerNodeNames.includes($.id)}const hoveringOverSwap="_hoveringOverSwap_l95oj_1",availableToSwap="_availableToSwap_l95oj_2",pulse="_pulse_l95oj_1",emptyGridCard="_emptyGridCard_l95oj_52",emptyMessage="_emptyMessage_l95oj_69",classes$o={hoveringOverSwap,availableToSwap,pulse,emptyGridCard,emptyMessage},LayoutDispatchContext=React.createContext(null);function useSetLayout(){return React.useContext(LayoutDispatchContext)}function useGridItemSwapping({path:$,area:rA}){const tA=useCurrentDraggedNode(),AA=useSetLayout(),eA=React.useCallback(({node:iA,currentPath:lA})=>lA===void 0||!isValidGridItem(iA)?!1:nodesAreSiblings(lA,$),[$]),nA=React.useCallback(iA=>{if(!("area"in iA.node.namedArgs)){console.error("Invalid grid area swap drop",{dropInfo:iA});return}const lA=iA.node.namedArgs.area??"__BAD_DROP__";AA==null||AA({type:"SWAP_ITEMS",item_a:rA,item_b:lA})},[rA,AA]),oA=useFilteredDrop({getCanAcceptDrop:eA,onDrop:nA,canAcceptDropClass:classes$o.availableToSwap,hoveringOverClass:classes$o.hoveringOverSwap});return React.useEffect(()=>{oA.current&&(oA.current.dataset.gridArea=rA)},[rA,oA]),React.useEffect(()=>{oA.current&&(tA!=null&&tA.node)&&"area"in tA.node.namedArgs&&(oA.current.dataset.swapWith=tA.node.namedArgs.area)},[tA==null?void 0:tA.node,oA]),oA}const GridlayoutGridCard=$=>{const{namedArgs:{area:rA,...tA},children:AA=[],path:eA,wrapperProps:nA}=$,oA=useGridItemSwapping({area:rA,path:eA});return jsx(BslibCardContainer,{ref:oA,style:{gridArea:rA},card_args:tA,...nA,children:renderCardElements(AA,eA)})},gridlayoutCardInfo=addEditorInfoToUiNode(grid_card,{UiComponent:GridlayoutGridCard}),plotIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAACYElEQVR4nO3cMYoUQQBA0RqRPYBn8E5GhqYbLiZeYDNzs428k1dwU8M2UGFZFmYUf/d013vRTEFDBZ+qomj6tCzLgP/t1dYT4JiERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEXi9dYT+Fd3X78tz4ZOm0xkJffv3m49hb9ixSIhrPNuxhifxxjfxxiPv3/fbDqjHdjtVrii+zHG7ZP/t2OMH2OMj9tMZx+sWOe9f2Hsw+qz2BlhnffmwjGeEBYJYZEQFglhkRAWCWF1pr5YdUHamfpi1YrVmfpiVVidqS9WZwpr6jPP2mY6Y0195lnbTCvW1Geetc0U1tRnnrXNFBYrEhYJYZEQFglhkRAWCWGREBYJYZEQFglhkRAWiZnCerxwbOvnDmGmsB5eGPtyhc8dwkwv+t2NXx9n+/Ne1sMY49MVPncIp2V5/mG8ffBFv+s201bIioRF4khnrH3u6Zfb1VZvxSIhLBLCIrHb6waumxWLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi8RPaOk2ptnQzzIAAAAASUVORK5CYII=";function GoGraph($){return GenIcon({tag:"svg",attr:{viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"}}]})($)}const container$d="_container_1rlbk_1",plotPlaceholder="_plotPlaceholder_1rlbk_5",label$1="_label_1rlbk_19",classes$n={container:container$d,plotPlaceholder,label:label$1};function StaticPlotPlaceholder({outputId:$}){const rA=reactExports.useRef(null),tA=useContainerDimensions(rA),AA=tA===null?100:Math.min(tA.width,tA.height);return jsxs("div",{ref:rA,className:classes$n.plotPlaceholder,"aria-label":"shiny::plotOutput placeholder",children:[jsx(InputOutputTitle,{className:classes$n.label,type:"output",name:$}),jsx(GoGraph,{size:`calc(${AA}px - 80px)`})]})}function useContainerDimensions($){const[rA,tA]=reactExports.useState(null);return reactExports.useEffect(()=>{if(typeof ResizeObserver>"u")return;const AA=new ResizeObserver(eA=>{if(!$.current)return;const{offsetHeight:nA,offsetWidth:oA}=$.current;tA({width:oA,height:nA})});return $.current&&AA.observe($.current),()=>AA.disconnect()},[$]),rA}const BsCard=React.forwardRef(({className:$="",children:rA,...tA},AA)=>{const eA=$+" card";return jsx("div",{ref:AA,className:eA,...tA,children:rA})}),gridCardPlot="_gridCardPlot_1a94v_1",classes$m={gridCardPlot},GridlayoutGridCardPlot=({namedArgs:{outputId:$,area:rA},path:tA,wrapperProps:AA})=>{const eA=useGridItemSwapping({area:rA,path:tA});return jsx(BsCard,{ref:eA,style:{gridArea:rA},className:mergeClasses(classes$m.gridCardPlot,"gridlayout-gridCardPlot"),...AA,children:jsx(StaticPlotPlaceholder,{outputId:$??rA})})},gridlayoutGridCardPlotInfo=addEditorInfoToUiNode(grid_card_plot,{iconSrc:plotIcon,UiComponent:GridlayoutGridCardPlot}),icon$6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAFn0lEQVR4nO3b4VHjRgCG4c+ZNMCV4BtVwJVgSjiiCqACJZRgogqgAuUoAZcAFShHC5RAfnh9rBdJFsaf8TrvM5MZzvZJTvxmtVovk5eXFwG79ttnvwEcJ8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcHi989+A2NMJpNRr6uadibpPnn4rC6LxXvP2XGsy7osbt97HJeXl5fPfguDjm3E+j7yMZgdTVhV056oO6KL8Bz26GjC0jKqvoAu9vlGcHxhrdxJiudVhLVnRxFW1bRTSbPoobvwz8o0TMaxJ0cRltZHq+e6LFZhPUePM2rt0bGEFUdzJ0l1WTxrfdT6ziR+f7JYxxoSLnHT6KG75Oc4ugtJ1zs4519ajpKn0cMLSYu6LN59/HC8U729q936mJ9tcugLbdLwAmnVtDd6jeepLouvyfM/9Rrem+cHjvtmgVTSk6QbrYecepZ0PmZRtmrai3C8Mc7DJV4SC6RWHWtXdx0vi1fLPzKJP9UytKGopOWSx33VtIMLs+F/iLFRSdKPMLJlIeuwtByp4nlTV1jpY9tO4uO/dyvpW10Wk7osJpK+dZznJtytvlE17bzjfVxL+hod84ukq+Q181zubrO+FFZN+6DXec5jXRbfel53r/XliC9hct+r53vHwctcCCYeVW7rsrjccNxnLb/PfOw55qmkh+ihRV0WZ4f+uWU7YoX/4PHkuWu06ntum1FrFUDv3Kkuiyst52G/ztNxJ5qe+7IvqnDMR63fcMz6RsJDkm1YensHtSmsj65pXQ8FEEl3QPwaKTvmhIt4Qj4gPe9p56sOSM7LDXEci7osnvpeWJfFc9W08dLDtGra7yM/1JXBS2f8XpI/n+o1+nR+NGo7T3ifa/OBv//gUrhz4Y5r06Q9lb7Gsp2mY1Sb9vwsvR2JjkauI1YaxU24fX/XMaqmnQ6NdB/wpNeIhlb7Hec+CNmNWAP7rrax702A/5uvlLILS7v9Mtn1xXRfQGPnadnL8VK4tpNBy0XF0R9Ysqa1zSR+jDisocvddMPz2cpqxOpau3pPVKu/k/x5p6NWeI+xp56fpQyWDbaV24j1nrWrPneS5nodVWY7nsQPLSmkywszjdhtEe6Cf0QPnWu7f/e9yWrE0vro8rzNr3V17NOSxk3iN068w41F/B6f4uWHjnPPNn1ZHaQj28EvU2QTVsfa1Ud+xy8Na8yugfmI3QXplpqu0Sh93zcdl89fwnPxeQcXgw9FNmHp7Vxo60tBGOniD+dk5Mgxr5r2IQ2satpZuCmIj/HY9Quu4dxxcCeSHqqmncffAVZNexK+1H5IDpHFpr8sdjf8+c+/U0k/o4d6dzKMFeKYRw8t6rI4i57v2t0w1pOW22p6byySDYpjXa12kx7655bLiLWLSXsqPcamXQNjz7nQhqgkKWynuRx6TeI8py3KuYS1s8vgSpinpJP/oRFkETbgXfWc/1rLbTVnY5dA6rK43XDMhZaj1MSw1maVxaUQ+cllxEJmCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCgsV/EcmMRmtHHXoAAAAASUVORK5CYII=",GridlayoutGridCardText=({namedArgs:{content:$,area:rA,alignment:tA},path:AA,wrapperProps:eA})=>{const nA=useGridItemSwapping({area:rA,path:AA});return jsx(BsCard,{ref:nA,className:"bg-white w-full h-full relative gridlayout-textPanel flex flex-row items-center px-3",style:{gridArea:rA,justifyContent:tA},...eA,children:jsx("h1",{className:"text-3xl",children:$})})},gridlayoutTextPanelInfo=addEditorInfoToUiNode(grid_card_text,{iconSrc:icon$6,UiComponent:GridlayoutGridCardText}),gridIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEVklEQVR4nO3cwYpcRRiG4XeMjouYGzAuXGThyohG1GvQxQQSJVfgRhkUnOANCCYLh6ALvQBBQkxE9BqiKEZ3wixcZO4gm4xIu6geaE+PDMp8VZU67wNncc5ppqqrP7r++Q/0xmKxQDppj7WegMZksBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBTxeK2Bdr7aO+ryJrC1PF4Dnl5e25i8bvqTON5fv/8AuA/8AtwGvgEOJq/j2lvnppciqgXrCBeBa0Cddzq+p4DnlscVYA+4CnzdYjIttsJTwMeUN2yocs4Btyhrfar24C2+sT4CdhqMO1eHa3215qC1v7EusR6qA+AGpcY6w3r9wPLa6uH99ftnKGt4g/Xaaoey9tXUDNYm8Mnk2j7wCrAN3KUUoPp/HlDWcJuypvuT+7uUz6CKmsG6DDyzcn4AvAHcqziHubgHvA48XLl2Fniz1gRqBmtrcv45hirpV+CLybWtWoPXDNbLk/MvT/BvLyaHiukaX6g1cM3/Cp+dnFfb72fsLkcX+3EtH+msdYU1Dp8VKqLlI52T1OTrXv+uZrCOe5CqjCbr7laoCIOliFFqLLfZztQMlh92G7PrY2lgBksRo9RYbrOdsY81PvtYGofBUsQoNZbbbGfsY43PPpbGYbAUMUqN5TbbGftY47OPpXEYLEWMUmO5zXbGPtb47GNpHAZLEaPUWG6znbGPNT77WBqHwVLEKDVWD7+z3sv9LkoM+1jjs4+lcRgsRYxSYx33dT/3+9XZxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIUWqsnrbZnubSjH2s8dnH0jgMliJGqbF62mZ7mksz9rHGZx9L4zBYihilxuppm+1pLs3YxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIlsHabDi2wmoG63dKYXt4vHiCf3tjcrTU01xe5Z9r/ketgWsG67fJ+ZWKY8/VdI1/qjVwzWDdmZy/DZyvOP7cPE9Z41V3ag1eM1g3gfsr508C3wEvVJzDXJwHvqes8aF9ymdQRc1gHQDvT66dBX4AdoELwOmK8xnNacoa7gI/UtZ21XvAw1qTqd15vwlcBz5YubYJbC+PQz3/Yt6jcH/qOhW/raBNu+FD4NMG487VZ5Q1r6pFsP4C3gUuAXsNxp+LPeAy8A5lzatq+RD6FvAt5c1fBF6i1AVPNJzTo+xPSoH+M3CbsvUdtJrMxmJx3PYs/Xc+K1SEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVLE32A0lLomuWLgAAAAAElFTkSuQmCC";var collectionClone=clone;function clone($){let rA=$;var tA={}.toString.call($).slice(8,-1);if(tA=="Set")return new Set([...$].map(eA=>clone(eA)));if(tA=="Map")return new Map([...$].map(eA=>[clone(eA[0]),clone(eA[1])]));if(tA=="Date")return new Date($.getTime());if(tA=="RegExp")return RegExp($.source,getRegExpFlags($));if(tA=="Array"||tA=="Object"){rA=Array.isArray($)?[]:{};for(var AA in $)rA[AA]=clone($[AA])}return rA}function getRegExpFlags($){if(typeof $.source.flags=="string")return $.source.flags;var rA=[];return $.global&&rA.push("g"),$.ignoreCase&&rA.push("i"),$.multiline&&rA.push("m"),$.sticky&&rA.push("y"),$.unicode&&rA.push("u"),rA.join("")}function matrixDimensions($){const rA=$.length,tA=$[0].length;for(let AA of $)if(AA.length!==tA)throw new Error("Inconsistant number of columns in matrix");return{numRows:rA,numCols:tA}}function insertRowOrCol($,{index:rA,arr:tA,dir:AA}){const eA=collectionClone($);switch(AA){case"rows":return addAtIndex(eA,rA,tA);case"cols":return eA.map((nA,oA)=>addAtIndex(nA,rA,tA[oA]))}}function removeRowOrCol($,{index:rA,dir:tA}){const AA=collectionClone($);switch(tA){case"rows":return removeAtIndex(AA,rA);case"cols":return AA.map((eA,nA)=>removeAtIndex(eA,rA))}}const emptyCell=".";function areasToItemLocations($){const rA=new Map;return areasToItemCells($).forEach(({itemRows:tA,itemCols:AA},eA)=>{if(eA===emptyCell)return;const nA=arrayRange(tA),oA=arrayRange(AA);rA.set(eA,{colStart:oA.minVal,rowStart:nA.minVal,colSpan:oA.span+1,rowSpan:nA.span+1,isValid:nA.isSequence&&oA.isSequence})}),rA}function areasToItemCells($){const rA=new Map,{numRows:tA,numCols:AA}=matrixDimensions($);for(let eA=0;eA{cA!==emptyCell&&oA.add(cA)});const sA=aA.length;if(eA===-1&&(eA=sA),eA!==sA)throw new Error("Invalid layout definition. Not consistant number of columns in every row")}if(!tA)tA=fillArr("1fr",eA);else if(tA.length!==eA)throw new Error("Column sizes vector doesn't match layout definition.");if(!rA)rA=fillArr("1fr",nA);else if(rA.length!==nA)throw new Error("Row sizes vector doesn't match layout definition.");return{uniqueAreas:[...oA],areas:iA,col_sizes:tA,row_sizes:rA,gap_size:AA??"12px"}}function convertLayoutTableToMatrix($){const rA=[];for(let tA of $)rA.push(tA.trim().split(/\s+/));return rA}function convertTemplatedLayoutToGridlayoutArgs({areas:$,...rA}){return{layout:makeColumnAlignedTable($),...rA}}function convertGridlayoutArgsToTemplatedLayout({layout:$,...rA}){return{areas:convertLayoutTableToMatrix($),...rA}}function makeColumnAlignedTable($){const{numCols:rA}=matrixDimensions($),tA=[],AA=fillArr(-1,rA);for(let eA of $)for(let nA=0;nAnA+oA.padEnd(AA[iA]," ")+(iA1,sA=AA>1,cA=[];return(rowIsFree({colRange:lA,rowIndex:$-1,layoutAreas:eA})||aA)&&cA.push("up"),(rowIsFree({colRange:lA,rowIndex:nA+1,layoutAreas:eA})||aA)&&cA.push("down"),(colIsFree({rowRange:iA,colIndex:tA-1,layoutAreas:eA})||sA)&&cA.push("left"),(colIsFree({rowRange:iA,colIndex:oA+1,layoutAreas:eA})||sA)&&cA.push("right"),cA}function rowIsFree({colRange:$,rowIndex:rA,layoutAreas:tA}){return rA<1||rA>tA.length?!1:$.every(AA=>tA[rA-1][AA-1]===emptyCell)}function colIsFree({rowRange:$,colIndex:rA,layoutAreas:tA}){return rA<1||rA>tA[0].length?!1:$.every(AA=>tA[AA-1][rA-1]===emptyCell)}const marker="_marker_mumaw_1",dragger="_dragger_mumaw_32",move="_move_mumaw_52",classes$l={marker,dragger,move};function within($,rA,tA){const AA=rA=AA&&$<=eA}function gridLocationToExtent({rowStart:$,rowSpan:rA,colStart:tA,colSpan:AA}){return{rowStart:$,rowEnd:$+rA-1,colStart:tA,colEnd:tA+AA-1}}function sameLocation($,rA){return typeof $>"u"&&typeof rA>"u"?!0:typeof $>"u"||typeof rA>"u"?!1:("colSpan"in $&&($=gridLocationToExtent($)),"colSpan"in rA&&(rA=gridLocationToExtent(rA)),$.colStart===rA.colStart&&$.colEnd===rA.colEnd&&$.rowStart===rA.rowStart&&$.rowEnd===rA.rowEnd)}function findAvailableTracts({dragDirection:$,gridLocation:rA,layoutAreas:tA}){const{rowStart:AA,rowEnd:eA,colStart:nA,colEnd:oA}=gridLocationToExtent(rA),iA=tA.length,lA=tA[0].length;let aA,sA,cA;switch($){case"up":if(AA===1)return{shrinkExtent:eA,growExtent:1};aA=AA-1,sA=1,cA=eA;break;case"left":if(nA===1)return{shrinkExtent:oA,growExtent:1};aA=nA-1,sA=1,cA=oA;break;case"down":if(eA===iA)return{shrinkExtent:AA,growExtent:iA};aA=eA+1,sA=iA,cA=AA;break;case"right":if(oA===lA)return{shrinkExtent:nA,growExtent:lA};aA=oA+1,sA=lA,cA=nA;break}const pA=$==="up"||$==="down",uA=$==="left"||$==="up",[gA,fA]=pA?[nA,oA]:[AA,eA],wA=(QA,dA)=>{const[yA,hA]=pA?[QA,dA]:[dA,QA];return tA[yA-1][hA-1]!==emptyCell},BA=buildRange(gA,fA),EA=buildRange(aA,sA);for(let QA of EA)for(let dA of BA)if(wA(QA,dA))return{shrinkExtent:cA,growExtent:QA+(uA?1:-1)};return{shrinkExtent:cA,growExtent:sA}}function getTractExtents({dir:$,gridContainerStyles:rA,gridContainerBoundingRect:tA}){const AA=pxValToNumber(rA.getPropertyValue("gap")),nA=pxValToNumber(rA.getPropertyValue("padding"))+AA/2,oA=tA[$==="rows"?"y":"x"],iA=getGridTractSizes(rA,$),lA=iA.length,aA=[];for(let sA=0;sAwithin(nA,lA,aA));if(oA===void 0)return;const iA=handleToGridExtent[tA];return eA[iA]=oA.index,eA}const handleToGridExtent={right:"colEnd",left:"colStart",up:"rowStart",down:"rowEnd"};function useResizeOnDrag({overlayRef:$,gridLocation:rA,layoutAreas:tA,onDragEnd:AA}){const eA=gridLocationToExtent(rA),nA=React.useRef(null),oA=React.useCallback(aA=>{const sA=$.current,cA=nA.current;if(!sA||!cA)throw new Error("For some reason we are observing dragging when we shouldn't");const pA=resizeOnDrag({mousePos:aA,dragState:cA});pA&&placeItemOnGrid(sA,pA)},[$]),iA=React.useCallback(()=>{const aA=$.current,sA=nA.current;if(!aA||!sA)return;const cA=sA.gridItemExtent;sameLocation(cA,eA)||AA(cA),aA.classList.remove("dragging"),document.removeEventListener("mousemove",oA),toggleTextSelection("on")},[eA,oA,AA,$]);return React.useCallback(aA=>{const sA=$.current;if(!sA)return;const cA=sA.parentElement;if(!cA)return;const pA=getComputedStyle(sA.parentElement),uA=cA.getBoundingClientRect(),gA=aA==="down"||aA==="up"?"rows":"cols",{shrinkExtent:fA,growExtent:wA}=findAvailableTracts({dragDirection:aA,gridLocation:rA,layoutAreas:tA});nA.current={dragHandle:aA,gridItemExtent:gridLocationToExtent(rA),tractExtents:getTractExtents({dir:gA,gridContainerStyles:pA,gridContainerBoundingRect:uA}).filter(({index:BA})=>within(BA,fA,wA))},placeItemOnGrid($.current,nA.current.gridItemExtent),sA.classList.add("dragging"),document.addEventListener("mousemove",oA),document.addEventListener("mouseup",iA,{once:!0}),toggleTextSelection("off")},[iA,rA,tA,oA,$])}function toggleTextSelection($){var tA;const rA=(tA=document.querySelector("body"))==null?void 0:tA.classList;$==="off"?rA==null||rA.add("disable-text-selection"):rA==null||rA.remove("disable-text-selection")}function placeItemOnGrid($,{rowStart:rA,rowEnd:tA,colStart:AA,colEnd:eA}){$.style.setProperty("--drag-grid-row-start",String(rA)),$.style.setProperty("--drag-grid-row-end",String(tA+1)),$.style.setProperty("--drag-grid-column-start",String(AA)),$.style.setProperty("--drag-grid-column-end",String(eA+1))}function AreaOverlay({area:$,gridLocation:rA,areas:tA,onNewPos:AA}){if(typeof rA>"u")throw new Error(`Item in ${$} is not in the location map`);const eA=React.useRef(null),nA=useResizeOnDrag({overlayRef:eA,gridLocation:rA,layoutAreas:tA,onDragEnd:AA}),oA=React.useMemo(()=>availableMoves({gridLocation:rA,layoutAreas:tA}),[rA,tA]),iA=React.useMemo(()=>{let lA=[];for(let aA of oA)lA.push(jsx("div",{className:mergeClasses(classes$l.dragger,aA),title:`resize ${$} ${aA}`,onMouseDown:sA=>{stopEventPropigation(sA),nA(aA)},children:resizeDirToArrow[aA]},aA));return lA},[$,oA,nA]);return React.useEffect(()=>{var lA;(lA=eA.current)==null||lA.style.setProperty("--grid-area",$)},[$]),jsx("div",{ref:eA,onClick:stopEventPropigation,className:classes$l.marker+" grid-area-overlay",children:iA})}function stopEventPropigation($){$.preventDefault(),$.stopPropagation()}const resizeDirToArrow={up:jsx(FaGripLines,{}),down:jsx(FaGripLines,{}),left:jsx(FaGripLinesVertical,{}),right:jsx(FaGripLinesVertical,{})};function itemBoundsInDir($,rA){switch(rA){case"rows":return{itemStart:$.rowStart,itemEnd:$.rowStart+$.rowSpan-1};case"cols":return{itemStart:$.colStart,itemEnd:$.colStart+$.colSpan-1}}}function getTractSizes({areas:$,row_sizes:rA=["1fr"],col_sizes:tA=["1fr"]}){const{numRows:AA,numCols:eA}=matrixDimensions($);return{rows:buildTractSizes(AA,rA,"row"),cols:buildTractSizes(eA,tA,"column")}}function buildTractSizes($,rA,tA){if(!Array.isArray(rA))return fillArr(rA,$);if($!==rA.length)throw new Error(`Number of ${tA} sizes does not match the number of ${tA}s in the areas template. Either make sure they match or use a single ${tA} size that will be repeated for all ${tA}s.`);return rA}function addTract($,{afterIndex:rA,size:tA,dir:AA}){return fn($,eA=>{const nA=AA==="rows"?"cols":"rows",oA=getTractSizes(eA);if(rA>oA[AA].length)throw new Error(`Can't add a tract after index ${rA}. Not enought tracts.`);if(rA<0)throw new Error("Cant add a tract at a negative index");const iA=areasToItemLocations(eA.areas);let lA=fillArr(emptyCell,oA[nA].length);iA.forEach((aA,sA)=>{const{itemStart:cA,itemEnd:pA}=itemBoundsInDir(aA,AA);if(cA<=rA&&pA>rA){const gA=itemBoundsInDir(aA,nA);for(let fA=gA.itemStart-1;fA1}function itemsContainedInTract($,{index:rA,dir:tA}){let AA=[];return $.forEach((eA,nA)=>{const oA=itemBoundsInDir(eA,tA);if(!oA)return;const{itemStart:iA,itemEnd:lA}=oA;iA===rA&&iA===lA&&AA.push(nA)}),AA}const ResizableGrid="_ResizableGrid_i4cq9_1",classes$k={ResizableGrid,"size-detection-cell":"_size-detection-cell_i4cq9_1"},cleanNumber=$=>Number($.toFixed(4)),minPx=40,minFrRatio=.15,roundTo=$=>rA=>Math.round(rA/$)*$,PX_ROUND_PRECISION=5,roundPixel=roundTo(PX_ROUND_PRECISION),FR_ROUND_PRECISION=.01,roundFr=roundTo(FR_ROUND_PRECISION);function dragBothRelative($,{pixelToFrRatio:rA,beforeInfo:tA,afterInfo:AA}){const eA=roundFr($*rA),nA=tA.count+eA,oA=AA.count-eA;return(eA<0?nA/oA:oA/nA)`"${eA.join(" ")}"`).join(` `),gridTemplateRows:rA.join(" "),gridTemplateColumns:tA.join(" "),"--grid-gap":AA}}function getTractSizesFromStyleDeclaration($){return $.split(" ")}function getAreaMatrixFromStyleDeclaration($){const rA=$.match(/"([.\w\s]+)"/g);if(!rA)throw new Error("Can't parse area definition");return rA.map(tA=>tA.replaceAll('"',"").split(" "))}function getLayoutFromGridElement($){const rA=getTractSizesFromStyleDeclaration($.style.gridTemplateRows),tA=getTractSizesFromStyleDeclaration($.style.gridTemplateColumns),AA=getAreaMatrixFromStyleDeclaration($.style.gridTemplateAreas),eA=$.style.getPropertyValue("--grid-gap");return{row_sizes:rA,col_sizes:tA,areas:AA,gap_size:eA}}function getTractSizesInPx({container:$,dir:rA}){return getComputedStyle($).getPropertyValue(rA==="rows"?"grid-template-rows":"grid-template-columns").split(" ").map(tA=>Number(tA.replaceAll("px","")))}function getDragInfo($,rA){const tA=getUnitInfo($),AA=rA===null?"missing":getUnitInfo(rA);if(tA.type==="pixel"&&(AA==="missing"||AA.type==="fr"))return{type:"before-pixel",beforeInfo:tA};if(AA==="missing")throw new Error("Somehow have a final tract drag without a pixel valued tract before....");return tA.type==="pixel"&&AA.type==="pixel"?{type:"both-pixel",beforeInfo:tA,afterInfo:AA}:tA.type==="fr"&&AA.type==="pixel"?{type:"after-pixel",afterInfo:AA}:tA.type==="fr"&&AA.type==="fr"?{type:"both-relative",beforeInfo:tA,afterInfo:AA}:{type:"unsupported"}}function getPxToFrRatioForRelativeTracts({container:$,index:rA,dir:tA,frCounts:AA}){const eA=getTractSizesInPx({container:$,dir:tA}),nA=eA[rA-2],oA=eA[rA-1];return(AA.before+AA.after)/(oA+nA)}function initDragState({mousePosition:$,dir:rA,index:tA,container:AA}){const eA=rA==="rows"?"gridTemplateRows":"gridTemplateColumns";let nA=AA.style[eA].split(" ");const oA=getHasAutoUnits(nA),iA=getHasRelativeUnits(nA);oA&&!iA&&(nA=getComputedStyle(AA).getPropertyValue(rA==="rows"?"grid-template-rows":"grid-template-columns").split(" ").slice(0,nA.length),AA.style[eA]=nA.join(" ")),oA&&iA&&console.warn("There's a mixture of auto and relative units in the grid. This may cause funky behavior on resize. To prevent this switch to only relative or auto units");const lA=tA-2,aA=lA+1;let sA=nA[lA],cA=aA>=nA.length?null:nA[aA];if(sA==="auto"||cA==="auto"){const gA=getComputedStyle(AA).getPropertyValue(rA==="rows"?"grid-template-rows":"grid-template-columns").split(" ");sA==="auto"&&(sA=gA[lA],nA[lA]=sA),cA==="auto"&&(cA=gA[aA],nA[aA]=cA),AA.style[eA]=gA.join(" ")}const pA=getDragInfo(sA,cA);if(pA.type==="unsupported")throw new Error("Unsupported drag type");AA.classList.add("been-dragged");const uA={dir:rA,mouseStart:getMousePosition($,rA),originalSizes:nA,currentSizes:[...nA],beforeIndex:lA,afterIndex:aA,...pA,pixelToFrRatio:1};return pA.type==="both-relative"&&(uA.pixelToFrRatio=getPxToFrRatioForRelativeTracts({container:AA,index:tA,dir:rA,frCounts:{before:pA.beforeInfo.count,after:pA.afterInfo.count}})),uA}function updateDragState({mousePosition:$,drag:rA,container:tA}){const eA=getMousePosition($,rA.dir)-rA.mouseStart,nA=[...rA.originalSizes];let oA;switch(rA.type){case"before-pixel":oA=dragPixelBefore(eA,rA);break;case"after-pixel":oA=dragPixelAfter(eA,rA);break;case"both-pixel":oA=dragBothPixel(eA,rA);break;case"both-relative":oA=dragBothRelative(eA,rA);break}oA!=="no-change"&&(oA.beforeSize&&(nA[rA.beforeIndex]=oA.beforeSize),oA.afterSize&&(nA[rA.afterIndex]=oA.afterSize),rA.currentSizes=nA,rA.dir==="cols"?tA.style.gridTemplateColumns=nA.join(" "):tA.style.gridTemplateRows=nA.join(" "))}function isPxUnit($){return $.match(/[0-9|.]+px/)!==null}function isFrUnit($){return $.match(/[0-9|.]+fr/)!==null}function getUnitInfo($){if(isFrUnit($))return{type:"fr",count:Number($.replace("fr","")),value:$};if(isPxUnit($))return{type:"pixel",count:Number($.replace("px","")),value:$};throw new Error("Unknown tract sizing unit: "+$)}function getMousePosition($,rA){return rA==="rows"?$.clientY:$.clientX}function getHasRelativeUnits($){return $.some(rA=>isFrUnit(rA))}function getHasAutoUnits($){return $.some(rA=>rA==="auto")}const tractInfoDisplay="_tractInfoDisplay_cvtwo_1",sizeWidget="_sizeWidget_cvtwo_61",cssSizeInput="_cssSizeInput_cvtwo_80",hoverListener="_hoverListener_cvtwo_94",buttons="_buttons_cvtwo_114",tractAddButton="_tractAddButton_cvtwo_127",deleteButton="_deleteButton_cvtwo_128",classes$j={tractInfoDisplay,sizeWidget,cssSizeInput,hoverListener,buttons,tractAddButton,deleteButton},ALLOWED_UNITS=["fr","px"];function TractInfoDisplay({dir:$,index:rA,size:tA,deletionConflicts:AA,addTract:eA,deleteTract:nA,changeUnit:oA,changeCount:iA}){const{unit:lA,count:aA}=parseCSSMeasure(tA);return jsxs("div",{className:classes$j.tractInfoDisplay,"data-drag-dir":$,style:{"--tract-index":rA+1},children:[jsx("div",{className:classes$j.hoverListener}),jsxs("div",{className:classes$j.sizeWidget,onClick:stopPropagation,children:[jsxs("div",{className:classes$j.buttons,children:[jsx(AddTractButton,{dir:$,onClick:()=>eA("before")}),jsx(DeleteTractButton,{dir:$,onClick:nA,deletionConflicts:AA}),jsx(AddTractButton,{dir:$,onClick:()=>eA("after")})]}),jsx("div",{className:classes$j.cssSizeInput,children:jsx(CSSUnitInputCore,{count:aA,unit:lA,onCountChange:iA,onUnitChange:oA,allowedUnits:ALLOWED_UNITS})})]})]})}function DeleteTractButton({dir:$,onClick:rA,deletionConflicts:tA}){const AA=$==="rows"?"right":"bottom",eA=tA.length===0,nA=eA?"Delete tract":`Can't delete because the items ${tA.join(",")} are entirely contained in tract`;return jsx(PopoverButton,{className:classes$j.deleteButton,onClick:removeFocusAfterClick(eA?rA:void 0),"data-enabled":eA,popoverContent:nA,placement:AA,variant:"icon",children:jsx(SvgTrash,{})})}function AddTractButton({dir:$,onClick:rA}){const tA=$==="rows"?"right":"bottom",AA=$==="rows"?"Add row":"Add column";return jsx(PopoverButton,{className:classes$j.tractAddButton,onClick:removeFocusAfterClick(rA),placement:tA,popoverContent:AA,variant:"icon",children:jsx(FaPlus,{})})}function removeFocusAfterClick($){return function(rA){rA.currentTarget.blur(),$==null||$()}}function getFrUnitSizeInPx($,rA){let tA=0,AA=0;for(let eA=0;eAconflictsToRemoveTract(AA,{dir:sA,index:cA+1}),[AA]),oA=sA=>cA=>{const{unit:pA}=parseCSSMeasure(rA[sA]);eA({type:"RESIZE",index:sA,dir:$,size:`${cA}${pA}`})},iA=sA=>cA=>{const pA=tA(),{count:uA}=parseCSSMeasure(rA[sA]);let gA=1;cA==="px"&&(gA=roundPixel(pA[sA]));const fA=getFrUnitSizeInPx(pA,rA);cA==="fr"&&fA!=="NO_FR_UNITS"&&(gA=cleanNumber(roundFr(uA?uA*fA:1))),eA({type:"RESIZE",index:sA,dir:$,size:`${gA}${cA}`})},lA=sA=>cA=>eA({type:"ADD",dir:$,index:cA==="before"?sA:sA+1}),aA=sA=>()=>{eA({type:"DELETE",dir:$,index:sA+1})};return jsx(Fragment,{children:rA.map((sA,cA)=>jsx(TractInfoDisplay,{index:cA,dir:$,addTract:lA(cA),deleteTract:aA(cA),changeUnit:iA(cA),changeCount:oA(cA),size:sA,deletionConflicts:nA({dir:$,index:cA})},$+cA))})}function stopPropagation($){$.stopPropagation()}function hideOrShowTractInfo($,rA){$.querySelectorAll(`.${classes$j.tractInfoDisplay}`).forEach(tA=>{tA.style.display=rA==="hide"?"none":"block"})}const columnSizer="_columnSizer_9b32k_1",rowSizer="_rowSizer_9b32k_2",classes$i={columnSizer,rowSizer};function TractSizerHandle({dir:$,index:rA,onStartDrag:tA}){return jsx("div",{className:$==="rows"?classes$i.rowSizer:classes$i.columnSizer,title:`resize ${$==="rows"?"rows":"columns"} ${rA-1} and ${rA}`,onMouseDown:AA=>tA({e:AA,dir:$,index:rA}),style:{[$==="rows"?"gridRow":"gridColumn"]:rA}})}function validateRef($,rA="Ref is not yet initialized"){if($.current===null)throw new Error(rA);return $.current}function useDragToResizeGrid({containerRef:$,onDragEnd:rA}){return React.useCallback(({e:AA,dir:eA,index:nA})=>{const oA=validateRef($,"How are you dragging on an element without a container?");AA.preventDefault();const iA=initDragState({mousePosition:AA,dir:eA,index:nA,container:oA}),{beforeIndex:lA,afterIndex:aA}=iA,sA=setupSizeFeedbackDisplay(oA,{dir:eA,index:lA,size:iA.currentSizes[lA]}),cA=setupSizeFeedbackDisplay(oA,{dir:eA,index:aA,size:iA.currentSizes[aA]});setupDragWatcherDiv(oA,iA.dir,{move:pA=>{updateDragState({mousePosition:pA,drag:iA,container:oA}),sA.update(iA.currentSizes[lA]),cA.update(iA.currentSizes[aA])},end:()=>{sA.remove(),cA.remove(),rA&&rA(getLayoutFromGridElement(oA))}})},[$,rA])}function setupSizeFeedbackDisplay($,{dir:rA,index:tA,size:AA}){const eA=document.createElement("div"),nA=rA==="rows"?{gridRow:String(tA+1),gridColumn:"1",flexDirection:"row"}:{gridColumn:String(tA+1),gridRow:"1",flexDirection:"column"};Object.assign(eA.style,nA,{zIndex:"1",display:"flex",alignItems:"center"});const oA=document.createElement("div");return Object.assign(oA.style,{padding:"3px 7px",borderRadius:"var(--corner-radius)",backgroundColor:"var(--light-grey, pink)"}),oA.innerHTML=AA,eA.appendChild(oA),$.appendChild(eA),hideOrShowTractInfo($,"hide"),{remove:()=>{eA.remove(),hideOrShowTractInfo($,"show")},update:iA=>{oA.innerHTML=iA}}}function setupDragWatcherDiv($,rA,tA){const AA=document.createElement("div");Object.assign(AA.style,{position:"fixed",inset:"0px",zIndex:"3",cursor:rA==="rows"?"ns-resize":"ew-resize"}),$.appendChild(AA);const eA=()=>{nA(),tA.end()};AA.addEventListener("mousemove",tA.move),AA.addEventListener("mouseup",eA),AA.addEventListener("mouseleave",eA);function nA(){AA.removeEventListener("mousemove",tA.move),AA.removeEventListener("mouseup",eA),AA.removeEventListener("mouseleave",eA),AA.remove()}}function cleanupLayoutArgs({areas:$,col_sizes:rA,row_sizes:tA,gap_size:AA}){return{areas:$,gap_size:AA,col_sizes:ensureArray$1(rA),row_sizes:ensureArray$1(tA)}}const NEW_TRACT_SIZE="1fr";function EditableGridContainer({className:$,children:rA,onNewLayout:tA,...AA}){AA=cleanupLayoutArgs(AA);let{row_sizes:eA,col_sizes:nA}=AA;const oA=reactExports.useRef(null),iA=layoutDefToStyles(AA),lA=nA.length<2?[]:buildRange(2,nA.length),aA=eA.length<2?[]:buildRange(2,eA.length),sA=useDragToResizeGrid({containerRef:oA,onDragEnd:tA}),cA=[classes$k.ResizableGrid];$&&cA.push($);const pA=reactExports.useCallback(fA=>{switch(fA.type){case"ADD":return addTract(AA,{afterIndex:fA.index,dir:fA.dir,size:NEW_TRACT_SIZE});case"RESIZE":return updateTractSize(AA,fA);case"DELETE":return removeTract(AA,fA)}},[AA]),uA=reactExports.useCallback(fA=>tA(pA(fA)),[pA,tA]),gA=reactExports.useCallback(fA=>{const wA=oA.current;return wA?getTractSizesInPx({container:wA,dir:fA}):[]},[]);return jsxs("div",{className:mergeClasses(...cA),ref:oA,style:iA,children:[lA.map(fA=>jsx(TractSizerHandle,{dir:"cols",index:fA,onStartDrag:sA},"cols"+fA)),aA.map(fA=>jsx(TractSizerHandle,{dir:"rows",index:fA,onStartDrag:sA},"rows"+fA)),rA,jsx(TractInfoDisplays,{dir:"cols",sizes:nA,getActualSizes:()=>gA("cols"),areas:AA.areas,onUpdate:uA}),jsx(TractInfoDisplays,{dir:"rows",sizes:eA,getActualSizes:()=>gA("rows"),areas:AA.areas,onUpdate:uA})]})}function updateTractSize($,{dir:rA,index:tA,size:AA}){return fn($,eA=>{eA[rA==="rows"?"row_sizes":"col_sizes"][tA]=AA})}const EditorSkeleton="_EditorSkeleton_obu7s_1",elements_panel="_elements_panel_obu7s_15",properties_panel="_properties_panel_obu7s_20",app_preview="_app_preview_obu7s_25",panel="_panel_obu7s_50",panel_title="_panel_title_obu7s_61",styles$b={EditorSkeleton,elements_panel,properties_panel,app_preview,panel,panel_title};function PanelHeader({children:$,className:rA=""}){return jsx("h3",{className:mergeClasses(rA,styles$b.panel_title),children:$})}const portalHolder="_portalHolder_qvrvc_1",portalModal="_portalModal_qvrvc_11",title$2="_title_qvrvc_21",body="_body_qvrvc_25",portalForm="_portalForm_qvrvc_30",portalFormInputs="_portalFormInputs_qvrvc_35",portalFormFooter="_portalFormFooter_qvrvc_42",validationMsg="_validationMsg_qvrvc_48",infoText="_infoText_qvrvc_53",classes$h={portalHolder,portalModal,title:title$2,body,portalForm,portalFormInputs,portalFormFooter,validationMsg,infoText};function PortalModal({children:$,title:rA,label:tA,onConfirm:AA,onCancel:eA}){return jsx(Portal,{children:jsx("div",{className:classes$h.portalHolder,onClick:()=>eA(),onKeyDown:nA=>{nA.key==="Escape"&&eA()},children:jsxs("div",{className:classes$h.portalModal,onClick:nA=>nA.stopPropagation(),"aria-label":tA??"popup modal",children:[rA?jsx(PanelHeader,{className:classes$h.title,children:rA}):null,jsx("div",{className:classes$h.body,children:$})]})})})}function NameNewPanelModal({onCancel:$,onDone:rA,existingAreaNames:tA}){const AA=`area${tA.length}`,[eA,nA]=React.useState(AA),[oA,iA]=React.useState(null),lA=React.useCallback(sA=>{sA&&sA.preventDefault();const cA=validateGridAreaName({name:eA,existingAreaNames:tA});if(cA){iA(cA);return}rA(eA)},[tA,eA,rA]),aA=React.useCallback(sA=>{sA.type!=="REMOVE"&&(iA(null),nA(sA.value))},[]);return jsxs(PortalModal,{title:"Name new grid area",label:"New grid area naming modal",onConfirm:()=>rA(eA),onCancel:$,children:[jsx("form",{className:classes$h.portalForm,onSubmit:lA,children:jsxs("div",{className:classes$h.portalFormInputs,children:[jsx("span",{className:classes$h.infoText,children:"Name for grid area needs to be unique, start with a letter, and contain only letters and numbers."}),jsx(SettingsInput,{label:"Name of new grid area",name:"New-Item-Name",inputType:"string",onUpdate:aA,value:eA,defaultValue:AA}),oA?jsx("div",{className:classes$h.validationMsg,children:oA}):null]})}),jsxs("div",{className:classes$h.portalFormFooter,children:[jsx(Button,{variant:"delete",onClick:$,children:"Cancel"}),jsx(Button,{onClick:()=>lA(),children:"Done"})]})]})}function validateGridAreaName({name:$,existingAreaNames:rA}){return $===""?"A name is needed for the grid area":rA.includes($)?`You already have an item with the name "${$}", all names diff --git a/inst/editor/build/index.html b/inst/editor/build/index.html index 79047ad96..927f05511 100644 --- a/inst/editor/build/index.html +++ b/inst/editor/build/index.html @@ -26,7 +26,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Shiny UI Editor - + diff --git a/inst/vscode-extension/shinyuieditor-0.5.1.vsix b/inst/vscode-extension/shinyuieditor-0.5.1.vsix index b54b90f53be3e51b189fef2b157df20d8e8b72d1..d4bb689eecddca7b52b967c37376468a853f1e49 100644 GIT binary patch delta 1009 zcmXZaO-vI(6bEp+v#pD?e6$6WqR1kC)DN&A3StqefIulI0-{J&C?M<{j2FFNV$7aM zj1AdndeEbZAu*T?F(gVn8BZ8Y6UDpnAQuk?V(~w3IsDT9zL_`Ox0$79i);xzJ)KPT zXJu(x)^sZI#?#6eei!;#y@S=I63M4(HycYOtY!a+Kr*9-WO1R!8MIg9E>49NS1lE+ z2f04|QBX63ngbMIpn?-zumj|JHtZBZEvI@=9${5Q3v@9P&lz5$NBMu|Mxz@%kPCT` zFE$zrLiuuwi4IW}^)}2?!@n6LV0Azey23m0itosW0 ziv9}Uk1|=J*{qKWFEYm?J~1BgYn5~)+5_h7gdYl_2#R4B?1mDM>!q*<_Cgu#gK{xD zp>IyoG4WU^U`;b#B0hZ4i|p_8`j=hvSf3f+Yn83)rL;G^s?#`PeN|slWXYUQ>resv zp%M(?1Vm@7ECS`Xrj&VPwb+;Iqsvdbo2jbJ3%l;75KrNhvIyeQV zp&lCG3^c-72tyN`gJx)f2%Lut&q*9Fp*#OIV{}rbV$0~FaCgh-pzwanXp>PbEpHw6Rx3~8VY+uc3U8zET-omWsci3wFdn0>ImY7@{xTk+5LS5;g@-EdqmWj) Y{Z=?9Aex-~w~Ol4Zf=iu&&}Ka1Ft%P*8l(j delta 1009 zcmXZaOH30%7zc2=)7C{=9&LF@5o9Yq>H{qJ0BaGdfIulI0#=c#C?M<{j2FFNV$7aM zj1AdnJP0=vLt-!)Vn~#DGM+G)CW;qN#)Diu7>LFHe9PgN{`Z^tzV2*h@#z9v1b24_ zv-`5LR5dFwn|SSRVGO_XeXQQbe#|6NPwZW+WHw(w3xRU@d{Kmi7JaDWrGfn3jq?INh=)C|ZGW_7GU6O+lD!Bu*c|7Wa+UEqdX z$b)>b9xe#w%Pj^vM0L#5Fh>plCUw8r9xEsm&o?~ZJhCS6HmaA>qe}0Ljg`(OQp--i zc~9XU(HHQ3uaG4=oB2WEMaD?fD@LL|wTecf-ET~d`k)YspcqPE2b6+bFN2*>4i&Hq zD#g^OwlPLylJSt=oM60Ey#K5fS>Nf^FRSJ@KQUfzR;*}cv^TP%(Q(Auingf8k};Ro zAOO3e3iiNW*a!O|2nXOG9D>7QE?sS;WOpiw<9