@micro-lc/preview 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/website/.vite/manifest.json +1 -1
- package/website/assets/index-5hug6TwQ.js +95 -0
- package/website/assets/{index-R8L7d4ZR.js → index-7T1ZCqRR.js} +2 -2
- package/website/development/.vite/manifest.json +1 -1
- package/website/development/assets/index-rbglf7s6.js +68220 -0
- package/website/development/assets/{index--zmXJhVL.js → index-xE-oRO06.js} +16 -12
- package/website/development/index.html +1 -1
- package/website/index.html +1 -1
@@ -84,9 +84,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
84
84
|
The above lifecycles should be removed. Learn more about this warning here:
|
85
85
|
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof j.getDerivedStateFromProps=="function"&&(F.componentWillMount=x,F.componentWillReceiveProps=M),typeof F.getSnapshotBeforeUpdate=="function"){if(typeof F.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");F.componentWillUpdate=T;var re=F.componentDidUpdate;F.componentDidUpdate=function(G,pe,Te){var Ye=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Te;re.call(this,G,pe,Ye)}}return j}function H(j,F){if(j==null)return{};var C,E,P=function(ie,re){if(ie==null)return{};var G,pe,Te={},Ye=Object.keys(ie);for(pe=0;pe<Ye.length;pe++)G=Ye[pe],re.indexOf(G)>=0||(Te[G]=ie[G]);return Te}(j,F);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(j);for(E=0;E<X.length;E++)C=X[E],F.indexOf(C)>=0||Object.prototype.propertyIsEnumerable.call(j,C)&&(P[C]=j[C])}return P}function O(j){var F=function(C){return{}.toString.call(C).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(j);return F==="number"&&(F=isNaN(j)?"nan":(0|j)!=j?"float":"integer"),F}x.__suppressDeprecationWarning=!0,M.__suppressDeprecationWarning=!0,T.__suppressDeprecationWarning=!0;var D={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},Q={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"},W={white:"#fff",black:"#000",transparent:"rgba(1, 1, 1, 0)",globalFontFamily:"monospace",globalCursor:"default",indentBlockWidth:"5px",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyBorderRadius:"3px",keyColonWeight:"bold",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",keyValPaddingHover:"3px 5px 3px 4px",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedFontWeight:"bold",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px"},ue=i(45),J=function(j){var F=function(C){return{backgroundColor:C.base00,ellipsisColor:C.base09,braceColor:C.base07,expandedIcon:C.base0D,collapsedIcon:C.base0E,keyColor:C.base07,arrayKeyColor:C.base0C,objectSize:C.base04,copyToClipboard:C.base0F,copyToClipboardCheck:C.base0D,objectBorder:C.base02,dataTypes:{boolean:C.base0E,date:C.base0D,float:C.base0B,function:C.base0D,integer:C.base0F,string:C.base09,nan:C.base08,null:C.base0A,undefined:C.base05,regexp:C.base0A,background:C.base02},editVariable:{editIcon:C.base0E,cancelIcon:C.base09,removeIcon:C.base09,addIcon:C.base0E,checkIcon:C.base0E,background:C.base01,color:C.base0A,border:C.base07},addKeyModal:{background:C.base05,border:C.base04,color:C.base0A,labelColor:C.base01},validationFailure:{background:C.base09,iconColor:C.base01,fontColor:C.base01}}}(j);return{"app-container":{fontFamily:W.globalFontFamily,cursor:W.globalCursor,backgroundColor:F.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:F.ellipsisColor,fontSize:W.ellipsisFontSize,lineHeight:W.ellipsisLineHeight,cursor:W.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:W.braceCursor,fontWeight:W.braceFontWeight,color:F.braceColor},"expanded-icon":{color:F.expandedIcon},"collapsed-icon":{color:F.collapsedIcon},colon:{display:"inline-block",margin:W.keyMargin,color:F.keyColor,verticalAlign:"top"},objectKeyVal:function(C,E){return{style:c({paddingTop:W.keyValPaddingTop,paddingRight:W.keyValPaddingRight,paddingBottom:W.keyValPaddingBottom,borderLeft:W.keyValBorderLeft+" "+F.objectBorder,":hover":{paddingLeft:E.paddingLeft-1+"px",borderLeft:W.keyValBorderHover+" "+F.objectBorder}},E)}},"object-key-val-no-border":{padding:W.keyValPadding},"pushed-content":{marginLeft:W.pushedContentMarginLeft},variableValue:function(C,E){return{style:c({display:"inline-block",paddingRight:W.variableValuePaddingRight,position:"relative"},E)}},"object-name":{display:"inline-block",color:F.keyColor,letterSpacing:W.keyLetterSpacing,fontStyle:W.keyFontStyle,verticalAlign:W.keyVerticalAlign,opacity:W.keyOpacity,":hover":{opacity:W.keyOpacityHover}},"array-key":{display:"inline-block",color:F.arrayKeyColor,letterSpacing:W.keyLetterSpacing,fontStyle:W.keyFontStyle,verticalAlign:W.keyVerticalAlign,opacity:W.keyOpacity,":hover":{opacity:W.keyOpacityHover}},"object-size":{color:F.objectSize,borderRadius:W.objectSizeBorderRadius,fontStyle:W.objectSizeFontStyle,margin:W.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:W.dataTypeFontSize,marginRight:W.dataTypeMarginRight,opacity:W.datatypeOpacity},boolean:{display:"inline-block",color:F.dataTypes.boolean},date:{display:"inline-block",color:F.dataTypes.date},"date-value":{marginLeft:W.dateValueMarginLeft},float:{display:"inline-block",color:F.dataTypes.float},function:{display:"inline-block",color:F.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:F.dataTypes.integer},string:{display:"inline-block",color:F.dataTypes.string},nan:{display:"inline-block",color:F.dataTypes.nan,fontSize:W.nanFontSize,fontWeight:W.nanFontWeight,backgroundColor:F.dataTypes.background,padding:W.nanPadding,borderRadius:W.nanBorderRadius},null:{display:"inline-block",color:F.dataTypes.null,fontSize:W.nullFontSize,fontWeight:W.nullFontWeight,backgroundColor:F.dataTypes.background,padding:W.nullPadding,borderRadius:W.nullBorderRadius},undefined:{display:"inline-block",color:F.dataTypes.undefined,fontSize:W.undefinedFontSize,padding:W.undefinedPadding,borderRadius:W.undefinedBorderRadius,backgroundColor:F.dataTypes.background},regexp:{display:"inline-block",color:F.dataTypes.regexp},"copy-to-clipboard":{cursor:W.clipboardCursor},"copy-icon":{color:F.copyToClipboard,fontSize:W.iconFontSize,marginRight:W.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:F.copyToClipboardCheck,marginLeft:W.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:W.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:W.metaDataPadding},"icon-container":{display:"inline-block",width:W.iconContainerWidth},tooltip:{padding:W.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:F.editVariable.removeIcon,cursor:W.iconCursor,fontSize:W.iconFontSize,marginRight:W.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:F.editVariable.addIcon,cursor:W.iconCursor,fontSize:W.iconFontSize,marginRight:W.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:F.editVariable.editIcon,cursor:W.iconCursor,fontSize:W.iconFontSize,marginRight:W.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:W.iconCursor,color:F.editVariable.checkIcon,fontSize:W.iconFontSize,paddingRight:W.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:W.iconCursor,color:F.editVariable.cancelIcon,fontSize:W.iconFontSize,paddingRight:W.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:W.editInputMinWidth,borderRadius:W.editInputBorderRadius,backgroundColor:F.editVariable.background,color:F.editVariable.color,padding:W.editInputPadding,marginRight:W.editInputMarginRight,fontFamily:W.editInputFontFamily},"detected-row":{paddingTop:W.detectedRowPaddingTop},"key-modal-request":{position:W.addKeyCoverPosition,top:W.addKeyCoverPositionPx,left:W.addKeyCoverPositionPx,right:W.addKeyCoverPositionPx,bottom:W.addKeyCoverPositionPx,backgroundColor:W.addKeyCoverBackground},"key-modal":{width:W.addKeyModalWidth,backgroundColor:F.addKeyModal.background,marginLeft:W.addKeyModalMargin,marginRight:W.addKeyModalMargin,padding:W.addKeyModalPadding,borderRadius:W.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:F.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:F.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:F.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:F.addKeyModal.labelColor,fontSize:W.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:F.editVariable.addIcon,fontSize:W.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:F.ellipsisColor,fontSize:W.ellipsisFontSize,lineHeight:W.ellipsisLineHeight,cursor:W.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:F.validationFailure.fontColor,backgroundColor:F.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:F.validationFailure.iconColor,fontSize:W.iconFontSize,transform:"rotate(45deg)"}}};function K(j,F,C){return j||console.error("theme has not been set"),function(E){var P=D;return E!==!1&&E!=="none"||(P=Q),Object(ue.createStyling)(J,{defaultBase16:P})(E)}(j)(F,C)}var fe=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=(E.rjvId,E.type_name),X=E.displayDataTypes,ie=E.theme;return X?p.a.createElement("span",Object.assign({className:"data-type-label"},K(ie,"data-type-label")),P):null}}]),C}(p.a.PureComponent),oe=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props;return p.a.createElement("div",K(E.theme,"boolean"),p.a.createElement(fe,Object.assign({type_name:"bool"},E)),E.value?"true":"false")}}]),C}(p.a.PureComponent),ge=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props;return p.a.createElement("div",K(E.theme,"date"),p.a.createElement(fe,Object.assign({type_name:"date"},E)),p.a.createElement("span",Object.assign({className:"date-value"},K(E.theme,"date-value")),E.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}]),C}(p.a.PureComponent),k=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props;return p.a.createElement("div",K(E.theme,"float"),p.a.createElement(fe,Object.assign({type_name:"float"},E)),this.props.value)}}]),C}(p.a.PureComponent);function ze(j,F){(F==null||F>j.length)&&(F=j.length);for(var C=0,E=new Array(F);C<F;C++)E[C]=j[C];return E}function Se(j,F){if(j){if(typeof j=="string")return ze(j,F);var C=Object.prototype.toString.call(j).slice(8,-1);return C==="Object"&&j.constructor&&(C=j.constructor.name),C==="Map"||C==="Set"?Array.from(j):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?ze(j,F):void 0}}function R(j,F){var C;if(typeof Symbol>"u"||j[Symbol.iterator]==null){if(Array.isArray(j)||(C=Se(j))||F&&j&&typeof j.length=="number"){C&&(j=C);var E=0,P=function(){};return{s:P,n:function(){return E>=j.length?{done:!0}:{done:!1,value:j[E++]}},e:function(G){throw G},f:P}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
86
86
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var X,ie=!0,re=!1;return{s:function(){C=j[Symbol.iterator]()},n:function(){var G=C.next();return ie=G.done,G},e:function(G){re=!0,X=G},f:function(){try{ie||C.return==null||C.return()}finally{if(re)throw X}}}}function He(j){return function(F){if(Array.isArray(F))return ze(F)}(j)||function(F){if(typeof Symbol<"u"&&Symbol.iterator in Object(F))return Array.from(F)}(j)||Se(j)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
87
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var Ze=i(46),je=new(i(47)).Dispatcher,at=new(function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).objects={},E.set=function(re,G,pe,Te){E.objects[re]===void 0&&(E.objects[re]={}),E.objects[re][G]===void 0&&(E.objects[re][G]={}),E.objects[re][G][pe]=Te},E.get=function(re,G,pe,Te){return E.objects[re]===void 0||E.objects[re][G]===void 0||E.objects[re][G][pe]==null?Te:E.objects[re][G][pe]},E.handleAction=function(re){var G=re.rjvId,pe=re.data;switch(re.name){case"RESET":E.emit("reset-"+G);break;case"VARIABLE_UPDATED":re.data.updated_src=E.updateSrc(G,pe),E.set(G,"action","variable-update",c(c({},pe),{},{type:"variable-edited"})),E.emit("variable-update-"+G);break;case"VARIABLE_REMOVED":re.data.updated_src=E.updateSrc(G,pe),E.set(G,"action","variable-update",c(c({},pe),{},{type:"variable-removed"})),E.emit("variable-update-"+G);break;case"VARIABLE_ADDED":re.data.updated_src=E.updateSrc(G,pe),E.set(G,"action","variable-update",c(c({},pe),{},{type:"variable-added"})),E.emit("variable-update-"+G);break;case"ADD_VARIABLE_KEY_REQUEST":E.set(G,"action","new-key-request",pe),E.emit("add-key-request-"+G)}},E.updateSrc=function(re,G){var pe=G.name,Te=G.namespace,Ye=G.new_value,it=(G.existing_value,G.variable_removed);Te.shift();var ft,Qe=E.get(re,"global","src"),dt=E.deepCopy(Qe,He(Te)),kt=dt,Re=R(Te);try{for(Re.s();!(ft=Re.n()).done;)kt=kt[ft.value]}catch(V){Re.e(V)}finally{Re.f()}return it?O(kt)=="array"?kt.splice(pe,1):delete kt[pe]:pe!==null?kt[pe]=Ye:dt=Ye,E.set(re,"global","src",dt),dt},E.deepCopy=function(re,G){var pe,Te=O(re),Ye=G.shift();return Te=="array"?pe=He(re):Te=="object"&&(pe=c({},re)),Ye!==void 0&&(pe[Ye]=E.deepCopy(re[Ye],G)),pe},E}return C}(Ze.EventEmitter));je.register(at.handleAction.bind(at));var $=at,I=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).toggleCollapsed=function(){P.setState({collapsed:!P.state.collapsed},function(){$.set(P.props.rjvId,P.props.namespace,"collapsed",P.state.collapsed)})},P.getFunctionDisplay=function(X){var ie=z(P).props;return X?p.a.createElement("span",null,P.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),p.a.createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},p.a.createElement("span",null,"{"),p.a.createElement("span",K(ie.theme,"ellipsis"),"..."),p.a.createElement("span",null,"}"))):P.props.value.toString().slice(9,-1)},P.state={collapsed:$.get(E.rjvId,E.namespace,"collapsed",!0)},P}return f(C,[{key:"render",value:function(){var E=this.props,P=this.state.collapsed;return p.a.createElement("div",K(E.theme,"function"),p.a.createElement(fe,Object.assign({type_name:"function"},E)),p.a.createElement("span",Object.assign({},K(E.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(P)))}}]),C}(p.a.PureComponent),B=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){return p.a.createElement("div",K(this.props.theme,"nan"),"NaN")}}]),C}(p.a.PureComponent),le=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){return p.a.createElement("div",K(this.props.theme,"null"),"NULL")}}]),C}(p.a.PureComponent),xe=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props;return p.a.createElement("div",K(E.theme,"integer"),p.a.createElement(fe,Object.assign({type_name:"int"},E)),this.props.value)}}]),C}(p.a.PureComponent),be=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props;return p.a.createElement("div",K(E.theme,"regexp"),p.a.createElement(fe,Object.assign({type_name:"regexp"},E)),this.props.value.toString())}}]),C}(p.a.PureComponent),We=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).toggleCollapsed=function(){P.setState({collapsed:!P.state.collapsed},function(){$.set(P.props.rjvId,P.props.namespace,"collapsed",P.state.collapsed)})},P.state={collapsed:$.get(E.rjvId,E.namespace,"collapsed",!0)},P}return f(C,[{key:"render",value:function(){this.state.collapsed;var E=this.props,P=E.collapseStringsAfterLength,X=E.theme,ie=E.value,re={style:{cursor:"default"}};return O(P)==="integer"&&ie.length>P&&(re.style.cursor="pointer",this.state.collapsed&&(ie=p.a.createElement("span",null,ie.substring(0,P),p.a.createElement("span",K(X,"ellipsis")," ...")))),p.a.createElement("div",K(X,"string"),p.a.createElement(fe,Object.assign({type_name:"string"},E)),p.a.createElement("span",Object.assign({className:"string-value"},re,{onClick:this.toggleCollapsed}),'"',ie,'"'))}}]),C}(p.a.PureComponent),Le=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){return p.a.createElement("div",K(this.props.theme,"undefined"),"undefined")}}]),C}(p.a.PureComponent);function Je(){return(Je=Object.assign||function(j){for(var F=1;F<arguments.length;F++){var C=arguments[F];for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&(j[E]=C[E])}return j}).apply(this,arguments)}var wt=_.useLayoutEffect,Ut=function(j){var F=Object(_.useRef)(j);return wt(function(){F.current=j}),F},Mt=function(j,F){typeof j!="function"?j.current=F:j(F)},Er=function(j,F){var C=Object(_.useRef)();return Object(_.useCallback)(function(E){j.current=E,C.current&&Mt(C.current,null),C.current=F,F&&Mt(F,E)},[F])},ot={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},cn=function(j){Object.keys(ot).forEach(function(F){j.style.setProperty(F,ot[F],"important")})},De=null,pr=function(){},se=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],L=!!document.documentElement.currentStyle,N=function(j,F){var C=j.cacheMeasurements,E=j.maxRows,P=j.minRows,X=j.onChange,ie=X===void 0?pr:X,re=j.onHeightChange,G=re===void 0?pr:re,pe=function(Re,V){if(Re==null)return{};var Y,ae,we={},he=Object.keys(Re);for(ae=0;ae<he.length;ae++)Y=he[ae],V.indexOf(Y)>=0||(we[Y]=Re[Y]);return we}(j,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),Te,Ye=pe.value!==void 0,it=Object(_.useRef)(null),ft=Er(it,F),Qe=Object(_.useRef)(0),dt=Object(_.useRef)(),kt=function(){var Re=it.current,V=C&&dt.current?dt.current:function(he){var me=window.getComputedStyle(he);if(me===null)return null;var Oe,ke=(Oe=me,se.reduce(function(Ee,ve){return Ee[ve]=Oe[ve],Ee},{})),Be=ke.boxSizing;return Be===""?null:(L&&Be==="border-box"&&(ke.width=parseFloat(ke.width)+parseFloat(ke.borderRightWidth)+parseFloat(ke.borderLeftWidth)+parseFloat(ke.paddingRight)+parseFloat(ke.paddingLeft)+"px"),{sizingStyle:ke,paddingSize:parseFloat(ke.paddingBottom)+parseFloat(ke.paddingTop),borderSize:parseFloat(ke.borderBottomWidth)+parseFloat(ke.borderTopWidth)})}(Re);if(V){dt.current=V;var Y=function(he,me,Oe,ke){Oe===void 0&&(Oe=1),ke===void 0&&(ke=1/0),De||((De=document.createElement("textarea")).setAttribute("tab-index","-1"),De.setAttribute("aria-hidden","true"),cn(De)),De.parentNode===null&&document.body.appendChild(De);var Be=he.paddingSize,Ee=he.borderSize,ve=he.sizingStyle,S=ve.boxSizing;Object.keys(ve).forEach(function(vr){var vt=vr;De.style[vt]=ve[vt]}),cn(De),De.value=me;var un=function(vr,vt){var Tr=vr.scrollHeight;return vt.sizingStyle.boxSizing==="border-box"?Tr+vt.borderSize:Tr-vt.paddingSize}(De,he);De.value="x";var Ht=De.scrollHeight-Be,Bt=Ht*Oe;S==="border-box"&&(Bt=Bt+Be+Ee),un=Math.max(Bt,un);var yn=Ht*ke;return S==="border-box"&&(yn=yn+Be+Ee),[un=Math.min(yn,un),Ht]}(V,Re.value||Re.placeholder||"x",P,E),ae=Y[0],we=Y[1];Qe.current!==ae&&(Qe.current=ae,Re.style.setProperty("height",ae+"px","important"),G(ae,{rowHeight:we}))}};return Object(_.useLayoutEffect)(kt),Te=Ut(kt),Object(_.useLayoutEffect)(function(){var Re=function(V){Te.current(V)};return window.addEventListener("resize",Re),function(){window.removeEventListener("resize",Re)}},[]),Object(_.createElement)("textarea",Je({},pe,{onChange:function(Re){Ye||kt(),ie(Re)},ref:ft}))},Z=Object(_.forwardRef)(N);function ce(j){j=j.trim();try{if((j=JSON.stringify(JSON.parse(j)))[0]==="[")return _e("array",JSON.parse(j));if(j[0]==="{")return _e("object",JSON.parse(j));if(j.match(/\-?\d+\.\d+/)&&j.match(/\-?\d+\.\d+/)[0]===j)return _e("float",parseFloat(j));if(j.match(/\-?\d+e-\d+/)&&j.match(/\-?\d+e-\d+/)[0]===j)return _e("float",Number(j));if(j.match(/\-?\d+/)&&j.match(/\-?\d+/)[0]===j)return _e("integer",parseInt(j));if(j.match(/\-?\d+e\+\d+/)&&j.match(/\-?\d+e\+\d+/)[0]===j)return _e("integer",Number(j))}catch{}switch(j=j.toLowerCase()){case"undefined":return _e("undefined",void 0);case"nan":return _e("nan",NaN);case"null":return _e("null",null);case"true":return _e("boolean",!0);case"false":return _e("boolean",!1);default:if(j=Date.parse(j))return _e("date",new Date(j))}return _e(!1,null)}function _e(j,F){return{type:j,value:F}}var Ae=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}]),C}(p.a.PureComponent),Ve=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}]),C}(p.a.PureComponent),Ge=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]),ie=et(P).style;return p.a.createElement("span",X,p.a.createElement("svg",{fill:ie.color,width:ie.height,height:ie.width,style:ie,viewBox:"0 0 1792 1792"},p.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),C}(p.a.PureComponent),ht=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]),ie=et(P).style;return p.a.createElement("span",X,p.a.createElement("svg",{fill:ie.color,width:ie.height,height:ie.width,style:ie,viewBox:"0 0 1792 1792"},p.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),C}(p.a.PureComponent),ut=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",{style:c(c({},et(P).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},p.a.createElement("path",{d:"M0 14l6-6-6-6z"})))}}]),C}(p.a.PureComponent),ct=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",{style:c(c({},et(P).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},p.a.createElement("path",{d:"M0 5l6 6 6-6z"})))}}]),C}(p.a.PureComponent),rt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}]),C}(p.a.PureComponent),bt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),C}(p.a.PureComponent),Nt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),C}(p.a.PureComponent),sn=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}]),C}(p.a.PureComponent),Zt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}]),C}(p.a.PureComponent),Tt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),C}(p.a.PureComponent);function et(j){return j||(j={}),{style:c(c({verticalAlign:"middle"},j),{},{color:j.color?j.color:"#000000",height:"1em",width:"1em"})}}var Lt=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).copiedTimer=null,P.handleCopy=function(){var X=document.createElement("textarea"),ie=P.props,re=ie.clickCallback,G=ie.src,pe=ie.namespace;X.innerHTML=JSON.stringify(P.clipboardValue(G),null," "),document.body.appendChild(X),X.select(),document.execCommand("copy"),document.body.removeChild(X),P.copiedTimer=setTimeout(function(){P.setState({copied:!1})},5500),P.setState({copied:!0},function(){typeof re=="function"&&re({src:G,namespace:pe,name:pe[pe.length-1]})})},P.getClippyIcon=function(){var X=P.props.theme;return P.state.copied?p.a.createElement("span",null,p.a.createElement(rt,Object.assign({className:"copy-icon"},K(X,"copy-icon"))),p.a.createElement("span",K(X,"copy-icon-copied"),"✔")):p.a.createElement(rt,Object.assign({className:"copy-icon"},K(X,"copy-icon")))},P.clipboardValue=function(X){switch(O(X)){case"function":case"regexp":return X.toString();default:return X}},P.state={copied:!1},P}return f(C,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var E=this.props,P=(E.src,E.theme),X=E.hidden,ie=E.rowHovered,re=K(P,"copy-to-clipboard").style,G="inline";return X&&(G="none"),p.a.createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:ie?"inline-block":"none"}},p.a.createElement("span",{style:c(c({},re),{},{display:G}),onClick:this.handleCopy},this.getClippyIcon()))}}]),C}(p.a.PureComponent),Jt=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).getEditIcon=function(){var X=P.props,ie=X.variable,re=X.theme;return p.a.createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:P.state.hovered?"inline-block":"none"}},p.a.createElement(Zt,Object.assign({className:"click-to-edit-icon"},K(re,"editVarIcon"),{onClick:function(){P.prepopInput(ie)}})))},P.prepopInput=function(X){if(P.props.onEdit!==!1){var ie=function(G){var pe;switch(O(G)){case"undefined":pe="undefined";break;case"nan":pe="NaN";break;case"string":pe=G;break;case"date":case"function":case"regexp":pe=G.toString();break;default:try{pe=JSON.stringify(G,null," ")}catch{pe=""}}return pe}(X.value),re=ce(ie);P.setState({editMode:!0,editValue:ie,parsedInput:{type:re.type,value:re.value}})}},P.getRemoveIcon=function(){var X=P.props,ie=X.variable,re=X.namespace,G=X.theme,pe=X.rjvId;return p.a.createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:P.state.hovered?"inline-block":"none"}},p.a.createElement(bt,Object.assign({className:"click-to-remove-icon"},K(G,"removeVarIcon"),{onClick:function(){je.dispatch({name:"VARIABLE_REMOVED",rjvId:pe,data:{name:ie.name,namespace:re,existing_value:ie.value,variable_removed:!0}})}})))},P.getValue=function(X,ie){var re=!ie&&X.type,G=z(P).props;switch(re){case!1:return P.getEditInput();case"string":return p.a.createElement(We,Object.assign({value:X.value},G));case"integer":return p.a.createElement(xe,Object.assign({value:X.value},G));case"float":return p.a.createElement(k,Object.assign({value:X.value},G));case"boolean":return p.a.createElement(oe,Object.assign({value:X.value},G));case"function":return p.a.createElement(I,Object.assign({value:X.value},G));case"null":return p.a.createElement(le,G);case"nan":return p.a.createElement(B,G);case"undefined":return p.a.createElement(Le,G);case"date":return p.a.createElement(ge,Object.assign({value:X.value},G));case"regexp":return p.a.createElement(be,Object.assign({value:X.value},G));default:return p.a.createElement("div",{className:"object-value"},JSON.stringify(X.value))}},P.getEditInput=function(){var X=P.props.theme,ie=P.state.editValue;return p.a.createElement("div",null,p.a.createElement(Z,Object.assign({type:"text",inputRef:function(re){return re&&re.focus()},value:ie,className:"variable-editor",onChange:function(re){var G=re.target.value,pe=ce(G);P.setState({editValue:G,parsedInput:{type:pe.type,value:pe.value}})},onKeyDown:function(re){switch(re.key){case"Escape":P.setState({editMode:!1,editValue:""});break;case"Enter":(re.ctrlKey||re.metaKey)&&P.submitEdit(!0)}re.stopPropagation()},placeholder:"update this value",minRows:2},K(X,"edit-input"))),p.a.createElement("div",K(X,"edit-icon-container"),p.a.createElement(bt,Object.assign({className:"edit-cancel"},K(X,"cancel-icon"),{onClick:function(){P.setState({editMode:!1,editValue:""})}})),p.a.createElement(Tt,Object.assign({className:"edit-check string-value"},K(X,"check-icon"),{onClick:function(){P.submitEdit()}})),p.a.createElement("div",null,P.showDetected())))},P.submitEdit=function(X){var ie=P.props,re=ie.variable,G=ie.namespace,pe=ie.rjvId,Te=P.state,Ye=Te.editValue,it=Te.parsedInput,ft=Ye;X&&it.type&&(ft=it.value),P.setState({editMode:!1}),je.dispatch({name:"VARIABLE_UPDATED",rjvId:pe,data:{name:re.name,namespace:G,existing_value:re.value,new_value:ft,variable_removed:!1}})},P.showDetected=function(){var X=P.props,ie=X.theme,re=(X.variable,X.namespace,X.rjvId,P.state.parsedInput),G=(re.type,re.value,P.getDetectedInput());if(G)return p.a.createElement("div",null,p.a.createElement("div",K(ie,"detected-row"),G,p.a.createElement(Tt,{className:"edit-check detected",style:c({verticalAlign:"top",paddingLeft:"3px"},K(ie,"check-icon").style),onClick:function(){P.submitEdit(!0)}})))},P.getDetectedInput=function(){var X=P.state.parsedInput,ie=X.type,re=X.value,G=z(P).props,pe=G.theme;if(ie!==!1)switch(ie.toLowerCase()){case"object":return p.a.createElement("span",null,p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"{"),p.a.createElement("span",{style:c(c({},K(pe,"ellipsis").style),{},{cursor:"default"})},"..."),p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"}"));case"array":return p.a.createElement("span",null,p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"["),p.a.createElement("span",{style:c(c({},K(pe,"ellipsis").style),{},{cursor:"default"})},"..."),p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"]"));case"string":return p.a.createElement(We,Object.assign({value:re},G));case"integer":return p.a.createElement(xe,Object.assign({value:re},G));case"float":return p.a.createElement(k,Object.assign({value:re},G));case"boolean":return p.a.createElement(oe,Object.assign({value:re},G));case"function":return p.a.createElement(I,Object.assign({value:re},G));case"null":return p.a.createElement(le,G);case"nan":return p.a.createElement(B,G);case"undefined":return p.a.createElement(Le,G);case"date":return p.a.createElement(ge,Object.assign({value:new Date(re)},G))}},P.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},P}return f(C,[{key:"render",value:function(){var E=this,P=this.props,X=P.variable,ie=P.singleIndent,re=P.type,G=P.theme,pe=P.namespace,Te=P.indentWidth,Ye=P.enableClipboard,it=P.onEdit,ft=P.onDelete,Qe=P.onSelect,dt=P.displayArrayKey,kt=P.quotesOnKeys,Re=this.state.editMode;return p.a.createElement("div",Object.assign({},K(G,"objectKeyVal",{paddingLeft:Te*ie}),{onMouseEnter:function(){return E.setState(c(c({},E.state),{},{hovered:!0}))},onMouseLeave:function(){return E.setState(c(c({},E.state),{},{hovered:!1}))},className:"variable-row",key:X.name}),re=="array"?dt?p.a.createElement("span",Object.assign({},K(G,"array-key"),{key:X.name+"_"+pe}),X.name,p.a.createElement("div",K(G,"colon"),":")):null:p.a.createElement("span",null,p.a.createElement("span",Object.assign({},K(G,"object-name"),{className:"object-key",key:X.name+"_"+pe}),!!kt&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"'),p.a.createElement("span",{style:{display:"inline-block"}},X.name),!!kt&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"')),p.a.createElement("span",K(G,"colon"),":")),p.a.createElement("div",Object.assign({className:"variable-value",onClick:Qe===!1&&it===!1?null:function(V){var Y=He(pe);(V.ctrlKey||V.metaKey)&&it!==!1?E.prepopInput(X):Qe!==!1&&(Y.shift(),Qe(c(c({},X),{},{namespace:Y})))}},K(G,"variableValue",{cursor:Qe===!1?"default":"pointer"})),this.getValue(X,Re)),Ye?p.a.createElement(Lt,{rowHovered:this.state.hovered,hidden:Re,src:X.value,clickCallback:Ye,theme:G,namespace:[].concat(He(pe),[X.name])}):null,it!==!1&&Re==0?this.getEditIcon():null,ft!==!1&&Re==0?this.getRemoveIcon():null)}}]),C}(p.a.PureComponent),Jn=function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).getObjectSize=function(){var re=E.props,G=re.size,pe=re.theme;if(re.displayObjectSize)return p.a.createElement("span",Object.assign({className:"object-size"},K(pe,"object-size")),G," item",G===1?"":"s")},E.getAddAttribute=function(re){var G=E.props,pe=G.theme,Te=G.namespace,Ye=G.name,it=G.src,ft=G.rjvId,Qe=G.depth;return p.a.createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:re?"inline-block":"none"}},p.a.createElement(Nt,Object.assign({className:"click-to-add-icon"},K(pe,"addVarIcon"),{onClick:function(){var dt={name:Qe>0?Ye:null,namespace:Te.splice(0,Te.length-1),existing_value:it,variable_removed:!1,key_name:null};O(it)==="object"?je.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:ft,data:dt}):je.dispatch({name:"VARIABLE_ADDED",rjvId:ft,data:c(c({},dt),{},{new_value:[].concat(He(it),[null])})})}})))},E.getRemoveObject=function(re){var G=E.props,pe=G.theme,Te=(G.hover,G.namespace),Ye=G.name,it=G.src,ft=G.rjvId;if(Te.length!==1)return p.a.createElement("span",{className:"click-to-remove",style:{display:re?"inline-block":"none"}},p.a.createElement(bt,Object.assign({className:"click-to-remove-icon"},K(pe,"removeVarIcon"),{onClick:function(){je.dispatch({name:"VARIABLE_REMOVED",rjvId:ft,data:{name:Ye,namespace:Te.splice(0,Te.length-1),existing_value:it,variable_removed:!0}})}})))},E.render=function(){var re=E.props,G=re.theme,pe=re.onDelete,Te=re.onAdd,Ye=re.enableClipboard,it=re.src,ft=re.namespace,Qe=re.rowHovered;return p.a.createElement("div",Object.assign({},K(G,"object-meta-data"),{className:"object-meta-data",onClick:function(dt){dt.stopPropagation()}}),E.getObjectSize(),Ye?p.a.createElement(Lt,{rowHovered:Qe,clickCallback:Ye,src:it,theme:G,namespace:ft}):null,Te!==!1?E.getAddAttribute(Qe):null,pe!==!1?E.getRemoveObject(Qe):null)},E}return C}(p.a.PureComponent);function En(j){var F=j.parent_type,C=j.namespace,E=j.quotesOnKeys,P=j.theme,X=j.jsvRoot,ie=j.name,re=j.displayArrayKey,G=j.name?j.name:"";return!X||ie!==!1&&ie!==null?F=="array"?re?p.a.createElement("span",Object.assign({},K(P,"array-key"),{key:C}),p.a.createElement("span",{className:"array-key"},G),p.a.createElement("span",K(P,"colon"),":")):p.a.createElement("span",null):p.a.createElement("span",Object.assign({},K(P,"object-name"),{key:C}),p.a.createElement("span",{className:"object-key"},E&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"'),p.a.createElement("span",null,G),E&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"')),p.a.createElement("span",K(P,"colon"),":")):p.a.createElement("span",null)}function en(j){var F=j.theme;switch(j.iconStyle){case"triangle":return p.a.createElement(ct,Object.assign({},K(F,"expanded-icon"),{className:"expanded-icon"}));case"square":return p.a.createElement(Ge,Object.assign({},K(F,"expanded-icon"),{className:"expanded-icon"}));default:return p.a.createElement(Ae,Object.assign({},K(F,"expanded-icon"),{className:"expanded-icon"}))}}function Bn(j){var F=j.theme;switch(j.iconStyle){case"triangle":return p.a.createElement(ut,Object.assign({},K(F,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return p.a.createElement(ht,Object.assign({},K(F,"collapsed-icon"),{className:"collapsed-icon"}));default:return p.a.createElement(Ve,Object.assign({},K(F,"collapsed-icon"),{className:"collapsed-icon"}))}}var Pr=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).toggleCollapsed=function(X){var ie=[];for(var re in P.state.expanded)ie.push(P.state.expanded[re]);ie[X]=!ie[X],P.setState({expanded:ie})},P.state={expanded:[]},P}return f(C,[{key:"getExpandedIcon",value:function(E){var P=this.props,X=P.theme,ie=P.iconStyle;return this.state.expanded[E]?p.a.createElement(en,{theme:X,iconStyle:ie}):p.a.createElement(Bn,{theme:X,iconStyle:ie})}},{key:"render",value:function(){var E=this,P=this.props,X=P.src,ie=P.groupArraysAfterLength,re=(P.depth,P.name),G=P.theme,pe=P.jsvRoot,Te=P.namespace,Ye=(P.parent_type,H(P,["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"])),it=0,ft=5*this.props.indentWidth;pe||(it=5*this.props.indentWidth);var Qe=ie,dt=Math.ceil(X.length/Qe);return p.a.createElement("div",Object.assign({className:"object-key-val"},K(G,pe?"jsv-root":"objectKeyVal",{paddingLeft:it})),p.a.createElement(En,this.props),p.a.createElement("span",null,p.a.createElement(Jn,Object.assign({size:X.length},this.props))),He(Array(dt)).map(function(kt,Re){return p.a.createElement("div",Object.assign({key:Re,className:"object-key-val array-group"},K(G,"objectKeyVal",{marginLeft:6,paddingLeft:ft})),p.a.createElement("span",K(G,"brace-row"),p.a.createElement("div",Object.assign({className:"icon-container"},K(G,"icon-container"),{onClick:function(V){E.toggleCollapsed(Re)}}),E.getExpandedIcon(Re)),E.state.expanded[Re]?p.a.createElement(ui,Object.assign({key:re+Re,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:Qe,index_offset:Re*Qe,src:X.slice(Re*Qe,Re*Qe+Qe),namespace:Te,type:"array",parent_type:"array_group",theme:G},Ye)):p.a.createElement("span",Object.assign({},K(G,"brace"),{onClick:function(V){E.toggleCollapsed(Re)},className:"array-group-brace"}),"[",p.a.createElement("div",Object.assign({},K(G,"array-group-meta-data"),{className:"array-group-meta-data"}),p.a.createElement("span",Object.assign({className:"object-size"},K(G,"object-size")),Re*Qe," - ",Re*Qe+Qe>X.length?X.length:Re*Qe+Qe)),"]")))}))}}]),C}(p.a.PureComponent),A1=function(j){h(C,j);var F=g(C);function C(E){var P;s(this,C),(P=F.call(this,E)).toggleCollapsed=function(){P.setState({expanded:!P.state.expanded},function(){$.set(P.props.rjvId,P.props.namespace,"expanded",P.state.expanded)})},P.getObjectContent=function(ie,re,G){return p.a.createElement("div",{className:"pushed-content object-container"},p.a.createElement("div",Object.assign({className:"object-content"},K(P.props.theme,"pushed-content")),P.renderObjectContents(re,G)))},P.getEllipsis=function(){return P.state.size===0?null:p.a.createElement("div",Object.assign({},K(P.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:P.toggleCollapsed}),"...")},P.getObjectMetaData=function(ie){var re=P.props,G=(re.rjvId,re.theme,P.state),pe=G.size,Te=G.hovered;return p.a.createElement(Jn,Object.assign({rowHovered:Te,size:pe},P.props))},P.renderObjectContents=function(ie,re){var G,pe=P.props,Te=pe.depth,Ye=pe.parent_type,it=pe.index_offset,ft=pe.groupArraysAfterLength,Qe=pe.namespace,dt=P.state.object_type,kt=[],Re=Object.keys(ie||{});return P.props.sortKeys&&dt!=="array"&&(Re=Re.sort()),Re.forEach(function(V){if(G=new Ic(V,ie[V]),Ye==="array_group"&&it&&(G.name=parseInt(G.name)+it),ie.hasOwnProperty(V))if(G.type==="object")kt.push(p.a.createElement(ui,Object.assign({key:G.name,depth:Te+1,name:G.name,src:G.value,namespace:Qe.concat(G.name),parent_type:dt},re)));else if(G.type==="array"){var Y=ui;ft&&G.value.length>ft&&(Y=Pr),kt.push(p.a.createElement(Y,Object.assign({key:G.name,depth:Te+1,name:G.name,src:G.value,namespace:Qe.concat(G.name),type:"array",parent_type:dt},re)))}else kt.push(p.a.createElement(Jt,Object.assign({key:G.name+"_"+Qe,variable:G,singleIndent:5,namespace:Qe,type:P.props.type},re)))}),kt};var X=C.getState(E);return P.state=c(c({},X),{},{prevProps:{}}),P}return f(C,[{key:"getBraceStart",value:function(E,P){var X=this,ie=this.props,re=ie.src,G=ie.theme,pe=ie.iconStyle;if(ie.parent_type==="array_group")return p.a.createElement("span",null,p.a.createElement("span",K(G,"brace"),E==="array"?"[":"{"),P?this.getObjectMetaData(re):null);var Te=P?en:Bn;return p.a.createElement("span",null,p.a.createElement("span",Object.assign({onClick:function(Ye){X.toggleCollapsed()}},K(G,"brace-row")),p.a.createElement("div",Object.assign({className:"icon-container"},K(G,"icon-container")),p.a.createElement(Te,{theme:G,iconStyle:pe})),p.a.createElement(En,this.props),p.a.createElement("span",K(G,"brace"),E==="array"?"[":"{")),P?this.getObjectMetaData(re):null)}},{key:"render",value:function(){var E=this,P=this.props,X=P.depth,ie=P.src,re=(P.namespace,P.name,P.type,P.parent_type),G=P.theme,pe=P.jsvRoot,Te=P.iconStyle,Ye=H(P,["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle"]),it=this.state,ft=it.object_type,Qe=it.expanded,dt={};return pe||re==="array_group"?re==="array_group"&&(dt.borderLeft=0,dt.display="inline"):dt.paddingLeft=5*this.props.indentWidth,p.a.createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return E.setState(c(c({},E.state),{},{hovered:!0}))},onMouseLeave:function(){return E.setState(c(c({},E.state),{},{hovered:!1}))}},K(G,pe?"jsv-root":"objectKeyVal",dt)),this.getBraceStart(ft,Qe),Qe?this.getObjectContent(X,ie,c({theme:G,iconStyle:Te},Ye)):this.getEllipsis(),p.a.createElement("span",{className:"brace-row"},p.a.createElement("span",{style:c(c({},K(G,"brace").style),{},{paddingLeft:Qe?"3px":"0px"})},ft==="array"?"]":"}"),Qe?null:this.getObjectMetaData(ie)))}}],[{key:"getDerivedStateFromProps",value:function(E,P){var X=P.prevProps;return E.src!==X.src||E.collapsed!==X.collapsed||E.name!==X.name||E.namespace!==X.namespace||E.rjvId!==X.rjvId?c(c({},C.getState(E)),{},{prevProps:E}):null}}]),C}(p.a.PureComponent);A1.getState=function(j){var F=Object.keys(j.src).length,C=(j.collapsed===!1||j.collapsed!==!0&&j.collapsed>j.depth)&&(!j.shouldCollapse||j.shouldCollapse({name:j.name,src:j.src,type:O(j.src),namespace:j.namespace})===!1)&&F!==0;return{expanded:$.get(j.rjvId,j.namespace,"expanded",C),object_type:j.type==="array"?"array":"object",parent_type:j.type==="array"?"array":"object",size:F,hovered:!1}};var Ic=function j(F,C){s(this,j),this.name=F,this.value=C,this.type=O(C)};A(A1);var ui=A1,Bc=function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).render=function(){var re=z(E).props,G=[re.name],pe=ui;return Array.isArray(re.src)&&re.groupArraysAfterLength&&re.src.length>re.groupArraysAfterLength&&(pe=Pr),p.a.createElement("div",{className:"pretty-json-container object-container"},p.a.createElement("div",{className:"object-content"},p.a.createElement(pe,Object.assign({namespace:G,depth:0,jsvRoot:!0},re))))},E}return C}(p.a.PureComponent),Dc=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).closeModal=function(){je.dispatch({rjvId:P.props.rjvId,name:"RESET"})},P.submit=function(){P.props.submit(P.state.input)},P.state={input:E.input?E.input:""},P}return f(C,[{key:"render",value:function(){var E=this,P=this.props,X=P.theme,ie=P.rjvId,re=P.isValid,G=this.state.input,pe=re(G);return p.a.createElement("div",Object.assign({className:"key-modal-request"},K(X,"key-modal-request"),{onClick:this.closeModal}),p.a.createElement("div",Object.assign({},K(X,"key-modal"),{onClick:function(Te){Te.stopPropagation()}}),p.a.createElement("div",K(X,"key-modal-label"),"Key Name:"),p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("input",Object.assign({},K(X,"key-modal-input"),{className:"key-modal-input",ref:function(Te){return Te&&Te.focus()},spellCheck:!1,value:G,placeholder:"...",onChange:function(Te){E.setState({input:Te.target.value})},onKeyPress:function(Te){pe&&Te.key==="Enter"?E.submit():Te.key==="Escape"&&E.closeModal()}})),pe?p.a.createElement(Tt,Object.assign({},K(X,"key-modal-submit"),{className:"key-modal-submit",onClick:function(Te){return E.submit()}})):null),p.a.createElement("span",K(X,"key-modal-cancel"),p.a.createElement(sn,Object.assign({},K(X,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){je.dispatch({rjvId:ie,name:"RESET"})}})))))}}]),C}(p.a.PureComponent),Rc=function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).isValid=function(re){var G=E.props.rjvId,pe=$.get(G,"action","new-key-request");return re!=""&&Object.keys(pe.existing_value).indexOf(re)===-1},E.submit=function(re){var G=E.props.rjvId,pe=$.get(G,"action","new-key-request");pe.new_value=c({},pe.existing_value),pe.new_value[re]=E.props.defaultValue,je.dispatch({name:"VARIABLE_ADDED",rjvId:G,data:pe})},E}return f(C,[{key:"render",value:function(){var E=this.props,P=E.active,X=E.theme,ie=E.rjvId;return P?p.a.createElement(Dc,{rjvId:ie,theme:X,isValid:this.isValid,submit:this.submit}):null}}]),C}(p.a.PureComponent),zo=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.message,X=E.active,ie=E.theme,re=E.rjvId;return X?p.a.createElement("div",Object.assign({className:"validation-failure"},K(ie,"validation-failure"),{onClick:function(){je.dispatch({rjvId:re,name:"RESET"})}}),p.a.createElement("span",K(ie,"validation-failure-label"),P),p.a.createElement(sn,K(ie,"validation-failure-clear"))):null}}]),C}(p.a.PureComponent),wa=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).rjvId=Date.now().toString(),P.getListeners=function(){return{reset:P.resetState,"variable-update":P.updateSrc,"add-key-request":P.addKeyRequest}},P.updateSrc=function(){var X,ie=$.get(P.rjvId,"action","variable-update"),re=ie.name,G=ie.namespace,pe=ie.new_value,Te=ie.existing_value,Ye=(ie.variable_removed,ie.updated_src),it=ie.type,ft=P.props,Qe=ft.onEdit,dt=ft.onDelete,kt=ft.onAdd,Re={existing_src:P.state.src,new_value:pe,updated_src:Ye,name:re,namespace:G,existing_value:Te};switch(it){case"variable-added":X=kt(Re);break;case"variable-edited":X=Qe(Re);break;case"variable-removed":X=dt(Re)}X!==!1?($.set(P.rjvId,"global","src",Ye),P.setState({src:Ye})):P.setState({validationFailure:!0})},P.addKeyRequest=function(){P.setState({addKeyRequest:!0})},P.resetState=function(){P.setState({validationFailure:!1,addKeyRequest:!1})},P.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:C.defaultProps.src,name:C.defaultProps.name,theme:C.defaultProps.theme,validationMessage:C.defaultProps.validationMessage,prevSrc:C.defaultProps.src,prevName:C.defaultProps.name,prevTheme:C.defaultProps.theme},P}return f(C,[{key:"componentDidMount",value:function(){$.set(this.rjvId,"global","src",this.state.src);var E=this.getListeners();for(var P in E)$.on(P+"-"+this.rjvId,E[P]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(E,P){P.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),P.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),E.src!==this.state.src&&$.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var E=this.getListeners();for(var P in E)$.removeListener(P+"-"+this.rjvId,E[P])}},{key:"render",value:function(){var E=this.state,P=E.validationFailure,X=E.validationMessage,ie=E.addKeyRequest,re=E.theme,G=E.src,pe=E.name,Te=this.props,Ye=Te.style,it=Te.defaultValue;return p.a.createElement("div",{className:"react-json-view",style:c(c({},K(re,"app-container").style),Ye)},p.a.createElement(zo,{message:X,active:P,theme:re,rjvId:this.rjvId}),p.a.createElement(Bc,Object.assign({},this.props,{src:G,name:pe,theme:re,type:O(G),rjvId:this.rjvId})),p.a.createElement(Rc,{active:ie,theme:re,rjvId:this.rjvId,defaultValue:it}))}}],[{key:"getDerivedStateFromProps",value:function(E,P){if(E.src!==P.prevSrc||E.name!==P.prevName||E.theme!==P.prevTheme){var X={src:E.src,name:E.name,theme:E.theme,validationMessage:E.validationMessage,prevSrc:E.src,prevName:E.name,prevTheme:E.theme};return C.validateState(X)}return null}}]),C}(p.a.PureComponent);wa.defaultProps={src:{},name:"root",theme:"rjv-default",collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:"triangle",style:{},validationMessage:"Validation Error",defaultValue:null,displayArrayKey:!0},wa.validateState=function(j){var F={};return O(j.theme)!=="object"||function(C){var E=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(O(C)==="object"){for(var P=0;P<E.length;P++)if(!(E[P]in C))return!1;return!0}return!1}(j.theme)||(console.error("react-json-view error:","theme prop must be a theme name or valid base-16 theme object.",'defaulting to "rjv-default" theme'),F.theme="rjv-default"),O(j.src)!=="object"&&O(j.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),F.name="ERROR",F.src={message:"src property must be a valid json object"}),c(c({},j),F)},A(wa),a.default=wa}])})})(Dj);var rze=Dj.exports;const aze=An(rze),ize=({onClick:e,isCollapsed:t})=>{const n="json.".concat(t?"expandAll":"collapseAll");return Ce.jsx(Zr,{onClick:e,children:Ce.jsx("span",{children:Tn(n)})})};var Ac={};function W5(e){"@babel/helpers - typeof";return W5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W5(e)}Object.defineProperty(Ac,"__esModule",{value:!0});Ac.CopyToClipboard=void 0;var M2=Rj(y),oze=Rj(kV),lze=["text","onCopy","options","children"];function Rj(e){return e&&e.__esModule?e:{default:e}}function Lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Hm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lm(Object(n),!0).forEach(function(r){g9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cze(e,t){if(e==null)return{};var n=sze(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sze(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function uze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fze(e,t,n){return t&&Vm(e.prototype,t),n&&Vm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U5(e,t)}function U5(e,t){return U5=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},U5(e,t)}function hze(e){var t=vze();return function(){var r=T0(e),a;if(t){var i=T0(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return pze(this,a)}}function pze(e,t){if(t&&(W5(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nj(e)}function Nj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function T0(e){return T0=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},T0(e)}function g9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wj=function(e){dze(n,e);var t=hze(n);function n(){var r;uze(this,n);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r=t.call.apply(t,[this].concat(i)),g9(Nj(r),"onClick",function(l){var c=r.props,s=c.text,u=c.onCopy,f=c.children,d=c.options,h=M2.default.Children.only(f),v=(0,oze.default)(s,d);u&&u(s,v),h&&h.props&&typeof h.props.onClick=="function"&&h.props.onClick(l)}),r}return fze(n,[{key:"render",value:function(){var a=this.props;a.text,a.onCopy,a.options;var i=a.children,o=cze(a,lze),l=M2.default.Children.only(i);return M2.default.cloneElement(l,Hm(Hm({},o),{},{onClick:this.onClick}))}}]),n}(M2.default.PureComponent);Ac.CopyToClipboard=Wj;g9(Wj,"defaultProps",{onCopy:void 0,options:void 0});var mze=Ac,q5=mze.CopyToClipboard;q5.CopyToClipboard=q5;var gze=q5;const yze=1e3,bze=({children:e,toCopy:t,copiedInterval:n=yze})=>{const[r,a]=y.useState(!1),i=()=>{r||a(!0)};y.useEffect(()=>{if(r){const l=setTimeout(()=>a(!1),n);return()=>clearTimeout(l)}},[n,r]);const o="copyContent.".concat(r?"copied":"copy");return Ce.jsx(gze.CopyToClipboard,{onCopy:i,text:t??"",children:e({copyMessageId:o,isCopied:r,toCopy:t})})};function _ze(e){try{return JSON.stringify(e)}catch{return null}}const wze=({schema:e})=>{const t=_ze(e);return Ce.jsx(bze,{toCopy:t,children:({copyMessageId:n})=>Ce.jsx(Zr,{children:Ce.jsx("span",{children:Tn(n)})})})},Mze=1,Oze=10,Xo={buttons:{display:"flex",gap:8,position:"absolute",right:10,top:10},center:{left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"},container:{height:"100%",position:"relative"},viewer:{backgroundColor:"#f1f1f1",borderRadius:8,height:"100%",overflow:"auto",padding:16}},zze=({schema:e})=>{const[t,n]=y.useState(!0),r=()=>n(!t);return e?Ce.jsxs("div",{className:"reactord-jsonviewer",style:Xo.container,children:[Ce.jsx(aze,{collapseStringsAfterLength:150,collapsed:t?Mze:Oze,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,name:!1,quotesOnKeys:!1,src:e,style:Xo.viewer}),Ce.jsxs("div",{style:Xo.buttons,children:[Ce.jsx(wze,{schema:e}),Ce.jsx(ize,{isCollapsed:t,onClick:r})]})]}):Ce.jsx("div",{style:Xo.viewer,children:Ce.jsx("div",{style:Xo.center,children:Ce.jsx("span",{children:"Missing schema message"})})})},jm=e=>e.source||"__other_libraries_key__",I6=e=>{var t;return((t=e.libraryName)!=null?t:e.source)||Tn("components.components-explorer.other-libs.name")},xze=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),B6=e=>{var t;return(t=e.info.label)!=null?t:xze(e.tag)},Cze=({info$:e,hide:t})=>{const[n,r]=y.useState(""),[a,i]=y.useState([]),[o,l]=y.useState(),[c,s]=y.useState(!1),u=KOe(e,(x,M)=>[...x,...M],[]),f=y.useCallback(()=>{l(void 0),s(!1)},[]),d=y.useCallback(()=>{t(),setTimeout(()=>{r(""),i([]),f()},300)},[f,t]),h=y.useMemo(()=>{if(o!=null&&o.info.example)try{return JSON.parse(o.info.example)}catch{console.error("Invalid example for component ".concat(o.tag));return}},[o]),v=y.useMemo(()=>{const x=u.reduce((M,{info:T})=>{const A=jm(T);return M[A]===void 0?{...M,[A]:I6(T)}:M},{});return Object.entries(x).map(([M,T])=>Ce.jsx(ei.Option,{value:M,children:T},M))},[u]),b=y.useMemo(()=>u.reduce((x,M)=>{const T=jm(M.info);if(a.length>0&&!a.includes(T)||n&&!B6(M).toLowerCase().includes(n.toLowerCase()))return x;const A=x[T];return A===void 0?{...x,[T]:{components:[M],label:I6(M.info)}}:(A.components.push(M),x)},{}),[a,n,u]),z=y.useMemo(()=>Ce.jsxs("div",{className:"components-explorer-comp-header",children:[Ce.jsx("div",{className:"components-explorer-comp-title",children:Ce.jsx("span",{children:Tn("components.components-explorer.drawer.title")})}),Ce.jsx(Zr,{className:"components-explorer-comp-title-btn",onClick:d,type:"link",children:Ce.jsx(Tm,{})})]}),[d]),m=y.useMemo(()=>{const x=Object.entries(b).map(([M,T])=>{const A=T.components.map(H=>Ce.jsxs("div",{className:"components-explorer-component-row",onClick:()=>l(H),children:[H.info.iconSrc?Ce.jsx("img",{alt:"",height:16,src:H.info.iconSrc,width:16}):Ce.jsx(COe,{}),B6(H)]},H.tag));return Ce.jsxs("div",{className:"components-explorer-lib",children:[Ce.jsx("span",{className:"components-explorer-lib-name",children:T.label}),A]},M)});return Ce.jsxs("div",{className:"components-explorer-lib-container",children:[Ce.jsxs("div",{className:"components-explorer-lib-filters",children:[Ce.jsx(ei,{allowClear:!0,getPopupContainer:M=>M,mode:"multiple",onChange:M=>i(M),placeholder:Tn("components.components-explorer.drawer.lib-filter.ph"),value:a,children:v}),Ce.jsx(ci.Search,{allowClear:!0,onChange:M=>r(M.target.value),placeholder:Tn("components.components-explorer.drawer.search.ph"),value:n})]}),Ce.jsx("div",{style:{overflowY:"auto"},children:x.length>0?x:Ce.jsx(kv,{icon:Ce.jsx(SOe,{}),subTitle:Ce.jsx("span",{children:Tn("components.components-explorer.drawer.no-data.subtitle")}),title:Ce.jsx("span",{children:Tn("components.components-explorer.drawer.no-data.title")})})})]})},[v,a,b,n]),g=y.useMemo(()=>o&&Ce.jsxs("div",{className:"components-explorer-comp-header",children:[Ce.jsxs("div",{className:"components-explorer-comp-title",children:[Ce.jsx(Zr,{className:"components-explorer-comp-title-btn",onClick:f,type:"link",children:Ce.jsx(xOe,{})}),Ce.jsx("span",{children:B6(o)}),Ce.jsx(wve,{className:"components-explorer-comp-title-tag",color:"blue",children:I6(o.info)}),o.info.docLink&&Ce.jsx(nze,{docLink:o.info.docLink})]}),Ce.jsx(Zr,{className:"components-explorer-comp-title-btn",onClick:d,type:"link",children:Ce.jsx(Tm,{})})]}),[d,f,o]),_=y.useMemo(()=>o&&Ce.jsxs("div",{className:"components-explorer-comp-detail",children:[o.info.previewImage&&Ce.jsx("div",{className:"components-explorer-comp-detail-img",children:Ce.jsx("img",{alt:"Preview",src:o.info.previewImage})}),o.info.descriptionLong&&Ce.jsxs("div",{className:"components-explorer-comp-detail-section",children:[Ce.jsx("span",{children:Tn("components.components-explorer.detail.description")}),Ce.jsx("div",{style:{display:"flex",flexDirection:"column"},children:c?Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(Vv,{children:Ce.jsx(hwe,{className:"components-explorer-markdown",remarkPlugins:[zOe],children:o.info.descriptionLong})}),Ce.jsxs(Zr,{className:"components-explorer-expand-btn",onClick:()=>s(!1),children:[Ce.jsx(kOe,{}),Ce.jsx("span",{children:Tn("components.components-explorer.detail.description.reduce")})]})]}):Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(Vv.Paragraph,{ellipsis:{rows:2},children:o.info.descriptionLong}),Ce.jsxs(Zr,{className:"components-explorer-expand-btn",onClick:()=>s(!0),children:[Ce.jsx(EOe,{}),Ce.jsx("span",{children:Tn("components.components-explorer.detail.description.expand")})]})]})})]}),h!==void 0&&Ce.jsxs("div",{className:"components-explorer-comp-detail-section",children:[Ce.jsx("span",{children:Tn("components.components-explorer.detail.example")}),Ce.jsx(zze,{schema:h})]}),!o.info.previewImage&&!o.info.descriptionLong&&!h&&Ce.jsx(kv,{icon:Ce.jsx(POe,{}),subTitle:Ce.jsx("span",{children:Tn("components.components-explorer.detail.no-data.subtitle")}),title:Ce.jsx("span",{children:Tn("components.components-explorer.detail.no-data.title")})})]}),[c,h,o]),p=y.useMemo(()=>o===void 0?{content:m,title:z}:{content:_,title:g},[_,g,m,z,o]);return Ce.jsxs("div",{className:"components-explorer-container",children:[p.title,p.content]})},Sze="en",kze=(e,t=Sze)=>typeof e=="string"?e:e==null?void 0:e[t];function Eze(e){return Object.entries(e).reduce((t,[n,r])=>(t[n]=kze(r),t),{})}const co=(...e)=>{},Uj=e=>Array.isArray(e)?e:[e],qj=({document:{baseURI:e},location:{href:t}})=>n=>new URL(n,new URL(e,t)),Kj=(e,t)=>{let n=t;return t instanceof URL||(n=e(typeof t=="string"?t:t.url)),n},Pze=(e,t)=>{const{href:n,origin:r}=t;return e===r?n.substring(e.length):n},Tze=(e,t,n=0)=>{const{selectors:r}=t;return e.querySelector(r[n])};function $ze(e){return document.querySelector(e)}const Lze=(e,t)=>{const n=t.get(e);if(n){const{css:r,rest:a,subscription:i}=n;a.forEach(o=>{var l;return(l=o.__unfocus_handler)==null?void 0:l.call(o)}),i.unsubscribe(),n.elementToFocus.forEach((o,l)=>{Object.assign(o.style,r[l])})}t.delete(e)},Hze=e=>e!==void 0;function Vze(e,t,n){const r=new Map,a=$ze.bind(e),i=t.pipe(PF(),TF(([o])=>{var l;if(o!==void 0){const c=Tze(e,o);c!==null&&((l=c.__unfocus_handler)==null||l.call(c),Lze(c,r))}}),Jr(([,o])=>o),Ln(Hze),Jr(o=>{const[l,...c]=o.selectors,s=c.reduce((u,f)=>{var d;const h=a(f);if(h){u.push(h);const v=(d=h.__focus_handler)==null?void 0:d.call(h);v&&"then"in v&&v.catch(co)}return u},[]);return{first:l,next:o,otherElements:s}}),Jr(o=>({...o,firstElement:a(o.first)})),Ln(o=>o.firstElement!==null),Jr(o=>{var l,c;return{...o,focus:(c=(l=o.firstElement).__focus_handler)==null?void 0:c.call(l)}}),EF(({focus:o,...l})=>(o&&"then"in o?o:Promise.resolve(o??l.firstElement)).then(s=>({focus:s,...l})).catch(()=>({focus:void 0,...l})))).subscribe(({otherElements:o,next:l,firstElement:c,focus:s})=>{const u=Object.keys(l.style),f=new Ur,d=Uj(s??c).filter(Boolean),h={css:[],elementToFocus:d,rest:o,subscription:f},v=u.reduce((b,z)=>(d.forEach((m,g)=>{var _;b.css[g]=Object.assign((_=b.css[g])!=null?_:{},{[z]:m.style[z]})}),b),h);f.add(n.pipe(Ln(b=>b==="select"),Ha(1)).subscribe(()=>{d.forEach(b=>{Object.assign(b.style,l.style)})})),r.set(c,v)});return()=>i.unsubscribe()}var D6;const $0=window,so=$0.trustedTypes,Am=so?so.createPolicy("lit-html",{createHTML:e=>e}):void 0,K5="$lit$",Y1=`lit$${(Math.random()+"").slice(9)}$`,Gj="?"+Y1,jze=`<${Gj}>`,ni=document,J4=()=>ni.createComment(""),el=e=>e===null||typeof e!="object"&&typeof e!="function",Yj=Array.isArray,Aze=e=>Yj(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",R6=`[
|
87
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var Ze=i(46),je=new(i(47)).Dispatcher,at=new(function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).objects={},E.set=function(re,G,pe,Te){E.objects[re]===void 0&&(E.objects[re]={}),E.objects[re][G]===void 0&&(E.objects[re][G]={}),E.objects[re][G][pe]=Te},E.get=function(re,G,pe,Te){return E.objects[re]===void 0||E.objects[re][G]===void 0||E.objects[re][G][pe]==null?Te:E.objects[re][G][pe]},E.handleAction=function(re){var G=re.rjvId,pe=re.data;switch(re.name){case"RESET":E.emit("reset-"+G);break;case"VARIABLE_UPDATED":re.data.updated_src=E.updateSrc(G,pe),E.set(G,"action","variable-update",c(c({},pe),{},{type:"variable-edited"})),E.emit("variable-update-"+G);break;case"VARIABLE_REMOVED":re.data.updated_src=E.updateSrc(G,pe),E.set(G,"action","variable-update",c(c({},pe),{},{type:"variable-removed"})),E.emit("variable-update-"+G);break;case"VARIABLE_ADDED":re.data.updated_src=E.updateSrc(G,pe),E.set(G,"action","variable-update",c(c({},pe),{},{type:"variable-added"})),E.emit("variable-update-"+G);break;case"ADD_VARIABLE_KEY_REQUEST":E.set(G,"action","new-key-request",pe),E.emit("add-key-request-"+G)}},E.updateSrc=function(re,G){var pe=G.name,Te=G.namespace,Ye=G.new_value,it=(G.existing_value,G.variable_removed);Te.shift();var ft,Qe=E.get(re,"global","src"),dt=E.deepCopy(Qe,He(Te)),kt=dt,Re=R(Te);try{for(Re.s();!(ft=Re.n()).done;)kt=kt[ft.value]}catch(V){Re.e(V)}finally{Re.f()}return it?O(kt)=="array"?kt.splice(pe,1):delete kt[pe]:pe!==null?kt[pe]=Ye:dt=Ye,E.set(re,"global","src",dt),dt},E.deepCopy=function(re,G){var pe,Te=O(re),Ye=G.shift();return Te=="array"?pe=He(re):Te=="object"&&(pe=c({},re)),Ye!==void 0&&(pe[Ye]=E.deepCopy(re[Ye],G)),pe},E}return C}(Ze.EventEmitter));je.register(at.handleAction.bind(at));var $=at,I=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).toggleCollapsed=function(){P.setState({collapsed:!P.state.collapsed},function(){$.set(P.props.rjvId,P.props.namespace,"collapsed",P.state.collapsed)})},P.getFunctionDisplay=function(X){var ie=z(P).props;return X?p.a.createElement("span",null,P.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),p.a.createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},p.a.createElement("span",null,"{"),p.a.createElement("span",K(ie.theme,"ellipsis"),"..."),p.a.createElement("span",null,"}"))):P.props.value.toString().slice(9,-1)},P.state={collapsed:$.get(E.rjvId,E.namespace,"collapsed",!0)},P}return f(C,[{key:"render",value:function(){var E=this.props,P=this.state.collapsed;return p.a.createElement("div",K(E.theme,"function"),p.a.createElement(fe,Object.assign({type_name:"function"},E)),p.a.createElement("span",Object.assign({},K(E.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(P)))}}]),C}(p.a.PureComponent),B=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){return p.a.createElement("div",K(this.props.theme,"nan"),"NaN")}}]),C}(p.a.PureComponent),le=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){return p.a.createElement("div",K(this.props.theme,"null"),"NULL")}}]),C}(p.a.PureComponent),xe=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props;return p.a.createElement("div",K(E.theme,"integer"),p.a.createElement(fe,Object.assign({type_name:"int"},E)),this.props.value)}}]),C}(p.a.PureComponent),be=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props;return p.a.createElement("div",K(E.theme,"regexp"),p.a.createElement(fe,Object.assign({type_name:"regexp"},E)),this.props.value.toString())}}]),C}(p.a.PureComponent),We=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).toggleCollapsed=function(){P.setState({collapsed:!P.state.collapsed},function(){$.set(P.props.rjvId,P.props.namespace,"collapsed",P.state.collapsed)})},P.state={collapsed:$.get(E.rjvId,E.namespace,"collapsed",!0)},P}return f(C,[{key:"render",value:function(){this.state.collapsed;var E=this.props,P=E.collapseStringsAfterLength,X=E.theme,ie=E.value,re={style:{cursor:"default"}};return O(P)==="integer"&&ie.length>P&&(re.style.cursor="pointer",this.state.collapsed&&(ie=p.a.createElement("span",null,ie.substring(0,P),p.a.createElement("span",K(X,"ellipsis")," ...")))),p.a.createElement("div",K(X,"string"),p.a.createElement(fe,Object.assign({type_name:"string"},E)),p.a.createElement("span",Object.assign({className:"string-value"},re,{onClick:this.toggleCollapsed}),'"',ie,'"'))}}]),C}(p.a.PureComponent),Le=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){return p.a.createElement("div",K(this.props.theme,"undefined"),"undefined")}}]),C}(p.a.PureComponent);function Je(){return(Je=Object.assign||function(j){for(var F=1;F<arguments.length;F++){var C=arguments[F];for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&(j[E]=C[E])}return j}).apply(this,arguments)}var wt=_.useLayoutEffect,Ut=function(j){var F=Object(_.useRef)(j);return wt(function(){F.current=j}),F},Mt=function(j,F){typeof j!="function"?j.current=F:j(F)},Er=function(j,F){var C=Object(_.useRef)();return Object(_.useCallback)(function(E){j.current=E,C.current&&Mt(C.current,null),C.current=F,F&&Mt(F,E)},[F])},ot={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},cn=function(j){Object.keys(ot).forEach(function(F){j.style.setProperty(F,ot[F],"important")})},De=null,pr=function(){},se=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],L=!!document.documentElement.currentStyle,N=function(j,F){var C=j.cacheMeasurements,E=j.maxRows,P=j.minRows,X=j.onChange,ie=X===void 0?pr:X,re=j.onHeightChange,G=re===void 0?pr:re,pe=function(Re,V){if(Re==null)return{};var Y,ae,we={},he=Object.keys(Re);for(ae=0;ae<he.length;ae++)Y=he[ae],V.indexOf(Y)>=0||(we[Y]=Re[Y]);return we}(j,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),Te,Ye=pe.value!==void 0,it=Object(_.useRef)(null),ft=Er(it,F),Qe=Object(_.useRef)(0),dt=Object(_.useRef)(),kt=function(){var Re=it.current,V=C&&dt.current?dt.current:function(he){var me=window.getComputedStyle(he);if(me===null)return null;var Oe,ke=(Oe=me,se.reduce(function(Ee,ve){return Ee[ve]=Oe[ve],Ee},{})),Be=ke.boxSizing;return Be===""?null:(L&&Be==="border-box"&&(ke.width=parseFloat(ke.width)+parseFloat(ke.borderRightWidth)+parseFloat(ke.borderLeftWidth)+parseFloat(ke.paddingRight)+parseFloat(ke.paddingLeft)+"px"),{sizingStyle:ke,paddingSize:parseFloat(ke.paddingBottom)+parseFloat(ke.paddingTop),borderSize:parseFloat(ke.borderBottomWidth)+parseFloat(ke.borderTopWidth)})}(Re);if(V){dt.current=V;var Y=function(he,me,Oe,ke){Oe===void 0&&(Oe=1),ke===void 0&&(ke=1/0),De||((De=document.createElement("textarea")).setAttribute("tab-index","-1"),De.setAttribute("aria-hidden","true"),cn(De)),De.parentNode===null&&document.body.appendChild(De);var Be=he.paddingSize,Ee=he.borderSize,ve=he.sizingStyle,S=ve.boxSizing;Object.keys(ve).forEach(function(vr){var vt=vr;De.style[vt]=ve[vt]}),cn(De),De.value=me;var un=function(vr,vt){var Tr=vr.scrollHeight;return vt.sizingStyle.boxSizing==="border-box"?Tr+vt.borderSize:Tr-vt.paddingSize}(De,he);De.value="x";var Ht=De.scrollHeight-Be,Bt=Ht*Oe;S==="border-box"&&(Bt=Bt+Be+Ee),un=Math.max(Bt,un);var yn=Ht*ke;return S==="border-box"&&(yn=yn+Be+Ee),[un=Math.min(yn,un),Ht]}(V,Re.value||Re.placeholder||"x",P,E),ae=Y[0],we=Y[1];Qe.current!==ae&&(Qe.current=ae,Re.style.setProperty("height",ae+"px","important"),G(ae,{rowHeight:we}))}};return Object(_.useLayoutEffect)(kt),Te=Ut(kt),Object(_.useLayoutEffect)(function(){var Re=function(V){Te.current(V)};return window.addEventListener("resize",Re),function(){window.removeEventListener("resize",Re)}},[]),Object(_.createElement)("textarea",Je({},pe,{onChange:function(Re){Ye||kt(),ie(Re)},ref:ft}))},Z=Object(_.forwardRef)(N);function ce(j){j=j.trim();try{if((j=JSON.stringify(JSON.parse(j)))[0]==="[")return _e("array",JSON.parse(j));if(j[0]==="{")return _e("object",JSON.parse(j));if(j.match(/\-?\d+\.\d+/)&&j.match(/\-?\d+\.\d+/)[0]===j)return _e("float",parseFloat(j));if(j.match(/\-?\d+e-\d+/)&&j.match(/\-?\d+e-\d+/)[0]===j)return _e("float",Number(j));if(j.match(/\-?\d+/)&&j.match(/\-?\d+/)[0]===j)return _e("integer",parseInt(j));if(j.match(/\-?\d+e\+\d+/)&&j.match(/\-?\d+e\+\d+/)[0]===j)return _e("integer",Number(j))}catch{}switch(j=j.toLowerCase()){case"undefined":return _e("undefined",void 0);case"nan":return _e("nan",NaN);case"null":return _e("null",null);case"true":return _e("boolean",!0);case"false":return _e("boolean",!1);default:if(j=Date.parse(j))return _e("date",new Date(j))}return _e(!1,null)}function _e(j,F){return{type:j,value:F}}var Ae=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}]),C}(p.a.PureComponent),Ve=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}]),C}(p.a.PureComponent),Ge=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]),ie=et(P).style;return p.a.createElement("span",X,p.a.createElement("svg",{fill:ie.color,width:ie.height,height:ie.width,style:ie,viewBox:"0 0 1792 1792"},p.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),C}(p.a.PureComponent),ht=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]),ie=et(P).style;return p.a.createElement("span",X,p.a.createElement("svg",{fill:ie.color,width:ie.height,height:ie.width,style:ie,viewBox:"0 0 1792 1792"},p.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),C}(p.a.PureComponent),ut=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",{style:c(c({},et(P).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},p.a.createElement("path",{d:"M0 14l6-6-6-6z"})))}}]),C}(p.a.PureComponent),ct=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",{style:c(c({},et(P).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},p.a.createElement("path",{d:"M0 5l6 6 6-6z"})))}}]),C}(p.a.PureComponent),rt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}]),C}(p.a.PureComponent),bt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),C}(p.a.PureComponent),Nt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),C}(p.a.PureComponent),sn=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}]),C}(p.a.PureComponent),Zt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}]),C}(p.a.PureComponent),Tt=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.style,X=H(E,["style"]);return p.a.createElement("span",X,p.a.createElement("svg",Object.assign({},et(P),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),p.a.createElement("g",null,p.a.createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),C}(p.a.PureComponent);function et(j){return j||(j={}),{style:c(c({verticalAlign:"middle"},j),{},{color:j.color?j.color:"#000000",height:"1em",width:"1em"})}}var Lt=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).copiedTimer=null,P.handleCopy=function(){var X=document.createElement("textarea"),ie=P.props,re=ie.clickCallback,G=ie.src,pe=ie.namespace;X.innerHTML=JSON.stringify(P.clipboardValue(G),null," "),document.body.appendChild(X),X.select(),document.execCommand("copy"),document.body.removeChild(X),P.copiedTimer=setTimeout(function(){P.setState({copied:!1})},5500),P.setState({copied:!0},function(){typeof re=="function"&&re({src:G,namespace:pe,name:pe[pe.length-1]})})},P.getClippyIcon=function(){var X=P.props.theme;return P.state.copied?p.a.createElement("span",null,p.a.createElement(rt,Object.assign({className:"copy-icon"},K(X,"copy-icon"))),p.a.createElement("span",K(X,"copy-icon-copied"),"✔")):p.a.createElement(rt,Object.assign({className:"copy-icon"},K(X,"copy-icon")))},P.clipboardValue=function(X){switch(O(X)){case"function":case"regexp":return X.toString();default:return X}},P.state={copied:!1},P}return f(C,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var E=this.props,P=(E.src,E.theme),X=E.hidden,ie=E.rowHovered,re=K(P,"copy-to-clipboard").style,G="inline";return X&&(G="none"),p.a.createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:ie?"inline-block":"none"}},p.a.createElement("span",{style:c(c({},re),{},{display:G}),onClick:this.handleCopy},this.getClippyIcon()))}}]),C}(p.a.PureComponent),Jt=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).getEditIcon=function(){var X=P.props,ie=X.variable,re=X.theme;return p.a.createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:P.state.hovered?"inline-block":"none"}},p.a.createElement(Zt,Object.assign({className:"click-to-edit-icon"},K(re,"editVarIcon"),{onClick:function(){P.prepopInput(ie)}})))},P.prepopInput=function(X){if(P.props.onEdit!==!1){var ie=function(G){var pe;switch(O(G)){case"undefined":pe="undefined";break;case"nan":pe="NaN";break;case"string":pe=G;break;case"date":case"function":case"regexp":pe=G.toString();break;default:try{pe=JSON.stringify(G,null," ")}catch{pe=""}}return pe}(X.value),re=ce(ie);P.setState({editMode:!0,editValue:ie,parsedInput:{type:re.type,value:re.value}})}},P.getRemoveIcon=function(){var X=P.props,ie=X.variable,re=X.namespace,G=X.theme,pe=X.rjvId;return p.a.createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:P.state.hovered?"inline-block":"none"}},p.a.createElement(bt,Object.assign({className:"click-to-remove-icon"},K(G,"removeVarIcon"),{onClick:function(){je.dispatch({name:"VARIABLE_REMOVED",rjvId:pe,data:{name:ie.name,namespace:re,existing_value:ie.value,variable_removed:!0}})}})))},P.getValue=function(X,ie){var re=!ie&&X.type,G=z(P).props;switch(re){case!1:return P.getEditInput();case"string":return p.a.createElement(We,Object.assign({value:X.value},G));case"integer":return p.a.createElement(xe,Object.assign({value:X.value},G));case"float":return p.a.createElement(k,Object.assign({value:X.value},G));case"boolean":return p.a.createElement(oe,Object.assign({value:X.value},G));case"function":return p.a.createElement(I,Object.assign({value:X.value},G));case"null":return p.a.createElement(le,G);case"nan":return p.a.createElement(B,G);case"undefined":return p.a.createElement(Le,G);case"date":return p.a.createElement(ge,Object.assign({value:X.value},G));case"regexp":return p.a.createElement(be,Object.assign({value:X.value},G));default:return p.a.createElement("div",{className:"object-value"},JSON.stringify(X.value))}},P.getEditInput=function(){var X=P.props.theme,ie=P.state.editValue;return p.a.createElement("div",null,p.a.createElement(Z,Object.assign({type:"text",inputRef:function(re){return re&&re.focus()},value:ie,className:"variable-editor",onChange:function(re){var G=re.target.value,pe=ce(G);P.setState({editValue:G,parsedInput:{type:pe.type,value:pe.value}})},onKeyDown:function(re){switch(re.key){case"Escape":P.setState({editMode:!1,editValue:""});break;case"Enter":(re.ctrlKey||re.metaKey)&&P.submitEdit(!0)}re.stopPropagation()},placeholder:"update this value",minRows:2},K(X,"edit-input"))),p.a.createElement("div",K(X,"edit-icon-container"),p.a.createElement(bt,Object.assign({className:"edit-cancel"},K(X,"cancel-icon"),{onClick:function(){P.setState({editMode:!1,editValue:""})}})),p.a.createElement(Tt,Object.assign({className:"edit-check string-value"},K(X,"check-icon"),{onClick:function(){P.submitEdit()}})),p.a.createElement("div",null,P.showDetected())))},P.submitEdit=function(X){var ie=P.props,re=ie.variable,G=ie.namespace,pe=ie.rjvId,Te=P.state,Ye=Te.editValue,it=Te.parsedInput,ft=Ye;X&&it.type&&(ft=it.value),P.setState({editMode:!1}),je.dispatch({name:"VARIABLE_UPDATED",rjvId:pe,data:{name:re.name,namespace:G,existing_value:re.value,new_value:ft,variable_removed:!1}})},P.showDetected=function(){var X=P.props,ie=X.theme,re=(X.variable,X.namespace,X.rjvId,P.state.parsedInput),G=(re.type,re.value,P.getDetectedInput());if(G)return p.a.createElement("div",null,p.a.createElement("div",K(ie,"detected-row"),G,p.a.createElement(Tt,{className:"edit-check detected",style:c({verticalAlign:"top",paddingLeft:"3px"},K(ie,"check-icon").style),onClick:function(){P.submitEdit(!0)}})))},P.getDetectedInput=function(){var X=P.state.parsedInput,ie=X.type,re=X.value,G=z(P).props,pe=G.theme;if(ie!==!1)switch(ie.toLowerCase()){case"object":return p.a.createElement("span",null,p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"{"),p.a.createElement("span",{style:c(c({},K(pe,"ellipsis").style),{},{cursor:"default"})},"..."),p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"}"));case"array":return p.a.createElement("span",null,p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"["),p.a.createElement("span",{style:c(c({},K(pe,"ellipsis").style),{},{cursor:"default"})},"..."),p.a.createElement("span",{style:c(c({},K(pe,"brace").style),{},{cursor:"default"})},"]"));case"string":return p.a.createElement(We,Object.assign({value:re},G));case"integer":return p.a.createElement(xe,Object.assign({value:re},G));case"float":return p.a.createElement(k,Object.assign({value:re},G));case"boolean":return p.a.createElement(oe,Object.assign({value:re},G));case"function":return p.a.createElement(I,Object.assign({value:re},G));case"null":return p.a.createElement(le,G);case"nan":return p.a.createElement(B,G);case"undefined":return p.a.createElement(Le,G);case"date":return p.a.createElement(ge,Object.assign({value:new Date(re)},G))}},P.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},P}return f(C,[{key:"render",value:function(){var E=this,P=this.props,X=P.variable,ie=P.singleIndent,re=P.type,G=P.theme,pe=P.namespace,Te=P.indentWidth,Ye=P.enableClipboard,it=P.onEdit,ft=P.onDelete,Qe=P.onSelect,dt=P.displayArrayKey,kt=P.quotesOnKeys,Re=this.state.editMode;return p.a.createElement("div",Object.assign({},K(G,"objectKeyVal",{paddingLeft:Te*ie}),{onMouseEnter:function(){return E.setState(c(c({},E.state),{},{hovered:!0}))},onMouseLeave:function(){return E.setState(c(c({},E.state),{},{hovered:!1}))},className:"variable-row",key:X.name}),re=="array"?dt?p.a.createElement("span",Object.assign({},K(G,"array-key"),{key:X.name+"_"+pe}),X.name,p.a.createElement("div",K(G,"colon"),":")):null:p.a.createElement("span",null,p.a.createElement("span",Object.assign({},K(G,"object-name"),{className:"object-key",key:X.name+"_"+pe}),!!kt&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"'),p.a.createElement("span",{style:{display:"inline-block"}},X.name),!!kt&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"')),p.a.createElement("span",K(G,"colon"),":")),p.a.createElement("div",Object.assign({className:"variable-value",onClick:Qe===!1&&it===!1?null:function(V){var Y=He(pe);(V.ctrlKey||V.metaKey)&&it!==!1?E.prepopInput(X):Qe!==!1&&(Y.shift(),Qe(c(c({},X),{},{namespace:Y})))}},K(G,"variableValue",{cursor:Qe===!1?"default":"pointer"})),this.getValue(X,Re)),Ye?p.a.createElement(Lt,{rowHovered:this.state.hovered,hidden:Re,src:X.value,clickCallback:Ye,theme:G,namespace:[].concat(He(pe),[X.name])}):null,it!==!1&&Re==0?this.getEditIcon():null,ft!==!1&&Re==0?this.getRemoveIcon():null)}}]),C}(p.a.PureComponent),Jn=function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).getObjectSize=function(){var re=E.props,G=re.size,pe=re.theme;if(re.displayObjectSize)return p.a.createElement("span",Object.assign({className:"object-size"},K(pe,"object-size")),G," item",G===1?"":"s")},E.getAddAttribute=function(re){var G=E.props,pe=G.theme,Te=G.namespace,Ye=G.name,it=G.src,ft=G.rjvId,Qe=G.depth;return p.a.createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:re?"inline-block":"none"}},p.a.createElement(Nt,Object.assign({className:"click-to-add-icon"},K(pe,"addVarIcon"),{onClick:function(){var dt={name:Qe>0?Ye:null,namespace:Te.splice(0,Te.length-1),existing_value:it,variable_removed:!1,key_name:null};O(it)==="object"?je.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:ft,data:dt}):je.dispatch({name:"VARIABLE_ADDED",rjvId:ft,data:c(c({},dt),{},{new_value:[].concat(He(it),[null])})})}})))},E.getRemoveObject=function(re){var G=E.props,pe=G.theme,Te=(G.hover,G.namespace),Ye=G.name,it=G.src,ft=G.rjvId;if(Te.length!==1)return p.a.createElement("span",{className:"click-to-remove",style:{display:re?"inline-block":"none"}},p.a.createElement(bt,Object.assign({className:"click-to-remove-icon"},K(pe,"removeVarIcon"),{onClick:function(){je.dispatch({name:"VARIABLE_REMOVED",rjvId:ft,data:{name:Ye,namespace:Te.splice(0,Te.length-1),existing_value:it,variable_removed:!0}})}})))},E.render=function(){var re=E.props,G=re.theme,pe=re.onDelete,Te=re.onAdd,Ye=re.enableClipboard,it=re.src,ft=re.namespace,Qe=re.rowHovered;return p.a.createElement("div",Object.assign({},K(G,"object-meta-data"),{className:"object-meta-data",onClick:function(dt){dt.stopPropagation()}}),E.getObjectSize(),Ye?p.a.createElement(Lt,{rowHovered:Qe,clickCallback:Ye,src:it,theme:G,namespace:ft}):null,Te!==!1?E.getAddAttribute(Qe):null,pe!==!1?E.getRemoveObject(Qe):null)},E}return C}(p.a.PureComponent);function En(j){var F=j.parent_type,C=j.namespace,E=j.quotesOnKeys,P=j.theme,X=j.jsvRoot,ie=j.name,re=j.displayArrayKey,G=j.name?j.name:"";return!X||ie!==!1&&ie!==null?F=="array"?re?p.a.createElement("span",Object.assign({},K(P,"array-key"),{key:C}),p.a.createElement("span",{className:"array-key"},G),p.a.createElement("span",K(P,"colon"),":")):p.a.createElement("span",null):p.a.createElement("span",Object.assign({},K(P,"object-name"),{key:C}),p.a.createElement("span",{className:"object-key"},E&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"'),p.a.createElement("span",null,G),E&&p.a.createElement("span",{style:{verticalAlign:"top"}},'"')),p.a.createElement("span",K(P,"colon"),":")):p.a.createElement("span",null)}function en(j){var F=j.theme;switch(j.iconStyle){case"triangle":return p.a.createElement(ct,Object.assign({},K(F,"expanded-icon"),{className:"expanded-icon"}));case"square":return p.a.createElement(Ge,Object.assign({},K(F,"expanded-icon"),{className:"expanded-icon"}));default:return p.a.createElement(Ae,Object.assign({},K(F,"expanded-icon"),{className:"expanded-icon"}))}}function Bn(j){var F=j.theme;switch(j.iconStyle){case"triangle":return p.a.createElement(ut,Object.assign({},K(F,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return p.a.createElement(ht,Object.assign({},K(F,"collapsed-icon"),{className:"collapsed-icon"}));default:return p.a.createElement(Ve,Object.assign({},K(F,"collapsed-icon"),{className:"collapsed-icon"}))}}var Pr=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).toggleCollapsed=function(X){var ie=[];for(var re in P.state.expanded)ie.push(P.state.expanded[re]);ie[X]=!ie[X],P.setState({expanded:ie})},P.state={expanded:[]},P}return f(C,[{key:"getExpandedIcon",value:function(E){var P=this.props,X=P.theme,ie=P.iconStyle;return this.state.expanded[E]?p.a.createElement(en,{theme:X,iconStyle:ie}):p.a.createElement(Bn,{theme:X,iconStyle:ie})}},{key:"render",value:function(){var E=this,P=this.props,X=P.src,ie=P.groupArraysAfterLength,re=(P.depth,P.name),G=P.theme,pe=P.jsvRoot,Te=P.namespace,Ye=(P.parent_type,H(P,["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"])),it=0,ft=5*this.props.indentWidth;pe||(it=5*this.props.indentWidth);var Qe=ie,dt=Math.ceil(X.length/Qe);return p.a.createElement("div",Object.assign({className:"object-key-val"},K(G,pe?"jsv-root":"objectKeyVal",{paddingLeft:it})),p.a.createElement(En,this.props),p.a.createElement("span",null,p.a.createElement(Jn,Object.assign({size:X.length},this.props))),He(Array(dt)).map(function(kt,Re){return p.a.createElement("div",Object.assign({key:Re,className:"object-key-val array-group"},K(G,"objectKeyVal",{marginLeft:6,paddingLeft:ft})),p.a.createElement("span",K(G,"brace-row"),p.a.createElement("div",Object.assign({className:"icon-container"},K(G,"icon-container"),{onClick:function(V){E.toggleCollapsed(Re)}}),E.getExpandedIcon(Re)),E.state.expanded[Re]?p.a.createElement(ui,Object.assign({key:re+Re,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:Qe,index_offset:Re*Qe,src:X.slice(Re*Qe,Re*Qe+Qe),namespace:Te,type:"array",parent_type:"array_group",theme:G},Ye)):p.a.createElement("span",Object.assign({},K(G,"brace"),{onClick:function(V){E.toggleCollapsed(Re)},className:"array-group-brace"}),"[",p.a.createElement("div",Object.assign({},K(G,"array-group-meta-data"),{className:"array-group-meta-data"}),p.a.createElement("span",Object.assign({className:"object-size"},K(G,"object-size")),Re*Qe," - ",Re*Qe+Qe>X.length?X.length:Re*Qe+Qe)),"]")))}))}}]),C}(p.a.PureComponent),A1=function(j){h(C,j);var F=g(C);function C(E){var P;s(this,C),(P=F.call(this,E)).toggleCollapsed=function(){P.setState({expanded:!P.state.expanded},function(){$.set(P.props.rjvId,P.props.namespace,"expanded",P.state.expanded)})},P.getObjectContent=function(ie,re,G){return p.a.createElement("div",{className:"pushed-content object-container"},p.a.createElement("div",Object.assign({className:"object-content"},K(P.props.theme,"pushed-content")),P.renderObjectContents(re,G)))},P.getEllipsis=function(){return P.state.size===0?null:p.a.createElement("div",Object.assign({},K(P.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:P.toggleCollapsed}),"...")},P.getObjectMetaData=function(ie){var re=P.props,G=(re.rjvId,re.theme,P.state),pe=G.size,Te=G.hovered;return p.a.createElement(Jn,Object.assign({rowHovered:Te,size:pe},P.props))},P.renderObjectContents=function(ie,re){var G,pe=P.props,Te=pe.depth,Ye=pe.parent_type,it=pe.index_offset,ft=pe.groupArraysAfterLength,Qe=pe.namespace,dt=P.state.object_type,kt=[],Re=Object.keys(ie||{});return P.props.sortKeys&&dt!=="array"&&(Re=Re.sort()),Re.forEach(function(V){if(G=new Ic(V,ie[V]),Ye==="array_group"&&it&&(G.name=parseInt(G.name)+it),ie.hasOwnProperty(V))if(G.type==="object")kt.push(p.a.createElement(ui,Object.assign({key:G.name,depth:Te+1,name:G.name,src:G.value,namespace:Qe.concat(G.name),parent_type:dt},re)));else if(G.type==="array"){var Y=ui;ft&&G.value.length>ft&&(Y=Pr),kt.push(p.a.createElement(Y,Object.assign({key:G.name,depth:Te+1,name:G.name,src:G.value,namespace:Qe.concat(G.name),type:"array",parent_type:dt},re)))}else kt.push(p.a.createElement(Jt,Object.assign({key:G.name+"_"+Qe,variable:G,singleIndent:5,namespace:Qe,type:P.props.type},re)))}),kt};var X=C.getState(E);return P.state=c(c({},X),{},{prevProps:{}}),P}return f(C,[{key:"getBraceStart",value:function(E,P){var X=this,ie=this.props,re=ie.src,G=ie.theme,pe=ie.iconStyle;if(ie.parent_type==="array_group")return p.a.createElement("span",null,p.a.createElement("span",K(G,"brace"),E==="array"?"[":"{"),P?this.getObjectMetaData(re):null);var Te=P?en:Bn;return p.a.createElement("span",null,p.a.createElement("span",Object.assign({onClick:function(Ye){X.toggleCollapsed()}},K(G,"brace-row")),p.a.createElement("div",Object.assign({className:"icon-container"},K(G,"icon-container")),p.a.createElement(Te,{theme:G,iconStyle:pe})),p.a.createElement(En,this.props),p.a.createElement("span",K(G,"brace"),E==="array"?"[":"{")),P?this.getObjectMetaData(re):null)}},{key:"render",value:function(){var E=this,P=this.props,X=P.depth,ie=P.src,re=(P.namespace,P.name,P.type,P.parent_type),G=P.theme,pe=P.jsvRoot,Te=P.iconStyle,Ye=H(P,["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle"]),it=this.state,ft=it.object_type,Qe=it.expanded,dt={};return pe||re==="array_group"?re==="array_group"&&(dt.borderLeft=0,dt.display="inline"):dt.paddingLeft=5*this.props.indentWidth,p.a.createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return E.setState(c(c({},E.state),{},{hovered:!0}))},onMouseLeave:function(){return E.setState(c(c({},E.state),{},{hovered:!1}))}},K(G,pe?"jsv-root":"objectKeyVal",dt)),this.getBraceStart(ft,Qe),Qe?this.getObjectContent(X,ie,c({theme:G,iconStyle:Te},Ye)):this.getEllipsis(),p.a.createElement("span",{className:"brace-row"},p.a.createElement("span",{style:c(c({},K(G,"brace").style),{},{paddingLeft:Qe?"3px":"0px"})},ft==="array"?"]":"}"),Qe?null:this.getObjectMetaData(ie)))}}],[{key:"getDerivedStateFromProps",value:function(E,P){var X=P.prevProps;return E.src!==X.src||E.collapsed!==X.collapsed||E.name!==X.name||E.namespace!==X.namespace||E.rjvId!==X.rjvId?c(c({},C.getState(E)),{},{prevProps:E}):null}}]),C}(p.a.PureComponent);A1.getState=function(j){var F=Object.keys(j.src).length,C=(j.collapsed===!1||j.collapsed!==!0&&j.collapsed>j.depth)&&(!j.shouldCollapse||j.shouldCollapse({name:j.name,src:j.src,type:O(j.src),namespace:j.namespace})===!1)&&F!==0;return{expanded:$.get(j.rjvId,j.namespace,"expanded",C),object_type:j.type==="array"?"array":"object",parent_type:j.type==="array"?"array":"object",size:F,hovered:!1}};var Ic=function j(F,C){s(this,j),this.name=F,this.value=C,this.type=O(C)};A(A1);var ui=A1,Bc=function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).render=function(){var re=z(E).props,G=[re.name],pe=ui;return Array.isArray(re.src)&&re.groupArraysAfterLength&&re.src.length>re.groupArraysAfterLength&&(pe=Pr),p.a.createElement("div",{className:"pretty-json-container object-container"},p.a.createElement("div",{className:"object-content"},p.a.createElement(pe,Object.assign({namespace:G,depth:0,jsvRoot:!0},re))))},E}return C}(p.a.PureComponent),Dc=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).closeModal=function(){je.dispatch({rjvId:P.props.rjvId,name:"RESET"})},P.submit=function(){P.props.submit(P.state.input)},P.state={input:E.input?E.input:""},P}return f(C,[{key:"render",value:function(){var E=this,P=this.props,X=P.theme,ie=P.rjvId,re=P.isValid,G=this.state.input,pe=re(G);return p.a.createElement("div",Object.assign({className:"key-modal-request"},K(X,"key-modal-request"),{onClick:this.closeModal}),p.a.createElement("div",Object.assign({},K(X,"key-modal"),{onClick:function(Te){Te.stopPropagation()}}),p.a.createElement("div",K(X,"key-modal-label"),"Key Name:"),p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("input",Object.assign({},K(X,"key-modal-input"),{className:"key-modal-input",ref:function(Te){return Te&&Te.focus()},spellCheck:!1,value:G,placeholder:"...",onChange:function(Te){E.setState({input:Te.target.value})},onKeyPress:function(Te){pe&&Te.key==="Enter"?E.submit():Te.key==="Escape"&&E.closeModal()}})),pe?p.a.createElement(Tt,Object.assign({},K(X,"key-modal-submit"),{className:"key-modal-submit",onClick:function(Te){return E.submit()}})):null),p.a.createElement("span",K(X,"key-modal-cancel"),p.a.createElement(sn,Object.assign({},K(X,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){je.dispatch({rjvId:ie,name:"RESET"})}})))))}}]),C}(p.a.PureComponent),Rc=function(j){h(C,j);var F=g(C);function C(){var E;s(this,C);for(var P=arguments.length,X=new Array(P),ie=0;ie<P;ie++)X[ie]=arguments[ie];return(E=F.call.apply(F,[this].concat(X))).isValid=function(re){var G=E.props.rjvId,pe=$.get(G,"action","new-key-request");return re!=""&&Object.keys(pe.existing_value).indexOf(re)===-1},E.submit=function(re){var G=E.props.rjvId,pe=$.get(G,"action","new-key-request");pe.new_value=c({},pe.existing_value),pe.new_value[re]=E.props.defaultValue,je.dispatch({name:"VARIABLE_ADDED",rjvId:G,data:pe})},E}return f(C,[{key:"render",value:function(){var E=this.props,P=E.active,X=E.theme,ie=E.rjvId;return P?p.a.createElement(Dc,{rjvId:ie,theme:X,isValid:this.isValid,submit:this.submit}):null}}]),C}(p.a.PureComponent),zo=function(j){h(C,j);var F=g(C);function C(){return s(this,C),F.apply(this,arguments)}return f(C,[{key:"render",value:function(){var E=this.props,P=E.message,X=E.active,ie=E.theme,re=E.rjvId;return X?p.a.createElement("div",Object.assign({className:"validation-failure"},K(ie,"validation-failure"),{onClick:function(){je.dispatch({rjvId:re,name:"RESET"})}}),p.a.createElement("span",K(ie,"validation-failure-label"),P),p.a.createElement(sn,K(ie,"validation-failure-clear"))):null}}]),C}(p.a.PureComponent),wa=function(j){h(C,j);var F=g(C);function C(E){var P;return s(this,C),(P=F.call(this,E)).rjvId=Date.now().toString(),P.getListeners=function(){return{reset:P.resetState,"variable-update":P.updateSrc,"add-key-request":P.addKeyRequest}},P.updateSrc=function(){var X,ie=$.get(P.rjvId,"action","variable-update"),re=ie.name,G=ie.namespace,pe=ie.new_value,Te=ie.existing_value,Ye=(ie.variable_removed,ie.updated_src),it=ie.type,ft=P.props,Qe=ft.onEdit,dt=ft.onDelete,kt=ft.onAdd,Re={existing_src:P.state.src,new_value:pe,updated_src:Ye,name:re,namespace:G,existing_value:Te};switch(it){case"variable-added":X=kt(Re);break;case"variable-edited":X=Qe(Re);break;case"variable-removed":X=dt(Re)}X!==!1?($.set(P.rjvId,"global","src",Ye),P.setState({src:Ye})):P.setState({validationFailure:!0})},P.addKeyRequest=function(){P.setState({addKeyRequest:!0})},P.resetState=function(){P.setState({validationFailure:!1,addKeyRequest:!1})},P.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:C.defaultProps.src,name:C.defaultProps.name,theme:C.defaultProps.theme,validationMessage:C.defaultProps.validationMessage,prevSrc:C.defaultProps.src,prevName:C.defaultProps.name,prevTheme:C.defaultProps.theme},P}return f(C,[{key:"componentDidMount",value:function(){$.set(this.rjvId,"global","src",this.state.src);var E=this.getListeners();for(var P in E)$.on(P+"-"+this.rjvId,E[P]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(E,P){P.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),P.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),E.src!==this.state.src&&$.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var E=this.getListeners();for(var P in E)$.removeListener(P+"-"+this.rjvId,E[P])}},{key:"render",value:function(){var E=this.state,P=E.validationFailure,X=E.validationMessage,ie=E.addKeyRequest,re=E.theme,G=E.src,pe=E.name,Te=this.props,Ye=Te.style,it=Te.defaultValue;return p.a.createElement("div",{className:"react-json-view",style:c(c({},K(re,"app-container").style),Ye)},p.a.createElement(zo,{message:X,active:P,theme:re,rjvId:this.rjvId}),p.a.createElement(Bc,Object.assign({},this.props,{src:G,name:pe,theme:re,type:O(G),rjvId:this.rjvId})),p.a.createElement(Rc,{active:ie,theme:re,rjvId:this.rjvId,defaultValue:it}))}}],[{key:"getDerivedStateFromProps",value:function(E,P){if(E.src!==P.prevSrc||E.name!==P.prevName||E.theme!==P.prevTheme){var X={src:E.src,name:E.name,theme:E.theme,validationMessage:E.validationMessage,prevSrc:E.src,prevName:E.name,prevTheme:E.theme};return C.validateState(X)}return null}}]),C}(p.a.PureComponent);wa.defaultProps={src:{},name:"root",theme:"rjv-default",collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:"triangle",style:{},validationMessage:"Validation Error",defaultValue:null,displayArrayKey:!0},wa.validateState=function(j){var F={};return O(j.theme)!=="object"||function(C){var E=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(O(C)==="object"){for(var P=0;P<E.length;P++)if(!(E[P]in C))return!1;return!0}return!1}(j.theme)||(console.error("react-json-view error:","theme prop must be a theme name or valid base-16 theme object.",'defaulting to "rjv-default" theme'),F.theme="rjv-default"),O(j.src)!=="object"&&O(j.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),F.name="ERROR",F.src={message:"src property must be a valid json object"}),c(c({},j),F)},A(wa),a.default=wa}])})})(Dj);var rze=Dj.exports;const aze=An(rze),ize=({onClick:e,isCollapsed:t})=>{const n="json.".concat(t?"expandAll":"collapseAll");return Ce.jsx(Zr,{onClick:e,children:Ce.jsx("span",{children:Tn(n)})})};var Ac={};function W5(e){"@babel/helpers - typeof";return W5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W5(e)}Object.defineProperty(Ac,"__esModule",{value:!0});Ac.CopyToClipboard=void 0;var M2=Rj(y),oze=Rj(kV),lze=["text","onCopy","options","children"];function Rj(e){return e&&e.__esModule?e:{default:e}}function Lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Hm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lm(Object(n),!0).forEach(function(r){g9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cze(e,t){if(e==null)return{};var n=sze(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sze(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function uze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fze(e,t,n){return t&&Vm(e.prototype,t),n&&Vm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U5(e,t)}function U5(e,t){return U5=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},U5(e,t)}function hze(e){var t=vze();return function(){var r=T0(e),a;if(t){var i=T0(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return pze(this,a)}}function pze(e,t){if(t&&(W5(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nj(e)}function Nj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function T0(e){return T0=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},T0(e)}function g9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wj=function(e){dze(n,e);var t=hze(n);function n(){var r;uze(this,n);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r=t.call.apply(t,[this].concat(i)),g9(Nj(r),"onClick",function(l){var c=r.props,s=c.text,u=c.onCopy,f=c.children,d=c.options,h=M2.default.Children.only(f),v=(0,oze.default)(s,d);u&&u(s,v),h&&h.props&&typeof h.props.onClick=="function"&&h.props.onClick(l)}),r}return fze(n,[{key:"render",value:function(){var a=this.props;a.text,a.onCopy,a.options;var i=a.children,o=cze(a,lze),l=M2.default.Children.only(i);return M2.default.cloneElement(l,Hm(Hm({},o),{},{onClick:this.onClick}))}}]),n}(M2.default.PureComponent);Ac.CopyToClipboard=Wj;g9(Wj,"defaultProps",{onCopy:void 0,options:void 0});var mze=Ac,q5=mze.CopyToClipboard;q5.CopyToClipboard=q5;var gze=q5;const yze=1e3,bze=({children:e,toCopy:t,copiedInterval:n=yze})=>{const[r,a]=y.useState(!1),i=()=>{r||a(!0)};y.useEffect(()=>{if(r){const l=setTimeout(()=>a(!1),n);return()=>clearTimeout(l)}},[n,r]);const o="copyContent.".concat(r?"copied":"copy");return Ce.jsx(gze.CopyToClipboard,{onCopy:i,text:t??"",children:e({copyMessageId:o,isCopied:r,toCopy:t})})};function _ze(e){try{return JSON.stringify(e)}catch{return null}}const wze=({schema:e})=>{const t=_ze(e);return Ce.jsx(bze,{toCopy:t,children:({copyMessageId:n})=>Ce.jsx(Zr,{children:Ce.jsx("span",{children:Tn(n)})})})},Mze=1,Oze=10,Xo={buttons:{display:"flex",gap:8,position:"absolute",right:10,top:10},center:{left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"},container:{height:"100%",position:"relative"},viewer:{backgroundColor:"#f1f1f1",borderRadius:8,height:"100%",overflow:"auto",padding:16}},zze=({schema:e})=>{const[t,n]=y.useState(!0),r=()=>n(!t);return e?Ce.jsxs("div",{className:"reactord-jsonviewer",style:Xo.container,children:[Ce.jsx(aze,{collapseStringsAfterLength:150,collapsed:t?Mze:Oze,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,name:!1,quotesOnKeys:!1,src:e,style:Xo.viewer}),Ce.jsxs("div",{style:Xo.buttons,children:[Ce.jsx(wze,{schema:e}),Ce.jsx(ize,{isCollapsed:t,onClick:r})]})]}):Ce.jsx("div",{style:Xo.viewer,children:Ce.jsx("div",{style:Xo.center,children:Ce.jsx("span",{children:"Missing schema message"})})})},jm=e=>e.source||"__other_libraries_key__",I6=e=>{var t;return((t=e.libraryName)!=null?t:e.source)||Tn("components.components-explorer.other-libs.name")},xze=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),B6=e=>{var t;return(t=e.info.label)!=null?t:xze(e.tag)},Cze=({info$:e,hide:t})=>{const[n,r]=y.useState(""),[a,i]=y.useState([]),[o,l]=y.useState(),[c,s]=y.useState(!1),u=KOe(e,(x,M)=>[...x,...M],[]),f=y.useCallback(()=>{l(void 0),s(!1)},[]),d=y.useCallback(()=>{t(),setTimeout(()=>{r(""),i([]),f()},300)},[f,t]),h=y.useMemo(()=>{if(o!=null&&o.info.example)try{return JSON.parse(o.info.example)}catch{console.error("Invalid example for component ".concat(o.tag));return}},[o]),v=y.useMemo(()=>{const x=u.reduce((M,{info:T})=>{const A=jm(T);return M[A]===void 0?{...M,[A]:I6(T)}:M},{});return Object.entries(x).map(([M,T])=>Ce.jsx(ei.Option,{value:M,children:T},M))},[u]),b=y.useMemo(()=>u.reduce((x,M)=>{const T=jm(M.info);if(a.length>0&&!a.includes(T)||n&&!B6(M).toLowerCase().includes(n.toLowerCase()))return x;const A=x[T];return A===void 0?{...x,[T]:{components:[M],label:I6(M.info)}}:(A.components.push(M),x)},{}),[a,n,u]),z=y.useMemo(()=>Ce.jsxs("div",{className:"components-explorer-comp-header",children:[Ce.jsx("div",{className:"components-explorer-comp-title",children:Ce.jsx("span",{children:Tn("components.components-explorer.drawer.title")})}),Ce.jsx(Zr,{className:"components-explorer-comp-title-btn",onClick:d,type:"link",children:Ce.jsx(Tm,{})})]}),[d]),m=y.useMemo(()=>{const x=Object.entries(b).map(([M,T])=>{const A=T.components.map(H=>Ce.jsxs("div",{className:"components-explorer-component-row",onClick:()=>l(H),children:[H.info.iconSrc?Ce.jsx("img",{alt:"",height:16,src:H.info.iconSrc,width:16}):Ce.jsx(COe,{}),B6(H)]},H.tag));return Ce.jsxs("div",{className:"components-explorer-lib",children:[Ce.jsx("span",{className:"components-explorer-lib-name",children:T.label}),A]},M)});return Ce.jsxs("div",{className:"components-explorer-lib-container",children:[Ce.jsxs("div",{className:"components-explorer-lib-filters",children:[Ce.jsx(ci.Search,{allowClear:!0,onChange:M=>r(M.target.value),placeholder:Tn("components.components-explorer.drawer.search.ph"),value:n}),Ce.jsx(ei,{allowClear:!0,getPopupContainer:M=>M,mode:"multiple",onChange:M=>i(M),placeholder:Tn("components.components-explorer.drawer.lib-filter.ph"),value:a,children:v})]}),Ce.jsx("div",{style:{overflowY:"auto"},children:x.length>0?x:Ce.jsx(kv,{icon:Ce.jsx(SOe,{}),subTitle:Ce.jsx("span",{children:Tn("components.components-explorer.drawer.no-data.subtitle")}),title:Ce.jsx("span",{children:Tn("components.components-explorer.drawer.no-data.title")})})})]})},[v,a,b,n]),g=y.useMemo(()=>o&&Ce.jsxs("div",{className:"components-explorer-comp-header",children:[Ce.jsxs("div",{className:"components-explorer-comp-title",children:[Ce.jsx(Zr,{className:"components-explorer-comp-title-btn",onClick:f,type:"link",children:Ce.jsx(xOe,{})}),Ce.jsx("span",{children:B6(o)}),Ce.jsx(wve,{className:"components-explorer-comp-title-tag",color:"blue",children:I6(o.info)}),o.info.docLink&&Ce.jsx(nze,{docLink:o.info.docLink})]}),Ce.jsx(Zr,{className:"components-explorer-comp-title-btn",onClick:d,type:"link",children:Ce.jsx(Tm,{})})]}),[d,f,o]),_=y.useMemo(()=>o&&Ce.jsxs("div",{className:"components-explorer-comp-detail",children:[o.info.previewImage&&Ce.jsx("div",{className:"components-explorer-comp-detail-img",children:Ce.jsx("img",{alt:"Preview",src:o.info.previewImage})}),o.info.descriptionLong&&Ce.jsxs("div",{className:"components-explorer-comp-detail-section",children:[Ce.jsx("span",{children:Tn("components.components-explorer.detail.description")}),Ce.jsx("div",{style:{display:"flex",flexDirection:"column"},children:c?Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(Vv,{children:Ce.jsx(hwe,{className:"components-explorer-markdown",remarkPlugins:[zOe],children:o.info.descriptionLong})}),Ce.jsxs(Zr,{className:"components-explorer-expand-btn",onClick:()=>s(!1),children:[Ce.jsx(kOe,{}),Ce.jsx("span",{children:Tn("components.components-explorer.detail.description.reduce")})]})]}):Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(Vv.Paragraph,{ellipsis:{rows:2},children:o.info.descriptionLong}),Ce.jsxs(Zr,{className:"components-explorer-expand-btn",onClick:()=>s(!0),children:[Ce.jsx(EOe,{}),Ce.jsx("span",{children:Tn("components.components-explorer.detail.description.expand")})]})]})})]}),h!==void 0&&Ce.jsxs("div",{className:"components-explorer-comp-detail-section",children:[Ce.jsx("span",{children:Tn("components.components-explorer.detail.example")}),Ce.jsx(zze,{schema:h})]}),!o.info.previewImage&&!o.info.descriptionLong&&!h&&Ce.jsx(kv,{icon:Ce.jsx(POe,{}),subTitle:Ce.jsx("span",{children:Tn("components.components-explorer.detail.no-data.subtitle")}),title:Ce.jsx("span",{children:Tn("components.components-explorer.detail.no-data.title")})})]}),[c,h,o]),p=y.useMemo(()=>o===void 0?{content:m,title:z}:{content:_,title:g},[_,g,m,z,o]);return Ce.jsxs("div",{className:"components-explorer-container",children:[p.title,p.content]})},Sze="en",kze=(e,t=Sze)=>typeof e=="string"?e:e==null?void 0:e[t];function Eze(e){return Object.entries(e).reduce((t,[n,r])=>(t[n]=kze(r),t),{})}const co=(...e)=>{},Uj=e=>Array.isArray(e)?e:[e],qj=({document:{baseURI:e},location:{href:t}})=>n=>new URL(n,new URL(e,t)),Kj=(e,t)=>{let n=t;return t instanceof URL||(n=e(typeof t=="string"?t:t.url)),n},Pze=(e,t)=>{const{href:n,origin:r}=t;return e===r?n.substring(e.length):n},Tze=(e,t,n=0)=>{const{selectors:r}=t;return e.querySelector(r[n])};function $ze(e){return document.querySelector(e)}const Lze=(e,t)=>{const n=t.get(e);if(n){const{css:r,rest:a,subscription:i}=n;a.forEach(o=>{var l;return(l=o.__unfocus_handler)==null?void 0:l.call(o)}),i.unsubscribe(),n.elementToFocus.forEach((o,l)=>{Object.assign(o.style,r[l])})}t.delete(e)},Hze=e=>e!==void 0;function Vze(e,t,n){const r=new Map,a=$ze.bind(e),i=t.pipe(PF(),TF(([o])=>{var l;if(o!==void 0){const c=Tze(e,o);c!==null&&((l=c.__unfocus_handler)==null||l.call(c),Lze(c,r))}}),Jr(([,o])=>o),Ln(Hze),Jr(o=>{const[l,...c]=o.selectors,s=c.reduce((u,f)=>{var d;const h=a(f);if(h){u.push(h);const v=(d=h.__focus_handler)==null?void 0:d.call(h);v&&"then"in v&&v.catch(co)}return u},[]);return{first:l,next:o,otherElements:s}}),Jr(o=>({...o,firstElement:a(o.first)})),Ln(o=>o.firstElement!==null),Jr(o=>{var l,c;return{...o,focus:(c=(l=o.firstElement).__focus_handler)==null?void 0:c.call(l)}}),EF(({focus:o,...l})=>(o&&"then"in o?o:Promise.resolve(o??l.firstElement)).then(s=>({focus:s,...l})).catch(()=>({focus:void 0,...l})))).subscribe(({otherElements:o,next:l,firstElement:c,focus:s})=>{const u=Object.keys(l.style),f=new Ur,d=Uj(s??c).filter(Boolean),h={css:[],elementToFocus:d,rest:o,subscription:f},v=u.reduce((b,z)=>(d.forEach((m,g)=>{var _;b.css[g]=Object.assign((_=b.css[g])!=null?_:{},{[z]:m.style[z]})}),b),h);f.add(n.pipe(Ln(b=>b==="select"),Ha(1)).subscribe(()=>{d.forEach(b=>{Object.assign(b.style,l.style)})})),r.set(c,v)});return()=>i.unsubscribe()}var D6;const $0=window,so=$0.trustedTypes,Am=so?so.createPolicy("lit-html",{createHTML:e=>e}):void 0,K5="$lit$",Y1=`lit$${(Math.random()+"").slice(9)}$`,Gj="?"+Y1,jze=`<${Gj}>`,ni=document,J4=()=>ni.createComment(""),el=e=>e===null||typeof e!="object"&&typeof e!="function",Yj=Array.isArray,Aze=e=>Yj(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",R6=`[
|
88
88
|
\f\r]`,Zo=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fm=/-->/g,Im=/>/g,ka=RegExp(`>|${R6}(?:([^\\s"'>=/]+)(${R6}*=${R6}*(?:[^
|
89
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Bm=/'/g,Dm=/"/g,Qj=/^(?:script|style|textarea|title)$/i,Fze=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Ize=Fze(1),tl=Symbol.for("lit-noChange"),nn=Symbol.for("lit-nothing"),Rm=new WeakMap,Fa=ni.createTreeWalker(ni,129,null,!1);function Xj(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Am!==void 0?Am.createHTML(t):t}const Bze=(e,t)=>{const n=e.length-1,r=[];let a,i=t===2?"<svg>":"",o=Zo;for(let l=0;l<n;l++){const c=e[l];let s,u,f=-1,d=0;for(;d<c.length&&(o.lastIndex=d,u=o.exec(c),u!==null);)d=o.lastIndex,o===Zo?u[1]==="!--"?o=Fm:u[1]!==void 0?o=Im:u[2]!==void 0?(Qj.test(u[2])&&(a=RegExp("</"+u[2],"g")),o=ka):u[3]!==void 0&&(o=ka):o===ka?u[0]===">"?(o=a??Zo,f=-1):u[1]===void 0?f=-2:(f=o.lastIndex-u[2].length,s=u[1],o=u[3]===void 0?ka:u[3]==='"'?Dm:Bm):o===Dm||o===Bm?o=ka:o===Fm||o===Im?o=Zo:(o=ka,a=void 0);const h=o===ka&&e[l+1].startsWith("/>")?" ":"";i+=o===Zo?c+jze:f>=0?(r.push(s),c.slice(0,f)+K5+c.slice(f)+Y1+h):c+Y1+(f===-2?(r.push(void 0),l):h)}return[Xj(e,i+(e[n]||"<?>")+(t===2?"</svg>":"")),r]};class nl{constructor({strings:t,_$litType$:n},r){let a;this.parts=[];let i=0,o=0;const l=t.length-1,c=this.parts,[s,u]=Bze(t,n);if(this.el=nl.createElement(s,r),Fa.currentNode=this.el.content,n===2){const f=this.el.content,d=f.firstChild;d.remove(),f.append(...d.childNodes)}for(;(a=Fa.nextNode())!==null&&c.length<l;){if(a.nodeType===1){if(a.hasAttributes()){const f=[];for(const d of a.getAttributeNames())if(d.endsWith(K5)||d.startsWith(Y1)){const h=u[o++];if(f.push(d),h!==void 0){const v=a.getAttribute(h.toLowerCase()+K5).split(Y1),b=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:b[2],strings:v,ctor:b[1]==="."?Rze:b[1]==="?"?Wze:b[1]==="@"?Uze:Fc})}else c.push({type:6,index:i})}for(const d of f)a.removeAttribute(d)}if(Qj.test(a.tagName)){const f=a.textContent.split(Y1),d=f.length-1;if(d>0){a.textContent=so?so.emptyScript:"";for(let h=0;h<d;h++)a.append(f[h],J4()),Fa.nextNode(),c.push({type:2,index:++i});a.append(f[d],J4())}}}else if(a.nodeType===8)if(a.data===Gj)c.push({type:2,index:i});else{let f=-1;for(;(f=a.data.indexOf(Y1,f+1))!==-1;)c.push({type:7,index:i}),f+=Y1.length-1}i++}}static createElement(t,n){const r=ni.createElement("template");return r.innerHTML=t,r}}function uo(e,t,n=e,r){var a,i,o,l;if(t===tl)return t;let c=r!==void 0?(a=n._$Co)===null||a===void 0?void 0:a[r]:n._$Cl;const s=el(t)?void 0:t._$litDirective$;return(c==null?void 0:c.constructor)!==s&&((i=c==null?void 0:c._$AO)===null||i===void 0||i.call(c,!1),s===void 0?c=void 0:(c=new s(e),c._$AT(e,n,r)),r!==void 0?((o=(l=n)._$Co)!==null&&o!==void 0?o:l._$Co=[])[r]=c:n._$Cl=c),c!==void 0&&(t=uo(e,c._$AS(e,t.values),c,r)),t}class Dze{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var n;const{el:{content:r},parts:a}=this._$AD,i=((n=t==null?void 0:t.creationScope)!==null&&n!==void 0?n:ni).importNode(r,!0);Fa.currentNode=i;let o=Fa.nextNode(),l=0,c=0,s=a[0];for(;s!==void 0;){if(l===s.index){let u;s.type===2?u=new Cl(o,o.nextSibling,this,t):s.type===1?u=new s.ctor(o,s.name,s.strings,this,t):s.type===6&&(u=new qze(o,this,t)),this._$AV.push(u),s=a[++c]}l!==(s==null?void 0:s.index)&&(o=Fa.nextNode(),l++)}return Fa.currentNode=ni,i}v(t){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}}class Cl{constructor(t,n,r,a){var i;this.type=2,this._$AH=nn,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=a,this._$Cp=(i=a==null?void 0:a.isConnected)===null||i===void 0||i}get _$AU(){var t,n;return(n=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=uo(this,t,n),el(t)?t===nn||t==null||t===""?(this._$AH!==nn&&this._$AR(),this._$AH=nn):t!==this._$AH&&t!==tl&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Aze(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==nn&&el(this._$AH)?this._$AA.nextSibling.data=t:this.$(ni.createTextNode(t)),this._$AH=t}g(t){var n;const{values:r,_$litType$:a}=t,i=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=nl.createElement(Xj(a.h,a.h[0]),this.options)),a);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===i)this._$AH.v(r);else{const o=new Dze(i,this),l=o.u(this.options);o.v(r),this.$(l),this._$AH=o}}_$AC(t){let n=Rm.get(t.strings);return n===void 0&&Rm.set(t.strings,n=new nl(t)),n}T(t){Yj(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,a=0;for(const i of t)a===n.length?n.push(r=new Cl(this.k(J4()),this.k(J4()),this,this.options)):r=n[a],r._$AI(i),a++;a<n.length&&(this._$AR(r&&r._$AB.nextSibling,a),n.length=a)}_$AR(t=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);t&&t!==this._$AB;){const a=t.nextSibling;t.remove(),t=a}}setConnected(t){var n;this._$AM===void 0&&(this._$Cp=t,(n=this._$AP)===null||n===void 0||n.call(this,t))}}class Fc{constructor(t,n,r,a,i){this.type=1,this._$AH=nn,this._$AN=void 0,this.element=t,this.name=n,this._$AM=a,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=nn}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,n=this,r,a){const i=this.strings;let o=!1;if(i===void 0)t=uo(this,t,n,0),o=!el(t)||t!==this._$AH&&t!==tl,o&&(this._$AH=t);else{const l=t;let c,s;for(t=i[0],c=0;c<i.length-1;c++)s=uo(this,l[r+c],n,c),s===tl&&(s=this._$AH[c]),o||(o=!el(s)||s!==this._$AH[c]),s===nn?t=nn:t!==nn&&(t+=(s??"")+i[c+1]),this._$AH[c]=s}o&&!a&&this.j(t)}j(t){t===nn?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Rze extends Fc{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nn?void 0:t}}const Nze=so?so.emptyScript:"";class Wze extends Fc{constructor(){super(...arguments),this.type=4}j(t){t&&t!==nn?this.element.setAttribute(this.name,Nze):this.element.removeAttribute(this.name)}}class Uze extends Fc{constructor(t,n,r,a,i){super(t,n,r,a,i),this.type=5}_$AI(t,n=this){var r;if((t=(r=uo(this,t,n,0))!==null&&r!==void 0?r:nn)===tl)return;const a=this._$AH,i=t===nn&&a!==nn||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,o=t!==nn&&(a===nn||i);i&&this.element.removeEventListener(this.name,this,a),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,t):this._$AH.handleEvent(t)}}class qze{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){uo(this,t)}}const Nm=$0.litHtmlPolyfillSupport;Nm==null||Nm(nl,Cl),((D6=$0.litHtmlVersions)!==null&&D6!==void 0?D6:$0.litHtmlVersions=[]).push("2.8.0");const Kze=(e,t,n)=>{var r,a;const i=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:t;let o=i._$litPart$;if(o===void 0){const l=(a=n==null?void 0:n.renderBefore)!==null&&a!==void 0?a:null;i._$litPart$=o=new Cl(t.insertBefore(J4(),l),l,void 0,n??{})}return o._$AI(e),o};const Gze=e=>{const t=e.charAt(0);return!(t!==e.charAt(e.length-1)||t!=="'"&&t!=='"')};function Yze(e){const t=e.match(/([^.]+)/g);return n=>t.reduce((r,a)=>{let i=a;if(a.startsWith("[")&&a.endsWith("]")){const o=a.slice(1,-1),l=Number.parseInt(o);!Number.isNaN(l)&&l.toString()===o?i=l:(o.startsWith('"')&&o.endsWith('"')||o.startsWith("'")&&o.endsWith("'"))&&(i=o.slice(1,-1))}if(i==="")throw new TypeError("42",{cause:e});return typeof r=="object"&&r!==null?r[i]:void 0},n)}function Qze(e,t={}){return e.reduce((n,r,a)=>{const i=r.trim(),o=Number.parseInt(i),l=Number.parseFloat(i);if(i==="")n[a]=i;else if(Gze(i))n[a]=i.slice(1,-1);else if(["true","false"].includes(i))n[a]=i==="true";else if(!Number.isNaN(o)&&o.toString()===i)n[a]=o;else if(!Number.isNaN(l)&&l.toString()===i)n[a]=l;else if(i.startsWith("{")||i.startsWith("["))try{n[a]=JSON.parse(i)}catch(c){if(c instanceof SyntaxError)throw new TypeError("43",{cause:c.message})}else n[a]=Yze(i)(t);return n},[])}function Zj(e){return Array.isArray(e)?e:[e]}function Xze(e){const t=typeof e=="string"?[e]:e;return Array.isArray(t)?t:Zj(t.uris)}const Zze=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Jze(e){return Zze.includes(e.tag)}function exe(e){return Array.isArray(e)?e:[e]}function Jj(e,t,n){if(typeof t!="object"){e.push("".concat(t));return}exe(t).forEach(r=>{if(typeof r!="object"){e.push("".concat(r));return}const{tag:a,attributes:i={},booleanAttributes:o=[],properties:l={}}=r,c=Jze(r),s="<".concat(a),u=c?"/>":">",f="</".concat(a,">"),d=Object.entries(i).reduce((g,[_,p])=>(g.push("".concat(_,'="').concat(p,'"')),g),[]),h=Zj(o),{override:v,props:b}=Object.entries(l).reduce((g,[_,p])=>(n.has(_)?typeof p=="string"&&(g.override[_]=p):g.props[_]=p,g),{override:{},props:{}}),z=Array.from(n.keys()).map(g=>{var _;return".".concat(g,"=${").concat((_=v[g])!=null?_:g,"}")}),m=Object.entries(b).reduce((g,[_,p])=>{switch(typeof p){case"object":case"number":case"boolean":g.push(".".concat(_,"=${").concat(JSON.stringify(p),"}"));break;case"string":g.push(".".concat(_,'=${"').concat(p,'"}'));break}return g},[]);if(e.push([s,d.join(" "),h.join(" "),z.join(" "),m.join(" "),u].join(" ")),!c){const{content:g}=r;g!==void 0&&Jj(e,g,n),e.push(f)}})}function txe(e,t=new Set){const n=[];return Jj(n,e,t),n.join(" ")}const nxe="modulepreload",rxe=function(e,t){return new URL(e,t).href},Wm={},axe=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link");a=Promise.all(n.map(o=>{if(o=rxe(o,r),o in Wm)return;Wm[o]=!0;const l=o.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const d=i[f];if(d.href===o&&(!l||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${c}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":nxe,l||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),l)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})}))}return a.then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},eA=(e,...t)=>{axe(()=>import("./errors-xGUFKyGs.js"),__vite__mapDeps([]),import.meta.url).then(({default:n})=>{const r=n[e];r?console.error(r(...t)):console.error(...t)}).catch(n=>{console.error("[micro-lc][composer]: Dynamic import error while importing logger utils - ".concat(n.message))})},ixe=e=>t=>{eA("0",e,t.message)},oxe={dynamicImportError:ixe,error:eA},lxe=Object.freeze(Object.defineProperty({__proto__:null,logger:oxe},Symbol.toStringTag,{value:"Module"}));var cxe=lxe;const sxe=()=>{const e=[];return Object.assign(e,{append:t=>{e[e.length-1]+=t},flush:()=>{e.push("")}})},uxe=()=>{const e=[""];return Object.assign(e,{append:t=>{e[e.length-1]+=t},flush:()=>{e.push("")}})},fxe=(e,t)=>{const n=[...e];return{literals:Object.defineProperty(n,"raw",{get:()=>n}),variables:[...t]}},Um=()=>({braceCnt:0,literals:uxe(),mode:0,variables:sxe()}),dxe=e=>{const t=()=>{const r=Array.from(e).reduce((a,i)=>{switch(a.mode){case 2:{if(i==="}"&&a.braceCnt===0){a.mode=0;break}i==="{"?a.braceCnt+=1:i==="}"&&a.braceCnt>0&&(a.braceCnt-=1),a.variables.append(i);break}case 1:{a.literals.append(i),i==="{"?(a.literals.flush(),a.variables.flush(),a.mode=2):a.mode=0;break}case 0:default:i==="$"&&(a.mode=1),a.literals.append(i)}return a},Um());return r.mode===2&&(r.literals.pop(),r.literals.append(r.variables.pop())),r.literals.forEach((a,i,o)=>{i<o.length-1&&(o[i]=a.slice(0,-2))}),r};let n=e.length===0;return{run:()=>{let r;n||(r=t(),n=!0);const{literals:a,variables:i}=r??Um();return fxe(a,i)}}},hxe=async(e,t="SHA-1")=>window.crypto.subtle.digest(t,new TextEncoder().encode(e)),N6=new Map,pxe=async e=>{const t=await hxe(e).catch(n=>{cxe.logger.error("40",e,n.message)});if(!t||!N6.has(t)){const n=dxe(e).run();return t&&N6.set(t,n),n}return N6.get(t)};class W6 extends y1{}function vxe(){const e=[],t=new Proxy({},{get(n,r,a){return typeof r=="string"&&!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=new W6),Reflect.get(n,r,a)}});return new Proxy(new W6,{get(n,r,a){if(r==="pool")return t;const i=typeof r=="string"?Number.parseInt(r,10):Number.NaN;return Number.isNaN(i)?Reflect.get(n,r,a):(e.at(i)===void 0&&(e[i]=new W6),e[i])}})}async function mxe(e,{extraProperties:t,context:n={}}={}){const r=Array.isArray(t)?new Set(t):t,a=txe(e,r),i=await pxe(a),o=Qze(i.variables,n),l=Ize(i.literals,...o);return(c,s)=>Kze(l,c,s)}async function gxe(e,t=window,n=console.error){var r;let a=[],i,o={},l=Promise.resolve();if(e.sources){const{sources:c}=e;i=!Array.isArray(c)&&typeof c!="string"?(r=c.importmap)!=null?r:{}:{};try{t.importShim.addImportMap(i)}catch(s){n(s)}a=Xze(c),a.length>0&&(l=Promise.all(a.map(s=>t.importShim(s).then(u=>{o={...o,[s]:u}}).catch(n))))}return l.then(()=>({...e,sources:{importmap:i,modules:o,uris:a}}))}async function yxe(e,t,n={}){return mxe(e.content,{context:n,extraProperties:new Set(Object.keys(n))}).then(a=>(a(t),null))}const bxe=e=>{var t;return{data:{message:e.message,name:e.name,stack:(t=e.stack)!=null?t:""},description:"preview.notifications.error.description",message:"preview.notifications.error.message",status:"error"}},tA=(e,t)=>e.send({content:bxe(t),type:"notification"}),nA=e=>"clientX"in e&&"clientY"in e;function qm(e,t){return n=>{nA(n)&&e.send({content:{bubbles:!0,cancelable:!1,clientX:n.clientX,clientY:n.clientY},type:t})}}const _xe=(e,t)=>e.has(t.tagName)&&t.hasAttribute(N5),wxe=(e,t,n)=>{const{document:r}=e;return a=>{let i;if(nA(a)){const{clientX:o,clientY:l}=a;i=r.elementsFromPoint(o,l).reduce((c,s)=>{if(_xe(n.uppercaseTags,s)){const u=s.getAttribute(N5);c.ids.push(u),c.selectors.push("[".concat(N5,'="').concat(u,'"]'))}return c},{ids:[],selectors:[]})}(n.mode.getValue()==="select"||i===void 0)&&t.send({content:i&&(i.ids.length>0?i:void 0),type:"click-element"})}},Mxe=e=>t=>{t.ctrlKey&&t.key===" "&&(t.preventDefault(),Bj(e.mode),e.focus.next(void 0))},Oxe=e=>typeof e=="object"&&e!==null&&"libraryName"in e&&typeof e.libraryName=="string"&&"components"in e&&Array.isArray(e.components),zxe=([e,t])=>rl(t.then(n=>[e,n])),xxe=([e,t])=>{const n={properties:{},type:"layout"},{__manifest:r=Promise.resolve(n)}=t,a=r.then(i=>[t,{__manifest:{...n,...i},tag:e}]).catch(()=>[t,{__manifest:n,tag:e}]);return rl(a)},Cxe=(e,t)=>rl(t.map(n=>[n,e.whenDefined(n.name)])).pipe(Wa(zxe),Wa(xxe)),Sxe=500,y9=(e,t)=>{t instanceof Error&&tA(e,t)},kxe=(e,t,n)=>t.pipe(Wa(([,{__manifest:{label:r,description:a,descriptionLong:i,...o},tag:l}])=>(delete o.mocks,fF({info:{libraryName:l.libraryName,source:l.source,...Eze({description:a,descriptionLong:i,label:r}),...o},tag:l.name}))),SF(Sxe),Ln(r=>r.length>0)).subscribe({error:r=>y9(e,r),next:r=>n(r)}),Exe=(e,t,n)=>n.pipe(Jr(([,{__manifest:{mocks:r={}},tag:a}])=>[a.name,r])).subscribe({error:r=>y9(e,r),next:r=>{t.mocks.next(r)}});async function rA(e,t,n,{addInfo:r,tags:a}){const{subscription:i}=this;if(n)return gxe(n,this,o=>{y9(e,o),r([])}).then(o=>{const l=Object.entries(o.sources.modules).reduce((s,[u,f])=>{if(Oxe(f.default)){const{components:d,libraryName:h}=f.default,v=d.map(b=>({libraryName:h,name:b,source:u}));s.push(...v)}return s},[]);a.forEach(s=>{l.find(u=>u.name===s)===void 0&&l.push({name:s,source:""})});const c=Cxe(this.customElements,l);i.add(kxe(e,c,r)),i.add(Exe(e,t,c))})}const aA=(e,t)=>{const{document:n}=e;let r=t.firstElementChild;return r===null&&(r=n.createElement("div"),r.style.height="inherit",r.style.display="flex",t.appendChild(r)),r};async function G5(e,t){const n=vxe(),{proxyWindow:r=this}=this;return yxe({content:e,sources:{importmap:{},modules:{},uris:[]}},aA(this,t),{eventBus:n,proxyWindow:r})}function iA(e){aA(this,e).remove()}var Pxe=Object.defineProperty,Txe=(e,t,n)=>t in e?Pxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Km=(e,t,n)=>(Txe(e,typeof t!="symbol"?t+"":t,n),n);function Gm(e,t,n){const{properties:r,attributes:a,booleanAttributes:i=[]}=e,o=Object.assign(Object.fromEntries(Uj(i).map(c=>[c,!0])),{...a,...r});return t(o).map(({url:c,method:s="GET",notify:u=!1,handler:f=()=>Promise.resolve(new Response)})=>{var d;const h=NOe({...c,method:s},o),v=new URL(h.pathname,(d=h.origin)!=null?d:n);return[v.href,s,(b,z)=>f(b,z).finally(()=>{u&&this.notify(oA(s,v))})]})}const $xe=(e,t)=>{const{href:n,search:r}=e;return n.replace(/\?$/,"").substring(0,n.length-r.length).match(new RegExp("^".concat(t,"$")))!==null},Lxe=(e,t)=>{const{href:n}=e;return n.match(new RegExp("^".concat(t.replace(/\/$/,""),"/")))!==null};class Hxe extends Map{constructor(t){super(),Km(this,"notify"),Km(this,"__urlMap",new Map),this.notify=t}add(t,n){var r,a;const{method:i,url:o}=t,l=(r=this.get(i))!=null?r:new Map,c=(a=this.__urlMap.get(i))!=null?a:[];l.set(o,n),c.push(o),this.set(i,l),this.__urlMap.set(i,c)}match(t){var n;const{method:r,url:a}=t,i=this.__urlMap.get(r);if(i===void 0)return;const o=i.reduce((l,c,s,u)=>{if($xe(a,c)||Lxe(a,c)){if(l===void 0)return s;if(u[l].length<c.length)return s}return l},void 0);if(o!==void 0)return(n=this.get(r))==null?void 0:n.get(i[o])}}const Vxe=e=>([t,n,r])=>e.add({method:n,url:t},r);async function Ym(e,t,n,r){const a=Vxe(e);return Array.isArray(t)?Promise.all(t.map(i=>Gm.call(e,i,n,r)).flat().map(a)).then(co):Promise.all(Gm.call(e,t,n,r).map(a)).then(co)}var Qm;const Xm=(Qm=window.__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__)!=null?Qm:5e3,jxe=e=>e.includes("-"),Zm=e=>({data:{tag:e},description:"preview.notifications.no-webcomponent-definition.description",message:"preview.notifications.no-webcomponent-definition.message",status:"warning"});async function Axe(e,t,n,r=[]){const{location:{href:a},fetch:i}=this,o=qj(this),l=new Hxe(this.notify.bind(this));await Promise.all(r.map(async s=>{var u;let f=()=>[];const d=await Promise.race([Tl(G6(Xm)),Tl(t.mocks.pipe(Ln(([v])=>v===s),Ha(1)))]);if(d===0)this.notify(Zm(s));else{const[,{fetch:v}]=d;v!==void 0&&(f=v)}const h=(u=n.get(s))!=null?u:[];return Ym(l,h,f,a)})).catch(s=>s instanceof Error&&tA(e,s));const c=async(s,u)=>{var f;const d=Kj(o,s),h=l.match({method:(f=u==null?void 0:u.method)!=null?f:"GET",url:d});return h!==void 0?h(d,u).then(v=>v):i(s,u)};if(this.proxyWindow){const s=Object.assign(c,{update:async u=>{let f=()=>[];if(jxe(u.tag)){const d=await Promise.race([Tl(G6(Xm)),Tl(t.mocks.pipe(Ln(([h])=>h===u.tag),Ha(1)))]);if(d===0)this.notify(Zm(u.tag));else{const[,{fetch:h}]=d;h!==void 0&&(f=h)}}return Ym(l,u,f,a)}});this.fetch=s,this.proxyWindow.fetch=s}}function Fxe(e,t){const{href:n,origin:r,pathname:a}=new URL(e??"",this.location.href);let i=n;return r===this.location.origin&&(i="{ your domain }".concat(a)),this.notify({data:{nextUrl:i,target:t??"[undefined]"},description:"preview.notifications.navigation-event.description.open",message:"preview.notifications.navigation-event.message",status:"default"}),this}function Ixe(e,t,n){const{href:r,origin:a,pathname:i}=new URL(n);let o=r;a===this.location.origin&&(o="".concat(i)),this.notify({data:{nextUrl:o},description:"preview.notifications.navigation-event.description.pushState",message:"preview.notifications.navigation-event.message",status:"default"})}function Bxe(e,t,n){const{href:r,origin:a,pathname:i,search:o}=new URL(n);let l=r;a===this.location.origin&&(l="".concat(i).concat(o)),this.notify({data:{nextUrl:l},description:"preview.notifications.navigation-event.description.replaceState",message:"preview.notifications.navigation-event.message",status:"info"})}function Dxe(e){return new Proxy(e,{get:(t,n)=>n==="pushState"?(r,a,i)=>{Ixe.call(this,r,a,new URL(i??"",new URL(this.document.baseURI,this.location.href)))}:n==="replaceState"?(r,a,i)=>{Bxe.call(this,r,a,new URL(i??"",new URL(this.document.baseURI,this.location.href)))}:t[n]})}class Jm extends Map{get length(){return this.size}clear(){super.clear()}getItem(t){var n;return(n=super.get(t))!=null?n:null}key(){return null}removeItem(t){super.delete(t)}setItem(t,n){super.set(t,n)}}const Rxe=e=>e.tagName==="A";function Nxe(e){const{prototype:{createElement:t}}=Document;return Document.prototype.createElement=function(r,a){const i=t.call(this,r,a);if(Rxe(i)){const o=()=>{var l;return e.notify({data:{href:Pze(e.location.origin,new URL(i.href,e.location.href)),target:(l=i.getAttribute("target"))!=null?l:"_self"},description:"preview.notifications.anchor.description",message:"preview.notifications.anchor.message",status:"info"})};Object.defineProperty(i,"click",{get(){return o},set:co})}return i},()=>{Document.prototype.createElement=t}}function Wxe(e,t){let n=e.fetch.bind(e);const r={notify:u=>t.next(u)},a=new Jm,i=new Jm,o=Object.assign(e,r),l=new Proxy(o,{get(u,f,d){if(f==="fetch")return n;if(f==="history")return Dxe.call(u,u.history);if(f==="location")return Object.entries(window.location).reduce((v,[b,z])=>(Object.defineProperty(v,b,{get:()=>z,set:m=>{b==="href"&&typeof m=="string"&&u.notify({data:{nextUrl:m,target:"_self"},description:"preview.notifications.navigation-event.description.location.href",message:"preview.notifications.navigation-event.message",status:"info"})}}),v),{});if(f==="open")return Fxe.bind(u);if(f==="localStorage")return a;if(f==="sessionStorage")return i;const h=Reflect.get(u,f);return typeof h!="function"?h:function(...b){return Reflect.apply(h,this===d?e:this,b)}},set(u,f,d){return f==="fetch"?(n=d,!0):Reflect.set(u,f,d)}}),c=Object.assign(o,{proxyWindow:l}),s=Nxe(c);return{sandbox:c,unpatch:s}}var Uxe=Object.defineProperty,qxe=(e,t,n)=>t in e?Uxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eg=(e,t,n)=>(qxe(e,typeof t!="symbol"?t+"":t,n),n);function Kxe(e,t,n,r){const{document:a}=e,i=a.createElement("div"),o="";i.style.display=o,i.style.height="inherit",i.style.width="inherit",i.style.position="fixed",i.style.zIndex="".concat(Ij+1);const l=r.subscribe(s=>{i.style.display=s?o:"none"});a.body.appendChild(i);const c=jb(i);return c.render(y.createElement(Cze,{hide:()=>{t.send({content:{visible:!1},type:"toggle-components-explorer"})},info$:n},null)),()=>{l.unsubscribe(),c.unmount()}}function Gxe(e,t){const{document:n}=e,r=n.createElement("div"),a="";r.style.display=a,r.style.position="fixed",r.style.width="100vw",r.style.height="100%",r.style.backgroundColor="rgba(0, 0, 0, 0.05)",r.style.zIndex="".concat(Ij);const i=()=>r.style.display===a,o=()=>i()?r.style.display="none":r.style.display=a,l=t.pipe(Ln(c=>e.__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__?c==="interact":!0)).subscribe(c=>{switch(c){case"interact":e.dispatchEvent(new Event("mousedown")),r.style.display="none";break;case"select":r.style.display=a;break;case 0:default:o();break}});return n.body.appendChild(r),{cleanup:()=>l.unsubscribe(),overlay:r}}const Yxe=e=>{const t=e.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.height="inherit",e.body.appendChild(t),t};function Qxe(e,t){const n=e;return Object.assign(e,{bootstrap:rA.bind(n),mocks:{fetch:new Map},postChannel:t,subscription:new Ur,unmount:iA.bind(n),update:G5.bind(n)})}class Xxe{constructor(){eg(this,"_results",new Map),eg(this,"_queue",Promise.resolve())}add(t){const r=[...t].map(a=>{let i,o;const l=new Promise((c,s)=>{i=c,o=s});return this._queue=this._queue.then(()=>a()).then(c=>{i(c)}).catch(c=>o(c)),l});return Promise.allSettled(r)}get(t){return this._results.get(t)}}const Zxe=e=>t=>{t.forEach(n=>{n.status==="rejected"&&e.next({data:{reason:n.reason},description:"preview.notifications.lifecycle.description",message:"preview.notifications.lifecycle.message",status:"error"})})},Jxe=e=>t=>{e.infos.next(t),t.forEach(({tag:n})=>e.uppercaseTags.add(n.toUpperCase()))},eCe=(e,t,n,r)=>{const a=new Xxe,i=r.configuration.pipe(kF(r.swSourceMapAck)).subscribe(([o])=>{const{configuration:l}=o,{content:c}=l;let s;if(o.type==="reset"){const{contexts:u,tags:f}=o;s=a.add([()=>iA.call(e,t),()=>rA.call(e,n,r,l,{addInfo:Jxe(r),tags:f}),()=>Axe.call(e,n,r,u,o.tags),()=>G5.call(e,c,t).finally(()=>r.updated.next(0))])}else{const{context:u}=o;s=a.add([()=>{var f,d,h;return(h=(f=e.proxyWindow)==null?void 0:(d=f.fetch).update)==null?void 0:h.call(d,u)},()=>G5.call(e,c,t).finally(()=>r.updated.next(0))])}s.then(Zxe(r.notification)).catch(co)});return()=>i.unsubscribe()},tCe=e=>{const{body:t}=e;t.style.height="100%",t.style.padding="0",t.style.margin="0"},nCe=(e,t)=>{const{location:{origin:n,port:r,protocol:a}}=e;return!(n!==t.origin||r!==t.port||a!==t.protocol)},oA=(e,t)=>({data:{method:e,url:t.href.substring(t.origin.length)},description:"preview.notifications.fetch-event.description",message:"preview.notifications.fetch-event.message",status:"info"}),rCe=(e,t)=>{const n=qj(e),{document:r,parent:a}=e;if(a===e)return;const i=e.fetch.bind(e);e.fetch=(o,l)=>{var c;const s=Kj(n,o);return nCe(r,s)&&t.next(oA((c=l==null?void 0:l.method)!=null?c:"GET",s)),i(o,l)}},aCe=(e,t,n)=>{tCe(e.document),rCe(e,n.notification);const{cleanup:r}=Gxe(e,n.mode.asObservable()),a=Kxe(e,t,n.infos.asObservable(),n.componentsExplorerVisible.asObservable()),i=Vze(e.document,n.focus.asObservable(),n.mode.asObservable()),o=Yxe(e.document),l=Qxe(e,t),{sandbox:c,unpatch:s}=Wxe(l,n.notification),u=eCe(c,o,t,n);return{cleanup:()=>{u(),s(),i(),r(),a()},sandboxedWindow:c}};function iCe(e){const t=new Ur;return t.add(e.updated.subscribe(()=>this.send({content:{},type:"updated"}))),t.add(e.infos.subscribe(n=>this.send({content:n,type:"tag-info"}))),t.add(e.notification.subscribe(n=>this.send({content:n,type:"notification"}))),t.add(e.mode.subscribe(n=>this.send({content:{mode:n},type:"ctrl-space"}))),()=>{this.send({content:{},type:"unload"}),t.unsubscribe()}}function oCe(e){const t=new Ur;return t.add(e.setSourceMap.subscribe(n=>{this.ackSend({content:n,type:"set-source-map"}).then(()=>e.swSourceMapAck.next(0)).catch(co)})),()=>t.unsubscribe()}function lCe(e,...t){const n=t.map(({type:r,handler:a})=>(e.addEventListener(r,a),()=>e.removeEventListener(r,a)));return()=>{n.forEach(r=>r())}}function cCe(e,t){e.addEventListener("unload",()=>{e.subscription.unsubscribe(),t.forEach(n=>n())})}(async e=>{const t=UOe(),n=await GOe(e),r=QOe(e,t),a=oCe.call(n,t),i=iCe.call(r,t),o=lCe(e,{handler:Mxe(t),type:"keydown"},{handler:qm(r,"mousemove"),type:"mousemove"},{handler:qm(r,"mousedown"),type:"mousedown"},{handler:wxe(e,r,t),type:"mousedown"}),{cleanup:l,sandboxedWindow:c}=aCe(e,r,t);cCe(c,[l,o,i,a,()=>r.disconnect(),()=>n.send({content:{},type:"unload-client"}),()=>n.disconnect()])})(window).catch(e=>{throw console.error("[preview] Error Boundary: ".concat(String(e))),e});
|
89
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Bm=/'/g,Dm=/"/g,Qj=/^(?:script|style|textarea|title)$/i,Fze=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Ize=Fze(1),tl=Symbol.for("lit-noChange"),nn=Symbol.for("lit-nothing"),Rm=new WeakMap,Fa=ni.createTreeWalker(ni,129,null,!1);function Xj(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Am!==void 0?Am.createHTML(t):t}const Bze=(e,t)=>{const n=e.length-1,r=[];let a,i=t===2?"<svg>":"",o=Zo;for(let l=0;l<n;l++){const c=e[l];let s,u,f=-1,d=0;for(;d<c.length&&(o.lastIndex=d,u=o.exec(c),u!==null);)d=o.lastIndex,o===Zo?u[1]==="!--"?o=Fm:u[1]!==void 0?o=Im:u[2]!==void 0?(Qj.test(u[2])&&(a=RegExp("</"+u[2],"g")),o=ka):u[3]!==void 0&&(o=ka):o===ka?u[0]===">"?(o=a??Zo,f=-1):u[1]===void 0?f=-2:(f=o.lastIndex-u[2].length,s=u[1],o=u[3]===void 0?ka:u[3]==='"'?Dm:Bm):o===Dm||o===Bm?o=ka:o===Fm||o===Im?o=Zo:(o=ka,a=void 0);const h=o===ka&&e[l+1].startsWith("/>")?" ":"";i+=o===Zo?c+jze:f>=0?(r.push(s),c.slice(0,f)+K5+c.slice(f)+Y1+h):c+Y1+(f===-2?(r.push(void 0),l):h)}return[Xj(e,i+(e[n]||"<?>")+(t===2?"</svg>":"")),r]};class nl{constructor({strings:t,_$litType$:n},r){let a;this.parts=[];let i=0,o=0;const l=t.length-1,c=this.parts,[s,u]=Bze(t,n);if(this.el=nl.createElement(s,r),Fa.currentNode=this.el.content,n===2){const f=this.el.content,d=f.firstChild;d.remove(),f.append(...d.childNodes)}for(;(a=Fa.nextNode())!==null&&c.length<l;){if(a.nodeType===1){if(a.hasAttributes()){const f=[];for(const d of a.getAttributeNames())if(d.endsWith(K5)||d.startsWith(Y1)){const h=u[o++];if(f.push(d),h!==void 0){const v=a.getAttribute(h.toLowerCase()+K5).split(Y1),b=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:b[2],strings:v,ctor:b[1]==="."?Rze:b[1]==="?"?Wze:b[1]==="@"?Uze:Fc})}else c.push({type:6,index:i})}for(const d of f)a.removeAttribute(d)}if(Qj.test(a.tagName)){const f=a.textContent.split(Y1),d=f.length-1;if(d>0){a.textContent=so?so.emptyScript:"";for(let h=0;h<d;h++)a.append(f[h],J4()),Fa.nextNode(),c.push({type:2,index:++i});a.append(f[d],J4())}}}else if(a.nodeType===8)if(a.data===Gj)c.push({type:2,index:i});else{let f=-1;for(;(f=a.data.indexOf(Y1,f+1))!==-1;)c.push({type:7,index:i}),f+=Y1.length-1}i++}}static createElement(t,n){const r=ni.createElement("template");return r.innerHTML=t,r}}function uo(e,t,n=e,r){var a,i,o,l;if(t===tl)return t;let c=r!==void 0?(a=n._$Co)===null||a===void 0?void 0:a[r]:n._$Cl;const s=el(t)?void 0:t._$litDirective$;return(c==null?void 0:c.constructor)!==s&&((i=c==null?void 0:c._$AO)===null||i===void 0||i.call(c,!1),s===void 0?c=void 0:(c=new s(e),c._$AT(e,n,r)),r!==void 0?((o=(l=n)._$Co)!==null&&o!==void 0?o:l._$Co=[])[r]=c:n._$Cl=c),c!==void 0&&(t=uo(e,c._$AS(e,t.values),c,r)),t}class Dze{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var n;const{el:{content:r},parts:a}=this._$AD,i=((n=t==null?void 0:t.creationScope)!==null&&n!==void 0?n:ni).importNode(r,!0);Fa.currentNode=i;let o=Fa.nextNode(),l=0,c=0,s=a[0];for(;s!==void 0;){if(l===s.index){let u;s.type===2?u=new Cl(o,o.nextSibling,this,t):s.type===1?u=new s.ctor(o,s.name,s.strings,this,t):s.type===6&&(u=new qze(o,this,t)),this._$AV.push(u),s=a[++c]}l!==(s==null?void 0:s.index)&&(o=Fa.nextNode(),l++)}return Fa.currentNode=ni,i}v(t){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}}class Cl{constructor(t,n,r,a){var i;this.type=2,this._$AH=nn,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=a,this._$Cp=(i=a==null?void 0:a.isConnected)===null||i===void 0||i}get _$AU(){var t,n;return(n=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=uo(this,t,n),el(t)?t===nn||t==null||t===""?(this._$AH!==nn&&this._$AR(),this._$AH=nn):t!==this._$AH&&t!==tl&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Aze(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==nn&&el(this._$AH)?this._$AA.nextSibling.data=t:this.$(ni.createTextNode(t)),this._$AH=t}g(t){var n;const{values:r,_$litType$:a}=t,i=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=nl.createElement(Xj(a.h,a.h[0]),this.options)),a);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===i)this._$AH.v(r);else{const o=new Dze(i,this),l=o.u(this.options);o.v(r),this.$(l),this._$AH=o}}_$AC(t){let n=Rm.get(t.strings);return n===void 0&&Rm.set(t.strings,n=new nl(t)),n}T(t){Yj(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,a=0;for(const i of t)a===n.length?n.push(r=new Cl(this.k(J4()),this.k(J4()),this,this.options)):r=n[a],r._$AI(i),a++;a<n.length&&(this._$AR(r&&r._$AB.nextSibling,a),n.length=a)}_$AR(t=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);t&&t!==this._$AB;){const a=t.nextSibling;t.remove(),t=a}}setConnected(t){var n;this._$AM===void 0&&(this._$Cp=t,(n=this._$AP)===null||n===void 0||n.call(this,t))}}class Fc{constructor(t,n,r,a,i){this.type=1,this._$AH=nn,this._$AN=void 0,this.element=t,this.name=n,this._$AM=a,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=nn}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,n=this,r,a){const i=this.strings;let o=!1;if(i===void 0)t=uo(this,t,n,0),o=!el(t)||t!==this._$AH&&t!==tl,o&&(this._$AH=t);else{const l=t;let c,s;for(t=i[0],c=0;c<i.length-1;c++)s=uo(this,l[r+c],n,c),s===tl&&(s=this._$AH[c]),o||(o=!el(s)||s!==this._$AH[c]),s===nn?t=nn:t!==nn&&(t+=(s??"")+i[c+1]),this._$AH[c]=s}o&&!a&&this.j(t)}j(t){t===nn?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Rze extends Fc{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nn?void 0:t}}const Nze=so?so.emptyScript:"";class Wze extends Fc{constructor(){super(...arguments),this.type=4}j(t){t&&t!==nn?this.element.setAttribute(this.name,Nze):this.element.removeAttribute(this.name)}}class Uze extends Fc{constructor(t,n,r,a,i){super(t,n,r,a,i),this.type=5}_$AI(t,n=this){var r;if((t=(r=uo(this,t,n,0))!==null&&r!==void 0?r:nn)===tl)return;const a=this._$AH,i=t===nn&&a!==nn||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,o=t!==nn&&(a===nn||i);i&&this.element.removeEventListener(this.name,this,a),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,t):this._$AH.handleEvent(t)}}class qze{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){uo(this,t)}}const Nm=$0.litHtmlPolyfillSupport;Nm==null||Nm(nl,Cl),((D6=$0.litHtmlVersions)!==null&&D6!==void 0?D6:$0.litHtmlVersions=[]).push("2.8.0");const Kze=(e,t,n)=>{var r,a;const i=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:t;let o=i._$litPart$;if(o===void 0){const l=(a=n==null?void 0:n.renderBefore)!==null&&a!==void 0?a:null;i._$litPart$=o=new Cl(t.insertBefore(J4(),l),l,void 0,n??{})}return o._$AI(e),o};const Gze=e=>{const t=e.charAt(0);return!(t!==e.charAt(e.length-1)||t!=="'"&&t!=='"')};function Yze(e){const t=e.match(/([^.]+)/g);return n=>t.reduce((r,a)=>{let i=a;if(a.startsWith("[")&&a.endsWith("]")){const o=a.slice(1,-1),l=Number.parseInt(o);!Number.isNaN(l)&&l.toString()===o?i=l:(o.startsWith('"')&&o.endsWith('"')||o.startsWith("'")&&o.endsWith("'"))&&(i=o.slice(1,-1))}if(i==="")throw new TypeError("42",{cause:e});return typeof r=="object"&&r!==null?r[i]:void 0},n)}function Qze(e,t={}){return e.reduce((n,r,a)=>{const i=r.trim(),o=Number.parseInt(i),l=Number.parseFloat(i);if(i==="")n[a]=i;else if(Gze(i))n[a]=i.slice(1,-1);else if(["true","false"].includes(i))n[a]=i==="true";else if(!Number.isNaN(o)&&o.toString()===i)n[a]=o;else if(!Number.isNaN(l)&&l.toString()===i)n[a]=l;else if(i.startsWith("{")||i.startsWith("["))try{n[a]=JSON.parse(i)}catch(c){if(c instanceof SyntaxError)throw new TypeError("43",{cause:c.message})}else n[a]=Yze(i)(t);return n},[])}function Zj(e){return Array.isArray(e)?e:[e]}function Xze(e){const t=typeof e=="string"?[e]:e;return Array.isArray(t)?t:Zj(t.uris)}const Zze=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Jze(e){return Zze.includes(e.tag)}function exe(e){return Array.isArray(e)?e:[e]}function Jj(e,t,n){if(typeof t!="object"){e.push("".concat(t));return}exe(t).forEach(r=>{if(typeof r!="object"){e.push("".concat(r));return}const{tag:a,attributes:i={},booleanAttributes:o=[],properties:l={}}=r,c=Jze(r),s="<".concat(a),u=c?"/>":">",f="</".concat(a,">"),d=Object.entries(i).reduce((g,[_,p])=>(g.push("".concat(_,'="').concat(p,'"')),g),[]),h=Zj(o),{override:v,props:b}=Object.entries(l).reduce((g,[_,p])=>(n.has(_)?typeof p=="string"&&(g.override[_]=p):g.props[_]=p,g),{override:{},props:{}}),z=Array.from(n.keys()).map(g=>{var _;return".".concat(g,"=${").concat((_=v[g])!=null?_:g,"}")}),m=Object.entries(b).reduce((g,[_,p])=>{switch(typeof p){case"object":case"number":case"boolean":g.push(".".concat(_,"=${").concat(JSON.stringify(p),"}"));break;case"string":g.push(".".concat(_,'=${"').concat(p,'"}'));break}return g},[]);if(e.push([s,d.join(" "),h.join(" "),z.join(" "),m.join(" "),u].join(" ")),!c){const{content:g}=r;g!==void 0&&Jj(e,g,n),e.push(f)}})}function txe(e,t=new Set){const n=[];return Jj(n,e,t),n.join(" ")}const nxe="modulepreload",rxe=function(e,t){return new URL(e,t).href},Wm={},axe=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link");a=Promise.all(n.map(o=>{if(o=rxe(o,r),o in Wm)return;Wm[o]=!0;const l=o.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const d=i[f];if(d.href===o&&(!l||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${c}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":nxe,l||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),l)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})}))}return a.then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},eA=(e,...t)=>{axe(()=>import("./errors-xGUFKyGs.js"),__vite__mapDeps([]),import.meta.url).then(({default:n})=>{const r=n[e];r?console.error(r(...t)):console.error(...t)}).catch(n=>{console.error("[micro-lc][composer]: Dynamic import error while importing logger utils - ".concat(n.message))})},ixe=e=>t=>{eA("0",e,t.message)},oxe={dynamicImportError:ixe,error:eA},lxe=Object.freeze(Object.defineProperty({__proto__:null,logger:oxe},Symbol.toStringTag,{value:"Module"}));var cxe=lxe;const sxe=()=>{const e=[];return Object.assign(e,{append:t=>{e[e.length-1]+=t},flush:()=>{e.push("")}})},uxe=()=>{const e=[""];return Object.assign(e,{append:t=>{e[e.length-1]+=t},flush:()=>{e.push("")}})},fxe=(e,t)=>{const n=[...e];return{literals:Object.defineProperty(n,"raw",{get:()=>n}),variables:[...t]}},Um=()=>({braceCnt:0,literals:uxe(),mode:0,variables:sxe()}),dxe=e=>{const t=()=>{const r=Array.from(e).reduce((a,i)=>{switch(a.mode){case 2:{if(i==="}"&&a.braceCnt===0){a.mode=0;break}i==="{"?a.braceCnt+=1:i==="}"&&a.braceCnt>0&&(a.braceCnt-=1),a.variables.append(i);break}case 1:{a.literals.append(i),i==="{"?(a.literals.flush(),a.variables.flush(),a.mode=2):a.mode=0;break}case 0:default:i==="$"&&(a.mode=1),a.literals.append(i)}return a},Um());return r.mode===2&&(r.literals.pop(),r.literals.append(r.variables.pop())),r.literals.forEach((a,i,o)=>{i<o.length-1&&(o[i]=a.slice(0,-2))}),r};let n=e.length===0;return{run:()=>{let r;n||(r=t(),n=!0);const{literals:a,variables:i}=r??Um();return fxe(a,i)}}},hxe=async(e,t="SHA-1")=>window.crypto.subtle.digest(t,new TextEncoder().encode(e)),N6=new Map,pxe=async e=>{const t=await hxe(e).catch(n=>{cxe.logger.error("40",e,n.message)});if(!t||!N6.has(t)){const n=dxe(e).run();return t&&N6.set(t,n),n}return N6.get(t)};class W6 extends y1{}function vxe(){const e=[],t=new Proxy({},{get(n,r,a){return typeof r=="string"&&!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=new W6),Reflect.get(n,r,a)}});return new Proxy(new W6,{get(n,r,a){if(r==="pool")return t;const i=typeof r=="string"?Number.parseInt(r,10):Number.NaN;return Number.isNaN(i)?Reflect.get(n,r,a):(e.at(i)===void 0&&(e[i]=new W6),e[i])}})}async function mxe(e,{extraProperties:t,context:n={}}={}){const r=Array.isArray(t)?new Set(t):t,a=txe(e,r),i=await pxe(a),o=Qze(i.variables,n),l=Ize(i.literals,...o);return(c,s)=>Kze(l,c,s)}async function gxe(e,t=window,n=console.error){var r;let a=[],i,o={},l=Promise.resolve();if(e.sources){const{sources:c}=e;i=!Array.isArray(c)&&typeof c!="string"?(r=c.importmap)!=null?r:{}:{};try{t.importShim.addImportMap(i)}catch(s){n(s)}a=Xze(c),a.length>0&&(l=Promise.all(a.map(s=>t.importShim(s).then(u=>{o={...o,[s]:u}}).catch(n))))}return l.then(()=>({...e,sources:{importmap:i,modules:o,uris:a}}))}async function yxe(e,t,n={}){return mxe(e.content,{context:n,extraProperties:new Set(Object.keys(n))}).then(a=>(a(t),null))}const bxe=e=>{var t;return{data:{message:e.message,name:e.name,stack:(t=e.stack)!=null?t:""},description:"preview.notifications.error.description",message:"preview.notifications.error.message",status:"error"}},tA=(e,t)=>e.send({content:bxe(t),type:"notification"}),nA=e=>"clientX"in e&&"clientY"in e;function qm(e,t){return n=>{nA(n)&&e.send({content:{bubbles:!0,cancelable:!1,clientX:n.clientX,clientY:n.clientY},type:t})}}const _xe=(e,t)=>e.has(t.tagName)&&t.hasAttribute(N5),wxe=(e,t,n)=>{const{document:r}=e;return a=>{let i;if(nA(a)){const{clientX:o,clientY:l}=a;i=r.elementsFromPoint(o,l).reduce((c,s)=>{if(_xe(n.uppercaseTags,s)){const u=s.getAttribute(N5);c.ids.push(u),c.selectors.push("[".concat(N5,'="').concat(u,'"]'))}return c},{ids:[],selectors:[]})}(n.mode.getValue()==="select"||i===void 0)&&t.send({content:i&&(i.ids.length>0?i:void 0),type:"click-element"})}},Mxe=e=>t=>{t.ctrlKey&&t.key===" "&&(t.preventDefault(),Bj(e.mode),e.focus.next(void 0))},Oxe=e=>typeof e=="object"&&e!==null&&"libraryName"in e&&typeof e.libraryName=="string"&&"components"in e&&Array.isArray(e.components),zxe=([e,t])=>rl(t.then(n=>[e,n])),xxe=([e,t])=>{const n={properties:{},type:"layout"},{__manifest:r=Promise.resolve(n)}=t,a=r.then(i=>[t,{__manifest:{...n,...i},tag:e}]).catch(()=>[t,{__manifest:n,tag:e}]);return rl(a)},Cxe=(e,t)=>rl(t.map(n=>[n,e.whenDefined(n.name)])).pipe(Wa(zxe),Wa(xxe)),Sxe=500,y9=(e,t)=>{t instanceof Error&&tA(e,t)},kxe=(e,t,n)=>t.pipe(Wa(([,{__manifest:{label:r,description:a,descriptionLong:i,...o},tag:l}])=>(delete o.mocks,fF({info:{libraryName:l.libraryName,source:l.source,...Eze({description:a,descriptionLong:i,label:r}),...o},tag:l.name}))),SF(Sxe),Ln(r=>r.length>0)).subscribe({error:r=>y9(e,r),next:r=>n(r)}),Exe=(e,t,n)=>n.pipe(Jr(([,{__manifest:{mocks:r={}},tag:a}])=>[a.name,r])).subscribe({error:r=>y9(e,r),next:r=>{t.mocks.next(r)}});async function rA(e,t,n,{addInfo:r,tags:a}){const{subscription:i}=this;if(n)return gxe(n,this,o=>{y9(e,o),r([])}).then(o=>{const l=Object.entries(o.sources.modules).reduce((s,[u,f])=>{if(Oxe(f.default)){const{components:d,libraryName:h}=f.default,v=d.map(b=>({libraryName:h,name:b,source:u}));s.push(...v)}return s},[]);a.forEach(s=>{l.find(u=>u.name===s)===void 0&&l.push({name:s,source:""})});const c=Cxe(this.customElements,l);i.add(kxe(e,c,r)),i.add(Exe(e,t,c))})}const aA=(e,t)=>{const{document:n}=e;let r=t.firstElementChild;return r===null&&(r=n.createElement("div"),r.style.height="inherit",r.style.display="flex",t.appendChild(r)),r};async function G5(e,t){const n=vxe(),{proxyWindow:r=this}=this;return yxe({content:e,sources:{importmap:{},modules:{},uris:[]}},aA(this,t),{eventBus:n,proxyWindow:r})}function iA(e){aA(this,e).remove()}var Pxe=Object.defineProperty,Txe=(e,t,n)=>t in e?Pxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Km=(e,t,n)=>(Txe(e,typeof t!="symbol"?t+"":t,n),n);function Gm(e,t,n){const{properties:r,attributes:a,booleanAttributes:i=[]}=e,o=Object.assign(Object.fromEntries(Uj(i).map(c=>[c,!0])),{...a,...r});return t(o).map(({url:c,method:s="GET",notify:u=!1,handler:f=()=>Promise.resolve(new Response)})=>{var d;const h=NOe({...c,method:s},o),v=new URL(h.pathname,(d=h.origin)!=null?d:n);return[v.href,s,(b,z)=>f(b,z).finally(()=>{u&&this.notify(oA(s,v))})]})}const $xe=(e,t)=>{const{href:n,search:r}=e;return n.replace(/\?$/,"").substring(0,n.length-r.length).match(new RegExp("^".concat(t,"$")))!==null},Lxe=(e,t)=>{const{href:n}=e;return n.match(new RegExp("^".concat(t.replace(/\/$/,""),"/")))!==null};class Hxe extends Map{constructor(t){super(),Km(this,"notify"),Km(this,"__urlMap",new Map),this.notify=t}add(t,n){var r,a;const{method:i,url:o}=t,l=(r=this.get(i))!=null?r:new Map,c=(a=this.__urlMap.get(i))!=null?a:[];l.set(o,n),c.push(o),this.set(i,l),this.__urlMap.set(i,c)}match(t){var n;const{method:r,url:a}=t,i=this.__urlMap.get(r);if(i===void 0)return;const o=i.reduce((l,c,s,u)=>{if($xe(a,c)||Lxe(a,c)){if(l===void 0)return s;if(u[l].length<c.length)return s}return l},void 0);if(o!==void 0)return(n=this.get(r))==null?void 0:n.get(i[o])}}const Vxe=e=>([t,n,r])=>e.add({method:n,url:t},r);async function Ym(e,t,n,r){const a=Vxe(e);return Array.isArray(t)?Promise.all(t.map(i=>Gm.call(e,i,n,r)).flat().map(a)).then(co):Promise.all(Gm.call(e,t,n,r).map(a)).then(co)}var Qm;const Xm=(Qm=window.__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__)!=null?Qm:5e3,jxe=e=>e.includes("-"),Zm=e=>({data:{tag:e},description:"preview.notifications.no-webcomponent-definition.description",message:"preview.notifications.no-webcomponent-definition.message",status:"warning"});async function Axe(e,t,n,r=[]){const{location:{href:a},fetch:i}=this,o=qj(this),l=new Hxe(this.notify.bind(this));await Promise.all(r.map(async s=>{var u;let f=()=>[];const d=await Promise.race([Tl(G6(Xm)),Tl(t.mocks.pipe(Ln(([v])=>v===s),Ha(1)))]);if(d===0)this.notify(Zm(s));else{const[,{fetch:v}]=d;v!==void 0&&(f=v)}const h=(u=n.get(s))!=null?u:[];return Ym(l,h,f,a)})).catch(s=>s instanceof Error&&tA(e,s));const c=async(s,u)=>{var f;const d=Kj(o,s),h=l.match({method:(f=u==null?void 0:u.method)!=null?f:"GET",url:d});return h!==void 0?h(d,u).then(v=>v):i(s,u)};if(this.proxyWindow){const s=Object.assign(c,{update:async u=>{let f=()=>[];if(jxe(u.tag)){const d=await Promise.race([Tl(G6(Xm)),Tl(t.mocks.pipe(Ln(([h])=>h===u.tag),Ha(1)))]);if(d===0)this.notify(Zm(u.tag));else{const[,{fetch:h}]=d;h!==void 0&&(f=h)}}return Ym(l,u,f,a)}});this.fetch=s,this.proxyWindow.fetch=s}}function Fxe(e,t){const{href:n,origin:r,pathname:a}=new URL(e??"",this.location.href);let i=n;return r===this.location.origin&&(i="{ your domain }".concat(a)),this.notify({data:{nextUrl:i,target:t??"[undefined]"},description:"preview.notifications.navigation-event.description.open",message:"preview.notifications.navigation-event.message",status:"default"}),this}function Ixe(e,t,n){const{href:r,origin:a,pathname:i}=new URL(n);let o=r;a===this.location.origin&&(o="".concat(i)),this.notify({data:{nextUrl:o},description:"preview.notifications.navigation-event.description.pushState",message:"preview.notifications.navigation-event.message",status:"default"})}function Bxe(e,t,n){const{href:r,origin:a,pathname:i,search:o}=new URL(n);let l=r;a===this.location.origin&&(l="".concat(i).concat(o)),this.notify({data:{nextUrl:l},description:"preview.notifications.navigation-event.description.replaceState",message:"preview.notifications.navigation-event.message",status:"info"})}function Dxe(e){return new Proxy(e,{get:(t,n)=>n==="pushState"?(r,a,i)=>{Ixe.call(this,r,a,new URL(i??"",new URL(this.document.baseURI,this.location.href)))}:n==="replaceState"?(r,a,i)=>{Bxe.call(this,r,a,new URL(i??"",new URL(this.document.baseURI,this.location.href)))}:t[n]})}class Jm extends Map{get length(){return this.size}clear(){super.clear()}getItem(t){var n;return(n=super.get(t))!=null?n:null}key(){return null}removeItem(t){super.delete(t)}setItem(t,n){super.set(t,n)}}const Rxe=e=>e.tagName==="A";function Nxe(e){const{prototype:{createElement:t}}=Document;return Document.prototype.createElement=function(r,a){const i=t.call(this,r,a);if(Rxe(i)){const o=()=>{var l;return e.notify({data:{href:Pze(e.location.origin,new URL(i.href,e.location.href)),target:(l=i.getAttribute("target"))!=null?l:"_self"},description:"preview.notifications.anchor.description",message:"preview.notifications.anchor.message",status:"info"})};Object.defineProperty(i,"click",{get(){return o},set:co})}return i},()=>{Document.prototype.createElement=t}}function Wxe(e,t){let n=e.fetch.bind(e);const r={notify:u=>t.next(u)},a=new Jm,i=new Jm,o=Object.assign(e,r),l=new Proxy(o,{get(u,f,d){if(f==="fetch")return n;if(f==="history")return Dxe.call(u,u.history);if(f==="location")return Object.entries(window.location).reduce((v,[b,z])=>(Object.defineProperty(v,b,{get:()=>z,set:m=>{b==="href"&&typeof m=="string"&&u.notify({data:{nextUrl:m,target:"_self"},description:"preview.notifications.navigation-event.description.location.href",message:"preview.notifications.navigation-event.message",status:"info"})}}),v),{});if(f==="open")return Fxe.bind(u);if(f==="localStorage")return a;if(f==="sessionStorage")return i;const h=Reflect.get(u,f);return typeof h!="function"?h:function(...b){return Reflect.apply(h,this===d?e:this,b)}},set(u,f,d){return f==="fetch"?(n=d,!0):Reflect.set(u,f,d)}}),c=Object.assign(o,{proxyWindow:l}),s=Nxe(c);return{sandbox:c,unpatch:s}}var Uxe=Object.defineProperty,qxe=(e,t,n)=>t in e?Uxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eg=(e,t,n)=>(qxe(e,typeof t!="symbol"?t+"":t,n),n);function Kxe(e,t,n,r){const{document:a}=e,i=a.createElement("div"),o="";i.style.display=o,i.style.height="inherit",i.style.width="inherit",i.style.position="fixed",i.style.zIndex="".concat(Ij+1);const l=r.subscribe(s=>{i.style.display=s?o:"none"});a.body.appendChild(i);const c=jb(i);return c.render(y.createElement(Cze,{hide:()=>{t.send({content:{visible:!1},type:"toggle-components-explorer"})},info$:n},null)),()=>{l.unsubscribe(),c.unmount()}}function Gxe(e,t){const{document:n}=e,r=n.createElement("div"),a="";r.style.display=a,r.style.position="fixed",r.style.width="100vw",r.style.height="100%",r.style.backgroundColor="rgba(0, 0, 0, 0.05)",r.style.zIndex="".concat(Ij);const i=()=>r.style.display===a,o=()=>i()?r.style.display="none":r.style.display=a,l=t.pipe(Ln(c=>e.__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__?c==="interact":!0)).subscribe(c=>{switch(c){case"interact":e.dispatchEvent(new Event("mousedown")),r.style.display="none";break;case"select":r.style.display=a;break;case 0:default:o();break}});return n.body.appendChild(r),{cleanup:()=>l.unsubscribe(),overlay:r}}const Yxe=(e,t)=>{const n=e.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.height="inherit";const r=t.subscribe(a=>{n.style.display=a?"none":"flex"});return e.body.appendChild(n),{cleanup:()=>r.unsubscribe(),renderRoot:n}};function Qxe(e,t){const n=e;return Object.assign(e,{bootstrap:rA.bind(n),mocks:{fetch:new Map},postChannel:t,subscription:new Ur,unmount:iA.bind(n),update:G5.bind(n)})}class Xxe{constructor(){eg(this,"_results",new Map),eg(this,"_queue",Promise.resolve())}add(t){const r=[...t].map(a=>{let i,o;const l=new Promise((c,s)=>{i=c,o=s});return this._queue=this._queue.then(()=>a()).then(c=>{i(c)}).catch(c=>o(c)),l});return Promise.allSettled(r)}get(t){return this._results.get(t)}}const Zxe=e=>t=>{t.forEach(n=>{n.status==="rejected"&&e.next({data:{reason:n.reason},description:"preview.notifications.lifecycle.description",message:"preview.notifications.lifecycle.message",status:"error"})})},Jxe=e=>t=>{e.infos.next(t),t.forEach(({tag:n})=>e.uppercaseTags.add(n.toUpperCase()))},eCe=(e,t,n,r)=>{const a=new Xxe,i=r.configuration.pipe(kF(r.swSourceMapAck)).subscribe(([o])=>{const{configuration:l}=o,{content:c}=l;let s;if(o.type==="reset"){const{contexts:u,tags:f}=o;s=a.add([()=>iA.call(e,t),()=>rA.call(e,n,r,l,{addInfo:Jxe(r),tags:f}),()=>Axe.call(e,n,r,u,o.tags),()=>G5.call(e,c,t).finally(()=>r.updated.next(0))])}else{const{context:u}=o;s=a.add([()=>{var f,d,h;return(h=(f=e.proxyWindow)==null?void 0:(d=f.fetch).update)==null?void 0:h.call(d,u)},()=>G5.call(e,c,t).finally(()=>r.updated.next(0))])}s.then(Zxe(r.notification)).catch(co)});return()=>i.unsubscribe()},tCe=e=>{const{body:t}=e;t.style.height="100%",t.style.padding="0",t.style.margin="0"},nCe=(e,t)=>{const{location:{origin:n,port:r,protocol:a}}=e;return!(n!==t.origin||r!==t.port||a!==t.protocol)},oA=(e,t)=>({data:{method:e,url:t.href.substring(t.origin.length)},description:"preview.notifications.fetch-event.description",message:"preview.notifications.fetch-event.message",status:"info"}),rCe=(e,t)=>{const n=qj(e),{document:r,parent:a}=e;if(a===e)return;const i=e.fetch.bind(e);e.fetch=(o,l)=>{var c;const s=Kj(n,o);return nCe(r,s)&&t.next(oA((c=l==null?void 0:l.method)!=null?c:"GET",s)),i(o,l)}},aCe=(e,t,n)=>{tCe(e.document),rCe(e,n.notification);const{cleanup:r}=Gxe(e,n.mode.asObservable()),a=Kxe(e,t,n.infos.asObservable(),n.componentsExplorerVisible.asObservable()),i=Vze(e.document,n.focus.asObservable(),n.mode.asObservable()),{cleanup:o,renderRoot:l}=Yxe(e.document,n.componentsExplorerVisible.asObservable()),c=Qxe(e,t),{sandbox:s,unpatch:u}=Wxe(c,n.notification),f=eCe(s,l,t,n);return{cleanup:()=>{f(),u(),i(),r(),a(),o()},sandboxedWindow:s}};function iCe(e){const t=new Ur;return t.add(e.updated.subscribe(()=>this.send({content:{},type:"updated"}))),t.add(e.infos.subscribe(n=>this.send({content:n,type:"tag-info"}))),t.add(e.notification.subscribe(n=>this.send({content:n,type:"notification"}))),t.add(e.mode.subscribe(n=>this.send({content:{mode:n},type:"ctrl-space"}))),()=>{this.send({content:{},type:"unload"}),t.unsubscribe()}}function oCe(e){const t=new Ur;return t.add(e.setSourceMap.subscribe(n=>{this.ackSend({content:n,type:"set-source-map"}).then(()=>e.swSourceMapAck.next(0)).catch(co)})),()=>t.unsubscribe()}function lCe(e,...t){const n=t.map(({type:r,handler:a})=>(e.addEventListener(r,a),()=>e.removeEventListener(r,a)));return()=>{n.forEach(r=>r())}}function cCe(e,t){e.addEventListener("unload",()=>{e.subscription.unsubscribe(),t.forEach(n=>n())})}(async e=>{const t=UOe(),n=await GOe(e),r=QOe(e,t),a=oCe.call(n,t),i=iCe.call(r,t),o=lCe(e,{handler:Mxe(t),type:"keydown"},{handler:qm(r,"mousemove"),type:"mousemove"},{handler:qm(r,"mousedown"),type:"mousedown"},{handler:wxe(e,r,t),type:"mousedown"}),{cleanup:l,sandboxedWindow:c}=aCe(e,r,t);cCe(c,[l,o,i,a,()=>r.disconnect(),()=>n.send({content:{},type:"unload-client"}),()=>n.disconnect()])})(window).catch(e=>{throw console.error("[preview] Error Boundary: ".concat(String(e))),e});
|
90
90
|
function __vite__mapDeps(indexes) {
|
91
91
|
if (!__vite__mapDeps.viteFileDeps) {
|
92
92
|
__vite__mapDeps.viteFileDeps = []
|