From eb09951b10db2bdc4acab753cc05619520de9071 Mon Sep 17 00:00:00 2001 From: Romeo Rosete <110788242+bombastictranz@users.noreply.github.com> Date: Mon, 6 May 2024 16:47:00 -0400 Subject: [PATCH] 233.1f453d2d.chunk.js.download Stock control supervisors --- 233.1f453d2d.chunk.js.download | 2254 ++++++++++++++++++++++++++++++++ 1 file changed, 2254 insertions(+) create mode 100644 233.1f453d2d.chunk.js.download diff --git a/233.1f453d2d.chunk.js.download b/233.1f453d2d.chunk.js.download new file mode 100644 index 0000000..7ac9b16 --- /dev/null +++ b/233.1f453d2d.chunk.js.download @@ -0,0 +1,2254 @@ +var __freeze=Object.freeze,__defProp=Object.defineProperty;var __template=(cooked,raw)=>__freeze(__defProp(cooked,"raw",{value:__freeze(raw||cooked.slice())}));var _a,_b,_c,_d,_e,_f;(this["webpackJsonp@builder.io/app"]=this["webpackJsonp@builder.io/app"]||[]).push([[233,5,21,243,249,261,279,280,307,320],{1939:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var helpers_extends=__webpack_require__(21),react=__webpack_require__(3),emotion_memoize_browser_esm=__webpack_require__(400),reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=Object(emotion_memoize_browser_esm.a)(function(prop){return reactPropsRegex.test(prop)||prop.charCodeAt(0)===111&&prop.charCodeAt(1)===110&&prop.charCodeAt(2)<91}),emotion_is_prop_valid_browser_esm=isPropValid,esm_extends=__webpack_require__(20),emotion_element_cbed451f_browser_esm=__webpack_require__(92),isBrowser=!0;function getRegisteredStyles(registered,registeredStyles,classNames){var rawClassName="";return classNames.split(" ").forEach(function(className){registered[className]!==void 0?registeredStyles.push(registered[className]+";"):rawClassName+=className+" "}),rawClassName}var registerStyles=function(cache,serialized,isStringTag){var className=cache.key+"-"+serialized.name;(isStringTag===!1||isBrowser===!1)&&cache.registered[className]===void 0&&(cache.registered[className]=serialized.styles)},insertStyles=function(cache,serialized,isStringTag){registerStyles(cache,serialized,isStringTag);var className=cache.key+"-"+serialized.name;if(cache.inserted[serialized.name]===void 0){var current=serialized;do{var maybeStyles=cache.insert(serialized===current?"."+className:"",current,cache.sheet,!0);current=current.next}while(current!==void 0)}},emotion_serialize_browser_esm=__webpack_require__(199),testOmitPropsOnStringTag=emotion_is_prop_valid_browser_esm,testOmitPropsOnComponent=function(key){return key!=="theme"},getDefaultShouldForwardProp=function(tag){return typeof tag=="string"&&tag.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(tag,options,isReal){var shouldForwardProp;if(options){var optionsShouldForwardProp=options.shouldForwardProp;shouldForwardProp=tag.__emotion_forwardProp&&optionsShouldForwardProp?function(propName){return tag.__emotion_forwardProp(propName)&&optionsShouldForwardProp(propName)}:optionsShouldForwardProp}return typeof shouldForwardProp!="function"&&isReal&&(shouldForwardProp=tag.__emotion_forwardProp),shouldForwardProp},useInsertionEffect=react["useInsertionEffect"]?react["useInsertionEffect"]:function(create){create()};function useInsertionEffectMaybe(create){useInsertionEffect(create)}var ILLEGAL_ESCAPE_SEQUENCE_ERROR=`You have illegal escape sequence in your template literal, most likely inside content's property value. +Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". +You can read more about this here: +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,emotion_styled_base_browser_esm_Insertion=function(_ref){var cache=_ref.cache,serialized=_ref.serialized,isStringTag=_ref.isStringTag;registerStyles(cache,serialized,isStringTag);var rules=useInsertionEffectMaybe(function(){return insertStyles(cache,serialized,isStringTag)});return null},emotion_styled_base_browser_esm_createStyled=function createStyled(tag,options){var isReal=tag.__emotion_real===tag,baseTag=isReal&&tag.__emotion_base||tag,identifierName,targetClassName;options!==void 0&&(identifierName=options.label,targetClassName=options.target);var shouldForwardProp=composeShouldForwardProps(tag,options,isReal),defaultShouldForwardProp=shouldForwardProp||getDefaultShouldForwardProp(baseTag),shouldUseAs=!defaultShouldForwardProp("as");return function(){var args=arguments,styles=isReal&&tag.__emotion_styles!==void 0?tag.__emotion_styles.slice(0):[];if(identifierName!==void 0&&styles.push("label:"+identifierName+";"),args[0]==null||args[0].raw===void 0)styles.push.apply(styles,args);else{styles.push(args[0][0]);for(var len=args.length,i=1;i(Object(react.useEffect)(()=>{dispatchEvent(new CustomEvent("resize"))}),Object(es.g)(()=>{const element=app_state_constant.appState.editor.selection[0],actionsPath="meta.bindingActions."+props.path;return Object(get_from_path_function.a)(element,actionsPath)?Object(emotion_react_jsx_runtime_browser_esm.b)(show_element_action_popover.a,{kind:"expression",path:actionsPath,element,eventName:props.path}):Object(emotion_react_jsx_runtime_browser_esm.b)("div",{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Paper_default.a,{children:Object(emotion_react_jsx_runtime_browser_esm.b)(List_default.a,{children:register_action.a.filter(item=>item.kind==="expression"||item.kind==="any").filter(item=>{let can=!0;return item.requiredPermissions&&(can=!!app_state_constant.appState.user.can(item.requiredPermissions)),item.showIf&&(can=can&&!!(props.fieldType&&item.showIf(props.fieldType))),can}).map(actionType=>Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({placement:"right",title:Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[actionType.helperText," ",actionType.learnMoreLink&&Object(emotion_react_jsx_runtime_browser_esm.b)(TextLink.a,Object.assign({target:"_blank",href:actionType.learnMoreLink,css:{color:theme_constant.a.colors.primaryVeryLight}},{children:"Learn more"}))]}),interactive:!0},{children:Object(emotion_react_jsx_runtime_browser_esm.c)(ListItem_default.a,Object.assign({button:!0,onClick:()=>{Object(build_observable_path.a)(element,actionsPath,[Object(register_action.b)({action:actionType.id})])}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(ListItemIcon_default.a,{children:actionType.icon||Object(emotion_react_jsx_runtime_browser_esm.b)(Code_default.a,{})}),Object(emotion_react_jsx_runtime_browser_esm.b)(ListItemText_default.a,{primary:actionType.name})]}))}),actionType.id))})})})})),BindingIconSvg=props=>Object(emotion_react_jsx_runtime_browser_esm.b)(SvgIcon_default.a,Object.assign({},props,{viewBox:"0 0 12 12",css:{transform:"scale(0.8)",transformOrigin:"center"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M2 8C0.9 8 0 8.9 0 10C0 11.1 0.9 12 2 12C3.1 12 4 11.1 4 10C4 8.9 3.1 8 2 8ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM10 4C11.1 4 12 3.1 12 2C12 0.9 11.1 0 10 0C8.9 0 8 0.9 8 2C8 3.1 8.9 4 10 4ZM10 8C8.9 8 8 8.9 8 10C8 11.1 8.9 12 10 12C11.1 12 12 11.1 12 10C12 8.9 11.1 8 10 8Z"})}));function getComponentOptionPath(path){return path?`component.options.${path}`:""}function BindingIcon(props){return app_state_constant.appState.editor.useSimpleEditingMode||!Object(react.useContext)(bindable_context.a)?null:Object(es.g)(()=>{if(app_state_constant.appState.editor.editorOptions.hideDataTab)return null;const el=app_state_constant.appState.editor.selection[0];if(!(props.path&&el))return null;const hasBinding=el.bindings.has(props.path);return Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Edit bindings"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({tabIndex:props.tabIndex,className:props.className,css:{fontSize:14},style:props.style,onClick:e=>{showBindingPopover(props.anchorElement||e.currentTarget,props.path,props.fieldType)}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(BindingIconSvg,{css:Object.assign({fontSize:"inherit"},hasBinding&&{color:theme_constant.a.colors.primary})})}))}))})}function showBindingPopover(element,path,fieldType){const close=app_state_constant.appState.globalState.openPopover(element,Object(emotion_react_jsx_runtime_browser_esm.b)(BindingPopover,{fieldType,path,onClose:()=>close()}),{PaperProps:{style:{overflow:"visible"}}})}function BindingPopover(props){return Object(es.g)(()=>{const el=app_state_constant.appState.editor.selection[0],hasBinding=el.bindings.has(props.path),options=Object(DataEditor.b)(),actionsPath="meta.bindingActions."+props.path;return Object(get_from_path_function.a)(el,actionsPath)?Object(emotion_react_jsx_runtime_browser_esm.b)(show_element_action_popover.a,{kind:"expression",path:actionsPath,element:el,eventName:props.path}):Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{padding:30,width:400,maxWidth:"100%",backgroundColor:"var(--off-background)"}},{children:[!options.length&&!hasBinding?Object(emotion_react_jsx_runtime_browser_esm.b)(emotion_react_jsx_runtime_browser_esm.a,{children:Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{textAlign:"center"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{fontSize:16}},{children:"You have no data connected"})),Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{fontSize:14,marginTop:15,color:"var(--text-caption)"}},{children:["You can add data to connect to"," ",Object(emotion_react_jsx_runtime_browser_esm.b)(TextLink.a,Object.assign({onClick:()=>{app_state_constant.appState.designerState.selectDataTab.next(),props.onClose()}},{children:"here"}))]})),Object(emotion_react_jsx_runtime_browser_esm.b)(TextLink.a,Object.assign({href:"https://www.builder.io/blog/builder-data",target:"_blank",css:{textAlign:"center",display:"block",padding:15,marginTop:10}},{children:"Learn more"}))]}))}):Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{textAlign:"center",marginBottom:20}},{children:"Get the value for this from:"})),Object(emotion_react_jsx_runtime_browser_esm.b)(Paper_default.a,Object.assign({css:{padding:"5px 5px 1px 5px"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(StyleNumberInput.a,{styles:{control:()=>({border:"none"})},actionPath:`meta.bindingActions.${props.path}`,css:{marginBottom:5},placeholder:"Choose data",options,value:el.code.bindings.get(props.path)||el.bindings.get(props.path)||"",onChange:value=>{app_state_constant.appState.editor.selection.forEach(el2=>{el2.code.bindings.set(props.path,value)}),Object(transpile.a)(value).then(transpiled=>{app_state_constant.appState.editor.selection.forEach(el2=>{el2.bindings.set(props.path,transpiled)})})}})})),hasBinding?Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({onClick:()=>{app_state_constant.appState.editor.selection.forEach(el2=>{el2.code.bindings.delete(props.path),el2.bindings.delete(props.path)})},fullWidth:!0,css:{opacity:.5,marginTop:10}},{children:"Remove Binding"})):Object(emotion_react_jsx_runtime_browser_esm.b)(TextLink.a,Object.assign({href:"https://www.builder.io/blog/builder-data",target:"_blank",css:{textAlign:"center",display:"block",padding:10}},{children:"Learn about data binding"}))]}),!hasBinding&&app_state_constant.appState.config.useNewActionsEditorV2&&Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{textAlign:"center",marginTop:10,paddingBottom:10}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{fontSize:16,padding:10}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(NewBadge.c,Object.assign({badgeProps:{style:{top:0}}},{children:"Shortcuts"}))})),Object(emotion_react_jsx_runtime_browser_esm.b)(ShortcutPopover,{fieldType:props.fieldType,path:props.path})]}))]}))})}},2019:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return ACCEPTED_CSS_UNITS}),__webpack_require__.d(__webpack_exports__,"c",function(){return isValidCssValue}),__webpack_require__.d(__webpack_exports__,"b",function(){return StyleInput});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5),_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),_material_ui_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(131),_material_ui_core__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_2__),mobx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4),mobx_react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(16),react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(3),react__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__),_classes_destroyable_component_class__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(52),_components_StickyCursorInput__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(2036),_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(1),_get_element_style__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(2021),_StyleLabel__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(2032),_constants_theme_constant__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(7),_bindings_binding_icon__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(2018),lodash__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(6),lodash__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__),_helpers_css_validators__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(729);const ACCEPTED_CSS_UNITS=["em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pt","pc","px","%"],isValidCssValue=(property,currentValue)=>{try{return CSS.supports(Object(lodash__WEBPACK_IMPORTED_MODULE_13__.kebabCase)(String(property)),currentValue)}catch(e){console.error("Error checking valid value for css: ",e)}if(_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.designerState.isBuildingForReactNative){const rnStyleError=Object(_helpers_css_validators__WEBPACK_IMPORTED_MODULE_14__.a)(String(property),currentValue);return rnStyleError&&console.error(rnStyleError),!rnStyleError}return!0},oppositeProperties={marginLeft:"marginRight",marginRight:"marginLeft",marginTop:"marginBottom",marginBottom:"marginTop",paddingLeft:"paddingRight",paddingRight:"paddingLeft",paddingTop:"paddingBottom",paddingBottom:"paddingTop"},allOtherDirectionProperties={marginLeft:["marginRight","marginTop","marginBottom"],marginRight:["marginLeft","marginTop","marginBottom"],marginTop:["marginLeft","marginRight","marginBottom"],marginBottom:["marginLeft","marginRight","marginTop"],paddingLeft:["paddingRight","paddingTop","paddingBottom"],paddingRight:["paddingLeft","paddingTop","paddingBottom"],paddingTop:["paddingLeft","paddingRight","paddingBottom"],paddingBottom:["paddingLeft","paddingRight","paddingTop"]};function getOppositeProperty(property){return oppositeProperties[property]}function getAllOtherDirectionProperties(property){return allOtherDirectionProperties[property]}let StyleInput=class extends _classes_destroyable_component_class__WEBPACK_IMPORTED_MODULE_6__.a{constructor(){super(...arguments),this.priorValue="",this.defaultUnits="px",this.bindingPath=`style.${String(this.props.property)}`,this.inputWidth=this.props.inputWidth||60,this.bindingWidth=this.props.bindingWidth||56,this.dropdownButtonRef=null,this.inputRef=null,this.showDropdownOnFocus=!1,this.mouseIsDown=!1,this.onChange=newValue=>{this.props.property&&Object(_StyleLabel__WEBPACK_IMPORTED_MODULE_10__.b)(this.props.property,newValue),this.props.onChange&&this.props.onChange(newValue)},this.focused=!1,this.showDropdown=!1,this.scrubbedAmount=0,this.handleChange=event=>{this.updateValue(event.target.value)},this.handleKeyDown=event=>{const amount=event.shiftKey?10:event.altKey?.1:1;switch(event.key){case"ArrowUp":event.preventDefault(),this.addToValue(amount);break;case"ArrowDown":event.preventDefault(),this.addToValue(-amount);break}}}get useValueScrubbing(){var _a2;return(_a2=this.props.allowValueScrubbing)!==null&&_a2!==void 0?_a2:!isNaN(parseInt(this.getValueString()||this.placeholder||""))}get placeholder(){var _a2;return this.props.overridePlaceholder||this.props.property&&Object(_get_element_style__WEBPACK_IMPORTED_MODULE_9__.a)(this.props.property,(_a2=this.props.includeComputed)!==null&&_a2!==void 0?_a2:!0)||this.props.placeholder||""}componentDidMount(){this.safeReaction(()=>this.useValueScrubbing&&this.mouseIsDown&&_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.document.getMouseDeltaY(),deltaY=>{var _a2;if(typeof deltaY=="number"&&this.scrubbedAmount++>3){if(this.addToValue(-deltaY),(_a2=this.inputRef)===null||_a2===void 0||_a2.blur(),_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.document.shiftKeyDown){const otherSides=getAllOtherDirectionProperties(this.props.property);if(otherSides){const value=this.getValueString();for(const side of otherSides)_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.editor.selection.forEach(el=>{el.style.set(side,value)})}}else if(_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.document.altKeyDown){const oppositeSide=getOppositeProperty(this.props.property);if(oppositeSide){const value=this.getValueString();_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.editor.selection.forEach(el=>{el.style.set(oppositeSide,value)})}}}}),this.safeListenToEvent(document,"mouseup",()=>{this.mouseIsDown=!1,this.scrubbedAmount=0})}getValueString(){var _a2;return this.props.value?this.props.value.trim():this.props.property&&((_a2=Object(_get_element_style__WEBPACK_IMPORTED_MODULE_9__.a)(this.props.property))===null||_a2===void 0?void 0:_a2.trim())||""}getNumberValue(value,includeDefault=!0){const parsed=parseFloat(value);return isNaN(parsed)&&includeDefault?0:parsed}get hasValueSet(){if(_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.designerState.editingAnimationStep)return!!_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.designerState.editingAnimationStep.styles.get(this.props.property);if(this.props.value)return!!this.props.value;const device=_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.designerState.artboardSize.deviceSize,hasStyleSet=!!_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.designerState.selectedElements.find(el=>{var _a2;const hasResponsiveStyle=el.responsiveStyles[device].get(this.props.property),hasComponentStyle=(_a2=_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.designerState.overrideEditingStyles)===null||_a2===void 0?void 0:_a2.get(`${String(this.props.property)}`);return!!(hasResponsiveStyle||hasComponentStyle)});return this.props.property&&hasStyleSet}getUnits(){const units=this.getValueString().trim().replace(/[\-\d\.]+/g,"");return ACCEPTED_CSS_UNITS.includes(units)?units:"px"}hasValidValue(){const currentValue=this.getValueString();return this.props.property?isValidCssValue(this.props.property,currentValue):!0}setValueString(value){this.priorValue=value,this.onChange(value)}updateValue(newValue){if(newValue&&newValue.length>=this.priorValue.length){newValue=newValue.replace(new RegExp("^(.*[\\d\\.]+)([^\\d\\.]+)"+this.defaultUnits+"$"),"$1$2");const numberValue=this.getNumberValue(newValue),units=isNaN(numberValue)?this.defaultUnits:this.getUnits();String(numberValue)===newValue&&(newValue=newValue+units)}this.setValueString(newValue)}onBlur(event){this.focused=!1,this.showDropdownOnFocus&&(this.showDropdown=!1),this.hasValidValue()||this.updateValue("")}onFocus(event){this.focused=!0,this.showDropdownOnFocus&&(this.showDropdown=!0)}addToValue(amount){const mustBeAbove0=["borderRadius","height","width","minHeight","maxHeight","minWidth","maxWidth","paddingTop","paddingBottom","paddingLeft","paddingRight","fontSize","borderWidth","lineHeight"],numberValue=this.getNumberValue(this.getValueString());let newValue=(numberValue||0)+amount;this.props.property&&mustBeAbove0.includes(this.props.property)&&(newValue=Math.max(0,newValue)),typeof this.props.min=="number"&&(newValue=Math.max(0,newValue)),String(newValue).length>6&&(newValue=Object(lodash__WEBPACK_IMPORTED_MODULE_13__.round)(newValue,1));const units=isNaN(numberValue)?this.defaultUnits:this.getUnits();this.setValueString(newValue+units)}render(){var _a2;const el=_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_8__.appState.editor.selection[0],options=[...this.props.dropdownOptions||[]],dimValue=this.props.property&&!this.hasValueSet;return Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_2___default.a,Object.assign({disableHoverListener:!this.props.warning,disableFocusListener:!this.props.warning,title:(_a2=this.props.warning)!==null&&_a2!==void 0?_a2:"",interactive:!0},{children:Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)("div",Object.assign({className:"style-number-input-container ","data-for-property":this.props.property,onMouseDown:()=>{this.mouseIsDown=!0},css:Object.assign(Object.assign(Object.assign(Object.assign({contain:"layout",justifyContent:"center",display:"flex",flexDirection:"column",marginBottom:15,height:30,background:"var(--off-background-4)",borderRadius:5,border:"1px solid var(--off-background-3)"},this.props.warning&&{borderColor:"#eb2525"}),this.props.halfWidth&&{width:"48%"}),this.props.inputCss),this.focused&&{borderColor:_constants_theme_constant__WEBPACK_IMPORTED_MODULE_11__.a.colors.primary})},{children:Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.c)("div",Object.assign({css:{display:"flex",alignItems:"center"}},{children:[el.bindings.has(this.bindingPath)?Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)("span",Object.assign({css:{width:this.bindingWidth,borderRadius:"3px 0 0 3px",display:"flex",flexGrow:1}},{children:Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_bindings_binding_icon__WEBPACK_IMPORTED_MODULE_12__.a,{path:this.bindingPath,css:{background:"transparent !important"}})})):Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_components_StickyCursorInput__WEBPACK_IMPORTED_MODULE_7__.a,{ref:ref=>{this.inputRef=ref},placeholder:this.placeholder,className:"style-number-input",onKeyDown:this.handleKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,css:Object.assign(Object.assign({paddingLeft:8,width:this.inputWidth,outline:"none",background:"transparent",border:"none",flexGrow:1,fontWeight:600,color:"var(--off-background-5)",cursor:this.useValueScrubbing?"ns-resize":void 0,lineHeight:"1rem"},dimValue?{color:"var(--off-background-6)"}:null),{"::placeholder":{color:"var(--off-background-6)"}}),value:this.props.property&&!this.hasValueSet?"":this.getValueString(),onChange:this.handleChange,type:this.props.type||"text",disabled:this.props.disabled||(this.bindingPath?el.bindings.has(this.bindingPath):!1)}),Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_StyleLabel__WEBPACK_IMPORTED_MODULE_10__.a,{dropdownOptions:options,content:this.props.label,property:this.props.property})]}))}))}))}};Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.observable],StyleInput.prototype,"mouseIsDown",void 0),Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.computed],StyleInput.prototype,"useValueScrubbing",null),Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.computed],StyleInput.prototype,"placeholder",null),Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.observable],StyleInput.prototype,"focused",void 0),Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.observable],StyleInput.prototype,"showDropdown",void 0),Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.computed],StyleInput.prototype,"hasValueSet",null),Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.action.bound],StyleInput.prototype,"onBlur",null),Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx__WEBPACK_IMPORTED_MODULE_3__.action.bound],StyleInput.prototype,"onFocus",null),StyleInput=Object(tslib__WEBPACK_IMPORTED_MODULE_0__.a)([mobx_react__WEBPACK_IMPORTED_MODULE_4__.observer],StyleInput)},2020:function(module,exports){var core=module.exports={version:"2.6.11"};typeof __e=="number"&&(__e=core)},2021:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return getElementsStyle});var _constants_app_state_constant__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);function getElementsStyle(property,includeComputed=!0,includeInherited=!0){return _constants_app_state_constant__WEBPACK_IMPORTED_MODULE_0__.appState.designerState.getSelectedElementsStyle(property,includeComputed,includeInherited)}},2022:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return useAppStateContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1);const AppStateContext=Object(react__WEBPACK_IMPORTED_MODULE_0__.createContext)(_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_1__.appState);function useAppStateContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppStateContext)}},2023:function(module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DomHandler=void 0;var domelementtype_1=__webpack_require__(2213),node_1=__webpack_require__(2214);__exportStar(__webpack_require__(2214),exports);var reWhitespace=/\s+/g,defaultOpts={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},DomHandler=function(){function DomHandler2(callback,options,elementCB){this.dom=[],this.root=new node_1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof options=="function"&&(elementCB=options,options=defaultOpts),typeof callback=="object"&&(options=callback,callback=void 0),this.callback=callback??null,this.options=options??defaultOpts,this.elementCB=elementCB??null}return DomHandler2.prototype.onparserinit=function(parser){this.parser=parser},DomHandler2.prototype.onreset=function(){this.dom=[],this.root=new node_1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},DomHandler2.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},DomHandler2.prototype.onerror=function(error){this.handleCallback(error)},DomHandler2.prototype.onclosetag=function(){this.lastNode=null;var elem=this.tagStack.pop();this.options.withEndIndices&&(elem.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(elem)},DomHandler2.prototype.onopentag=function(name2,attribs){var type=this.options.xmlMode?domelementtype_1.ElementType.Tag:void 0,element=new node_1.Element(name2,attribs,void 0,type);this.addNode(element),this.tagStack.push(element)},DomHandler2.prototype.ontext=function(data){var normalizeWhitespace=this.options.normalizeWhitespace,lastNode=this.lastNode;if(lastNode&&lastNode.type===domelementtype_1.ElementType.Text)normalizeWhitespace?lastNode.data=(lastNode.data+data).replace(reWhitespace," "):lastNode.data+=data,this.options.withEndIndices&&(lastNode.endIndex=this.parser.endIndex);else{normalizeWhitespace&&(data=data.replace(reWhitespace," "));var node=new node_1.Text(data);this.addNode(node),this.lastNode=node}},DomHandler2.prototype.oncomment=function(data){if(this.lastNode&&this.lastNode.type===domelementtype_1.ElementType.Comment){this.lastNode.data+=data;return}var node=new node_1.Comment(data);this.addNode(node),this.lastNode=node},DomHandler2.prototype.oncommentend=function(){this.lastNode=null},DomHandler2.prototype.oncdatastart=function(){var text=new node_1.Text(""),node=new node_1.NodeWithChildren(domelementtype_1.ElementType.CDATA,[text]);this.addNode(node),text.parent=node,this.lastNode=text},DomHandler2.prototype.oncdataend=function(){this.lastNode=null},DomHandler2.prototype.onprocessinginstruction=function(name2,data){var node=new node_1.ProcessingInstruction(name2,data);this.addNode(node)},DomHandler2.prototype.handleCallback=function(error){if(typeof this.callback=="function")this.callback(error,this.dom);else if(error)throw error},DomHandler2.prototype.addNode=function(node){var parent=this.tagStack[this.tagStack.length-1],previousSibling=parent.children[parent.children.length-1];this.options.withStartIndices&&(node.startIndex=this.parser.startIndex),this.options.withEndIndices&&(node.endIndex=this.parser.endIndex),parent.children.push(node),previousSibling&&(node.prev=previousSibling,previousSibling.next=node),node.parent=parent,this.lastNode=null},DomHandler2}();exports.DomHandler=DomHandler,exports.default=DomHandler},2024:function(module,exports,__webpack_require__){"use strict";let{isClean,my}=__webpack_require__(2080),Declaration=__webpack_require__(2044),Comment=__webpack_require__(2034),Node2=__webpack_require__(2045),parse,Rule,AtRule,Root;function cleanSource(nodes){return nodes.map(i=>(i.nodes&&(i.nodes=cleanSource(i.nodes)),delete i.source,i))}function markDirtyUp(node){if(node[isClean]=!1,node.proxyOf.nodes)for(let i of node.proxyOf.nodes)markDirtyUp(i)}class Container extends Node2{push(child){return child.parent=this,this.proxyOf.nodes.push(child),this}each(callback){if(!this.proxyOf.nodes)return;let iterator=this.getIterator(),index,result;for(;this.indexes[iterator]{let result;try{result=callback(child,i)}catch(e){throw child.addToError(e)}return result!==!1&&child.walk&&(result=child.walk(callback)),result})}walkDecls(prop,callback){return callback?prop instanceof RegExp?this.walk((child,i)=>{if(child.type==="decl"&&prop.test(child.prop))return callback(child,i)}):this.walk((child,i)=>{if(child.type==="decl"&&child.prop===prop)return callback(child,i)}):(callback=prop,this.walk((child,i)=>{if(child.type==="decl")return callback(child,i)}))}walkRules(selector,callback){return callback?selector instanceof RegExp?this.walk((child,i)=>{if(child.type==="rule"&&selector.test(child.selector))return callback(child,i)}):this.walk((child,i)=>{if(child.type==="rule"&&child.selector===selector)return callback(child,i)}):(callback=selector,this.walk((child,i)=>{if(child.type==="rule")return callback(child,i)}))}walkAtRules(name2,callback){return callback?name2 instanceof RegExp?this.walk((child,i)=>{if(child.type==="atrule"&&name2.test(child.name))return callback(child,i)}):this.walk((child,i)=>{if(child.type==="atrule"&&child.name===name2)return callback(child,i)}):(callback=name2,this.walk((child,i)=>{if(child.type==="atrule")return callback(child,i)}))}walkComments(callback){return this.walk((child,i)=>{if(child.type==="comment")return callback(child,i)})}append(...children){for(let child of children){let nodes=this.normalize(child,this.last);for(let node of nodes)this.proxyOf.nodes.push(node)}return this.markDirty(),this}prepend(...children){children=children.reverse();for(let child of children){let nodes=this.normalize(child,this.first,"prepend").reverse();for(let node of nodes)this.proxyOf.nodes.unshift(node);for(let id in this.indexes)this.indexes[id]=this.indexes[id]+nodes.length}return this.markDirty(),this}cleanRaws(keepBetween){if(super.cleanRaws(keepBetween),this.nodes)for(let node of this.nodes)node.cleanRaws(keepBetween)}insertBefore(exist,add){let existIndex=this.index(exist),type=existIndex===0?"prepend":!1,nodes=this.normalize(add,this.proxyOf.nodes[existIndex],type).reverse();existIndex=this.index(exist);for(let node of nodes)this.proxyOf.nodes.splice(existIndex,0,node);let index;for(let id in this.indexes)index=this.indexes[id],existIndex<=index&&(this.indexes[id]=index+nodes.length);return this.markDirty(),this}insertAfter(exist,add){let existIndex=this.index(exist),nodes=this.normalize(add,this.proxyOf.nodes[existIndex]).reverse();existIndex=this.index(exist);for(let node of nodes)this.proxyOf.nodes.splice(existIndex+1,0,node);let index;for(let id in this.indexes)index=this.indexes[id],existIndex=child&&(this.indexes[id]=index-1);return this.markDirty(),this}removeAll(){for(let node of this.proxyOf.nodes)node.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(pattern,opts,callback){return callback||(callback=opts,opts={}),this.walkDecls(decl=>{opts.props&&!opts.props.includes(decl.prop)||opts.fast&&!decl.value.includes(opts.fast)||(decl.value=decl.value.replace(pattern,callback))}),this.markDirty(),this}every(condition){return this.nodes.every(condition)}some(condition){return this.nodes.some(condition)}index(child){return typeof child=="number"?child:(child.proxyOf&&(child=child.proxyOf),this.proxyOf.nodes.indexOf(child))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(nodes,sample){if(typeof nodes=="string")nodes=cleanSource(parse(nodes).nodes);else if(Array.isArray(nodes)){nodes=nodes.slice(0);for(let i of nodes)i.parent&&i.parent.removeChild(i,"ignore")}else if(nodes.type==="root"&&this.type!=="document"){nodes=nodes.nodes.slice(0);for(let i of nodes)i.parent&&i.parent.removeChild(i,"ignore")}else if(nodes.type)nodes=[nodes];else if(nodes.prop){if(typeof nodes.value>"u")throw new Error("Value field is missed in node creation");typeof nodes.value!="string"&&(nodes.value=String(nodes.value)),nodes=[new Declaration(nodes)]}else if(nodes.selector)nodes=[new Rule(nodes)];else if(nodes.name)nodes=[new AtRule(nodes)];else if(nodes.text)nodes=[new Comment(nodes)];else throw new Error("Unknown node type in node creation");return nodes.map(i=>(i[my]||Container.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[isClean]&&markDirtyUp(i),typeof i.raws.before>"u"&&sample&&typeof sample.raws.before<"u"&&(i.raws.before=sample.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}getProxyProcessor(){return{set(node,prop,value){return node[prop]===value||(node[prop]=value,(prop==="name"||prop==="params"||prop==="selector")&&node.markDirty()),!0},get(node,prop){return prop==="proxyOf"?node:node[prop]?prop==="each"||typeof prop=="string"&&prop.startsWith("walk")?(...args)=>node[prop](...args.map(i=>typeof i=="function"?(child,index)=>i(child.toProxy(),index):i)):prop==="every"||prop==="some"?cb=>node[prop]((child,...other)=>cb(child.toProxy(),...other)):prop==="root"?()=>node.root().toProxy():prop==="nodes"?node.nodes.map(i=>i.toProxy()):prop==="first"||prop==="last"?node[prop].toProxy():node[prop]:node[prop]}}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let iterator=this.lastEach;return this.indexes[iterator]=0,iterator}}Container.registerParse=dependant=>{parse=dependant},Container.registerRule=dependant=>{Rule=dependant},Container.registerAtRule=dependant=>{AtRule=dependant},Container.registerRoot=dependant=>{Root=dependant},module.exports=Container,Container.default=Container,Container.rebuild=node=>{node.type==="atrule"?Object.setPrototypeOf(node,AtRule.prototype):node.type==="rule"?Object.setPrototypeOf(node,Rule.prototype):node.type==="decl"?Object.setPrototypeOf(node,Declaration.prototype):node.type==="comment"?Object.setPrototypeOf(node,Comment.prototype):node.type==="root"&&Object.setPrototypeOf(node,Root.prototype),node[my]=!0,node.nodes&&node.nodes.forEach(child=>{Container.rebuild(child)})}},2025:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return isBuilderElement});const isBuilderElement=object=>object?.["@type"]==="@builder.io/sdk:Element"},2026:function(module,exports,__webpack_require__){"use strict";let{isClean,my}=__webpack_require__(2112),Declaration=__webpack_require__(2064),Comment=__webpack_require__(2068),Node2=__webpack_require__(2065),parse,Rule,AtRule,Root;function cleanSource(nodes){return nodes.map(i=>(i.nodes&&(i.nodes=cleanSource(i.nodes)),delete i.source,i))}function markDirtyUp(node){if(node[isClean]=!1,node.proxyOf.nodes)for(let i of node.proxyOf.nodes)markDirtyUp(i)}class Container extends Node2{push(child){return child.parent=this,this.proxyOf.nodes.push(child),this}each(callback){if(!this.proxyOf.nodes)return;let iterator=this.getIterator(),index,result;for(;this.indexes[iterator]{let result;try{result=callback(child,i)}catch(e){throw child.addToError(e)}return result!==!1&&child.walk&&(result=child.walk(callback)),result})}walkDecls(prop,callback){return callback?prop instanceof RegExp?this.walk((child,i)=>{if(child.type==="decl"&&prop.test(child.prop))return callback(child,i)}):this.walk((child,i)=>{if(child.type==="decl"&&child.prop===prop)return callback(child,i)}):(callback=prop,this.walk((child,i)=>{if(child.type==="decl")return callback(child,i)}))}walkRules(selector,callback){return callback?selector instanceof RegExp?this.walk((child,i)=>{if(child.type==="rule"&&selector.test(child.selector))return callback(child,i)}):this.walk((child,i)=>{if(child.type==="rule"&&child.selector===selector)return callback(child,i)}):(callback=selector,this.walk((child,i)=>{if(child.type==="rule")return callback(child,i)}))}walkAtRules(name2,callback){return callback?name2 instanceof RegExp?this.walk((child,i)=>{if(child.type==="atrule"&&name2.test(child.name))return callback(child,i)}):this.walk((child,i)=>{if(child.type==="atrule"&&child.name===name2)return callback(child,i)}):(callback=name2,this.walk((child,i)=>{if(child.type==="atrule")return callback(child,i)}))}walkComments(callback){return this.walk((child,i)=>{if(child.type==="comment")return callback(child,i)})}append(...children){for(let child of children){let nodes=this.normalize(child,this.last);for(let node of nodes)this.proxyOf.nodes.push(node)}return this.markDirty(),this}prepend(...children){children=children.reverse();for(let child of children){let nodes=this.normalize(child,this.first,"prepend").reverse();for(let node of nodes)this.proxyOf.nodes.unshift(node);for(let id in this.indexes)this.indexes[id]=this.indexes[id]+nodes.length}return this.markDirty(),this}cleanRaws(keepBetween){if(super.cleanRaws(keepBetween),this.nodes)for(let node of this.nodes)node.cleanRaws(keepBetween)}insertBefore(exist,add){let existIndex=this.index(exist),type=existIndex===0?"prepend":!1,nodes=this.normalize(add,this.proxyOf.nodes[existIndex],type).reverse();existIndex=this.index(exist);for(let node of nodes)this.proxyOf.nodes.splice(existIndex,0,node);let index;for(let id in this.indexes)index=this.indexes[id],existIndex<=index&&(this.indexes[id]=index+nodes.length);return this.markDirty(),this}insertAfter(exist,add){let existIndex=this.index(exist),nodes=this.normalize(add,this.proxyOf.nodes[existIndex]).reverse();existIndex=this.index(exist);for(let node of nodes)this.proxyOf.nodes.splice(existIndex+1,0,node);let index;for(let id in this.indexes)index=this.indexes[id],existIndex=child&&(this.indexes[id]=index-1);return this.markDirty(),this}removeAll(){for(let node of this.proxyOf.nodes)node.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(pattern,opts,callback){return callback||(callback=opts,opts={}),this.walkDecls(decl=>{opts.props&&!opts.props.includes(decl.prop)||opts.fast&&!decl.value.includes(opts.fast)||(decl.value=decl.value.replace(pattern,callback))}),this.markDirty(),this}every(condition){return this.nodes.every(condition)}some(condition){return this.nodes.some(condition)}index(child){return typeof child=="number"?child:(child.proxyOf&&(child=child.proxyOf),this.proxyOf.nodes.indexOf(child))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(nodes,sample){if(typeof nodes=="string")nodes=cleanSource(parse(nodes).nodes);else if(Array.isArray(nodes)){nodes=nodes.slice(0);for(let i of nodes)i.parent&&i.parent.removeChild(i,"ignore")}else if(nodes.type==="root"&&this.type!=="document"){nodes=nodes.nodes.slice(0);for(let i of nodes)i.parent&&i.parent.removeChild(i,"ignore")}else if(nodes.type)nodes=[nodes];else if(nodes.prop){if(typeof nodes.value>"u")throw new Error("Value field is missed in node creation");typeof nodes.value!="string"&&(nodes.value=String(nodes.value)),nodes=[new Declaration(nodes)]}else if(nodes.selector)nodes=[new Rule(nodes)];else if(nodes.name)nodes=[new AtRule(nodes)];else if(nodes.text)nodes=[new Comment(nodes)];else throw new Error("Unknown node type in node creation");return nodes.map(i=>(i[my]||Container.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[isClean]&&markDirtyUp(i),typeof i.raws.before>"u"&&sample&&typeof sample.raws.before<"u"&&(i.raws.before=sample.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}getProxyProcessor(){return{set(node,prop,value){return node[prop]===value||(node[prop]=value,(prop==="name"||prop==="params"||prop==="selector")&&node.markDirty()),!0},get(node,prop){return prop==="proxyOf"?node:node[prop]?prop==="each"||typeof prop=="string"&&prop.startsWith("walk")?(...args)=>node[prop](...args.map(i=>typeof i=="function"?(child,index)=>i(child.toProxy(),index):i)):prop==="every"||prop==="some"?cb=>node[prop]((child,...other)=>cb(child.toProxy(),...other)):prop==="root"?()=>node.root().toProxy():prop==="nodes"?node.nodes.map(i=>i.toProxy()):prop==="first"||prop==="last"?node[prop].toProxy():node[prop]:node[prop]}}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let iterator=this.lastEach;return this.indexes[iterator]=0,iterator}}Container.registerParse=dependant=>{parse=dependant},Container.registerRule=dependant=>{Rule=dependant},Container.registerAtRule=dependant=>{AtRule=dependant},Container.registerRoot=dependant=>{Root=dependant},module.exports=Container,Container.default=Container,Container.rebuild=node=>{node.type==="atrule"?Object.setPrototypeOf(node,AtRule.prototype):node.type==="rule"?Object.setPrototypeOf(node,Rule.prototype):node.type==="decl"?Object.setPrototypeOf(node,Declaration.prototype):node.type==="comment"?Object.setPrototypeOf(node,Comment.prototype):node.type==="root"&&Object.setPrototypeOf(node,Root.prototype),node[my]=!0,node.nodes&&node.nodes.forEach(child=>{Container.rebuild(child)})}},2027:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",function(){return FieldsForm_ListEditor}),__webpack_require__.d(__webpack_exports__,"a",function(){return FieldBoundMessage});var tslib_es6=__webpack_require__(5),emotion_react_jsx_runtime_browser_esm=__webpack_require__(0),mobx_state_tree_module=__webpack_require__(2),builder_react_es5=__webpack_require__(19),emotion_react_browser_esm=__webpack_require__(33),MenuItem=__webpack_require__(35),MenuItem_default=__webpack_require__.n(MenuItem),ListItemText=__webpack_require__(374),ListItemText_default=__webpack_require__.n(ListItemText),Paper=__webpack_require__(126),Paper_default=__webpack_require__.n(Paper),IconButton=__webpack_require__(113),IconButton_default=__webpack_require__.n(IconButton),Button=__webpack_require__(40),Button_default=__webpack_require__.n(Button),Popover=__webpack_require__(443),Popover_default=__webpack_require__.n(Popover),ExpansionPanel=__webpack_require__(2266),ExpansionPanel_default=__webpack_require__.n(ExpansionPanel),ExpansionPanelSummary=__webpack_require__(2655),ExpansionPanelSummary_default=__webpack_require__.n(ExpansionPanelSummary),ExpansionPanelDetails=__webpack_require__(2656),ExpansionPanelDetails_default=__webpack_require__.n(ExpansionPanelDetails),List=__webpack_require__(444),List_default=__webpack_require__.n(List),ListItem=__webpack_require__(446),ListItem_default=__webpack_require__.n(ListItem),ListItemSecondaryAction=__webpack_require__(1972),ListItemSecondaryAction_default=__webpack_require__.n(ListItemSecondaryAction),Dialog=__webpack_require__(1054),Dialog_default=__webpack_require__.n(Dialog),Switch=__webpack_require__(1055),Switch_default=__webpack_require__.n(Switch),TextField=__webpack_require__(1035),TextField_default=__webpack_require__.n(TextField),Tooltip=__webpack_require__(546),Tooltip_default=__webpack_require__.n(Tooltip),Typography=__webpack_require__(106),Typography_default=__webpack_require__.n(Typography),Edit=__webpack_require__(2647),Edit_default=__webpack_require__.n(Edit),Close=__webpack_require__(573),Close_default=__webpack_require__.n(Close),ChevronRight=__webpack_require__(1959),ChevronRight_default=__webpack_require__.n(ChevronRight),HelpOutline=__webpack_require__(961),HelpOutline_default=__webpack_require__.n(HelpOutline),ArrowDropDown=__webpack_require__(1970),ArrowDropDown_default=__webpack_require__.n(ArrowDropDown),ExpandMore=__webpack_require__(2244),ExpandMore_default=__webpack_require__.n(ExpandMore),DragHandle=__webpack_require__(2676),DragHandle_default=__webpack_require__.n(DragHandle),CloudDone=__webpack_require__(2714),CloudDone_default=__webpack_require__.n(CloudDone),Code=__webpack_require__(665),Code_default=__webpack_require__.n(Code),Fullscreen=__webpack_require__(2650),Fullscreen_default=__webpack_require__.n(Fullscreen),ExpandLess=__webpack_require__(2715),ExpandLess_default=__webpack_require__.n(ExpandLess),lodash=__webpack_require__(6),isEmpty=__webpack_require__(2521),isEmpty_default=__webpack_require__.n(isEmpty);function is_empty_function_isEmpty(value){return typeof value>"u"||value===null||value===""||!["number","boolean"].includes(typeof value)&&isEmpty_default()(value)}var lodash_decorators=__webpack_require__(2070),mobx_module=__webpack_require__(4),mobxreact_esm=__webpack_require__(16),moment=__webpack_require__(56),moment_default=__webpack_require__.n(moment),pluralize=__webpack_require__(288),pluralize_default=__webpack_require__.n(pluralize),quill_paste_smart=__webpack_require__(2522),react=__webpack_require__(3),react_default=__webpack_require__.n(react),react_beautiful_dnd_esm=__webpack_require__(2040),react_datepicker_min=__webpack_require__(286),react_datepicker_min_default=__webpack_require__.n(react_datepicker_min),react_datepicker=__webpack_require__(1033),react_inspector=__webpack_require__(2498),lib=__webpack_require__(2500),lib_default=__webpack_require__.n(lib),quill_snow=__webpack_require__(2533),es=__webpack_require__(2260),sanitize_html=__webpack_require__(2514),sanitize_html_default=__webpack_require__.n(sanitize_html),traverse=__webpack_require__(195),traverse_default=__webpack_require__.n(traverse),binding_icon=__webpack_require__(2018),safe_component_class=__webpack_require__(124),app_state_constant=__webpack_require__(1);const customFields=[{type:"integration",name:"ShopStyle Product",id:"shopstyleProduct",inputLabel:"Product ID",description:"Insert ShopStyle product by ID",url:"https://api.shopstyle.com/api/v2/products/{id}?pid=shopstyle&fields=brandedName,price,id,image.sizes.Large.url,inStock"},{type:"integration",name:"ShopStyle Look",id:"shopstyleLook",inputLabel:"Look ID",description:"Insert ShopStyle look by ID",url:"https://www.shopstyle.com/api/v2/site/posts/{id}?maxNumProducts=5&maxNumRelatedPostProducts=0&numRelatedPosts06&pid=shopstyle"}];var theme_constant=__webpack_require__(7),HelpButton=__webpack_require__(222),StyleEditor=__webpack_require__(2394),async_component_function=__webpack_require__(27),delay_function=__webpack_require__(87),fast_clone_function=__webpack_require__(25),element_model=__webpack_require__(72);const getClosestParentElement=el=>{if(!el||!Object(mobx_state_tree_module.isStateTreeNode)(el))return null;let parent=Object(lodash.attempt)(()=>Object(mobx_state_tree_module.getParent)(el));for(;parent;){if(Object(lodash.isError)(parent))return null;if(Object(element_model.j)(parent))return parent;parent=Object(lodash.attempt)(()=>Object(mobx_state_tree_module.getParent)(parent))}return null},getParentElements=el=>{let parent=getClosestParentElement(el);const parents=[];for(;parent;)parents.push(parent),parent=getClosestParentElement(parent);return parents};var human_case_function=__webpack_require__(73),load_image_function=__webpack_require__(197),next_tick_function=__webpack_require__(279),object_to_inputs=__webpack_require__(2505),run_function=__webpack_require__(532),safe_evaluate_function=__webpack_require__(244),upload_asset_function=__webpack_require__(392),content_model=__webpack_require__(118),reference=__webpack_require__(340),init_firebase=__webpack_require__(58),Content=__webpack_require__(2170),destroyable_component_class=__webpack_require__(52);function validateTextField(field,value,required=!1){const string=value;if(!string)return required?`Field ${field.friendlyName||Object(human_case_function.a)(field.name)} is required`:"";if(field.minLength&&string.lengthfield.maxLength)return`Field ${field.friendlyName||Object(human_case_function.a)(field.name)} requires no more than ${field.maxLength} characters, currently it is ${string.length} characters`;const regex=field.regex;return regex&&!new RegExp(regex.pattern,regex.options).test(value)?regex.message||`Field ${field.friendlyName||Object(human_case_function.a)(field.name)} does not match required pattern "${regex.pattern}"`:""}class FieldEditor_FieldEditor extends destroyable_component_class.a{constructor(){super(...arguments),this.errorMessage=""}validateCurrentValue(){const field=this.props.field,options=this.props.object,camelName=Object(lodash.camelCase)(field.name);return this.validate(Object(mobx_module.get)(options,camelName),field.required)}validate(value,required=!1){const field=this.props.field;return value?typeof value=="string"?validateTextField(field,value,required):"":required?"This field is required":""}}Object(tslib_es6.a)([mobx_module.observable],FieldEditor_FieldEditor.prototype,"errorMessage",void 0);var core_Typography=__webpack_require__(105),core_Typography_default=__webpack_require__.n(core_Typography),json_type=__webpack_require__(77);let RequestEditor_RequestEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(string,required=!1){return string?"":required?"This field is required":""}componentDidMount(){const value=this.props.object.get(this.props.field.name);this.jsonObject=json_type.b.create(Object(mobx_state_tree_module.getSnapshot)(value)),Object(mobx_state_tree_module.unprotect)(this.jsonObject),this.onDestroy(Object(mobx_state_tree_module.onPatch)(this.jsonObject,patch=>{Object(mobx_state_tree_module.applyPatch)(value,patch)})),this.onDestroy(Object(mobx_state_tree_module.onPatch)(value,patch=>{Object(mobx_state_tree_module.applyPatch)(this.jsonObject,patch)}))}render(){if(!this.jsonObject)return null;const{field}=this.props;return Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[Object(emotion_react_jsx_runtime_browser_esm.c)(core_Typography_default.a,Object.assign({css:{marginTop:10},variant:"subheading"},{children:[Object(human_case_function.a)(field.friendlyName||field.name),field.required?"*":""]})),Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm,{css:{marginTop:10},object:this.jsonObject,fields:[{name:"request",type:"object",subFields:[{name:"url",type:"string"},{name:"query",type:"map",valueType:{type:"string "}},{name:"headers",type:"map",valueType:{type:"string "}},{name:"method",type:"string",defaultValue:"GET"},{name:"body",type:"string",advanced:!0}]},{name:"bindings",type:"map",valueType:{type:"string "}}]}),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)(core_Typography_default.a,Object.assign({variant:"caption",css:{color:"var(--red)",padding:"10px 0"}},{children:this.errorMessage})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(core_Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};Object(tslib_es6.a)([mobx_module.observable.ref],RequestEditor_RequestEditor.prototype,"jsonObject",void 0),RequestEditor_RequestEditor=Object(tslib_es6.a)([mobxreact_esm.observer],RequestEditor_RequestEditor);var localize_helpers_function=__webpack_require__(246);function extractLocalizedText(data,locale){if(!data||!Object.getOwnPropertyNames(data).length)return{};const ownKeys=Object.getOwnPropertyNames(data),extractedResult={};return ownKeys.forEach(key=>{const fieldValue=data[key];!Object(lodash.isNil)(fieldValue)&&typeof fieldValue=="object"&&fieldValue["@type"]==="@builder.io/core:LocalizedValue"?(extractedResult[key]=fieldValue.Default,locale&&fieldValue[locale]&&(extractedResult[key]=fieldValue[locale])):extractedResult[key]=fieldValue}),extractedResult}var FieldsEditor=__webpack_require__(2371),KeyValueEditor=__webpack_require__(2100),AssetPicker=__webpack_require__(2093),SlideUp=__webpack_require__(2278);let EmailEditor_EmailEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(string,required=!1){if(!string)return required?"You must specify an email":"";const textInvalid=validateTextField(this.props.field,string,required);return textInvalid||(string.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/gi)?"":"This email is invalid")}render(){const field=this.props.field,options=this.props.object,camelName=field.name;return Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,{required:field.required,error:!!this.errorMessage,type:"email",css:{width:"100%",margin:"10px 0"},label:field.friendlyName||Object(human_case_function.a)(field.name),helperText:this.errorMessage||field.helperText,value:options.get(camelName)||"",onChange:e=>{const value=e.target.value;this.errorMessage=this.validate(value,field.required),options.set(camelName,value),this.props.onChange&&this.props.onChange(options)}})}};EmailEditor_EmailEditor=Object(tslib_es6.a)([mobxreact_esm.observer],EmailEditor_EmailEditor);const AsyncMonacoEditor=Object(async_component_function.a)(async()=>(await __webpack_require__.e(4).then(__webpack_require__.t.bind(null,2625,7))).default);let JavaScriptEditor_JavaScriptEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(string,required=!1){return string?"":required?"This field is required":""}render(){const field=this.props.field,options=this.props.object,camelName=field.name,monacoOptions={lineNumbers:"off",minimap:{enabled:!1},folding:!1,renderLineHighlight:"none",scrollbar:{horizontal:"hidden",vertical:"hidden"}};return Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[Object(emotion_react_jsx_runtime_browser_esm.c)(core_Typography_default.a,Object.assign({variant:"subheading",css:{flexGrow:1,paddingTop:15}},{children:[this.props.label||field.friendlyName||Object(human_case_function.a)(field.name),field.required?"*":""]})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(core_Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText})),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)(core_Typography_default.a,Object.assign({variant:"caption",css:{color:"var(--red)",padding:"10px 0"}},{children:this.errorMessage})),Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{minHeight:300,height:"50vh",border:"1px solid #222",borderRadius:4,padding:20,marginTop:20,overflow:"hidden",backgroundColor:"#1E1E1E"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(AsyncMonacoEditor,{theme:"vs-dark",language:"javascript",value:options.get(camelName),options:monacoOptions,onChange:value=>{this.errorMessage=this.validate(value,field.required),options.set(camelName,value),this.props.onChange&&this.props.onChange(options)}})}))]})}};JavaScriptEditor_JavaScriptEditor=Object(tslib_es6.a)([mobxreact_esm.observer],JavaScriptEditor_JavaScriptEditor);var esm_extends=__webpack_require__(20),objectWithoutPropertiesLoose=__webpack_require__(684),use_isomorphic_layout_effect_browser_esm_index=react.useLayoutEffect,use_isomorphic_layout_effect_browser_esm=use_isomorphic_layout_effect_browser_esm_index,use_latest_esm_useLatest=function(value){var ref=react.useRef(value);return use_isomorphic_layout_effect_browser_esm(function(){ref.current=value}),ref},updateRef=function(ref,value){if(typeof ref=="function"){ref(value);return}ref.current=value},use_composed_ref_esm_useComposedRef=function(libRef,userRef){var prevUserRef=Object(react.useRef)();return Object(react.useCallback)(function(instance){libRef.current=instance,prevUserRef.current&&updateRef(prevUserRef.current,null),prevUserRef.current=userRef,userRef&&updateRef(userRef,instance)},[userRef])},use_composed_ref_esm=use_composed_ref_esm_useComposedRef,HIDDEN_TEXTAREA_STYLE={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},forceHiddenStyles=function(node){Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(key){node.style.setProperty(key,HIDDEN_TEXTAREA_STYLE[key],"important")})},hiddenTextarea=null,getHeight=function(node,sizingData){var height=node.scrollHeight;return sizingData.sizingStyle.boxSizing==="border-box"?height+sizingData.borderSize:height-sizingData.paddingSize};function calculateNodeHeight(sizingData,value,minRows,maxRows){minRows===void 0&&(minRows=1),maxRows===void 0&&(maxRows=1/0),hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),hiddenTextarea.setAttribute("tabindex","-1"),hiddenTextarea.setAttribute("aria-hidden","true"),forceHiddenStyles(hiddenTextarea)),hiddenTextarea.parentNode===null&&document.body.appendChild(hiddenTextarea);var paddingSize=sizingData.paddingSize,borderSize=sizingData.borderSize,sizingStyle=sizingData.sizingStyle,boxSizing=sizingStyle.boxSizing;Object.keys(sizingStyle).forEach(function(_key){var key=_key;hiddenTextarea.style[key]=sizingStyle[key]}),forceHiddenStyles(hiddenTextarea),hiddenTextarea.value=value;var height=getHeight(hiddenTextarea,sizingData);hiddenTextarea.value=value,height=getHeight(hiddenTextarea,sizingData),hiddenTextarea.value="x";var rowHeight=hiddenTextarea.scrollHeight-paddingSize,minHeight=rowHeight*minRows;boxSizing==="border-box"&&(minHeight=minHeight+paddingSize+borderSize),height=Math.max(minHeight,height);var maxHeight=rowHeight*maxRows;return boxSizing==="border-box"&&(maxHeight=maxHeight+paddingSize+borderSize),height=Math.min(maxHeight,height),[height,rowHeight]}var noop=function(){},pick=function(props,obj){return props.reduce(function(acc,prop){return acc[prop]=obj[prop],acc},{})},SIZING_STYLE=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],isIE=!!document.documentElement.currentStyle,getSizingData=function(node){var style=window.getComputedStyle(node);if(style===null)return null;var sizingStyle=pick(SIZING_STYLE,style),boxSizing=sizingStyle.boxSizing;if(boxSizing==="")return null;isIE&&boxSizing==="border-box"&&(sizingStyle.width=parseFloat(sizingStyle.width)+parseFloat(sizingStyle.borderRightWidth)+parseFloat(sizingStyle.borderLeftWidth)+parseFloat(sizingStyle.paddingRight)+parseFloat(sizingStyle.paddingLeft)+"px");var paddingSize=parseFloat(sizingStyle.paddingBottom)+parseFloat(sizingStyle.paddingTop),borderSize=parseFloat(sizingStyle.borderBottomWidth)+parseFloat(sizingStyle.borderTopWidth);return{sizingStyle,paddingSize,borderSize}};function useListener(target,type,listener){var latestListener=use_latest_esm_useLatest(listener);Object(react.useLayoutEffect)(function(){var handler=function(ev){return latestListener.current(ev)};return target.addEventListener(type,handler),function(){return target.removeEventListener(type,handler)}},[])}var useWindowResizeListener=function(listener){useListener(window,"resize",listener)},useFontsLoadedListener=function(listener){useListener(document.fonts,"loadingdone",listener)},_excluded=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],react_textarea_autosize_browser_esm_TextareaAutosize=function(_ref,userRef){var cacheMeasurements=_ref.cacheMeasurements,maxRows=_ref.maxRows,minRows=_ref.minRows,_ref$onChange=_ref.onChange,onChange=_ref$onChange===void 0?noop:_ref$onChange,_ref$onHeightChange=_ref.onHeightChange,onHeightChange=_ref$onHeightChange===void 0?noop:_ref$onHeightChange,props=Object(objectWithoutPropertiesLoose.a)(_ref,_excluded),isControlled=props.value!==void 0,libRef=Object(react.useRef)(null),ref=use_composed_ref_esm(libRef,userRef),heightRef=Object(react.useRef)(0),measurementsCacheRef=Object(react.useRef)(),resizeTextarea=function(){var node=libRef.current,nodeSizingData=cacheMeasurements&&measurementsCacheRef.current?measurementsCacheRef.current:getSizingData(node);if(nodeSizingData){measurementsCacheRef.current=nodeSizingData;var _calculateNodeHeight=calculateNodeHeight(nodeSizingData,node.value||node.placeholder||"x",minRows,maxRows),height=_calculateNodeHeight[0],rowHeight=_calculateNodeHeight[1];heightRef.current!==height&&(heightRef.current=height,node.style.setProperty("height",height+"px","important"),onHeightChange(height,{rowHeight}))}},handleChange=function(event){isControlled||resizeTextarea(),onChange(event)};return Object(react.useLayoutEffect)(resizeTextarea),useWindowResizeListener(resizeTextarea),useFontsLoadedListener(resizeTextarea),Object(react.createElement)("textarea",Object(esm_extends.a)({},props,{onChange:handleChange,ref}))},react_textarea_autosize_browser_esm_index=Object(react.forwardRef)(react_textarea_autosize_browser_esm_TextareaAutosize),react_textarea_autosize_browser_esm=react_textarea_autosize_browser_esm_index;let LongTextEditor_LongTextEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(value,required=!1){return validateTextField(this.props.field,value,required)}render(){const field=this.props.field,options=this.props.object,camelName=field.name;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:Object.assign({position:"relative",marginBottom:20},this.props.styles)},{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,{multiline:!0,rowsMax:15,InputProps:{inputComponent:react_textarea_autosize_browser_esm},required:field.required,type:field.type,error:!!this.errorMessage,css:{width:"100%",marginBottom:5},helperText:this.errorMessage||field.helperText,value:options.get(camelName)||"",placeholder:field.placeholder,"aria-placeholder":field.placeholder,onChange:e=>{const value=e.target.value;this.errorMessage=this.validate(value,field.required),options.set(camelName,value),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]),this.props.onChange&&this.props.onChange(options)}})]}))}};LongTextEditor_LongTextEditor=Object(tslib_es6.a)([mobxreact_esm.observer],LongTextEditor_LongTextEditor);var url_url=__webpack_require__(198);let UrlEditor_UrlEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(string,required=!1){if(!string)return required?"You must specify a URL":"";const textInvalid=validateTextField(this.props.field,string,required);if(textInvalid)return textInvalid;const parsedUrl=Object(url_url.parse)(string,!0);if(!(["http:","https:","mailto:","tel:","sms:"].includes(parsedUrl.protocol||"")&&parsedUrl.hostname||(parsedUrl.path||"")[0]==="/"||(parsedUrl.hash||"").length>1))return"URLs must be absolute (start with http:, https:, mailto:, sms:, or tel: and have a hostname) or site relative (/page/name) or a hash (#something)";const numberOfQuestionMarks=string.replace(/[^\?]/g,"").length;return numberOfQuestionMarks>1?'This URL is invalid, it can only contain one "?" character; yours has '+numberOfQuestionMarks:""}render(){const field=this.props.field,options=this.props.object,camelName=field.name;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{position:"relative"}},{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,{required:field.required,error:!!this.errorMessage,type:"url",fullWidth:!0,helperText:this.errorMessage||field.helperText,value:options.get(camelName)||"",onChange:e=>{let value=e.target.value;!value&&field.disallowRemove?(console.debug('setting value to " "'),value=" "):value=value.trim(),this.errorMessage=this.validate(value,field.required),options.set(camelName,value),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]),this.props.onChange&&this.props.onChange(options)}})]}))}};UrlEditor_UrlEditor=Object(tslib_es6.a)([mobxreact_esm.observer],UrlEditor_UrlEditor);var Loading=__webpack_require__(57),TextLink=__webpack_require__(84),Tip=__webpack_require__(2077),bindable_context=__webpack_require__(2095),ColorPicker=__webpack_require__(2184),core_Tooltip=__webpack_require__(131),core_Tooltip_default=__webpack_require__.n(core_Tooltip),mobx_react_lite_es=__webpack_require__(90),LocalizeButton=__webpack_require__(2175),KeysPicker=__webpack_require__(2512),AiModifyText=__webpack_require__(2279),IconWand=__webpack_require__(2749),FeatureLockBadge=__webpack_require__(175);function FieldLabel(props){const rootElementRef=react_default.a.useRef(null);return Object(mobx_react_lite_es.g)(()=>{var _a2;const{path,showActions,hideAllActions=!1,field,onLocaleToggle,folded,keysPickerProps,bindingIconProps,simple=!1}=props,el=app_state_constant.appState.designerState.selectedElements[0],metaPropPath=`transformed.${path}`,isLocalized=el?.meta.get(metaPropPath)==="localized",supportsAi=["text","string","longText","html","code","javascript","richText"].includes(field.type)||field.supportsAiGeneration;if(field.isTargeting||field.isFilterView)return null;const labelColor=(_a2=field?.labelColor)!==null&&_a2!==void 0?_a2:"var(--text-regular)";return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({ref:rootElementRef,css:{display:"flex",alignItems:"flex-end",width:"100%",minHeight:40}},{children:[folded&&keysPickerProps.options.length&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{position:"relative",flexGrow:1}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(FeatureLockBadge.a,Object.assign({feature:"customTargeting"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(KeysPicker.a,Object.assign({},keysPickerProps,{styles:Object.assign({control:()=>({border:"none"})},keysPickerProps.styles)}))}))}))||Object(emotion_react_jsx_runtime_browser_esm.c)(core_Typography_default.a,Object.assign({css:{flexGrow:1,color:labelColor,fontWeight:500,fontSize:14,lineHeight:1,paddingBottom:10}},{children:[field.friendlyName||Object(human_case_function.a)(field.name),Object(emotion_react_jsx_runtime_browser_esm.b)("span",{children:field.required?" *":""})]})),!hideAllActions&&!props.fieldBound&&Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({className:"hide-until-field-hover",css:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",opacity:0,transition:"opacity 0.1s"}},{children:[showActions&&app_state_constant.appState.designerState.contentLocale&&Object(emotion_react_jsx_runtime_browser_esm.b)(LocalizeButton.a,{tabIndex:-1,value:isLocalized,onChange:Object(mobx_module.action)(()=>{isLocalized?el.meta.delete(metaPropPath):el.meta.set(metaPropPath,"localized"),onLocaleToggle(!isLocalized)})}),app_state_constant.appState.editor.canAiModifyText()&&supportsAi&&!isLocalized&&!simple&&Object(emotion_react_jsx_runtime_browser_esm.b)(core_Tooltip_default.a,Object.assign({title:"Edit with AI"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({tabIndex:-1,onClick:()=>{Object(AiModifyText.b)({type:["text","string","longText"].includes(field.type)?"text":"code",value:props.value,onComplete:result=>{typeof result=="string"&&props.onChange(result)}})}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconWand.a,{size:17})}))})),Object(emotion_react_jsx_runtime_browser_esm.b)(binding_icon.a,Object.assign({tabIndex:-1,anchorElement:rootElementRef.current||void 0},bindingIconProps))]}))]}))})}var Help=__webpack_require__(224),Heading=__webpack_require__(250),P=__webpack_require__(251);const HelpModal=()=>Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",flexDirection:"column",maxWidth:"400px",padding:24}},{children:[Object(emotion_react_jsx_runtime_browser_esm.c)("svg",Object.assign({css:{alignSelf:"center"},className:"dark-mode-invert",width:"245",height:"212",viewBox:"0 0 245 212",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M222.653 102.912L225.508 133.198L200.017 118.983L191.482 140.077L175.297 123.122L163.194 150.667L150.834 122.579L137.818 137.308L129.854 118.868C129.854 118.868 115.896 132.399 74.0488 141.876C100.624 124.149 111.985 103.454 111.985 103.454L81.1565 99.4865L105.391 80.9895L84.3821 58.7245L112.27 55.8129L104.563 17.6484L136.191 39.6565L146.296 12.6245L163.166 36.3453L185.773 0.20752L198.904 39.9134L227.877 28.524L221.512 57.9252L244.633 67.1452L224.709 79.3909L244.233 95.4902L222.653 102.912Z",fill:"#6DE4A2"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M163.196 150.896C163.11 150.896 163.024 150.839 162.996 150.782L150.779 123.007L137.962 137.48C137.905 137.537 137.848 137.565 137.762 137.537C137.677 137.537 137.619 137.48 137.591 137.423L129.741 119.268C128.828 120.067 125.145 123.15 117.724 127.061C109.76 131.228 95.7156 137.223 74.0786 142.132C73.9645 142.161 73.8788 142.104 73.8217 142.018C73.7932 141.933 73.8217 141.818 73.9074 141.761C98.4845 125.348 110.159 106.194 111.615 103.711L81.1292 99.6862C81.0436 99.6862 80.9865 99.6006 80.958 99.5435C80.9294 99.4579 80.958 99.3722 81.0436 99.3152L105.107 80.9608L84.2692 58.8671C84.2121 58.81 84.1835 58.7244 84.2121 58.6387C84.2406 58.5531 84.2977 58.496 84.3833 58.496L112.043 55.613L104.393 17.7054C104.365 17.6198 104.422 17.5341 104.479 17.477C104.565 17.42 104.65 17.42 104.707 17.477L136.107 39.3139L146.097 12.5388C146.126 12.4532 146.183 12.4246 146.269 12.3961C146.354 12.3961 146.411 12.4246 146.468 12.4817L163.167 35.9456L185.632 0.0932269C185.689 0.0361372 185.746 -0.0209523 185.832 0.00759256C185.917 0.00759256 185.974 0.0646823 186.003 0.150317L199.048 39.6279L227.793 28.3241C227.878 28.2955 227.935 28.2955 228.021 28.3526C228.078 28.4097 228.107 28.4954 228.078 28.5525L221.741 57.7824L244.691 66.9453C244.777 66.9738 244.805 67.0595 244.834 67.1166C244.834 67.2022 244.805 67.2878 244.72 67.3164L225.052 79.3908L244.349 95.2903C244.406 95.3474 244.434 95.4045 244.434 95.4901C244.434 95.5758 244.377 95.6329 244.292 95.6614L222.883 102.997L225.709 133.141C225.709 133.226 225.68 133.284 225.623 133.341C225.566 133.398 225.481 133.398 225.395 133.341L200.133 119.239L191.683 140.163C191.655 140.22 191.598 140.277 191.512 140.306C191.427 140.334 191.369 140.306 191.312 140.248L175.356 123.493L163.395 150.753C163.367 150.839 163.281 150.896 163.196 150.896ZM150.836 122.379H150.864C150.95 122.379 151.007 122.436 151.036 122.494L163.196 150.125L175.099 123.007C175.127 122.95 175.185 122.893 175.27 122.893C175.327 122.893 175.413 122.893 175.47 122.95L191.427 139.678L199.847 118.868C199.876 118.811 199.904 118.754 199.961 118.754C200.019 118.726 200.076 118.726 200.133 118.783L225.252 132.798L222.455 102.912C222.455 102.826 222.512 102.712 222.598 102.683L243.806 95.4045L224.567 79.5621C224.51 79.505 224.481 79.4479 224.481 79.3908C224.481 79.3338 224.51 79.2481 224.596 79.2196L244.149 67.2022L221.427 58.1535C221.342 58.1249 221.284 58.0107 221.284 57.8966L227.564 28.8664L198.962 40.1131C198.905 40.1417 198.848 40.1417 198.791 40.1131C198.734 40.0846 198.705 40.056 198.677 39.9989L185.746 0.692669L163.367 36.4594C163.338 36.5165 163.253 36.545 163.196 36.5736C163.11 36.5736 163.053 36.545 163.024 36.4879L146.383 13.1097L136.421 39.7706C136.392 39.8277 136.335 39.8848 136.278 39.9133C136.221 39.9418 136.135 39.9133 136.078 39.8848L104.907 18.1907L112.5 55.8128C112.5 55.8699 112.5 55.927 112.471 55.9841C112.443 56.0411 112.386 56.0697 112.329 56.0697L84.8686 58.9242L105.564 80.8752C105.592 80.9323 105.621 80.9894 105.621 81.0464C105.621 81.1035 105.592 81.1606 105.535 81.1892L81.7001 99.3437L111.986 103.254C112.043 103.254 112.129 103.311 112.157 103.369C112.186 103.426 112.186 103.511 112.157 103.568C112.043 103.768 100.74 124.006 75.1063 141.419C115.526 132.085 129.541 118.868 129.684 118.726C129.741 118.669 129.798 118.669 129.884 118.669C129.941 118.669 129.998 118.726 130.027 118.783L137.876 136.909L150.693 122.436C150.722 122.408 150.779 122.379 150.836 122.379Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.619 41.1474V49.0854H0.622559V41.1931C0.622559 40.4175 0.941904 39.6876 1.44373 39.1858C1.99118 38.6383 2.7211 38.3646 3.45103 38.3646H196.745C197.475 38.3646 198.205 38.6383 198.753 39.1858C199.3 39.6876 199.619 40.4175 199.619 41.1474Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.619 49.4506H0.622164C0.439682 49.4506 0.257202 49.3137 0.257202 49.0856V41.1933C0.257202 40.3721 0.622166 39.5053 1.21523 38.9123C1.8083 38.3192 2.62947 37.9998 3.45064 37.9998H196.745C197.566 37.9998 198.387 38.3192 198.98 38.9123C199.573 39.5053 199.893 40.2809 199.938 41.1477V49.0856C199.984 49.2681 199.801 49.4506 199.619 49.4506ZM0.94151 48.7663H199.254V41.1477C199.254 40.509 198.98 39.8703 198.524 39.4141C198.068 38.9579 197.429 38.6842 196.79 38.6842H3.49626C2.85757 38.6842 2.17326 38.9579 1.71706 39.4141C1.26085 39.8703 0.98713 40.509 0.98713 41.1933V48.7663H0.94151Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M12.4145 45.2689C13.246 45.2689 13.92 44.5949 13.92 43.7635C13.92 42.932 13.246 42.258 12.4145 42.258C11.5831 42.258 10.9091 42.932 10.9091 43.7635C10.9091 44.5949 11.5831 45.2689 12.4145 45.2689Z",fill:"#FF5986"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M12.4166 45.5884C11.413 45.5884 10.5918 44.7672 10.5918 43.7636C10.5918 42.7599 11.413 41.9388 12.4166 41.9388C13.4203 41.9388 14.2414 42.7599 14.2414 43.7636C14.2871 44.7672 13.4659 45.5884 12.4166 45.5884ZM12.4166 42.5774C11.7779 42.5774 11.2761 43.0793 11.2761 43.718C11.2761 44.3566 11.7779 44.8585 12.4166 44.8585C13.0553 44.8585 13.5571 44.3566 13.5571 43.718C13.6028 43.1249 13.0553 42.5774 12.4166 42.5774Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M19.0301 45.2232C19.8616 45.2232 20.5356 44.5492 20.5356 43.7178C20.5356 42.8863 19.8616 42.2123 19.0301 42.2123C18.1987 42.2123 17.5247 42.8863 17.5247 43.7178C17.5247 44.5492 18.1987 45.2232 19.0301 45.2232Z",fill:"#FFE483"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M19.0295 45.5426C18.0259 45.5426 17.2047 44.7215 17.2047 43.7178C17.2047 42.7142 18.0259 41.893 19.0295 41.893C20.0332 41.893 20.8544 42.7142 20.8544 43.7178C20.8544 44.7215 20.0332 45.5426 19.0295 45.5426ZM19.0295 42.5773C18.3908 42.5773 17.889 43.0791 17.889 43.7178C17.889 44.3565 18.3908 44.8583 19.0295 44.8583C19.6682 44.8583 20.17 44.3565 20.17 43.7178C20.17 43.0791 19.6682 42.5773 19.0295 42.5773Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M25.6449 45.2689C26.4763 45.2689 27.1504 44.5949 27.1504 43.7634C27.1504 42.932 26.4763 42.2579 25.6449 42.2579C24.8134 42.2579 24.1394 42.932 24.1394 43.7634C24.1394 44.5949 24.8134 45.2689 25.6449 45.2689Z",fill:"#53F2D4"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M25.6456 45.5882C24.642 45.5882 23.8208 44.7671 23.8208 43.7634C23.8208 42.7598 24.642 41.9386 25.6456 41.9386C26.6493 41.9386 27.4704 42.7598 27.4704 43.7634C27.4704 44.7671 26.6493 45.5882 25.6456 45.5882ZM25.6456 42.5773C25.0069 42.5773 24.5051 43.0791 24.5051 43.7178C24.5051 44.3565 25.0069 44.8583 25.6456 44.8583C26.2843 44.8583 26.7861 44.3565 26.7861 43.7178C26.7861 43.1247 26.2843 42.5773 25.6456 42.5773Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M186.344 49.5418C186.161 49.5418 185.979 49.405 185.979 49.1769V38.3648C185.979 38.1823 186.116 37.9998 186.344 37.9998C186.572 37.9998 186.709 38.1367 186.709 38.3648V49.2225C186.709 49.405 186.526 49.5418 186.344 49.5418Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M195.504 46.1582C195.413 46.1582 195.321 46.1126 195.276 46.067L190.759 41.8699C190.623 41.733 190.623 41.5049 190.759 41.3681C190.896 41.2312 191.124 41.2312 191.261 41.3681L195.778 45.5651C195.915 45.702 195.915 45.9301 195.778 46.067C195.686 46.1126 195.595 46.1582 195.504 46.1582Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M190.987 46.1582C190.896 46.1582 190.805 46.1126 190.759 46.067C190.623 45.9301 190.623 45.702 190.759 45.5651L195.276 41.3681C195.413 41.2312 195.641 41.2312 195.778 41.3681C195.915 41.5049 195.915 41.733 195.778 41.8699L191.261 46.067C191.124 46.1582 191.033 46.1582 190.987 46.1582Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.632 49.1193V191.638C199.632 193.554 198.08 195.151 196.119 195.151H4.10196C3.18955 195.151 2.27714 194.786 1.63845 194.147C0.999765 193.508 0.589178 192.596 0.634798 191.683V49.1193H199.632Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M4.10116 195.47C3.09751 195.47 2.09386 195.06 1.40956 194.375C0.679628 193.645 0.269043 192.642 0.269043 191.638V49.1196C0.269043 48.9371 0.405902 48.7546 0.634005 48.7546H199.631C199.813 48.7546 199.996 48.8915 199.996 49.1196V191.638C199.996 193.737 198.262 195.47 196.164 195.47H4.10116ZM0.953351 49.4389V191.638C0.953351 192.459 1.27269 193.28 1.86576 193.873C2.45883 194.467 3.27999 194.786 4.10116 194.786H196.118C197.852 194.786 199.266 193.372 199.266 191.638V49.4389H0.953351Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M13.898 195.482C13.7156 195.482 13.5331 195.345 13.5331 195.117V49.2224C13.5331 49.0399 13.6699 48.8574 13.898 48.8574C14.0805 48.8574 14.2174 48.9943 14.2174 49.2224V195.162C14.2174 195.299 14.0805 195.482 13.898 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.619 62.8173H0.622164C0.439682 62.8173 0.257202 62.6805 0.257202 62.4524C0.257202 62.2243 0.394062 62.0874 0.622164 62.0874H199.619C199.801 62.0874 199.984 62.2243 199.984 62.4524C199.984 62.6805 199.801 62.8173 199.619 62.8173Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M27.174 195.482C26.9916 195.482 26.8091 195.345 26.8091 195.117V49.2224C26.8091 49.0399 26.9459 48.8574 27.174 48.8574C27.4021 48.8574 27.539 48.9943 27.539 49.2224V195.162C27.4934 195.299 27.3565 195.482 27.174 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M40.4043 195.482C40.2218 195.482 40.0393 195.345 40.0393 195.117V49.2224C40.0393 49.0399 40.1762 48.8574 40.4043 48.8574C40.6324 48.8574 40.7692 48.9943 40.7692 49.2224V195.162C40.7692 195.299 40.6324 195.482 40.4043 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M53.6783 195.482C53.4958 195.482 53.3134 195.345 53.3134 195.117V49.2224C53.3134 49.0399 53.4502 48.8574 53.6783 48.8574C53.9064 48.8574 54.0433 48.9943 54.0433 49.2224V195.162C54.0433 195.299 53.8608 195.482 53.6783 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M66.9543 195.482C66.7718 195.482 66.5894 195.345 66.5894 195.117V49.2224C66.5894 49.0399 66.7262 48.8574 66.9543 48.8574C67.1824 48.8574 67.3193 48.9943 67.3193 49.2224V195.162C67.3193 195.299 67.1368 195.482 66.9543 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.801 76.0929H0.622164C0.439682 76.0929 0.257202 75.9561 0.257202 75.728C0.257202 75.4999 0.394062 75.363 0.622164 75.363H199.801C199.984 75.363 200.166 75.4999 200.166 75.728C200.166 75.9561 199.984 76.0929 199.801 76.0929Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.619 89.3231H0.622164C0.439682 89.3231 0.257202 89.1862 0.257202 89.0037C0.257202 88.8212 0.394062 88.6388 0.622164 88.6388H199.619C199.801 88.6388 199.984 88.7756 199.984 89.0037C199.984 89.1862 199.801 89.3231 199.619 89.3231Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.619 102.598H0.622164C0.439682 102.598 0.257202 102.462 0.257202 102.233C0.257202 102.005 0.394062 101.868 0.622164 101.868H199.619C199.801 101.868 199.984 102.005 199.984 102.233C199.984 102.462 199.801 102.598 199.619 102.598Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.619 115.874H0.622164C0.439682 115.874 0.257202 115.737 0.257202 115.509C0.257202 115.281 0.394062 115.144 0.622164 115.144H199.619C199.801 115.144 199.984 115.281 199.984 115.509C199.984 115.737 199.801 115.874 199.619 115.874Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.619 129.15H0.622164C0.439682 129.15 0.257202 129.013 0.257202 128.785C0.257202 128.557 0.394062 128.42 0.622164 128.42H199.619C199.801 128.42 199.984 128.557 199.984 128.785C199.984 129.013 199.801 129.15 199.619 129.15Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M80.2302 195.482C80.0477 195.482 79.8652 195.345 79.8652 195.117V49.2224C79.8652 49.0399 80.0021 48.8574 80.2302 48.8574C80.4583 48.8574 80.5952 48.9943 80.5952 49.2224V195.162C80.5495 195.299 80.4127 195.482 80.2302 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M93.5061 195.482C93.3236 195.482 93.1411 195.345 93.1411 195.117V49.2224C93.1411 49.0399 93.278 48.8574 93.5061 48.8574C93.7342 48.8574 93.871 48.9943 93.871 49.2224V195.162C93.8254 195.299 93.6886 195.482 93.5061 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M106.735 195.482C106.553 195.482 106.37 195.345 106.37 195.117V49.2224C106.37 49.0399 106.507 48.8574 106.735 48.8574C106.963 48.8574 107.1 48.9943 107.1 49.2224V195.162C107.1 195.299 106.963 195.482 106.735 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M120.013 195.482C119.83 195.482 119.648 195.345 119.648 195.117V49.2224C119.648 49.0399 119.785 48.8574 120.013 48.8574C120.241 48.8574 120.378 48.9943 120.378 49.2224V195.162C120.378 195.299 120.195 195.482 120.013 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M133.289 195.482C133.106 195.482 132.924 195.345 132.924 195.117V49.2224C132.924 49.0399 133.061 48.8574 133.289 48.8574C133.517 48.8574 133.654 48.9943 133.654 49.2224V195.162C133.654 195.299 133.471 195.482 133.289 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M146.563 195.482C146.38 195.482 146.198 195.345 146.198 195.117V49.2224C146.198 49.0399 146.335 48.8574 146.563 48.8574C146.791 48.8574 146.928 48.9943 146.928 49.2224V195.162C146.882 195.299 146.745 195.482 146.563 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M159.839 195.482C159.657 195.482 159.474 195.345 159.474 195.117V49.2224C159.474 49.0399 159.611 48.8574 159.839 48.8574C160.067 48.8574 160.204 48.9943 160.204 49.2224V195.162C160.158 195.299 160.022 195.482 159.839 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M173.069 195.482C172.886 195.482 172.704 195.345 172.704 195.117V49.2224C172.704 49.0399 172.84 48.8574 173.069 48.8574C173.297 48.8574 173.434 48.9943 173.434 49.2224V195.162C173.434 195.299 173.297 195.482 173.069 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M186.344 195.482C186.161 195.482 185.979 195.345 185.979 195.117V49.2224C185.979 49.0399 186.116 48.8574 186.344 48.8574C186.572 48.8574 186.709 48.9943 186.709 49.2224V195.162C186.709 195.299 186.526 195.482 186.344 195.482Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.71 142.425H0.530981C0.348499 142.425 0.166016 142.288 0.166016 142.06C0.166016 141.832 0.302879 141.695 0.530981 141.695H199.71C199.893 141.695 200.075 141.832 200.075 142.06C200.075 142.288 199.893 142.425 199.71 142.425Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.528 155.655H0.530981C0.348499 155.655 0.166016 155.518 0.166016 155.29C0.166016 155.062 0.302879 154.925 0.530981 154.925H199.528C199.71 154.925 199.893 155.062 199.893 155.29C199.893 155.518 199.71 155.655 199.528 155.655Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.528 168.931H0.530981C0.348499 168.931 0.166016 168.794 0.166016 168.566C0.166016 168.338 0.302879 168.201 0.530981 168.201H199.528C199.71 168.201 199.893 168.338 199.893 168.566C199.893 168.794 199.71 168.931 199.528 168.931Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M199.528 182.206H0.530981C0.348499 182.206 0.166016 182.07 0.166016 181.841C0.166016 181.613 0.302879 181.476 0.530981 181.476H199.528C199.71 181.476 199.893 181.613 199.893 181.841C199.893 182.07 199.71 182.206 199.528 182.206Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M133.746 99.1207H44.5576V163.081H133.746V99.1207Z",fill:"#F6AF3A"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M134.063 163.4H44.1902V98.7556H134.063V163.4ZM44.9201 162.716H133.424V99.4399H44.9201V162.716Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.56 87.8979H56.3718V151.858H145.56V87.8979Z",fill:"#F06D41"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.88 152.178H56.0079V87.5333H145.88V152.178ZM56.6922 151.493H145.196V88.2176H56.6922V151.493Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M120.332 152.178C120.24 152.178 120.149 152.132 120.104 152.086L56.1437 88.1264C56.0068 87.9895 56.0068 87.7614 56.1437 87.6245C56.2805 87.4877 56.5086 87.4877 56.6455 87.6245L120.56 151.63C120.697 151.767 120.697 151.995 120.56 152.132C120.514 152.178 120.423 152.178 120.332 152.178Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M112.211 152.177C112.12 152.177 112.029 152.132 111.983 152.086L56.1438 96.2466C56.0069 96.1097 56.0069 95.8816 56.1438 95.7448C56.2806 95.6079 56.5087 95.6079 56.6456 95.7448L112.485 151.584C112.622 151.721 112.622 151.949 112.485 152.086C112.394 152.177 112.303 152.177 112.211 152.177Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M128.453 152.178C128.361 152.178 128.27 152.132 128.225 152.086L64.2646 88.1265C64.1278 87.9897 64.1278 87.7616 64.2646 87.6247C64.4015 87.4878 64.6296 87.4878 64.7665 87.6247L128.726 151.585C128.863 151.722 128.863 151.95 128.726 152.086C128.635 152.178 128.544 152.178 128.453 152.178Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M136.252 151.995C136.161 151.995 136.07 151.95 136.024 151.904L72.2468 88.1265C72.1099 87.9897 72.1099 87.7616 72.2468 87.6247C72.3837 87.4878 72.6118 87.4878 72.7486 87.6247L136.526 151.402C136.663 151.539 136.663 151.767 136.526 151.904C136.435 151.995 136.344 151.995 136.252 151.995Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.514 152.178C145.423 152.178 145.331 152.132 145.286 152.086L80.3677 88.1265C80.2308 87.9897 80.2308 87.7616 80.3677 87.6247C80.5045 87.4878 80.7326 87.4878 80.8695 87.6247L145.787 151.585C145.924 151.722 145.924 151.95 145.787 152.086C145.696 152.178 145.605 152.178 145.514 152.178Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.515 145.015C145.424 145.015 145.332 144.97 145.287 144.924L88.4891 88.1265C88.3523 87.9897 88.3523 87.7616 88.4891 87.6247C88.626 87.4878 88.8541 87.4878 88.9909 87.6247L145.788 144.422C145.925 144.559 145.925 144.787 145.788 144.924C145.697 145.015 145.606 145.015 145.515 145.015Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.516 137.077C145.425 137.077 145.333 137.032 145.288 136.986L96.4737 88.172C96.3369 88.0351 96.3369 87.807 96.4737 87.6702C96.6106 87.5333 96.8387 87.5333 96.9756 87.6702L145.79 136.484C145.926 136.621 145.926 136.849 145.79 136.986C145.698 137.032 145.607 137.077 145.516 137.077Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.514 128.957C145.423 128.957 145.332 128.911 145.286 128.866L104.593 88.1265C104.456 87.9897 104.456 87.7616 104.593 87.6247C104.73 87.4878 104.958 87.4878 105.095 87.6247L145.788 128.318C145.925 128.455 145.925 128.683 145.788 128.82C145.697 128.911 145.606 128.957 145.514 128.957Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M87.9869 152.178C87.8957 152.178 87.8044 152.132 87.7588 152.086L56.1438 120.471C56.0069 120.334 56.0069 120.106 56.1438 119.97C56.2806 119.833 56.5087 119.833 56.6456 119.97L88.2606 151.585C88.3975 151.721 88.3975 151.95 88.2606 152.086C88.1694 152.178 88.0782 152.178 87.9869 152.178Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M96.153 152.178C96.0617 152.178 95.9705 152.132 95.9249 152.086L56.1438 112.305C56.0069 112.168 56.0069 111.94 56.1438 111.803C56.2806 111.667 56.5087 111.667 56.6456 111.803L96.4267 151.585C96.5636 151.721 96.5636 151.949 96.4267 152.086C96.3355 152.178 96.2442 152.178 96.153 152.178Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M104.091 152.178C104 152.178 103.908 152.132 103.863 152.086L56.1438 104.367C56.0069 104.231 56.0069 104.002 56.1438 103.866C56.2806 103.729 56.5087 103.729 56.6456 103.866L104.365 151.585C104.502 151.722 104.502 151.95 104.365 152.086C104.273 152.178 104.182 152.178 104.091 152.178Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M71.9285 152.177C71.8373 152.177 71.746 152.132 71.7004 152.086L56.1894 136.575C56.0526 136.438 56.0526 136.21 56.1894 136.073C56.3263 135.936 56.5544 135.936 56.6913 136.073L72.2022 151.584C72.3391 151.721 72.3391 151.949 72.2022 152.086C72.0654 152.177 71.9741 152.177 71.9285 152.177Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M80.0489 152.177C79.9577 152.177 79.8665 152.132 79.8208 152.086L56.1438 128.409C56.0069 128.272 56.0069 128.044 56.1438 127.907C56.2806 127.77 56.5087 127.77 56.6456 127.907L80.3227 151.584C80.4595 151.721 80.4595 151.949 80.3227 152.086C80.2314 152.177 80.1402 152.177 80.0489 152.177Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.516 112.807C145.424 112.807 145.333 112.762 145.288 112.716L120.789 88.2179C120.653 88.0811 120.653 87.853 120.789 87.7161C120.926 87.5792 121.154 87.5792 121.291 87.7161L145.789 112.214C145.926 112.351 145.926 112.579 145.789 112.716C145.698 112.807 145.607 112.807 145.516 112.807Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.515 104.687C145.424 104.687 145.332 104.641 145.287 104.596L128.818 88.1267C128.681 87.9899 128.681 87.7618 128.818 87.6249C128.955 87.488 129.183 87.488 129.32 87.6249L145.789 104.094C145.926 104.231 145.926 104.459 145.789 104.596C145.697 104.641 145.606 104.687 145.515 104.687Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.513 96.7488C145.422 96.7488 145.33 96.7032 145.285 96.6576L136.799 88.1722C136.662 88.0353 136.662 87.8072 136.799 87.6703C136.936 87.5335 137.164 87.5335 137.301 87.6703L145.787 96.1558C145.923 96.2926 145.923 96.5207 145.787 96.6576C145.695 96.7032 145.604 96.7488 145.513 96.7488Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M145.515 120.791C145.423 120.791 145.332 120.746 145.287 120.7L112.805 88.2181C112.668 88.0812 112.668 87.8531 112.805 87.7163C112.942 87.5794 113.17 87.5794 113.307 87.7163L145.788 120.198C145.925 120.335 145.925 120.563 145.788 120.7C145.697 120.746 145.606 120.791 145.515 120.791Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M63.7624 152.178C63.6711 152.178 63.5799 152.132 63.5343 152.086L56.235 144.787C56.0981 144.65 56.0981 144.422 56.235 144.285C56.3718 144.148 56.5999 144.148 56.7368 144.285L64.0361 151.585C64.1729 151.721 64.1729 151.95 64.0361 152.086C63.9448 152.178 63.8536 152.178 63.7624 152.178Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M157.466 74.668H68.2783V138.628H157.466V74.668Z",fill:"#18B6F6"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M157.786 138.993H67.9131V74.3486H157.786V138.993ZM68.5974 138.309H157.101V75.0329H68.5974V138.309Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M165.953 68.3726H151.993V82.3325H165.953V68.3726Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M165.953 82.6518H151.994C151.811 82.6518 151.629 82.5149 151.629 82.2868V68.3726C151.629 68.1901 151.765 68.0076 151.994 68.0076H165.953C166.136 68.0076 166.318 68.1445 166.318 68.3726V82.3324C166.273 82.5149 166.136 82.6518 165.953 82.6518ZM152.313 81.9675H165.588V68.6919H152.313V81.9675Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M158.974 79.9144C158.791 79.9144 158.609 79.7775 158.609 79.5494V71.064C158.609 70.8815 158.746 70.6991 158.974 70.6991C159.202 70.6991 159.339 70.8359 159.339 71.064V79.5494C159.293 79.7775 159.156 79.9144 158.974 79.9144Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M163.215 75.6715H154.73C154.547 75.6715 154.365 75.5346 154.365 75.3065C154.365 75.0784 154.501 74.9416 154.73 74.9416H163.215C163.397 74.9416 163.58 75.0784 163.58 75.3065C163.58 75.5346 163.397 75.6715 163.215 75.6715Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M93.0505 94.8329C91.6819 94.8329 90.5414 93.738 90.5414 92.3237C90.5414 90.9551 91.6363 89.8146 93.0505 89.8146H113.808C115.176 89.8146 116.317 90.9095 116.317 92.3237C116.317 93.6924 115.222 94.8329 113.808 94.8329H106.326V119.742C106.326 121.338 105.049 122.661 103.406 122.661C101.81 122.661 100.487 121.384 100.487 119.742V94.8329H93.0505Z",fill:"black"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M103.407 122.981C101.628 122.981 100.168 121.521 100.168 119.741V95.1976H93.0057C91.4546 95.1976 90.1772 93.9203 90.1772 92.3692C90.1772 90.8181 91.4546 89.5407 93.0057 89.5407H113.763C115.314 89.5407 116.592 90.8181 116.592 92.3692C116.592 93.9203 115.314 95.1976 113.763 95.1976H106.601V119.741C106.646 121.521 105.232 122.981 103.407 122.981ZM93.0513 90.1794C91.8652 90.1794 90.9072 91.1374 90.9072 92.3235C90.9072 93.5097 91.8652 94.4677 93.0513 94.4677H100.898V119.696C100.898 121.11 102.039 122.251 103.453 122.251C104.867 122.251 106.008 121.11 106.008 119.696V94.4677H113.854C115.04 94.4677 115.998 93.5097 115.998 92.3235C115.998 91.1374 115.04 90.1794 113.854 90.1794H93.0513Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M111.618 106.192C110.341 106.192 109.291 105.143 109.291 103.865C109.291 102.588 110.341 101.539 111.618 101.539H125.715C126.992 101.539 128.041 102.588 128.041 103.865C128.041 105.143 126.992 106.192 125.715 106.192H121.837V119.832C121.837 121.384 120.605 122.615 119.054 122.615C117.503 122.615 116.271 121.384 116.271 119.832V106.192H111.618Z",fill:"black"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M119.009 122.98C117.275 122.98 115.907 121.566 115.907 119.878V106.557H111.618C110.159 106.557 108.972 105.371 108.972 103.911C108.972 102.451 110.159 101.265 111.618 101.265H125.715C127.175 101.265 128.361 102.451 128.361 103.911C128.361 105.371 127.175 106.557 125.715 106.557H122.157V119.878C122.157 121.566 120.743 122.98 119.009 122.98ZM111.618 101.904C110.524 101.904 109.657 102.771 109.657 103.865C109.657 104.96 110.569 105.827 111.618 105.827H116.591V119.833C116.591 121.156 117.686 122.25 119.009 122.25C120.332 122.25 121.427 121.156 121.427 119.833V105.827H125.67C126.764 105.827 127.631 104.96 127.631 103.865C127.631 102.771 126.764 101.904 125.67 101.904H111.618Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M214.138 199.793C211.997 197.452 210.455 194.17 210.455 194.17C208.115 206.358 204.061 210.868 203.376 211.554C203.348 211.582 203.319 211.582 203.291 211.582C203.262 211.582 203.234 211.554 203.205 211.525C199.038 206.444 199.18 191.429 199.18 191.429C198.067 193.941 196.069 196.853 195.384 197.852C195.327 197.938 195.241 197.966 195.155 197.938C195.07 197.938 194.984 197.881 194.956 197.795C189.561 184.122 195.07 173.789 196.526 171.419C197.439 171.648 198.41 171.819 199.466 171.99C198.781 174.274 197.211 180.411 198.752 185.435C198.752 185.435 200.465 183.266 202.12 182.181C202.12 182.181 202.72 189.374 204.575 192.885C204.575 192.885 207.487 186.434 208.457 183.18C208.857 184.579 209.456 185.892 210.256 187.119C210.256 187.119 213.51 182.324 212.14 172.647C213.224 172.59 214.252 172.504 215.222 172.361C219.761 185.692 215.508 197.481 214.623 199.679C214.594 199.764 214.509 199.85 214.423 199.85C214.281 199.907 214.195 199.879 214.138 199.793Z",fill:"#594EE4"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M203.291 211.81C203.177 211.81 203.091 211.753 203.034 211.696C201.293 209.555 200.065 205.502 199.409 199.622C199.066 196.568 198.981 193.799 198.952 192.4C198.181 193.97 197.04 195.854 195.527 197.995C195.412 198.138 195.27 198.195 195.098 198.195C194.927 198.166 194.784 198.052 194.727 197.909C189.39 184.35 194.585 174.16 196.297 171.334L196.383 171.191L196.526 171.22C197.411 171.42 198.353 171.619 199.437 171.791L199.694 171.819L199.609 172.048C198.895 174.36 197.468 180.126 198.781 184.978C199.323 184.322 200.636 182.866 201.921 181.981L202.235 181.781L202.263 182.152C202.263 182.209 202.834 188.803 204.49 192.371C205.146 190.887 207.344 185.835 208.172 183.094L208.372 182.381L208.572 183.094C208.914 184.35 209.457 185.549 210.142 186.662C210.399 186.177 210.941 185.093 211.398 183.38C211.969 181.21 212.511 177.585 211.826 172.618L211.797 172.39H212.026C213.082 172.333 214.109 172.247 215.08 172.105L215.251 172.076L215.308 172.247C219.847 185.635 215.622 197.481 214.709 199.707C214.68 199.85 214.538 199.993 214.366 200.021C214.195 200.05 214.024 199.993 213.91 199.85C212.311 198.08 211.027 195.797 210.484 194.741C208.115 206.444 204.233 210.84 203.462 211.611C203.462 211.782 203.376 211.81 203.291 211.81ZM199.409 190.43V191.487C199.409 191.629 199.323 206.301 203.319 211.354C204.233 210.412 208.029 205.845 210.284 194.141L210.399 193.513L210.684 194.113C210.713 194.141 212.225 197.367 214.309 199.679C214.309 199.679 214.338 199.707 214.338 199.679C214.338 199.679 214.366 199.679 214.366 199.65C215.251 197.424 219.419 185.806 215.023 172.618C214.166 172.733 213.253 172.818 212.34 172.875C213.624 182.352 210.513 187.062 210.37 187.262L210.199 187.519L210.027 187.262C209.342 186.234 208.8 185.121 208.429 183.922C207.316 187.29 204.775 192.942 204.747 192.999L204.575 193.399L204.376 192.999C202.749 189.888 202.092 184.093 201.949 182.581C200.436 183.694 198.952 185.578 198.923 185.606L198.667 185.92L198.552 185.521C197.068 180.64 198.438 174.731 199.209 172.19C198.267 172.048 197.439 171.876 196.64 171.705C194.87 174.645 189.989 184.579 195.184 197.766C195.184 197.766 195.184 197.795 195.213 197.795H195.241C197.011 195.254 198.267 193.114 199.038 191.401L199.409 190.43Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M210.17 187.148C209.371 185.92 208.771 184.607 208.4 183.209C207.43 186.463 204.518 192.914 204.518 192.914C202.691 189.374 202.063 182.21 202.063 182.21C200.408 183.323 198.695 185.464 198.695 185.464C197.154 180.44 198.724 174.303 199.409 172.019C201.464 172.333 203.519 172.533 205.574 172.647C207.715 172.761 209.885 172.761 212.054 172.647C213.424 182.352 210.17 187.148 210.17 187.148Z",fill:"#18B4F4"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M204.519 193.428L204.319 193.028C202.692 189.917 202.036 184.122 201.893 182.609C200.38 183.723 198.896 185.607 198.867 185.635L198.61 185.949L198.496 185.549C196.955 180.526 198.496 174.388 199.21 171.991L199.267 171.819L199.438 171.848C201.465 172.162 203.549 172.362 205.575 172.476C207.716 172.59 209.886 172.59 212.026 172.476H212.226L212.255 172.676C213.625 182.324 210.457 187.119 210.342 187.319L210.171 187.576L210 187.319C209.315 186.292 208.772 185.15 208.401 183.979C207.288 187.348 204.748 193 204.719 193.057L204.519 193.428ZM202.236 181.839L202.264 182.21C202.264 182.267 202.835 188.861 204.491 192.429C205.147 190.944 207.345 185.892 208.173 183.152L208.373 182.438L208.573 183.152C208.915 184.408 209.457 185.635 210.143 186.748C210.771 185.578 212.94 180.954 211.855 172.875C209.771 172.99 207.659 172.99 205.547 172.875C203.549 172.761 201.522 172.562 199.524 172.276C198.81 174.702 197.469 180.326 198.753 185.036C199.295 184.379 200.609 182.895 201.893 182.038L202.236 181.839Z",fill:"black"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M206.318 201.519H206.289C206.232 201.491 206.203 201.434 206.232 201.405C206.66 200.149 207.003 198.836 207.231 197.495C207.231 197.437 207.288 197.409 207.345 197.409C207.402 197.409 207.431 197.466 207.431 197.523C207.174 198.836 206.86 200.178 206.432 201.434C206.403 201.491 206.346 201.519 206.318 201.519Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M205.347 203.717C205.318 203.717 205.318 203.717 205.289 203.717C205.232 203.688 205.232 203.631 205.261 203.574C205.489 203.203 205.689 202.804 205.832 202.375C205.86 202.318 205.917 202.29 205.975 202.318C206.032 202.347 206.06 202.404 206.032 202.461C205.86 202.889 205.661 203.289 205.432 203.688C205.432 203.717 205.375 203.717 205.347 203.717Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M221.788 164.936L221.56 169.389C221.474 170.873 218.963 171.93 215.166 172.415C214.224 172.558 213.196 172.643 212.083 172.7C209.942 172.814 207.773 172.814 205.604 172.7C203.52 172.586 201.465 172.386 199.409 172.072C198.382 171.901 197.383 171.73 196.469 171.501C192.53 170.588 190.018 169.246 190.104 167.705L190.332 163.223C195.47 164.622 200.751 165.507 206.089 165.821C211.341 166.049 216.593 165.764 221.788 164.936Z",fill:"black"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M208.858 172.986C207.773 172.986 206.689 172.957 205.604 172.9C203.549 172.786 201.436 172.586 199.41 172.244C198.296 172.072 197.297 171.872 196.441 171.673C192.131 170.674 189.819 169.246 189.904 167.676L190.133 163.195C190.133 163.138 190.161 163.081 190.218 163.024C190.275 162.995 190.332 162.966 190.389 162.995C195.499 164.394 200.808 165.279 206.089 165.593C211.313 165.849 216.565 165.564 221.732 164.736C221.789 164.736 221.874 164.736 221.903 164.793C221.96 164.85 221.989 164.907 221.96 164.965L221.732 169.418C221.646 170.959 219.305 172.101 215.138 172.643C213.996 172.786 212.997 172.9 212.055 172.929C211.027 172.957 209.943 172.986 208.858 172.986ZM190.561 163.48L190.332 167.705C190.275 169.046 192.53 170.331 196.555 171.273C197.383 171.473 198.382 171.673 199.495 171.844C201.522 172.158 203.606 172.386 205.661 172.472C207.802 172.586 209.971 172.586 212.112 172.472C213.054 172.443 214.025 172.358 215.166 172.186C219.048 171.673 221.303 170.645 221.389 169.36L221.617 165.164C216.508 165.964 211.313 166.221 206.146 165.992C200.837 165.678 195.613 164.85 190.561 163.48Z",fill:"black"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M230.237 152.148C229.894 155.288 229.495 157.971 229.181 159.941C228.838 162.082 227.211 163.823 225.07 164.308C224.157 164.508 223.072 164.736 221.816 164.936C216.621 165.764 211.369 166.049 206.117 165.792C200.779 165.478 195.498 164.622 190.36 163.195C189.247 162.881 188.247 162.567 187.42 162.281C185.336 161.568 183.909 159.684 183.794 157.514C183.68 155.516 183.595 152.805 183.566 149.636C183.538 142.3 184.023 132.623 186.221 124.46C186.478 123.489 186.763 122.518 187.077 121.605C188.875 116.182 191.502 111.043 194.841 106.391C199.523 107.304 204.29 107.875 209.057 108.103C213.995 108.389 218.962 108.303 223.871 107.875C226.612 112.699 228.61 117.923 229.78 123.346C230.037 124.517 230.237 125.715 230.437 126.943C231.607 135.221 231.036 144.869 230.237 152.148Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M209.8 166.078C208.573 166.078 207.317 166.049 206.089 165.992C200.752 165.678 195.442 164.793 190.304 163.395C189.277 163.109 188.277 162.795 187.335 162.481C185.166 161.739 183.682 159.798 183.568 157.514C183.482 155.773 183.368 153.004 183.339 149.636C183.311 142.757 183.739 132.794 185.994 124.402C186.251 123.46 186.536 122.49 186.85 121.548C188.649 116.096 191.275 110.958 194.643 106.276C194.7 106.219 194.786 106.191 194.871 106.191C199.524 107.104 204.32 107.675 209.058 107.903C213.968 108.189 218.963 108.103 223.844 107.675C223.93 107.675 224.016 107.704 224.044 107.789C226.813 112.642 228.811 117.866 229.981 123.318C230.238 124.431 230.438 125.658 230.638 126.914C231.837 135.392 231.209 145.326 230.438 152.176C230.153 154.688 229.81 157.257 229.382 159.998C229.011 162.253 227.327 164.023 225.1 164.536C224.073 164.765 222.988 164.993 221.846 165.164C217.85 165.764 213.825 166.078 209.8 166.078ZM194.928 106.619C191.617 111.215 189.048 116.267 187.278 121.662C186.964 122.604 186.679 123.574 186.451 124.516C184.224 132.88 183.767 142.785 183.796 149.636C183.796 152.976 183.91 155.773 184.024 157.486C184.138 159.598 185.509 161.396 187.507 162.053C188.449 162.367 189.419 162.681 190.447 162.966C195.556 164.365 200.837 165.25 206.147 165.564C211.37 165.821 216.651 165.535 221.818 164.708C222.959 164.536 224.044 164.308 225.072 164.08C227.127 163.623 228.697 161.967 229.011 159.884C229.439 157.143 229.782 154.603 230.067 152.091C230.809 145.269 231.466 135.364 230.267 126.943C230.096 125.658 229.867 124.459 229.61 123.375C228.44 118.008 226.499 112.87 223.787 108.103C218.906 108.531 213.968 108.617 209.058 108.332C204.32 108.103 199.553 107.532 194.928 106.619Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M186.221 124.459C184.051 132.623 183.537 142.3 183.566 149.636L175.887 149.236C175.316 149.208 174.803 148.951 174.432 148.523C174.06 148.095 173.889 147.552 173.975 146.981C175.773 131.624 186.221 124.459 186.221 124.459Z",fill:"#EFB2CB"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M183.538 149.836L175.859 149.436C175.231 149.408 174.66 149.122 174.26 148.637C173.861 148.18 173.661 147.552 173.747 146.953C175.545 131.681 185.964 124.345 186.078 124.288C186.164 124.231 186.249 124.231 186.335 124.288C186.421 124.345 186.449 124.431 186.421 124.517C184.194 132.937 183.737 142.814 183.766 149.636C183.766 149.693 183.737 149.75 183.709 149.779C183.652 149.836 183.595 149.836 183.538 149.836ZM185.85 125.002C183.794 126.657 175.745 133.822 174.203 147.01C174.146 147.495 174.289 148.009 174.632 148.38C174.974 148.751 175.431 148.979 175.916 149.008L183.366 149.408C183.309 142.728 183.766 133.223 185.85 125.002Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M217.764 99.3688C220.104 101.966 222.159 104.821 223.901 107.875C218.962 108.332 214.024 108.389 209.086 108.103C204.319 107.875 199.552 107.276 194.871 106.391C199.952 99.3973 205.404 95.4296 208.173 93.7169C209.286 93.0318 210.713 93.0889 211.798 93.8596C213.311 95.0014 214.766 96.2574 216.108 97.599",fill:"#A97FF2"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M214.822 108.503C212.881 108.503 210.969 108.446 209.028 108.332C204.261 108.103 199.465 107.504 194.784 106.59L194.441 106.533L194.641 106.248C199.722 99.2258 205.203 95.2581 208 93.5169C209.199 92.7747 210.712 92.8318 211.854 93.6881C213.367 94.8299 214.822 96.0859 216.193 97.4275L215.879 97.7415C214.537 96.3999 213.11 95.1725 211.597 94.0307C210.598 93.2885 209.285 93.2314 208.229 93.8879C205.488 95.6006 200.15 99.4542 195.184 106.248C199.751 107.104 204.404 107.675 209.028 107.903C213.823 108.189 218.705 108.103 223.5 107.704C221.816 104.792 219.818 102.052 217.563 99.5398L217.877 99.2544C220.217 101.881 222.301 104.735 224.042 107.789L224.214 108.075L223.871 108.103C220.902 108.36 217.848 108.503 214.822 108.503Z",fill:"black"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M230.237 152.138C231.065 144.859 231.636 135.24 230.437 126.933L230.466 126.819C230.466 126.819 240.085 135.097 240.228 150.568C240.228 151.111 240 151.624 239.6 151.995C239.2 152.366 238.687 152.566 238.144 152.538L230.237 152.138Z",fill:"#EFB2CB"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M238.259 152.766C238.23 152.766 238.173 152.766 238.144 152.766L230.237 152.367C230.18 152.367 230.123 152.338 230.095 152.281C230.066 152.224 230.038 152.167 230.038 152.11C230.808 145.316 231.465 135.44 230.237 126.962C230.237 126.933 230.237 126.905 230.237 126.876L230.266 126.762C230.294 126.676 230.352 126.619 230.409 126.619C230.466 126.591 230.551 126.619 230.608 126.648C230.694 126.733 240.314 135.154 240.456 150.568C240.456 151.168 240.2 151.739 239.771 152.138C239.343 152.538 238.801 152.766 238.259 152.766ZM230.466 151.939L238.144 152.338C238.63 152.367 239.086 152.195 239.457 151.853C239.8 151.51 240 151.054 240 150.597C239.886 137.152 232.492 129.103 230.694 127.361C231.836 135.668 231.208 145.259 230.466 151.939Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M210.712 164.274C211.087 157.269 209.375 151.482 206.888 151.349C204.4 151.215 202.08 156.787 201.705 163.792C201.33 170.798 203.042 176.585 205.53 176.718C208.017 176.851 210.337 171.28 210.712 164.274Z",fill:"#EFB2CB"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M205.598 176.957C205.57 176.957 205.541 176.957 205.513 176.957C202.858 176.815 201.088 171.049 201.488 163.798C201.888 156.576 204.257 151.01 206.883 151.153C209.538 151.296 211.307 157.062 210.908 164.312C210.736 167.737 210.08 170.906 209.081 173.275C208.11 175.644 206.854 176.957 205.598 176.957ZM206.797 151.552C204.485 151.552 202.287 157.119 201.916 163.798C201.545 170.563 203.201 176.386 205.541 176.501C206.626 176.558 207.796 175.302 208.71 173.075C209.68 170.735 210.308 167.595 210.48 164.255C210.851 157.49 209.195 151.667 206.854 151.552C206.826 151.552 206.797 151.552 206.797 151.552Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M219.506 129.312C219.22 135.849 213.711 140.93 207.174 140.644C200.638 140.359 195.557 134.85 195.842 128.313C196.127 121.776 201.637 116.695 208.173 116.981C211.313 117.095 214.282 118.465 216.394 120.777C218.507 123.089 219.648 126.172 219.506 129.312Z",fill:"#18B6F6"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M207.688 140.844C207.516 140.844 207.345 140.844 207.174 140.844C200.523 140.559 195.356 134.936 195.642 128.313C195.927 121.662 201.55 116.496 208.173 116.781C211.398 116.924 214.367 118.294 216.536 120.663C218.677 123.004 219.848 126.172 219.705 129.341C219.448 135.763 214.082 140.844 207.688 140.844ZM207.659 117.181C201.465 117.181 196.298 122.09 196.041 128.313C195.784 134.707 200.78 140.131 207.174 140.416C213.596 140.673 218.991 135.678 219.277 129.284C219.42 126.229 218.306 123.175 216.223 120.92C214.11 118.636 211.256 117.295 208.144 117.181C208.002 117.181 207.83 117.181 207.659 117.181Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M214.053 138.389L214.024 138.761C209.828 141.444 204.433 141.215 200.494 138.19L200.523 137.79C200.58 135.335 201.95 133.109 204.119 131.938C206.289 130.796 208.915 130.882 210.97 132.224C213.025 133.565 214.196 135.935 214.053 138.389Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M207.688 140.844C205.09 140.844 202.521 140.016 200.381 138.389C200.323 138.361 200.295 138.275 200.295 138.218L200.323 137.818C200.381 135.306 201.808 132.994 204.034 131.795C206.261 130.596 208.973 130.711 211.113 132.081C213.226 133.451 214.453 135.877 214.31 138.389H214.082H214.282L214.253 138.76C214.253 138.817 214.225 138.903 214.168 138.931C212.17 140.216 209.915 140.844 207.688 140.844ZM200.723 138.104C204.548 140.958 209.772 141.186 213.825 138.646V138.361C213.968 135.991 212.826 133.708 210.828 132.423C208.83 131.139 206.289 131.025 204.206 132.138C202.122 133.251 200.78 135.42 200.723 137.79V138.104Z",fill:"#0D052C"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M207.801 129.569C209.835 129.569 211.483 127.92 211.483 125.887C211.483 123.853 209.835 122.204 207.801 122.204C205.767 122.204 204.119 123.853 204.119 125.887C204.119 127.92 205.767 129.569 207.801 129.569Z",fill:"white"}),Object(emotion_react_jsx_runtime_browser_esm.b)("path",{d:"M207.802 129.797C207.745 129.797 207.687 129.797 207.63 129.797C206.574 129.74 205.632 129.312 204.919 128.541C204.205 127.771 203.834 126.772 203.891 125.744C203.977 123.603 205.803 121.89 207.973 122.005C209.029 122.062 209.971 122.49 210.685 123.261C211.398 124.031 211.769 125.03 211.712 126.058C211.655 127.114 211.227 128.056 210.456 128.77C209.714 129.426 208.801 129.797 207.802 129.797ZM207.802 122.404C205.946 122.404 204.405 123.86 204.319 125.744C204.291 126.686 204.605 127.571 205.233 128.256C205.861 128.941 206.717 129.341 207.659 129.369C208.601 129.398 209.486 129.084 210.171 128.456C210.856 127.828 211.256 126.971 211.284 126.029C211.313 125.088 210.999 124.203 210.371 123.518C209.743 122.832 208.886 122.433 207.944 122.404C207.887 122.404 207.859 122.404 207.802 122.404Z",fill:"#0D052C"})]})),Object(emotion_react_jsx_runtime_browser_esm.b)(Heading.a,Object.assign({css:{marginTop:8}},{children:"Save time with inline text editing"})),Object(emotion_react_jsx_runtime_browser_esm.b)(P.a,{children:"With the inline text editor, you no longer have to switch between the Options tab and the visual section of the editor. When enabled, you can simply compose and edit text directly in the text block where it's supposed to go."})]})),displayInlineEditingHelpModal=async()=>{await app_state_constant.appState.dialogs.openDialog(Object(emotion_react_jsx_runtime_browser_esm.b)(HelpModal,{}),!0,{})};var RadioGroup=__webpack_require__(2713),RadioGroup_default=__webpack_require__.n(RadioGroup),FormControlLabel=__webpack_require__(236),FormControlLabel_default=__webpack_require__.n(FormControlLabel),Radio=__webpack_require__(2657),Radio_default=__webpack_require__.n(Radio);let RadioButtonEditor_RadioButtonEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(value,required=!1){return value?"":required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:""}render(){const field=this.props.field,options=this.props.object;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{position:"relative",marginBottom:20}},{children:[!field.hideLabel&&this.props.label,Object(emotion_react_jsx_runtime_browser_esm.c)(RadioGroup_default.a,Object.assign({defaultValue:field.defaultValue,name:"radio-buttons-group",css:{width:"100%",marginBottom:5},value:options.get(field.name)||"",onChange:(e,value)=>{this.errorMessage=this.validate(value,field.required),options.set(field.name,value),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]),this.props.onChange&&this.props.onChange(options)}},{children:[(this.props.field.enum||[]).map(option=>Object(emotion_react_jsx_runtime_browser_esm.b)(FormControlLabel_default.a,{value:option.value,control:Object(emotion_react_jsx_runtime_browser_esm.b)(Radio_default.a,{color:"primary"}),label:option.label},option.value)),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(core_Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText})),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)(core_Typography_default.a,Object.assign({variant:"caption",css:{color:"var(--red)",padding:"10px 0"}},{children:this.errorMessage}))]}))]}))}};RadioButtonEditor_RadioButtonEditor=Object(tslib_es6.a)([mobxreact_esm.observer],RadioButtonEditor_RadioButtonEditor);var global_symbol_model=__webpack_require__(552),VirtualizedSelect=__webpack_require__(2028),index_4bd03571_esm=__webpack_require__(41),WalkthroughStateContext=__webpack_require__(281),createReactComponent=__webpack_require__(46),IconFileCheck=Object(createReactComponent.a)("file-check","IconFileCheck",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 15l2 2l4 -4",key:"svg-2"}]]);lib.Quill.register("modules/imageResize",__webpack_require__(2598).default),lib.Quill.register("modules/imageDrop",__webpack_require__(2599).ImageDrop),lib.Quill.debug("error");const AsyncContentCodeEditor=Object(async_component_function.a)(async()=>(await Promise.all([__webpack_require__.e(17),__webpack_require__.e(309)]).then(__webpack_require__.bind(null,6365))).ContentCodeEditor),Link=lib.Quill.import("formats/link");class LinkType extends Link{static create(val){let value=val;const node=super.create(value);return value=this.sanitize(value),value.startsWith("https://")||value.startsWith("http://")||value.startsWith("//")||node.removeAttribute("target"),node}}lib.Quill.register(LinkType);const Parchment=lib.Quill.import("parchment");class IndentAttributor extends Parchment.Attributor.Style{constructor(attrName,keyName,options){super(attrName,keyName,options)}add(node,value){const useValue=parseInt(value);return!value||useValue===0?(this.remove(node),!0):super.add(node,`${value}em`)}}let indentStyle=new IndentAttributor("indent","text-indent",{scope:Parchment.Scope.BLOCK,whitelist:["1em","2em","3em","4em","5em","6em","7em","8em","9em"]});lib.Quill.register(indentStyle);const Script=lib.Quill.import("formats/script");class ScriptStyleType extends Script{constructor(attrName,keyName,options){super(attrName,keyName,options)}static create(value){if(value==="super"){const el=document.createElement("sup");return el.style.verticalAlign="super",el.style.fontSize="smaller",el}if(value==="sub"){const el=document.createElement("sub");return el.style.verticalAlign="sub",el.style.fontSize="smaller",el}return super.create(value)}}lib.Quill.register(ScriptStyleType);const FieldsForm_AsyncMonacoEditor=Object(async_component_function.a)(async()=>(await __webpack_require__.e(4).then(__webpack_require__.t.bind(null,2625,7))).default);lib.Quill.register(lib.Quill.import("attributors/style/align"),!0);const getPath=(...parts)=>Object(lodash.compact)(parts).join("."),sizes=["10px","12px","14px","16px","18px","20px","22px","24px","26px","28px","30px","32px","34px","36px","38px","40px","42px","44px","46px","48px","50px","52px","54px","56px","58px","60px"],cache=new es.c({defaultHeight:100,fixedWidth:!0});function isValidDate(date){return date instanceof Date&&!isNaN(date.getTime())}const Size=lib.Quill.import("attributors/style/size");Size.whitelist=sizes,lib.Quill.register(Size,!0);const OptionWithTooltip=_a2=>{var{data:option}=_a2,props=Object(tslib_es6.b)(_a2,["data"]);return Object(emotion_react_jsx_runtime_browser_esm.b)(index_4bd03571_esm.l.Option,Object.assign({data:option},props,{css:{cursor:"pointer"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:props.label,placement:"bottom-end"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},{children:props.label}))}))}))};let FieldsForm_TextEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.isOnChangeTriggered=!1,this.handleWalkthroughUpdates=()=>{const{walkthroughState,setWalkthroughState}=this.context;this.isOnChangeTriggered||walkthroughState.tourActive&&walkthroughState.currentStepId==="visually-build-content"&&walkthroughState.stepIndex===4&&(this.isOnChangeTriggered=!0,setTimeout(()=>{setWalkthroughState({stepIndex:5,run:!0,continuous:!1})},4e3))}}validate(value,required=!1){return validateTextField(this.props.field,value,required)}render(){const field=this.props.field,options=this.props.object,camelName=field.name,value=options.get(camelName)||"";return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{position:"relative"}},{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,Object.assign({select:!!(field.enum&&field.enum.length),required:field.required,type:field.type,error:!!this.errorMessage,fullWidth:!0,disabled:field.disallowRemove,helperText:this.errorMessage||field.helperText,placeholder:field.placeholder,"aria-placeholder":field.placeholder,value,SelectProps:{renderValue:()=>{var _a2;if(((_a2=field.enum)===null||_a2===void 0?void 0:_a2.length)>0){const enumOption=field.enum.find(op=>typeof op=="object"&&op.value===value);if(enumOption?.label)return enumOption.label}return typeof value=="object"&&typeof value.label=="string"?value.label:value}},onChange:e=>{this.handleWalkthroughUpdates();const value2=e.target.value;this.errorMessage=this.validate(value2,field.required),options.set(camelName,value2),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]),this.props.onChange&&this.props.onChange(options)}},{children:field.enum&&field.enum.map(option=>{const label=typeof option=="object"?typeof option.label>"u"?option.value:option.label:option,value2=typeof option=="object"?typeof option.value>"u"?option.label:option.value:option,helperText=typeof option=="object"?option.helperText:void 0;return Object(emotion_react_jsx_runtime_browser_esm.b)(MenuItem_default.a,Object.assign({css:{height:"auto"},value:value2},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(ListItemText_default.a,{primary:label,secondary:Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{maxWidth:350,whiteSpace:"normal"}},{children:helperText}))})}),label)})}))]}))}};FieldsForm_TextEditor.contextType=WalkthroughStateContext.b,FieldsForm_TextEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_TextEditor);let FieldsForm_ReferenceEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(){const field=this.props.field,id=this.value&&this.value.id;return field.required&&!id?`Field ${field.friendlyName||Object(human_case_function.a)(field.name)} is required`:""}get value(){return this.props.object.get(this.props.field.name)}set value(value){Object(mobx_module.runInAction)(()=>{try{value?this.props.object.set(this.props.field.name,value):this.props.object.delete(this.props.field.name)}catch{const parent=Object(mobx_state_tree_module.getParent)(this.props.object),grandParent=Object(mobx_state_tree_module.getParent)(parent);Object(mobx_state_tree_module.unprotect)(grandParent),this.props.object.set(this.props.field.name,value)}})}render(){var _a2,_b2;const{field}=this.props;let modelId=field.modelId;!modelId&&field.model&&(modelId=(_b2=(_a2=app_state_constant.appState.models)===null||_a2===void 0?void 0:_a2.result.find(model=>model.name===field.model))===null||_b2===void 0?void 0:_b2.id);const{value}=this;let isRefModelAccessibleToUser=!0;modelId&&!app_state_constant.appState.user.canAccessModel(modelId)&&(isRefModelAccessibleToUser=!1);const chooseEntry=()=>{const destroy=app_state_constant.appState.globalState.openDialog(Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{backgroundColor:"var(--off-background)",height:"90vh",width:"90vw"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Content.default,{mini:!0,model:modelId,hideModelChoices:!!modelId,query:[{property:"query.published",operator:"is",value:"published"}],onChoose:Object(mobx_module.action)(choice=>{var _a3,_b3,_c2;choice?.id===((_a3=app_state_constant.appState.designerState.editingContentModel)===null||_a3===void 0?void 0:_a3.id)&&app_state_constant.appState.dialogs.alert("Unable to select reference to be the same as the current content. This will cause a circular reference."),choice?.id&&choice.id!==((_b3=app_state_constant.appState.designerState.editingContentModel)===null||_b3===void 0?void 0:_b3.id)&&(this.value=reference.a.create({id:choice.id,model:app_state_constant.appState.models&&((_c2=app_state_constant.appState.models.result.find(model=>model.id===choice.modelId))===null||_c2===void 0?void 0:_c2.name)||""})),destroy()})})})))};return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,value?.id?Object(emotion_react_jsx_runtime_browser_esm.b)(emotion_react_jsx_runtime_browser_esm.a,{children:Object(emotion_react_jsx_runtime_browser_esm.c)(Paper_default.a,Object.assign({role:"button",css:{padding:20,display:"flex",alignItems:"center",cursor:"pointer"},onClick:()=>{isRefModelAccessibleToUser&&chooseEntry()}},{children:[value.value&&value.value.name||"Entry",Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({style:{display:"flex",alignItems:"center",marginLeft:"auto"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:isRefModelAccessibleToUser?"View and edit this entry":"You do not have permission to edit this entry"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("span",{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({disabled:!isRefModelAccessibleToUser,css:{padding:5},onClick:e=>{e.stopPropagation(),open("/content/"+value.id,"_blank")}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Edit_default.a,{css:{opacity:.5,fontSize:20}})}))})})),Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:isRefModelAccessibleToUser?"Remove this reference":"You do not have permission to remove this reference"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("span",{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({disabled:!isRefModelAccessibleToUser,css:{padding:5},onClick:()=>{this.value&&(this.value=null)}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Close_default.a,{css:{opacity:.5,fontSize:20}})}))})}))]}))]}))}):Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:isRefModelAccessibleToUser?"":"You do not have permission to choose the content entry"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("span",{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({disabled:!isRefModelAccessibleToUser,color:"primary",variant:"contained",fullWidth:!0,onClick:async()=>{chooseEntry()}},{children:"Choose entry"}))})})),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption",css:{color:"var(--red)",padding:"10px 0"}},{children:this.errorMessage}))]})}};FieldsForm_ReferenceEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_ReferenceEditor);let FieldsForm_ModelEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.fieldsFormRef=null}validate(){const errors=this.fieldsFormRef&&this.fieldsFormRef.validate();return errors&&errors.length?errors.join(", "):""}render(){const field=this.props.field,options=this.props.object,camelName=field.name,modelId=field.modelId,model=app_state_constant.appState.models&&Object(mobx_module.untracked)(()=>app_state_constant.appState.models.result.find(item=>item.id===modelId)),object=model&&(options.get(camelName)||Object(mobx_module.untracked)(()=>mobx_module.observable.map({},{deep:!1})));return model&&object?Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,{path:getPath(this.props.path,field.name),ref:ref=>this.fieldsFormRef=ref,fields:model.fields,object,onChange:obj=>{Object(mobx_module.runInAction)(()=>{const clonedData=Object(fast_clone_function.b)(obj);options.set(camelName,clonedData),this.props.onChange&&this.props.onChange(options)})}})]}):Object(emotion_react_jsx_runtime_browser_esm.b)("div",{children:"Loading..."})}};FieldsForm_ModelEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_ModelEditor);let FieldsForm_StyleFieldEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.buttonRef=null,this.editing=!1}render(){const field=this.props.field,options=this.props.object,camelName=field.name,object=options.get(camelName)||mobx_module.observable.map({},{deep:!1});return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[Object(emotion_react_jsx_runtime_browser_esm.c)(Button_default.a,Object.assign({buttonRef:ref=>this.buttonRef=ref,color:"primary",variant:"contained",fullWidth:!0,css:{margin:"10px 0"},onClick:()=>{app_state_constant.appState.designerState.overrideEditingStyles=object,this.editing=!0}},{children:["Edit ",field.friendlyName||Object(human_case_function.a)(field.name)]})),Object(emotion_react_jsx_runtime_browser_esm.b)(Popover_default.a,Object.assign({open:this.editing,anchorEl:this.buttonRef,onClose:()=>{app_state_constant.appState.designerState.overrideEditingStyles=null,this.editing=!1}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(StyleEditor.a,{simple:!0})}))]})}};Object(tslib_es6.a)([mobx_module.observable],FieldsForm_StyleFieldEditor.prototype,"editing",void 0),FieldsForm_StyleFieldEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_StyleFieldEditor);let FieldsForm_ObjectEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.collapsed=this.props.field.defaultCollapsed,this.fieldsFormRef=null}validate(){const field=this.props.field;if(!field.required&&this.object.size===0)return"";let errors=this.fieldsFormRef&&this.fieldsFormRef.validate()||[];const isEmpty2=this.object.size===(this.object.get("@type")?1:0);return field.required&&isEmpty2&&errors.push("This field is required"),errors&&errors.length?errors.join(", "):""}get object(){var _a2,_b2;const value=(_b2=(_a2=this.props.object).get)===null||_b2===void 0?void 0:_b2.call(_a2,this.props.field.name);return value&&typeof value=="object"?value:mobx_module.observable.map({})}get selectedKey(){var _a2;const field=this.props.field,fields=Object(lodash.sortBy)(field.subFields,"priority");if(!fields?.length)return;const locale=app_state_constant.appState.designerState.locale;return field.localized&&app_state_constant.appState.designerState.contentLocale&&fields.length?{label:locale,value:locale}:{label:((_a2=fields[0])===null||_a2===void 0?void 0:_a2.friendlyName)||Object(human_case_function.a)(fields[0].name),value:fields[0].name}}render(){var _a2,_b2;const field=this.props.field,options=this.props.object,camelName=field.name,fields=field.subFields,object=this.object,disabled=(_a2=this.props.disabled)===null||_a2===void 0?void 0:_a2.filter(name2=>name2.startsWith(camelName)).map(name2=>name2.replace(`${camelName}.`,""));return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[Object(emotion_react_jsx_runtime_browser_esm.c)("button",Object.assign({onClick:()=>{this.collapsed=!this.collapsed},css:{all:"unset",display:"flex",alignItems:"center",cursor:"pointer",width:"100%"}},{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(ChevronRight_default.a,{css:{marginLeft:"auto",fontSize:22,opacity:.5,marginTop:10,transform:this.collapsed?"rotate(90deg)":"rotate(-90deg)"}})]})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({css:{marginBottom:15,marginTop:10},variant:"caption"},{children:field.helperText})),!this.collapsed&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:Object.assign({paddingLeft:15,marginTop:10,paddingBottom:10},!this.props.simple&&{borderLeft:"var(--border)"})},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(bindable_context.a.Provider,Object.assign({value:this.context?!field.localized:this.context},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,Object.assign({disabled,keysIcon:field.localized?LocalizeButton.b:void 0,folded:field.folded||field.localized,keysHelperText:field.keysHelperText},field.localized&&{key:(_b2=this.selectedKey)===null||_b2===void 0?void 0:_b2.label},{selectedKey:this.selectedKey,onKeyChange:key=>{field.localized&&app_state_constant.appState.designerState.contentLocale&&(app_state_constant.appState.designerState.activeLocale=key,app_state_constant.appState.designerState.updateIframeContent.next())},path:getPath(this.props.path),ref:ref=>this.fieldsFormRef=ref,fields,object,onChange:Object(mobx_module.action)(obj=>{var _a3,_b3;if(field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]),typeof options.get(camelName)!="object"){const clonedData=Object(fast_clone_function.b)(obj);options.set(camelName,clonedData)}(_b3=(_a3=this.props).onChange)===null||_b3===void 0||_b3.call(_a3,options)})}))}))}))]})}};FieldsForm_ObjectEditor.contextType=bindable_context.a,Object(tslib_es6.a)([mobx_module.observable],FieldsForm_ObjectEditor.prototype,"collapsed",void 0),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_ObjectEditor.prototype,"selectedKey",null),FieldsForm_ObjectEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_ObjectEditor);let FieldsForm_MapEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.fieldsFormRef=null}initMap(map){const{field,object}=this.props;typeof object.get(field.name)>"u"&&object.set(field.name,map)}validate(){const errors=this.fieldsFormRef&&this.fieldsFormRef.validate();return errors&&errors.length?errors.join(", "):""}render(){const{field,object,path}=this.props,valueType=field.valueType||{type:"string"},map=object.get(field.name)||{};return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(KeyValueEditor.c,{map,onNewKey:this.initMap,keyEditor:(value,onChange)=>Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({style:{marginTop:16}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,{label:"Key",placeholder:"Key...",value,onChange:kbEvent=>onChange(kbEvent.target.value)})})),valueEditor:valueType?(value,onChange,key)=>Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,{path:getPath(path,field.name,key),fields:[Object.assign(Object.assign({},valueType),{name:key||" ",isMapValue:!0})],object:{get:()=>value,set:(key2,value2)=>onChange(value2)}}):void 0}),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({css:{marginBottom:15,marginTop:15},variant:"caption"},{children:field.helperText}))]})}};Object(tslib_es6.a)([mobx_module.action.bound],FieldsForm_MapEditor.prototype,"initMap",null),FieldsForm_MapEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_MapEditor);const builtInStateProperties=["location","device","deviceSize","isBrowser","isServer"],builtInStatePropertiesSet=new Set(builtInStateProperties),globalSymbolsModel={label:"Global Symbols",value:"global_symbols"};let FieldsForm_SymbolEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.fieldsFormRef=null,this.showInlineSymbolOptions=!1,this.showCodeEditor=!1,this.showStateInspector=!1,this.searchText="",this.defaultMongoOptions=Object.freeze({noTraverse:!0,query:Object.freeze({published:"published"}),limit:500,cachebust:!0,fields:"name,id,data.inputs,modelId"}),this.content=content_model.c.create({collectionName:"content",replaceOnPaginate:!0,queryMongo:!0,mongoOptions:this.defaultMongoOptions}),this.showGlobalContent=!1,this.globalContent=[],this.loadingGlobalContent=!1}validate(){const errors=this.fieldsFormRef&&this.fieldsFormRef.validate();return errors&&errors.length?errors.join(", "):""}get showGlobalSymbolOption(){return app_state_constant.appState.designerState.sdkInfo.supportsGlobalSymbols&&app_state_constant.appState.designerState.globalSymbols.result.length>0}get loadingContent(){return this.showGlobalContent?this.loadingGlobalContent:this.content.loading}get dynamicInputs(){const selectedElement=app_state_constant.appState.designerState.selectedElements[0];if(!selectedElement)return[];const content=this.props.object.get("content");if(!content)return[];const state=Object(lodash.omit)(Object(fast_clone_function.b)(selectedElement.state),...builtInStateProperties);let inputs=state?Object(object_to_inputs.a)(state):[];const manuallyCreatedInputs=content&&content.get("data").get("inputs");return manuallyCreatedInputs&&Array.isArray(manuallyCreatedInputs)&&(inputs=inputs.filter(item=>!manuallyCreatedInputs.find(manualBoi=>manualBoi.name===item.name))),inputs}get model(){var _a2;return app_state_constant.appState.designerState.sdkInfo.supportsGlobalSymbols&&(this.showGlobalContent||this.isGlobalSymbol)?globalSymbolsModel.value:(_a2=this.props.object.get(this.props.field.name))===null||_a2===void 0?void 0:_a2.get("model")}get isGlobalSymbol(){var _a2,_b2;const ownerId=(_a2=this.props.object.get(this.props.field.name))===null||_a2===void 0?void 0:_a2.get("ownerId");return ownerId&&ownerId!==app_state_constant.appState.user.apiKey||((_b2=this.props.object.get(this.props.field.name))===null||_b2===void 0?void 0:_b2.get("global"))}componentDidMount(){Object(mobx_state_tree_module.unprotect)(this.content);const field=this.props.field,options=this.props.object,camelName=field.name,object=options.get(camelName);if(!object){const symbolModel=app_state_constant.appState.models&&app_state_constant.appState.models.result.find(item=>item.name==="symbol");options.set(camelName,{model:symbolModel?.name||"",entry:"",data:{}})}const content=object&&object.get("content");if(content&&"@type"in content&&options.set("content",Object.assign(Object.assign({},Object(mobx_state_tree_module.getSnapshot)(content)),{"@type":void 0})),this.safeSubscribe(app_state_constant.appState.designerState.contentUpdated,()=>{this.content.fetch()}),this.safeReaction(()=>{const symbol=this.props.object.get(this.props.field.name);if(!symbol)return null;const model=symbol.get("model");if(model){const modelId=app_state_constant.appState.models&&app_state_constant.appState.models.result.find(item=>item.name===symbol.get("model"));return modelId||model}return null},()=>{const symbol=this.props.object.get(this.props.field.name);if(symbol&&symbol.get("model")&&!this.showGlobalContent){const model=app_state_constant.appState.models&&app_state_constant.appState.models.result.find(item=>item.name===symbol.get("model"));model&&(this.content.mongoOptions=Object(lodash.merge)({},this.defaultMongoOptions,{query:{modelId:model.id}}),this.content.fetch())}}),content){const oldKeys=new Set;let priorInputs=[];this.onDestroy(Object(mobx_module.autorun)(()=>{const contentModel=content,element=app_state_constant.appState.designerState.selectedElements[0];if(contentModel&&element){const inputs=contentModel.get("data").get("inputs"),stateOverrides=element.state;if(inputs||contentModel.get("data").set("inputs",[]),inputs&&Array.isArray(inputs)){let deleted=!1;inputs.forEach((input,index)=>{if(input.defaultValue!==void 0&&stateOverrides.get(input.name)===void 0){oldKeys.has(input.name)&&oldKeys.delete(input.name),stateOverrides.set(input.name,input.defaultValue);const priorInput=priorInputs[index];priorInput&&priorInput.defaultValue===input.defaultValue&&priorInput.name!==input.name&&(stateOverrides.delete(priorInput.name),oldKeys.add(priorInput.name),deleted=!0)}});for(const key of oldKeys)!inputs.find(item=>item.name===key)&&!builtInStatePropertiesSet.has(key)&&stateOverrides.has(key)&&stateOverrides.delete(key);if(priorInputs=Object(fast_clone_function.b)(inputs),deleted&&app_state_constant.appState.designerState.editingIframeRef&&app_state_constant.appState.designerState.editingIframeRef.contentWindow){const editingContent=app_state_constant.appState.designerState.editingContentModel;if(editingContent){const model=app_state_constant.appState.models&&app_state_constant.appState.models.result.find(item=>item.id===editingContent.modelId);model&&app_state_constant.appState.designerState.editingIframeRef.contentWindow.postMessage({type:"builder.resetSymbolState",data:{id:element.id,model:model.name,state:Object(fast_clone_function.b)(app_state_constant.appState.designerState.stateOverrides)}},"*")}}}}}))}this.safeReaction(()=>this.loadingContent,loading=>{loading||window.dispatchEvent(new CustomEvent("resize"))},{fireImmediately:!1}),this.safeReaction(()=>this.model,async()=>{this.model===globalSymbolsModel.value?(this.loadingGlobalContent=!0,this.showGlobalContent=!0,this.globalContent=(await Object(global_symbol_model.c)()).filter(val=>val).map(val=>content_model.a.create(val)),this.loadingGlobalContent=!1):this.showGlobalContent=!1});const debouncedSearch=Object(lodash.debounce)(text=>{if(text!=""){const regexObject={};regexObject.$regex=`(?i)${Object(lodash.escapeRegExp)(text)}`,this.content.mongoOptions=Object(lodash.merge)({},this.content.mongoOptions,{query:{name:{$regex:regexObject.$regex}}}),this.content.fetch(),this.searchText=""}},1e3);this.safeReaction(()=>this.searchText,text=>{debouncedSearch(text)})}resetSymbol(asGlobal=!1){const field=this.props.field,object=this.props.object.get(field.name);object.delete("entry"),object.delete("ownerId"),asGlobal?object.set("global",!0):object.delete("global"),object.delete("data"),object.delete("content")}render(){var _a2,_b2;const field=this.props.field,options=this.props.object,camelName=field.name,object=options.get(camelName);let modelOptions=((_b2=(_a2=app_state_constant.appState.models)===null||_a2===void 0?void 0:_a2.result)!==null&&_b2!==void 0?_b2:[]).filter(model2=>!model2.archived).map(model2=>({value:model2.name,label:model2.humanName}));this.showGlobalSymbolOption&&(modelOptions=modelOptions.concat(globalSymbolsModel));const symbolOptions=this.showGlobalContent?this.globalContent.map(content2=>({label:content2.name,value:content2.id})):[...this.content.result.filter(model2=>model2.id!==(app_state_constant.appState.designerState.editingContentModel&&app_state_constant.appState.designerState.editingContentModel.id)).map(model2=>({label:model2.name,value:model2.id})),{label:"None",value:""}];if(!object)return null;const valueType=field.valueType,model=object.get("model"),modelInstance=model&&app_state_constant.appState.models&&app_state_constant.appState.models.result.find(modelItem=>modelItem.name===model),entry=object.get("entry");let entryInstance=entry&&this.content&&this.content.result.find(model2=>model2.id===entry);this.showGlobalContent&&(entryInstance=this.globalContent.find(globalContent=>globalContent.id===entry));const entryInputs=entryInstance&&entryInstance.data&&entryInstance.data.get("inputs"),inline=object.get("inline"),content=object.get("content")||null,contentInputs=content&&content.get("data")&&content.get("data").get("inputs"),meta=object.get("meta")||null,stateInputs=this.dynamicInputs,selectedElement=app_state_constant.appState.designerState.selectedElements[0],disabled=Array.from(app_state_constant.appState.designerState.selectedElements[0].bindings.keys()).map(item=>item.replace("component.options.symbol.data.","")),onResetBindings=fieldName=>{app_state_constant.appState.designerState.selectedElements[0].bindings.delete(`component.options.symbol.data.${fieldName}`)};return object.get("data")?Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",flexDirection:"column"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.c)(Typography_default.a,Object.assign({variant:"body1",css:{marginBottom:5,marginTop:15}},{children:[meta?.get("fieldName")||field.friendlyName||Object(human_case_function.a)(field.name),field.required?"*":"",meta?.get("documentationLink")?Object(emotion_react_jsx_runtime_browser_esm.b)("a",Object.assign({href:meta.get("documentationLink"),css:{marginLeft:5},target:"_blank"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(HelpOutline_default.a,{css:{marginLeft:2,position:"relative",top:5},fontSize:"small",color:"primary"})})):""]})),!!entryInputs&&!inline&&(this.loadingContent?Object(emotion_react_jsx_runtime_browser_esm.b)(Loading.a,{size:20,css:{margin:"20px auto"}}):Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,{disabled,onResetBindings,path:getPath(this.props.path,"data"),fields:entryInputs,object:object.get("data")})),inline&&Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,{disabled,onResetBindings,path:getPath(this.props.path,"data"),fields:contentInputs,object:object.get("data")}),!inline&&Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({style:{width:"100%",display:"block",marginTop:15}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("label",Object.assign({style:{color:theme_constant.a.colors.text.regular,opacity:.5,padding:0,fontSize:14,fontWeight:500}},{children:"Model"})),Object(emotion_react_jsx_runtime_browser_esm.b)(VirtualizedSelect.a,{options:modelOptions,value:this.isGlobalSymbol?globalSymbolsModel:modelOptions.find(el=>el.value===object.get("model")),isSearchable:!0,css:{marginTop:7},menuDimensions:{width:"100%"},styles:{menu:()=>({width:"100%"})},components:{Option:OptionWithTooltip,DropdownIndicator:props=>Object(emotion_react_jsx_runtime_browser_esm.b)(ArrowDropDown_default.a,{css:{color:theme_constant.a.colors.iconColor}})},onChange:(selectedOption,action)=>{const value=selectedOption?.value;value===globalSymbolsModel.value?this.showGlobalContent=!0:(this.showGlobalContent=!1,object.set("model",value)),this.resetSymbol(this.showGlobalContent)}})]})),inline&&Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[this.showInlineSymbolOptions&&Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[Object(emotion_react_jsx_runtime_browser_esm.c)(Dialog_default.a,Object.assign({maxWidth:!1,open:this.showCodeEditor,onClose:()=>this.showCodeEditor=!1,TransitionComponent:SlideUp.a,PaperProps:{style:{backgroundColor:"rgba(0, 0, 0, 0.7)",backdropFilter:"blur(20px)",position:"fixed",bottom:0,left:0,right:0,margin:0,height:"calc(100vh - 50px)",maxHeight:"none",width:"100vw",borderColor:theme_constant.a.colors.borderColorForDarkBackground}}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({onClick:()=>this.showCodeEditor=!1,css:{position:"absolute",top:0,right:0,zIndex:5,color:"rgba(255, 255, 255, 0.3)"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Close_default.a,{})})),Object(emotion_react_jsx_runtime_browser_esm.b)(AsyncContentCodeEditor,{css:{height:"90vh",maxWidth:"90vw",width:app_state_constant.appState.designerState.emailMode?"800px":"90vw"},editingModel:content||void 0})]})),Object(emotion_react_jsx_runtime_browser_esm.c)(Typography_default.a,Object.assign({css:{padding:"30px 10px 5px",position:"relative"}},{children:["Inputs",Object(emotion_react_jsx_runtime_browser_esm.b)(HelpButton.a,{link:"/c/docs/guides/symbols"})]})),Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsEditor.a,{activeModelId:modelInstance?.id||"",createButtonProps:{variant:"text",style:{margin:"10px auto"}},hideRequired:!0,fields:contentInputs,onFieldsChange:newValue=>{content&&content.get("data").set("inputs",newValue)}}),Object(emotion_react_jsx_runtime_browser_esm.c)(Typography_default.a,Object.assign({css:{padding:"30px 10px 5px",position:"relative"}},{children:["State",Object(emotion_react_jsx_runtime_browser_esm.b)(HelpButton.a,{link:"/c/docs/guides/state-and-actions"})]})),stateInputs&&!!stateInputs.length&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{paddingBottom:20}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,{fields:stateInputs,object:selectedElement.state})})),this.showStateInspector&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({className:"inspector dark-mode-v2-invert",css:{paddingBottom:10,"*":{backgroundColor:"transparent !important"}}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(react_inspector.a,{name:"state",data:Object(fast_clone_function.b)(selectedElement.state)})})),Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({onClick:()=>this.showStateInspector=!this.showStateInspector,size:"small",fullWidth:!0,css:{opacity:.5,fontSize:12,margin:"10px 0"}},{children:this.showStateInspector?"hide inspector":"show inspector"})),Object(emotion_react_jsx_runtime_browser_esm.c)(Button_default.a,Object.assign({css:{marginTop:30,marginBottom:10},fullWidth:!0,variant:"contained",color:"primary",onClick:()=>this.showCodeEditor=!this.showCodeEditor},{children:["Edit custom ",app_state_constant.appState.designerState.emailMode?"":"JS / ","CSS"]}))]}),Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({fullWidth:!0,css:{color:"var(--off-background-7)",marginTop:10},onClick:()=>this.showInlineSymbolOptions=!this.showInlineSymbolOptions},{children:this.showInlineSymbolOptions?"hide advanced":"show advanced"}))]}),(!!modelInstance||this.showGlobalContent)&&!inline&&!object.get("dynamic")&&(this.loadingContent?Object(emotion_react_jsx_runtime_browser_esm.b)(Loading.a,{size:20,css:{margin:"20px auto"}}):Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({style:{width:"100%",display:"block",marginTop:15}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("label",Object.assign({style:{color:theme_constant.a.colors.text.regular,opacity:.5,padding:0,fontSize:14,fontWeight:500}},{children:"Entry"})),Object(emotion_react_jsx_runtime_browser_esm.b)(VirtualizedSelect.a,{options:symbolOptions,value:this.searchText!==""?this.searchText:symbolOptions.find(el=>el.value===object.get("entry")),isSearchable:!0,css:{marginTop:7},menuDimensions:{width:"100%"},styles:{menu:()=>({width:"100%"})},components:{Option:OptionWithTooltip,DropdownIndicator:props=>Object(emotion_react_jsx_runtime_browser_esm.b)(ArrowDropDown_default.a,{css:{color:theme_constant.a.colors.iconColor}})},onChange:(newDropdown,action)=>{const value=newDropdown?.value;if(!value){object.delete("entry");return}if(object.get("entry")!==value){object.set("entry",value);const options2={};let instance=value&&this.content&&this.content.result.find(model2=>model2.id===value);if(this.showGlobalContent){instance=this.globalContent.find(globalContent=>globalContent.id===value);const globalSymbol=app_state_constant.appState.designerState.globalSymbols.result.find(symbol=>symbol.entry===value);globalSymbol&&object.set("model",globalSymbol.model)}let instanceInputs=instance&&instance.data&&instance.data.get("inputs");if(instanceInputs&&Array.isArray(instanceInputs))for(const field2 of instanceInputs)field2.defaultValue!==void 0&&(options2[field2.name]=Object(fast_clone_function.b)(field2.defaultValue));object.set("data",options2),object.set("ownerId",instance.ownerId||app_state_constant.appState.user.apiKey),object.set("global",this.isGlobalSymbol)}},getSearchValue:value=>{this.searchText=value}})]}))),!!modelInstance&&!inline&&!this.isGlobalSymbol&&!this.showGlobalContent&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({interactive:!0,placement:"right",title:Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:["Dynamically find a matching content entry based on"," ",Object(emotion_react_jsx_runtime_browser_esm.b)("a",Object.assign({rel:"noreferrer",href:"https://www.builder.io/c/docs/targeting",css:{color:theme_constant.a.colors.primaryLight}},{children:"targeting"})),"and",Object(emotion_react_jsx_runtime_browser_esm.b)("a",Object.assign({rel:"noreferrer",href:"https://www.builder.io/c/docs/scheduling",css:{color:theme_constant.a.colors.primaryLight}},{children:"scheduling"}))]})},{children:Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",alignItems:"center",marginTop:10}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",{children:"Dynamic"}),Object(emotion_react_jsx_runtime_browser_esm.b)(Switch_default.a,{required:field.required,color:"primary",css:{marginLeft:"auto"},checked:object.get("dynamic")||!1,onChange:Object(mobx_module.action)(event=>{const value=event.target.checked;object.set("dynamic",value),value&&this.resetSymbol()})})]}))})),!inline&&entry&&Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",flexDirection:"column",marginTop:25}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({variant:"outlined",color:"primary",target:"_blank",href:`/content/${entry}`,fullWidth:!0},{children:"Edit symbol"})),Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Detach this symbol so it can be edited locally, and is no longer connected to the original"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({color:"primary",css:{marginTop:10},onClick:async()=>{function fail(){app_state_constant.appState.dialogs.alert("If you believe this is an error, please contact support@builder.io","Could not convert to inline symbol :(")}const entry2=object.get("entry");if(!entry2)return fail();const item=await init_firebase.a.collection("content").doc(entry2).get().catch(fail);if(item){const data=Object(lodash.omit)(item.data(),"id");if(!(data&&data.data))return fail();data.data.blocksString&&(data.data.blocks=JSON.parse(data.data.blocksString),delete data.data.blocksString),data.data.hasLinks&&delete data.data.hasLinks,data.meta&&data.meta.hasLinks&&delete data.meta.hasLinks,delete data.screenshot,object.set("inline",!0),object.set("content",data),options.set("inheritState",!0)}},fullWidth:!0},{children:"Detach symbol"}))}))]})),!(meta?.get("hideExplanation")||meta?.get("hideDocumentationLink"))&&Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{marginTop:20,fontSize:13,color:"var(--text-light)",textAlign:"center"}},{children:[meta?.get("documentationNote")||"Symbols are a powerful way to make dynamic pages."," ",Object(emotion_react_jsx_runtime_browser_esm.b)("a",Object.assign({css:{color:theme_constant.a.colors.primary,fontWeight:"bold"},href:meta?.get("documentationLink")||"https://builder.io/c/docs/guides/symbols",target:"_blank"},{children:"Learn more"}))]}))]})):(Object(next_tick_function.a)(()=>{object.set("data",{})}),null)}};Object(tslib_es6.a)([mobx_module.observable],FieldsForm_SymbolEditor.prototype,"showInlineSymbolOptions",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_SymbolEditor.prototype,"showCodeEditor",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_SymbolEditor.prototype,"showStateInspector",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_SymbolEditor.prototype,"searchText",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_SymbolEditor.prototype,"showGlobalContent",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_SymbolEditor.prototype,"globalContent",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_SymbolEditor.prototype,"loadingGlobalContent",void 0),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_SymbolEditor.prototype,"showGlobalSymbolOption",null),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_SymbolEditor.prototype,"loadingContent",null),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_SymbolEditor.prototype,"dynamicInputs",null),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_SymbolEditor.prototype,"model",null),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_SymbolEditor.prototype,"isGlobalSymbol",null),FieldsForm_SymbolEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_SymbolEditor);let FieldsForm_ColorEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.showPickerDialog=!1,this.colorButtonRef=null}validate(value,required=!1){return!value&&required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:""}render(){const field=this.props.field,options=this.props.object,camelName=field.name;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(Popover_default.a,Object.assign({anchorEl:this.colorButtonRef||void 0,open:this.showPickerDialog,onClose:()=>this.showPickerDialog=!1,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{horizontal:"left",vertical:"center"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(ColorPicker.b,{value:options.get(camelName),onChange:color=>{options.set(camelName,color),this.props.onChange&&this.props.onChange(options)}})})),Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",justifyContent:"space-between",padding:5}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({className:"dark-mode-invert",ref:ref=>this.colorButtonRef=ref},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Paper_default.a,{elevation:1,css:{width:80,height:35,border:"2px solid white",cursor:"pointer",background:options.get(camelName)||"linear-gradient(154deg, #ffffff 0%,#ffffff 48%, #ff3030 50%,#ffffff 52%,#ffffff 100%)"},onClick:()=>{this.showPickerDialog=!this.showPickerDialog}})})),options.get(camelName)&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Clear"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({css:{padding:5,marginRight:5},disabled:!options.get(camelName),onClick:()=>options.delete(camelName)},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Close_default.a,{css:{fontSize:14,opacity:.5}})}))}))]}))]}),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};Object(tslib_es6.a)([mobx_module.observable],FieldsForm_ColorEditor.prototype,"showPickerDialog",void 0),FieldsForm_ColorEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_ColorEditor);let FieldsForm_BooleanEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(value,required=!1){return typeof value!="boolean"&&required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:""}render(){const field=this.props.field,options=this.props.object,camelName=field.name;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:Object.assign({marginBottom:field.isMapValue||field.isFilterView||field.isTargeting?0:25},this.props.styles)},{children:[Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",alignItems:"center"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{flexGrow:1}},{children:this.props.label})),Object(emotion_react_jsx_runtime_browser_esm.b)(Switch_default.a,{required:field.required,color:"primary",checked:options.get(camelName)||!1,onChange:Object(mobx_module.action)(event=>{const value=event.target.checked;this.errorMessage=this.validate(value,field.required),options.set(camelName,value),this.props.onChange&&this.props.onChange(options),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options])})})]})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText})),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption",css:{color:"var(--red)",padding:"10px 0"}},{children:this.errorMessage}))]}))}};FieldsForm_BooleanEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_BooleanEditor);let FieldsForm_ComponentEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.subFormRef=null}validate(value,required=!1){if(!value)return required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:"";const errors=this.subFormRef&&this.subFormRef.validate();return errors&&errors.length?errors.join(", "):""}componentDidMount(){const field=this.props.field,options=this.props.object,camelName=field.name,componentOptions=options.get(camelName)||Object(mobx_module.untracked)(()=>Object(mobx_module.observable)({component:null,options:mobx_module.observable.map()}));options.get(camelName)||options.set(camelName,componentOptions),typeof componentOptions.options.get!="function"&&Object(mobx_module.untracked)(()=>{componentOptions.options=mobx_module.observable.map(componentOptions.options)})}render(){const field=this.props.field,options=this.props.object,camelName=field.name,componentOptions=options.get(camelName)||Object(mobx_module.untracked)(()=>Object(mobx_module.observable)({component:null,options:mobx_module.observable.map()}));typeof componentOptions.options.get!="function"&&Object(mobx_module.untracked)(()=>{componentOptions.options=mobx_module.observable.map(componentOptions.options)});const selectedComponentName=componentOptions.component,component=selectedComponentName&&app_state_constant.appState.builderComponents.find(item=>item.name===selectedComponentName);return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,Object.assign({select:!0,label:"Block Type",type:field.type,error:!!this.errorMessage,css:{width:"100%",margin:"10px 0"},value:componentOptions.component||"",onChange:e=>{const value=e.target.value;componentOptions.component=value;const newComponent=value&&app_state_constant.appState.builderComponents.find(item=>item.name===value);if(newComponent){const newValue={};if(newComponent.inputs)for(const field2 of newComponent.inputs)field2.defaultValue!==void 0&&(newValue[field2.name]=field2.defaultValue);componentOptions.options=newValue}options.set(camelName,componentOptions),this.props.onChange&&this.props.onChange(options)}},{children:app_state_constant.appState.builderComponents.map(item=>Object(emotion_react_jsx_runtime_browser_esm.b)(MenuItem_default.a,Object.assign({value:item.name},{children:item.name}),item.name))})),component&&Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,{path:getPath(this.props.path,field.name,"options"),ref:ref=>this.subFormRef=ref,fields:component.inputs,object:componentOptions.options,onChange:data=>{Object(mobx_module.runInAction)(()=>{componentOptions.options=data,options.set(camelName,componentOptions),this.props.onChange&&this.props.onChange(options)})}}),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};FieldsForm_ComponentEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_ComponentEditor);const FieldsForm_ListItem=Object(mobxreact_esm.observer)(props=>{const{provided,snapshot,isComponentEditor,index,expandedIndex,expandedIndexChanged,formRefs,onChange,schema,itemOptions,observableData,itemName,options,camelName,path,field,summary,simple}=props;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({ref:provided.innerRef},provided.draggableProps,{css:{paddingBottom:10}},{children:Object(emotion_react_jsx_runtime_browser_esm.c)(ExpansionPanel_default.a,Object.assign({css:{overflow:"visible"},expanded:isComponentEditor?!1:expandedIndex===index,onChange:()=>{expandedIndex===index?expandedIndexChanged(null):(expandedIndexChanged(index),setTimeout(()=>{dispatchEvent(new CustomEvent("resize",{detail:{synthetic:!0}}))},300))}},{children:[Object(emotion_react_jsx_runtime_browser_esm.c)(ExpansionPanelSummary_default.a,Object.assign({style:{alignItems:"center",cursor:isComponentEditor?"default":void 0},expandIcon:!isComponentEditor&&Object(emotion_react_jsx_runtime_browser_esm.b)(ExpandMore_default.a,{})},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{display:"flex",":active":{cursor:"grabbing"}}},provided.dragHandleProps,{children:Object(emotion_react_jsx_runtime_browser_esm.b)(DragHandle_default.a,{style:{alignSelf:"center",margin:"0 10px 0 -5px",opacity:.3,display:props.disableReorder?"none":void 0}})})),Object(emotion_react_jsx_runtime_browser_esm.b)(ListItemText_default.a,{primary:Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({css:{fontsize:12,color:formRefs[index]!=null&&formRefs[index].isValid===!1?"var(--red)":void 0}},{children:itemName})),secondary:summary})]})),Object(emotion_react_jsx_runtime_browser_esm.b)(ExpansionPanelDetails_default.a,Object.assign({css:{backgroundColor:"var(--off-background)",flexDirection:"column",overflow:"visible"}},{children:!isComponentEditor&&Object(emotion_react_jsx_runtime_browser_esm.c)(react.Fragment,{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,{simple,ref:ref=>formRefs[index]=ref,path:getPath(path,String(index)),fields:schema,object:itemOptions}),Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{display:"flex"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({css:{margin:"auto",color:"var(--text-caption)",marginTop:10},onClick:()=>{observableData.splice(index,1),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options])}},{children:"Delete"}))}))]})}))]}),index)}),index),provided.placeholder]})}),DraggableListItems=Object(mobxreact_esm.observer)(props=>{const{provided,snapshot,isComponentEditor,expandedIndex,expandedIndexChanged,formRefs,onChange,schema,observableData,humanName,options,camelName,path,field,simple,summaryKeys}=props,stringKeys=summaryKeys||schema.filter(input=>["string","text"].includes(input.type)).map(input=>input.name),blockKeys=schema.filter(input=>["uiBlocks","array"].includes(input.type)).map(input=>input.name);return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({ref:provided.innerRef},{children:[!!(observableData&&Array.isArray(observableData))&&observableData.map((data,index)=>{const itemOptions=data,itemName=isComponentEditor?data.component&&(data.component.component||data.component.name)||"Box":props.nameField&&data.get&&data.get(props.nameField)||`${pluralize_default()(humanName,1)} ${index+1}`,value=data.toJSON();let summary=stringKeys?Object.values(extractLocalizedText(Object(lodash.pick)(value,stringKeys))).join(" - ").slice(0,40):"";return summary.length===40&&(summary+="..."),traverse_default()(Object.values(extractLocalizedText(Object(lodash.pick)(value,blockKeys)))).forEach(function(obj){var _a2;let text=(_a2=obj?.component)===null||_a2===void 0?void 0:_a2.options.text;summary.length>50&&this.stop(),typeof text=="string"&&(text=text.replace(/(<([^>]+)>)/gi,""),text&&(summary+=` ${text.slice(0,Math.min(50-summary.length,25))}...`))}),Object(emotion_react_jsx_runtime_browser_esm.b)(react_beautiful_dnd_esm.b,Object.assign({draggableId:String(index)},{index},{children:(provided2,snapshot2)=>Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ListItem,{simple,field,disableReorder:props.disableReorder,provided:provided2,snapshot:snapshot2,isComponentEditor,index,expandedIndex,expandedIndexChanged,formRefs,onChange,schema,itemOptions,observableData,itemName,summary,options,camelName,path},index)}),index)}),provided.placeholder]}))});let FieldsForm_ListEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.expandedIndex=null,this.formRefs=[],this.onDragEnd=info=>{this.expandedIndex=null;const field=this.props.field,options=this.props.object,camelName=field.name,endIndex=info.destination&&info.destination.index;if(endIndex==null)return;const startIndex=info.source.index,data=Object(fast_clone_function.b)(options.get(camelName)||[]),[removed]=data.splice(startIndex,1);data.splice(endIndex,0,removed),options.set(camelName,data),this.props.onChange&&this.props.onChange(options)}}validate(value=this.props.object.get(this.props.field.name),required=!1){if(!value)return required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:"";if(value?.length===0&&required)return`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} needs to have at least one element`;let errors=[];return this.formRefs.forEach(item=>{if(item){const itemErrors=item.validate();itemErrors&&itemErrors.length&&(errors=errors.concat(itemErrors))}}),errors.join(", ")}render(){const field=this.props.field,options=this.props.object,camelName=field.name,humanName=field.friendlyName||Object(human_case_function.a)(field.name);let observableData=options.get(camelName);const schema=field.type==="uiBlocks"?[{name:"component",type:"component"}]:field.subFields,isComponentEditor=field.type==="uiBlocks"||schema?.length===1&&schema[0].type==="component",expandedIndex=this.expandedIndex;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{marginTop:observableData?.length?0:-10,marginLeft:-20,marginRight:-20,padding:"10px 20px"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(react_beautiful_dnd_esm.a,Object.assign({onDragEnd:this.onDragEnd},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(react_beautiful_dnd_esm.c,Object.assign({droppableId:"droppable"},{children:(provided,snapshot)=>Object(emotion_react_jsx_runtime_browser_esm.b)(DraggableListItems,{simple:this.props.simple,field,summaryKeys:this.props.summaryKeys||field.summaryKeys,nameField:this.props.nameField||field.nameField,humanName,disableReorder:this.props.disableReorder,provided,snapshot,isComponentEditor,expandedIndex,expandedIndexChanged:expandedIndex2=>{this.expandedIndex=expandedIndex2},formRefs:this.formRefs,onChange:this.props.onChange,schema,observableData,options,camelName,path:this.props.path})}))})),!isComponentEditor&&Object(emotion_react_jsx_runtime_browser_esm.c)(Button_default.a,Object.assign({"data-fields-form-id":`builder-fields-form-${isComponentEditor?"Block":pluralize_default()(humanName,1)}`.toLowerCase(),css:{margin:"10px 0"},color:"primary",variant:this.props.addButtonVariant||field.addButtonVariant||"contained",onClick:()=>{const{walkthroughState,setWalkthroughState}=this.context;walkthroughState.tourActive&&walkthroughState.currentStepId==="build-with-cms"&&setWalkthroughState({stepIndex:3,run:!0,continuous:!0});let newValue={};const value=options.get(camelName);if(field.copyOnAdd!==!1&&value&&value.length){const last=value[value.length-1];newValue=Object(fast_clone_function.b)(last),traverse_default()(newValue).forEach(value2=>{value2&&typeof value2=="object"&&value2["@type"]==="@builder.io/sdk:Element"&&delete value2.id})}else for(const field2 of schema)field2.defaultValue!==void 0&&(newValue[field2.name]=Object(fast_clone_function.b)(field2.defaultValue));observableData?observableData.push(newValue):observableData=[newValue],options.set(camelName,observableData),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]),this.props.onChange&&this.props.onChange(options)}},{children:["+ ",isComponentEditor?"Block":pluralize_default()(humanName,1)]}))]})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};FieldsForm_ListEditor.contextType=WalkthroughStateContext.b,Object(tslib_es6.a)([mobx_module.observable],FieldsForm_ListEditor.prototype,"expandedIndex",void 0),FieldsForm_ListEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_ListEditor);let FieldsForm_FileEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.uploading=!1,this.imageLoading=!1,this.showFilePicker=!1,this.fileMimeType=void 0,this.allMedia=!1,this.uploadFile=async file=>{if(!file)return;const field=this.props.field;if(this.errorMessage="",file.size>1e8&&!app_state_constant.appState.user.isBuilderAdmin){const size=Math.round(file.size/1e5)/10;this.errorMessage=`This file (${size}mb) is too large, please upload a file smaller than 100mb`,file.type.includes("video")&&(this.errorMessage+='. Alternatively, you can use YouTube or Vimeo with the "embed" block type for large videos');return}let fileType=Object(lodash.last)(file.type.split("/")).split("+")[0];if(fileType==="quicktime"&&(fileType="mov"),field.allowedFileTypes&&fileType&&!field.allowedFileTypes.includes(fileType)){this.errorMessage=`This filetype (${fileType}) is not supported, please upload a supported file type: ${field.allowedFileTypes.join(", ")}`;return}const isVideo=fileType==="mp4"||fileType==="mov";if(field.imageHeight||field.imageWidth){const{height,width}=await new Promise((resolve,reject)=>{const fileReader=new FileReader;fileReader.onload=()=>{const img=new Image;img.onload=()=>{resolve({height:img.height,width:img.width})},img.src=fileReader.result},fileReader.readAsDataURL(file)});let error=!1;if(field.imageHeight&&field.imageHeight!==height&&(error=!0),field.imageWidth&&field.imageWidth!==width&&(error=!0),error){this.errorMessage=`You must upload a file of dimensions ${field.imageHeight} by ${field.imageWidth} pixels but your image is ${height} by ${width} pixels`;return}}if(field.mediaHeight||field.mediaWidth){const{height,width}=await new Promise((resolve,reject)=>{const fileReader=new FileReader;fileReader.onload=()=>{const video=document.createElement("video");video.onload=()=>{resolve({height:video.height,width:video.width})},video.src=fileReader.result},fileReader.readAsDataURL(file)});let error=!1;if(field.mediaHeight&&field.mediaHeight!==height&&(error=!0),field.mediaWidth&&field.mediaWidth!==width&&(error=!0),error){this.errorMessage=`You must upload a file of dimensions ${field.imageHeight} by ${field.imageWidth} pixels but your media is ${height} by ${width} pixels`;return}}if(field.maxFileSize&&file.size>field.maxFileSize*1e3){this.errorMessage=`This file is too large. Your file must be below ${field.maxFileSize}kb but it is ${file.size/1e3}kb`;return}if(field.maxMediaDuration){const{duration}=await new Promise((resolve,reject)=>{const fileReader=new FileReader;fileReader.onload=()=>{const video=document.createElement("video");video.onload=()=>{resolve({duration:video.duration})},video.src=fileReader.result},fileReader.readAsDataURL(file)});let error=!1;if(field.maxMediaDuration&&duration>field.maxMediaDuration&&(error=!0),error){this.errorMessage=`Your video must be less than ${field.maxMediaDuration} seconds but this + video is ${duration} seconds`;return}}let url;try{this.uploading=!0,url=await Object(upload_asset_function.b)({file}),this.props.field.successMessage&&app_state_constant.appState.snackBar.display({message:this.props.field.successMessage})}catch(error){this.errorMessage=String(error),this.uploading=!1}if(this.imageLoading=!0,url){const options=this.props.object,camelName=this.props.field.name;this.errorMessage=this.validate(url,field.required),options.set(camelName,url),this.props.onChange&&this.props.onChange(options),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]);const isImage=file.type.startsWith("image")&&!file.type.includes("svg+xml");isVideo||isImage&&await Object(load_image_function.a)(url),this.uploading=!1}}}componentDidMount(){this.interpretFileProperties()}async interpretFileProperties(){const field=this.props.field,options=this.props.object,camelName=field.name,fileUrl=options.get(camelName);if(!fileUrl){this.fileMimeType=void 0;return}if(this.isDataUri(fileUrl)){this.fileMimeType=void 0;return}fetch(fileUrl,{method:"HEAD"}).then(response=>{if(!response.ok)throw new Error(response.statusText);return response.headers}).then(responseHeaders=>{this.fileMimeType=responseHeaders.get("content-type")||void 0}).catch(error=>{console.warn(`Could not read file properties from passed url ${fileUrl}!`,error),this.fileMimeType=void 0})}validate(string,required=!1){return string?"":required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:""}isDataUri(value){return!!value?.startsWith("data:")}isPdfFile(){return this.fileMimeType==="application/pdf"}isImageFile(){return!!(this.fileMimeType&&(this.fileMimeType.indexOf("image")!==-1||this.fileMimeType.indexOf("svg")!==-1))}render(){var _a2,_b2;const field=this.props.field,options=this.props.object,camelName=field.name;let value=options.get(camelName);value&&typeof value!="string"&&(value="");const isVideo=value&&value.includes(".mp4")||field&&((_a2=field.allowedFileTypes)===null||_a2===void 0?void 0:_a2.length)===1&&field.allowedFileTypes[0]==="mp4";let isImage=!!["jpg","jpeg","svg","gif","png","webp"].find(type=>!!(field.allowedFileTypes&&field.allowedFileTypes.includes(type)));isImage&&(isImage=!["mov","ogg","webm","pdf","mp4","all"].some(type=>!!(field.allowedFileTypes&&field.allowedFileTypes.includes(type))));const isDataUri=this.isDataUri(value),showPhotoVideoChooseButton=(isImage||isVideo)&&!field.noPhotoPicker,disable=!isImage&&!app_state_constant.appState.user.isSignedIn;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({className:"preview"},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(Dialog_default.a,Object.assign({open:this.uploading},{children:Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{padding:30,textAlign:"center"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({css:{fontSize:18,opacity:.7},variant:"body1"},{children:"Uploading and optimizing your file..."})),Object(emotion_react_jsx_runtime_browser_esm.b)(Loading.a,{css:{margin:"20px auto 0"}})]}))})),!(!((_b2=field.options)===null||_b2===void 0)&&_b2.get("hideLabel"))&&this.props.label,(this.uploading||value&&!isVideo&&isImage&&this.imageLoading&&!isDataUri)&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",{children:Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{padding:50}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Loading.a,{})}))}),Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",alignItems:"center","&:hover .close-button":{display:"flex"}}},{children:[value&&(isDataUri||!(isImage||isVideo)||!(!isVideo&&this.uploading))&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Preview"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{padding:isImage&&this.imageLoading?0:"10px 0",height:isImage&&this.imageLoading?0:"auto",cursor:"pointer","&:hover":{backgroundColor:this.isImageFile()?theme_constant.a.isDarkMode?theme_constant.a.swatches.black[500]:theme_constant.a.swatches.black[10]:void 0}},onClick:()=>window.open(value,"_blank")},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Paper_default.a,Object.assign({css:{display:"inline-block",fontSize:0,marginTop:3,overflow:"hidden"}},{children:isVideo?Object(emotion_react_jsx_runtime_browser_esm.b)("video",{muted:!0,src:value,css:{width:65,height:45,objectFit:"cover",objectPosition:"center"}}):this.isImageFile()?Object(emotion_react_jsx_runtime_browser_esm.b)("img",{onContextMenu:e=>{e.stopPropagation()},onLoad:()=>this.imageLoading=!1,css:{width:65,height:45,objectFit:"cover",objectPosition:"center"},src:value&&(isDataUri||value.includes("?")?value:value+"?quality=60&width=200&height=200"),onError:error=>{var _a3,_b3;if(!(!((_a3=error.target.src)===null||_a3===void 0)&&_a3.includes("format=webp"))&&(!((_b3=error.target.src)===null||_b3===void 0)&&_b3.includes("cdn.builder.io"))){const useValue=value.includes("?")?value:`${value}?`;error.target.src=useValue+"&format=webp"}}},value):Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{padding:20,"&:hover":{backgroundColor:theme_constant.a.isDarkMode?theme_constant.a.swatches.black[500]:theme_constant.a.swatches.black[10]}}},{children:value?Object(emotion_react_jsx_runtime_browser_esm.b)(IconFileCheck,{}):Object(emotion_react_jsx_runtime_browser_esm.b)(CloudDone_default.a,{})}))}))}))})),value&&!field.disallowRemove&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:`Remove ${showPhotoVideoChooseButton?isVideo?"video":"photo":"file"}`},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({className:"close-button",css:{marginLeft:-14,marginTop:-64,height:25,width:25,backgroundColor:`${theme_constant.a.isDarkMode?theme_constant.a.swatches.black[400]:theme_constant.a.swatches.black[100]} !important`,"&:hover":{backgroundColor:`${theme_constant.a.isDarkMode?theme_constant.a.swatches.black[900]:theme_constant.a.swatches.black[200]} !important`}},component:"label",onClick:()=>{options.delete(camelName),this.props.onChange&&this.props.onChange(options)}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Close_default.a,{css:{fontSize:14}})}))})),Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Sign up to upload files",open:disable?void 0:!1},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{display:"flex",padding:"10px 0"}},{children:showPhotoVideoChooseButton?Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({disabled:disable,color:"primary",onClick:()=>{this.showFilePicker=!0},style:{marginLeft:value&&7},css:{padding:"0 5px"}},{children:`Choose ${value?"Different":""} ${isVideo?"video":"photo"}`})):Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({disabled:disable,color:"primary",onClick:()=>{this.allMedia=!0,this.showFilePicker=!0},style:{marginLeft:value&&7},css:{padding:"0 5px"}},{children:value?"Choose Different File":"Choose File"}))}))}))]})),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption",css:{color:"var(--red)",padding:"10px 0"}},{children:this.errorMessage})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText})),Object(emotion_react_jsx_runtime_browser_esm.b)(Dialog_default.a,Object.assign({PaperProps:{style:{maxWidth:"100vw",maxHeight:"100vh"}},open:this.showFilePicker,onClose:()=>this.showFilePicker=!1},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(AssetPicker.a,{css:{width:"90vw",height:"90vh",minWidth:200,minHeight:400},allMedia:this.allMedia,allowedFileTypes:this.props.field.allowedFileTypes,video:isVideo,onChange:async url=>{this.showFilePicker=!1;const options2=this.props.object,camelName2=this.props.field.name;options2.set(camelName2,url),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options:options2},[options2]),this.errorMessage=this.validate(url,field.required),this.props.onChange&&this.props.onChange(options2),this.interpretFileProperties()},showCloseButton:!0,onClose:()=>this.showFilePicker=!1})}))]}))}};Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FileEditor.prototype,"uploading",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FileEditor.prototype,"imageLoading",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FileEditor.prototype,"showFilePicker",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FileEditor.prototype,"fileMimeType",void 0),FieldsForm_FileEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_FileEditor);let FieldsForm_DateEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.focused=!1,this.value=this.props.object.get(this.props.field.name)}validate(date,required=!1){return date?"":required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:""}get utcOffset(){return new Date().getTimezoneOffset()/60}get timezoneString(){return Intl.DateTimeFormat().resolvedOptions().timeZone}get momentDate(){const value=this.props.object.get(this.props.field.name);return value?moment_default()(value):void 0}render(){const field=this.props.field,options=this.props.object,camelName=field.name;let date=this.value&&new Date(this.value)||null;return date&&!isValidDate(date)&&(console.warn("Invalid date detected",this.value),date=null),Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:emotion_react_browser_esm.css` + & .field-date-chooser { + padding: 10px; + font-size: 12px; + border-radius: 4px; + border: 1px solid var(--control-border-color); + height: 40px; + } + `},{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)("div",{children:Object(emotion_react_jsx_runtime_browser_esm.b)(react_datepicker_min_default.a,Object.assign({className:"field-date-chooser",selected:date,showTimeSelect:!0,todayButton:" ",dateFormat:"Pp",timeIntervals:60,onChange:change=>{let value;this.value=change,change instanceof Date?value=this.props.timestamp?change.getTime():String(change):value=null,this.errorMessage=this.validate(value,field.required),options.set(camelName,value),this.props.onChange&&this.props.onChange(options)}},{children:Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{textAlign:"center",opacity:.5,paddingBottom:20}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{paddingBottom:5}},{children:"Times are in your local time"})),Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:["(",this.timezoneString,")"]})," "]}))}))}),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption",css:{color:"var(--red)",padding:"10px 0"}},{children:this.errorMessage})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({css:{padding:"10px 0"},variant:"caption"},{children:field.helperText}))]}))}};Object(tslib_es6.a)([mobx_module.observable],FieldsForm_DateEditor.prototype,"focused",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_DateEditor.prototype,"value",void 0),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_DateEditor.prototype,"momentDate",null),FieldsForm_DateEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_DateEditor);let FieldsForm_IntegrationFieldEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(string,required=!1){return string?"":required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:""}render(){const field=this.props.field,customField=customFields.find(item=>item.id===field.type),options=this.props.object,camelName=customField&&customField.name||field.name;return Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,{error:!!this.errorMessage,required:field.required,css:{width:"100%",margin:"20px 0"},label:customField&&customField.inputLabel||field.friendlyName||Object(human_case_function.a)(field.name),helperText:this.errorMessage||field.helperText,value:options.get(camelName)||"",onChange:e=>{const value=e.target.value;this.errorMessage=this.validate(value,field.required),options.set(camelName,value),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options]),this.props.onChange&&this.props.onChange(options)}})}};FieldsForm_IntegrationFieldEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_IntegrationFieldEditor);function convertTag(tag,newTagName){const newTag=document.createElement(newTagName);return newTag.innerHTML=tag.innerHTML,[...tag.attributes].forEach(attribute=>newTag.setAttribute(attribute.nodeName,attribute.nodeValue||"")),tag.parentNode?tag.parentNode.replaceChild(newTag,tag):console.error("Expected tag to have parent node but its parent is unavailable!",tag),newTag}let FieldsForm_HtmlEditor=class extends FieldEditor_FieldEditor{constructor(props){super(props),this.errorMessage="",this.expanded=!1,this.editFullScreen=!1,this.focused=!1,this.showQuillColorEditor=null,this.currentTextColor="",this.editAsCode=this.editAsCodeDefaultValue||!1,this.reactQuillRef=null,this.rootRef=null,this.rootRefFn=ref=>{this.rootRef=ref},this.quillRefFn=ref=>{var _a2,_b2,_c2;if(this.reactQuillRef=ref,this.reactQuillRef){const quill=this.reactQuillRef.getEditor();(_a2=quill.getModule("toolbar"))===null||_a2===void 0||_a2.addHandler("image",async()=>{const range=quill.getSelection(),close=app_state_constant.appState.globalState.openDialog(Object(emotion_react_jsx_runtime_browser_esm.b)(AssetPicker.a,{css:{width:"90vw",height:"90vh",minWidth:300,minHeight:400},onChange:async url=>{quill.insertEmbed(range.index,"image",url),close()},showCloseButton:!0,onClose:()=>close()}))}),(_b2=quill.getModule("toolbar"))===null||_b2===void 0||_b2.addHandler("color",async value=>{var _a3;if(value==="custom-color"){this.currentTextColor=(_a3=this.reactQuillRef)===null||_a3===void 0?void 0:_a3.getEditor().getFormat().color,this.showQuillColorEditor="color";return}quill.format("color",value,"user")}),(_c2=quill.getModule("toolbar"))===null||_c2===void 0||_c2.addHandler("background",async value=>{var _a3;if(value==="custom-color"){this.currentTextColor=(_a3=this.reactQuillRef)===null||_a3===void 0?void 0:_a3.getEditor().getFormat().background,this.showQuillColorEditor="background";return}quill.format("background",value,"user")}),quill.clipboard.addMatcher(Node.ELEMENT_NODE,function(node,delta){return delta.forEach(e=>{e.attributes&&(e.attributes.color="",e.attributes.background="",e.attributes.font="")}),delta});const Delta=lib.Quill.import("delta"),replaceSearch=/[?&]activeDesignerTab=[0-9]+|[?&]selectedBlock=builder-[a-f0-9]+/g;if(quill.clipboard.addMatcher("a",(node,delta)=>{const{location:location2}=window;if(node.origin===location2.origin){const url=[node.origin===location2.origin?"":node.origin,node.pathname===location2.pathname?"":node.pathname,node.search===location2.search?"":node.search.replace(replaceSearch,""),node.hash===location2.hash?"":node.hash].join("");return delta.compose(new Delta().retain(delta.length(),{link:url}))}return delta}),this.reactQuillRef&&this.props.field.simpleTextOnly){const keyboard=quill.keyboard;keyboard.bindings[13]&&delete keyboard.bindings[13]}}},app_state_constant.appState.designerState.showFullScreenTextEditor.subscribe(()=>{this.editFullScreen=!0})}get editAsCodeDefaultValue(){return this.props.field.richText!==!0&&(this.props.field.name==="code"||this.props.field.code)}validate(value,required=!1){return validateTextField(this.props.field,value,required)}focus(){this.reactQuillRef&&this.reactQuillRef.getEditor().focus()}selectAllRange(){if(this.reactQuillRef){const editor=this.reactQuillRef.getEditor(),length=editor.getText().length;editor.setSelection(0,length)}}get htmlValue(){const value=this.options.get(this.camelName);if(!(app_state_constant.appState.user.organization&&app_state_constant.appState.user.organization.value.useHTags===!1))return value||"";if(!value)return"";if(!value.trim())return value;const tempDiv=document.createElement("div");return tempDiv.innerHTML=value,tempDiv.querySelectorAll("br").forEach(brElement=>{var _a2;return(_a2=brElement.parentNode)===null||_a2===void 0?void 0:_a2.removeChild(brElement)}),tempDiv.querySelectorAll([".builder-pargraph",".builder-heading-1",".builder-heading-2",".builder-heading-3",".builder-heading-4",".builder-heading-5",".builder-heading-6"].join(",")).forEach(el=>{if(el.classList.contains("builder-paragraph"))el.classList.remove("builder-paragraph"),el=convertTag(el,"p");else for(const i of[1,2,3,4,5,6]){const className=`builder-heading-${i}`;if(el.classList.contains(className)){el.classList.remove(className),el=convertTag(el,`h${i}`);break}}}),tempDiv.innerHTML}get options(){return this.props.object}get camelName(){return this.props.field.name}modifyHtml(value){if(!(app_state_constant.appState.user.organization&&app_state_constant.appState.user.organization.value.useHTags===!1))return value;const tempDiv=document.createElement("div");return tempDiv.innerHTML=value,tempDiv.querySelectorAll("h1,h2,h3,h4,h5,h6,p").forEach(el=>{const{tagName}=el;el=convertTag(el,"span"),el.setAttribute("style","display: block;");const num=parseInt(tagName[1],10);num?el.classList.add(`builder-heading-${num}`):el.classList.add("builder-paragraph")}),tempDiv.innerHTML}componentDidMount(){var _a2;this.props.field.autoFocus&&!app_state_constant.appState.localConfig.inlineTextEditing&&(!((_a2=this.rootRef)===null||_a2===void 0)&&_a2.closest(".options-tab")||setTimeout(()=>this.selectAllRange(),0)),this.safeReaction(()=>app_state_constant.appState.designerState.selectedElements.map(el=>el.id).join(","),()=>{var _a3;const editor=(_a3=this.reactQuillRef)===null||_a3===void 0?void 0:_a3.getEditor();editor&&editor.blur()}),this.safeReaction(()=>this.editAsCode,async editAsCode=>{if(editAsCode){const[{format},htmlParser]=await Promise.all([Promise.resolve().then(__webpack_require__.t.bind(null,2127,7)),Promise.resolve().then(__webpack_require__.t.bind(null,2835,7))]);this.options.set(this.camelName,format(this.options.get(this.camelName),{parser:"html",plugins:[htmlParser]}))}})}get quillToolbar(){var _a2,_b2,_c2,_d2,_e2,_f2,_g,_h,_j,_k,_l;const onlyAllowSwatches=(_d2=(_c2=(_b2=(_a2=app_state_constant.appState===null||app_state_constant.appState===void 0?void 0:app_state_constant.appState.user)===null||_a2===void 0?void 0:_a2.organization)===null||_b2===void 0?void 0:_b2.value)===null||_c2===void 0?void 0:_c2.settings)===null||_d2===void 0?void 0:_d2.onlyAllowSwatchColors,basicColors=((_h=(_g=(_f2=(_e2=app_state_constant.appState===null||app_state_constant.appState===void 0?void 0:app_state_constant.appState.user)===null||_e2===void 0?void 0:_e2.organization)===null||_f2===void 0?void 0:_f2.value)===null||_g===void 0?void 0:_g.settings)===null||_h===void 0?void 0:_h.swatchColors)||["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"];return this.props.field.simpleTextOnly?!1:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{color:basicColors.concat(onlyAllowSwatches?[]:["custom-color"])},{background:basicColors.concat(onlyAllowSwatches?[]:["custom-color"])}],["code"],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],...!((_j=app_state_constant.appState===null||app_state_constant.appState===void 0?void 0:app_state_constant.appState.user)===null||_j===void 0)&&_j.isOrganization("shopstyle")?[[{align:[]}]]:[["link"]],...!((_l=(_k=app_state_constant.appState===null||app_state_constant.appState===void 0?void 0:app_state_constant.appState.user)===null||_k===void 0?void 0:_k.organization)===null||_l===void 0)&&_l.value.settings.allowImagesInRichText?[["image"]]:[],["clean"]]}sanitizeValue(value){return sanitize_html_default()(value)}throttledTriggerChange(newValue){this.triggerChange(newValue)}triggerChange(newValue){this.focused=!0;const finalValue=this.modifyHtml(newValue),options=this.options;options.set(this.camelName,finalValue),this.props.field.onChange&&Object(safe_evaluate_function.a)(this.props.field.onChange,{options},[options]),this.props.onChange&&this.props.onChange(this.options)}getCodeEditor(){const monacoOptions={lineNumbers:"off",minimap:{enabled:!1},folding:!1,automaticLayout:!0,renderLineHighlight:"none",scrollbar:{horizontal:"hidden",vertical:"hidden"}};return Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({className:"dark-mode-invert",css:{height:300,minHeight:"100%",backgroundColor:"#1e1d1d",border:app_state_constant.appState.theme.isDarkMode?app_state_constant.appState.theme.colors.darkModeInvertedBorder:"var(--border)",padding:"10px 0",borderRadius:4,overflow:"hidden"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_AsyncMonacoEditor,{theme:"vs-dark",language:"html",value:this.options.get(this.camelName),options:monacoOptions,onChange:value=>{this.options.set(this.camelName,value),this.props.onChange&&this.props.onChange(this.options)}})}))}getEditor(props={}){if(this.editAsCode)return Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[this.editAsCode&&!this.editAsCodeDefaultValue&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tip.a,{hideTipText:!0,message:Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("b",{children:"Warning:"})," code edits here might get erased next time someone edits this as rich text again.",Object(emotion_react_jsx_runtime_browser_esm.b)("br",{}),Object(emotion_react_jsx_runtime_browser_esm.b)("br",{}),"Be sure to only edit code that is supported by"," ",Object(emotion_react_jsx_runtime_browser_esm.b)(TextLink.a,Object.assign({target:"_blank",href:"https://quilljs.com/",rel:"noopenner noreferrer"},{children:"Quill"})),", or consider using a"," ",app_state_constant.appState.editor.selection.find(item=>item.component&&item.component.name==="Text")?Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(TextLink.a,Object.assign({target:"_blank",href:"https://www.builder.io/c/docs/block-types#code"},{children:"Custom Code block"}))," ","or a"," "]}):Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[Object(emotion_react_jsx_runtime_browser_esm.c)(TextLink.a,Object.assign({href:"https://www.builder.io/c/docs/custom-fields",target:"_blank"},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("b",{children:"code"})," field type"]}))," ","or a"," "]}),Object(emotion_react_jsx_runtime_browser_esm.b)(TextLink.a,Object.assign({target:"_blank",href:"https://www.builder.io/c/docs/plugins-creating-custom-types"},{children:"custom rich text editor"}))," ","instead"]})}),this.getCodeEditor()]});const customCss=sizes.map(item=>` + .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="${item}"]::before { + content: '${item.replace("px","")}' !important; + } + .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="${item}"]::before { + content: '${item.replace("px","")}' !important; + }`).join(` +`);return this.focused?props.defaultValue=this.htmlValue:props.value=this.htmlValue,Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({ref:this.rootRefFn,className:"quill-container",css:{background:"var(--background)"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("style",{children:` + .ql-snow a { + color: var(--primary-color); + } + .ql-snow .ql-picker.ql-size .ql-picker-label::before, .ql-snow .ql-picker.ql-size .ql-picker-item::before { + content: 'Size'; + } + .ql-tooltip { + left: 0!important; + } + + .ql-snow .ql-picker.ql-size .ql-picker-options { + max-height: 180px; + overflow: auto; + } + + .ql-toolbar.ql-snow .ql-formats { + margin-right: 0; + border-bottom: var(--border); + display: flex; + flex-grow: 1; + padding-top: 2px; + padding-bottom: 2px; + position: relative; + justify-content: space-evenly; + } + + .ql-toolbar.ql-snow .ql-formats::after { + width: 1px; + height: 80%; + background: var(--border-color); + position: absolute; + top: 10%; + right: -1px; + } + + .ql-toolbar.ql-snow .ql-formats:last-of-type::after { + width: 0; + background: transparent; + } + + .ql-snow .ql-formats .ql-clean { + position: relative; + width: 100px; + } + + .ql-snow .ql-formats .ql-clean::after { + content: 'Clear Format'; + font-size: 11px; + } + + .ql-snow .ql-picker.ql-size { + width: 55px !important; + } + + .ql-snow.ql-toolbar { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + padding: 0; + display: flex; + flex-wrap: wrap; + border-bottom: 0; + } + + .ql-snow.ql-container { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + } + + ${["color","background"].map(property=>`.ql-${property} .ql-picker-options [data-value=custom-color] { + background: none !important; + width: 100% !important; + height: 20px !important; + text-align: center; + } + .ql-${property} .ql-picker-options [data-value=custom-color]:before { + content: 'Custom Color'; + } + .ql-${property} .ql-picker-options [data-value=custom-color]:hover { + border-color: transparent !important; + }`).join(" ")} + + .ql-background .ql-picker-options [data-value=custom-color] { + background: none !important; + width: 100% !important; + height: 20px !important; + text-align: center; + } + .ql-background .ql-picker-options [data-value=custom-color]:before { + content: 'Custom Color'; + } + .ql-background .ql-picker-options [data-value=custom-color]:hover { + border-color: transparent !important; + } + + ${this.props.field.simpleTextOnly?"":`.ql-snow .ql-editor { + min-height: 100px; + }`} + `+customCss}),Object(emotion_react_jsx_runtime_browser_esm.b)(lib_default.a,Object.assign({},props,{onKeyDown:e=>{var _a2;(e.metaKey||e.ctrlKey)&&e.key==="k"&&(!((_a2=window.getSelection())===null||_a2===void 0)&&_a2.toString().length?e.stopPropagation():setTimeout(()=>{app_state_constant.appState.globalState.showQuickActions=!0}))},onFocus:()=>this.focused=!0,onBlur:()=>this.focused=!1,ref:this.quillRefFn,modules:{toolbar:this.quillToolbar,imageResize:{},imageDrop:!0,clipboard:{matchVisual:!1,matchSpacing:!1}},onChange:(text,delta,source,editor)=>{const isImageUpload=source==="api"&&(delta?.ops||[]).find(d=>d.insert&&d.insert.image);(source==="user"||isImageUpload)&&this.throttledTriggerChange(text)}})),Object(emotion_react_jsx_runtime_browser_esm.b)(Popover_default.a,Object.assign({anchorEl:()=>document.getElementsByClassName(`ql-${this.showQuillColorEditor} ql-color-picker`)[0],open:!!this.showQuillColorEditor,onClose:()=>this.showQuillColorEditor=null,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{horizontal:"right",vertical:"top"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({className:"dark-mode-invert dark-mode-invert-color-picker"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(ColorPicker.b,{value:this.currentTextColor,onChange:color=>{var _a2;this.showQuillColorEditor&&(this.currentTextColor=color,(_a2=this.reactQuillRef)===null||_a2===void 0||_a2.getEditor().format(this.showQuillColorEditor,color,"user"))}})}))})),!this.editFullScreen&&app_state_constant.appState.designerState.supportsInlineEditing&&!!app_state_constant.appState.editor.selection.length&&Object(emotion_react_jsx_runtime_browser_esm.b)(List_default.a,{children:Object(emotion_react_jsx_runtime_browser_esm.c)(ListItem_default.a,Object.assign({css:{padding:"0 32px 0 0"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(ListItemText_default.a,{primary:Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",alignItems:"center",marginTop:15}},{children:["Inline text editing",Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({css:{padding:0,marginLeft:5,color:"var(--off-background-6)","& svg":{height:16,width:16}},onClick:displayInlineEditingHelpModal},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Help.a,{})}))]})),secondaryTypographyProps:{style:{whiteSpace:"normal",maxWidth:400,paddingRight:20,color:"var(--text-caption)"}},secondary:"Allow rich text editing inline on the page by double clicking on text blocks."}),Object(emotion_react_jsx_runtime_browser_esm.b)(ListItemSecondaryAction_default.a,{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Switch_default.a,{color:"primary",checked:app_state_constant.appState.localConfig.inlineTextEditing,onChange:e=>{const{checked}=e.target;app_state_constant.appState.localConfig.inlineTextEditing=checked}})})]}))})]}))}render(){const field=this.props.field;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({className:this.props.field.simpleTextOnly?"simple-text-editor":"",css:emotion_react_browser_esm.css` + margin-bottom: 25px; + + .ql-editor { + padding: 5px 15px; + ${app_state_constant.appState.designerState.editorOptions.rtlMode?"text-align: right;direction: rtl;":""} + } + + .ql-editor p { + margin: 10px 0; + } + + .ql-editor { + max-height: 50vh; + overflow: auto; + } + + .ql-tooltip { + z-index: 1; + } + + &.simple-text-editor .ql-container { + border-width: 0; + border-bottom-width: 1px; + border-color: rgba(0, 0, 0, 0.42); + border-radius: 0; + } + + &.simple-text-editor .ql-editor { + padding: 0; + } + + &.simple-text-editor .ql-editor p { + margin: 7px 0; + } + + &.simple-text-editor .label { + font-size: 0.75em; + opacity: 0.6; + margin-bottom: -1px; + } + + .ql-snow .ql-stroke { + stroke: var(--text-regular); + } + .ql-snow .ql-fill { + fill: var(--text-regular); + } + .ql-snow .ql-picker-label { + color: var(--text-regular); + } + .ql-snow .ql-picker-options { + color: var(--text-regular); + background-color: var(--background); + } + .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options { + border-color: var(--border-color); + } + .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { + border-color: var(--border-color); + } + .ql-snow .ql-tooltip { + background-color: var(--background); + border: var(--border); + box-shadow: var(--shadow); + color: var(--text-regular); + } + .ql-snow .ql-editor code { + background-color: var(--off-background); + } + `},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)(Dialog_default.a,Object.assign({maxWidth:!1,open:this.editFullScreen},{children:Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{padding:20,backgroundColor:"var(--off-background)"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{marginBottom:10,display:"flex"}},{children:[this.props.label,app_state_constant.appState.user.can("editCode")&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Edit as code"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({css:{color:this.editAsCode?theme_constant.a.colors.primary:void 0},onClick:()=>this.editAsCode=!this.editAsCode},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Code_default.a,{css:{fontSize:18}})}))})),Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Close"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({onClick:()=>this.editFullScreen=!1},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Close_default.a,{css:{color:"var(--text-caption)",fontSize:18}})}))}))]})),Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{display:"flex",flexDirection:"column",alignItems:"stretch",width:"80vw","& .quill-container":{maxHeight:"100%"},"& .quill":{height:"calc(100% - 42px)"}}},{children:this.getEditor()}))]}))})),Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",alignItems:"center",marginBottom:5}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{flexGrow:1}},{children:this.props.label})),!this.props.field.simpleTextOnly&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Edit full screen"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({css:{color:this.editFullScreen?theme_constant.a.colors.primary:void 0},onClick:()=>{this.editFullScreen=!this.editFullScreen}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Fullscreen_default.a,{css:{fontSize:18}})}))})),app_state_constant.appState.user.can("editCode")&&!this.props.field.simpleTextOnly&&Object(emotion_react_jsx_runtime_browser_esm.b)(Tooltip_default.a,Object.assign({title:"Edit as code"},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(IconButton_default.a,Object.assign({css:{color:this.editAsCode?theme_constant.a.colors.primary:void 0},onClick:()=>this.editAsCode=!this.editAsCode},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Code_default.a,{css:{fontSize:18}})}))}))]})),this.getEditor(),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({css:{paddingTop:10},variant:"caption"},{children:field.helperText}))]}))}};Object(tslib_es6.a)([mobx_module.observable],FieldsForm_HtmlEditor.prototype,"expanded",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_HtmlEditor.prototype,"editFullScreen",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_HtmlEditor.prototype,"focused",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_HtmlEditor.prototype,"showQuillColorEditor",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_HtmlEditor.prototype,"currentTextColor",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_HtmlEditor.prototype,"editAsCode",void 0),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_HtmlEditor.prototype,"quillToolbar",null),Object(tslib_es6.a)([Object(lodash_decorators.Throttle)(200,{trailing:!0,leading:!0})],FieldsForm_HtmlEditor.prototype,"throttledTriggerChange",null),FieldsForm_HtmlEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_HtmlEditor);let FieldsForm_NumberEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage=""}validate(number,required=!1){return isNaN(number)&&required?`Field ${this.props.field.friendlyName||Object(human_case_function.a)(this.props.field.name)} is required`:""}render(){const field=this.props.field,options=this.props.object,camelName=field.name,value=options.get(camelName);return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{position:"relative"}},{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(TextField_default.a,{required:field.required,type:field.type,inputProps:{min:field.min,max:field.max,step:field.step},error:!!this.errorMessage,css:{width:"100%",margin:"10px 0"},helperText:this.errorMessage||field.helperText,value:!value&&value!==0?"":value,onChange:e=>{const value2=e.target.value;let num=parseFloat(value2);this.errorMessage=this.validate(num,field.required),typeof field.max=="number"&&field.maxnum&&(num=field.min,this.errorMessage=`Minimum input is ${field.min}`),options.set(camelName,num),this.props.onChange&&this.props.onChange(options),field.onChange&&Object(safe_evaluate_function.a)(field.onChange,{options},[options])}})]}))}};FieldsForm_NumberEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_NumberEditor);let FieldsForm_CustomElementEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.ref=null}componentDidMount(){this.ref&&this.safeListenToEvent(this.ref,"change",event=>{this.props.object.set(this.props.field.name,event.detail),this.props.onChange&&this.props.onChange(this.props.object)})}render(){const field=this.props.field,options=this.props.object,camelName=field.name,CustomEditorElement=field.customEditorElement;return this.ref&&(this.ref.value=options.get(camelName)),Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{padding:"20px 0"}},{children:CustomEditorElement&&Object(emotion_react_jsx_runtime_browser_esm.b)(CustomEditorElement,{ref:el=>this.ref=el})})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};FieldsForm_CustomElementEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_CustomElementEditor);let FieldsForm_BuillderCustomEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.ref=null,this.loading=!1}async getEntry(entry=this.entryId){if(!entry)return;this.loading=!0,this.entry=null;const doc=await init_firebase.a.collection("content").doc(entry).get().catch(err=>(console.warn("Get entry for symbol editor error",err),null));this.loading=!1;const data=doc&&doc.data();return data&&data.data&&data.data.blocksString&&(data.data.blocks=JSON.parse(data.data.blocksString),delete data.data.blocksString,data.variations&&(data.variations=Object(content_model.j)(data.variations))),data}componentDidMount(){this.safeReaction(()=>this.entryId,async entry=>{entry?this.entry=await this.getEntry():this.entry=null})}get entryId(){return this.props.field&&this.props.field.editorId}render(){const field=this.props.field,options=this.props.object,name2=field.name,editorId=field.editorId;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,this.loading&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{display:"flex"}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Loading.a,{css:{margin:"30px auto"}})})),this.entry&&Object(emotion_react_jsx_runtime_browser_esm.b)(builder_react_es5.BuilderComponent,{onStateChange:data=>options.set(name2,typeof data.value>"u"?null:data.value),content:this.entry||void 0,entry:editorId||void 0,options:editorId?{key:editorId}:void 0,modelName:"editor",data:{value:options.get(name2),onChange:newValue=>options.set(name2,newValue)}}),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};Object(tslib_es6.a)([mobx_module.observable.ref],FieldsForm_BuillderCustomEditor.prototype,"entry",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_BuillderCustomEditor.prototype,"loading",void 0),Object(tslib_es6.a)([mobx_module.action],FieldsForm_BuillderCustomEditor.prototype,"getEntry",null),FieldsForm_BuillderCustomEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_BuillderCustomEditor);let FieldsForm_ReactCustomEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.ref=null}render(){const field=this.props.field,options=this.props.object,name2=field.name,customEditorOptions=this.props.customEditor.options||{};return Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:Object.assign({marginBottom:field.isTargeting||field.isFilterView||field.isMapValue?0:25},this.props.styles)},{children:[!customEditorOptions.hideTitle&&!field.isTargeting&&this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)(this.props.customEditor.component,{context:app_state_constant.appState,path:this.props.path,renderEditor:props=>Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FieldsFormEditor,Object.assign({},props)),field,object:options,customEditor:this.props.customEditor,value:options.get(name2),onChange:value=>{var _a2,_b2;options.set(name2,value),(_b2=(_a2=this.props).onChange)===null||_b2===void 0||_b2.call(_a2,options)}}),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{padding:"10px",border:"1px solid #d0a2a0",backgroundColor:"#fbe3e2",color:"#d9453f",margin:"15px 0",borderRadius:4,fontSize:14}},{children:this.errorMessage})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]}))}};FieldsForm_ReactCustomEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_ReactCustomEditor);let FieldsForm_WorkerReactCustomEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.ref=null}async loadWorkerDom(){if(this.ref){this.ref.setAttribute("src","http://localhost:1269/plugin-loader.umd.js");const worker=await window.MainThread.upgradeElement(this.ref,"http://unpkg.com/@ampproject/worker-dom/dist/worker/worker.js");worker&&(worker.postMessage({type:"builder.loadPlugin",info:this.props.customEditor}),worker.addEventListener("load",()=>{worker.postMessage({type:"builder.loadPlugin",info:this.props.customEditor})}),worker.addEventListener("message",()=>{worker.postMessage({type:"builder.loadPlugin",info:this.props.customEditor})},{once:!0}))}}async componentDidMount(){if(this.ref){const scriptId="worker-dom-script",current=document.getElementById(scriptId);if(current){current.getAttribute("data-loaded")?this.loadWorkerDom():current.addEventListener("load",()=>this.loadWorkerDom());return}const script=document.createElement("script");script.id=scriptId,script.src="http://unpkg.com/@ampproject/worker-dom/dist/main.js",script.addEventListener("load",()=>{script.setAttribute("data-loaded","true"),this.loadWorkerDom()}),document.body.appendChild(script)}}render(){const field=this.props.field;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)("div",{ref:ref=>this.ref=ref}),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{padding:"10px",border:"1px solid #d0a2a0",backgroundColor:"#fbe3e2",color:"#d9453f",margin:"15px 0",borderRadius:4,fontSize:14}},{children:this.errorMessage})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};FieldsForm_WorkerReactCustomEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_WorkerReactCustomEditor);let FieldsForm_WorkerBuilderCustomEditor=class extends FieldEditor_FieldEditor{constructor(){super(...arguments),this.errorMessage="",this.loading=!1,this.ref=null}async getEntry(entry=this.entryId){if(!entry)return;this.loading=!0,this.entry=null;const doc=await init_firebase.a.collection("content").doc(entry).get().catch(err=>(console.warn("Get entry for symbol editor error",err),null));this.loading=!1;const data=doc&&doc.data();return data&&data.data&&data.data.blocksString&&(data.data.blocks=JSON.parse(data.data.blocksString),delete data.data.blocksString,data.variations&&(data.variations=Object(content_model.j)(data.variations))),data}get entryId(){return this.props.field&&this.props.field.editorId}async loadWorkerDom(){if(this.ref){const useDev=app_state_constant.appState.location.query.get("pluginLoaderVersion")==="dev";this.ref.setAttribute("src",useDev?"http://localhost:1269/content-loader.umd.js":"https://unpkg.com/@builder.io/plugin-loader");const worker=await window.MainThread.upgradeElement(this.ref,"http://unpkg.com/@ampproject/worker-dom/dist/worker/worker.js");return worker&&(setInterval(()=>{worker.postMessage({type:"builder.hello",data:{foo:"bar"}})},200),this.entry&&worker.postMessage({type:"builder.loadContent",data:{content:this.entry}}),worker.addEventListener("load",()=>{worker.postMessage({type:"builder.loadContent",data:{content:this.entry}})}),worker.addEventListener("message",e=>{switch(e.data&&e.data.type){case"builder.workerLoaded":{worker.postMessage({type:"builder.loadContent",data:{content:this.entry}});break}case"builder.workerEditorValueChange":{this.props.object.set(this.props.field.name,e.data.data.value);break}}},{once:!0})),worker}}async componentDidMount(){if(this.safeReaction(()=>this.entryId,async entryId=>{entryId?this.entry=await this.getEntry():this.entry=null}),this.safeReaction(()=>this.entry,async entry=>{this.worker&&this.worker.postMessage({type:"builder.loadContent",data:{content:entry}})}),this.safeReaction(()=>this.props.object.get(this.props.field.name),value=>{this.worker&&this.worker.postMessage({type:"builder.updateEditorValue",data:{value}})}),this.ref){const scriptId="worker-dom-script",current=document.getElementById(scriptId);if(current){current.getAttribute("data-loaded")?this.loadWorkerDom():current.addEventListener("load",()=>this.loadWorkerDom());return}const script=document.createElement("script");script.id=scriptId,script.src="http://unpkg.com/@ampproject/worker-dom/dist/main.js",script.addEventListener("load",()=>{script.setAttribute("data-loaded","true"),this.loadWorkerDom()}),document.body.appendChild(script)}}render(){const field=this.props.field;return Object(emotion_react_jsx_runtime_browser_esm.c)("div",{children:[this.props.label,Object(emotion_react_jsx_runtime_browser_esm.b)("div",{css:{display:"flex",flexDirection:"column"},ref:ref=>this.ref=ref}),this.loading&&Object(emotion_react_jsx_runtime_browser_esm.b)(Loading.a,{css:{margin:"30px auto"}}),this.errorMessage&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{padding:"10px",border:"1px solid #d0a2a0",backgroundColor:"#fbe3e2",color:"#d9453f",margin:"15px 0",borderRadius:4,fontSize:14}},{children:this.errorMessage})),field.helperText&&Object(emotion_react_jsx_runtime_browser_esm.b)(Typography_default.a,Object.assign({variant:"caption"},{children:field.helperText}))]})}};Object(tslib_es6.a)([mobx_module.observable.ref],FieldsForm_WorkerBuilderCustomEditor.prototype,"entry",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_WorkerBuilderCustomEditor.prototype,"loading",void 0),Object(tslib_es6.a)([mobx_module.action],FieldsForm_WorkerBuilderCustomEditor.prototype,"getEntry",null),FieldsForm_WorkerBuilderCustomEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_WorkerBuilderCustomEditor);const nonBindableTypes=["object","list","symbol"];let FieldsForm_FieldsFormEditor=class extends safe_component_class.a{constructor(){super(...arguments),this.showAdvanced=!!this.props.alwaysShowAdvanced,this.rootRef=null,this.isValid=null,this.highlightField=null,this.selectedKey=this.props.selectedKey,this.refsHash={},this.setRef=(path,ref)=>{ref?this.refsHash[path]=ref:delete this.refsHash[path]},this.elementRefsHash={},this.setElementRef=(path,ref)=>{ref?this.elementRefsHash[path]=ref:delete this.elementRefsHash[path]},this.getFieldEditor=(field,index)=>{var _a2,_b2,_c2,_d2;const options=this.props.object,excludeFromFocus=["model","list","array","component","uiBlocks"],camelName=field.name,path=getPath(this.props.path||"",camelName);function focusInput(){excludeFromFocus.includes(field.type)||app_state_constant.appState.designerState.fieldFocused.next(path)}const CustomEditorElement=field.customEditorElement,permissions=field.permissionsRequiredToEdit,selected=app_state_constant.appState.designerState.selectedElements[0],isLocalized=field.localized||selected?.meta.get(`transformed.${path}`)==="localized",fieldBound=(this.props.disabled||[]).includes(field.name),cannotEdit=fieldBound||permissions&&!app_state_constant.appState.user.hasPermissions(permissions),locked=(this.props.locked||[]).includes(field.name),canSeeDataTab=app_state_constant.appState.designerState.isEmbedded||app_state_constant.appState.designerState.isFiddle||app_state_constant.appState.user.can("editCode")&&!app_state_constant.appState.designerState.editorOptions.hideDataTab,bindable=this.context,showActions=!cannotEdit&&bindable&&typeof field.localized>"u"&&!nonBindableTypes.includes(field.type),hideAllActions=(_a2=this.props.hideAllActions)!==null&&_a2!==void 0?_a2:!1,property=Object(lodash.last)(path.split(".")),label=this.getFieldLabel({fieldBound,field,path,showActions,hideAllActions,value:options.get(property),onChange:newValue=>options.set(property,newValue)}),isTargeting=(_b2=this.fields[0])===null||_b2===void 0?void 0:_b2.isTargeting,isFilterView=(_c2=this.fields[0])===null||_c2===void 0?void 0:_c2.isFilterView,isMapValue=(_d2=this.fields[0])===null||_d2===void 0?void 0:_d2.isMapValue;return Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{position:"relative",":hover .hide-until-field-hover":{opacity:1},":has(:focus-visible) .hide-until-field-hover":{opacity:1},marginBottom:isTargeting||isFilterView||isMapValue?0:20},"data-field-path":path,onClick:focusInput,ref:ref=>this.setElementRef(path,ref)},{children:fieldBound?Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:[label,Object(emotion_react_jsx_runtime_browser_esm.b)(FieldBoundMessage,{fieldType:field.type,path,canSeeDataTab:!!canSeeDataTab,camelName,elementRefs:this.elementRefsHash})]}):Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:locked?{pointerEvents:"none",opacity:.5,cursor:"pointer"}:cannotEdit?{pointerEvents:"none",opacity:.3,cursor:"pointer",filter:"blur(1px)"}:void 0},{children:Object(run_function.a)(()=>{var _a3,_b3,_c3,_d3;if(field.editorId)return app_state_constant.appState.location.query.get("workerDomEditor")==="true"?Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_WorkerBuilderCustomEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index):Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_BuillderCustomEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);const fieldValue=options.get(field.name)||field.defaultValue,styles=field.styles;if(isLocalized&&field.type!=="object"){const defaultValue=((_a3=fieldValue?.get)===null||_a3===void 0?void 0:_a3.call(fieldValue,"Default"))&&Object(fast_clone_function.b)((_b3=fieldValue?.get)===null||_b3===void 0?void 0:_b3.call(fieldValue,"Default")),resetValue=defaultValue&&is_empty_function_isEmpty(defaultValue);if(((_c3=fieldValue?.get)===null||_c3===void 0?void 0:_c3.call(fieldValue,"@type"))!==content_model.d||resetValue)return Object(next_tick_function.a)(()=>{this.convertTolocalizedField(field,resetValue)}),Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{minHeight:200}},{children:label}));const localizedSubfields=Object(localize_helpers_function.g)(Object.assign(Object.assign({},Object(lodash.omit)(field,"defaultValue","helperText","localized","required","showIf","onChange")),{type:field.type}));return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ObjectEditor,{simple:this.props.simple,disabled:this.props.disabled,label,path,ref:ref=>{this.setRef(path,ref)},object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash,field:Object.assign(Object.assign({},field),{localized:isLocalized,type:"object",folded:!0,keysHelperText:Object(localize_helpers_function.f)(),subFields:localizedSubfields})},index+localizedSubfields.length)}else if(!Array.isArray(fieldValue)&&((_d3=fieldValue?.get)===null||_d3===void 0?void 0:_d3.call(fieldValue,"@type"))===content_model.d&&!isLocalized)return Object(next_tick_function.a)(()=>{this.convertToNonLocalizedField(field)}),Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{minHeight:200}},{children:label}));const customEditor=builder_react_es5.Builder.editors.find(item=>item.name===field.type),useWorker=!1;if(customEditor)return useWorker?Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_WorkerReactCustomEditor,{label,customEditor,path,ref:ref=>{this.setRef(path,ref)},field,object:options,elementRefs:this.elementRefsHash},index):Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ReactCustomEditor,{label,customEditor,path,ref:ref=>{this.setRef(path,ref)},elementRefs:this.elementRefsHash,field,object:options,styles,onChange:this.props.onChange},index);if(CustomEditorElement)return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_CustomElementEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);switch(field.type){case"url":return Object(emotion_react_jsx_runtime_browser_esm.b)(UrlEditor_UrlEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"request":return Object(emotion_react_jsx_runtime_browser_esm.b)(RequestEditor_RequestEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"reference":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ReferenceEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"number":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_NumberEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"email":return Object(emotion_react_jsx_runtime_browser_esm.b)(EmailEditor_EmailEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"longText":return Object(emotion_react_jsx_runtime_browser_esm.b)(LongTextEditor_LongTextEditor,{label,path,ref:ref=>{this.setRef(path,ref)},styles,field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"radio":return Object(emotion_react_jsx_runtime_browser_esm.b)(RadioButtonEditor_RadioButtonEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"javascript":return Object(emotion_react_jsx_runtime_browser_esm.b)(JavaScriptEditor_JavaScriptEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"richText":case"html":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_HtmlEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"date":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_DateEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"timestamp":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_DateEditor,{label,timestamp:!0,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"file":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_FileEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"list":case"array":case"uiBlocks":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ListEditor,{simple:this.props.simple,label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"color":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ColorEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"model":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ModelEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"map":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_MapEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"uiStyle":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_StyleFieldEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"uiSymbol":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_SymbolEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"object":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ObjectEditor,{simple:this.props.simple,disabled:this.props.disabled,label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"boolean":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_BooleanEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,styles,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);case"component":return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_ComponentEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index);default:return customFields.find(item=>item.type===field.type)?Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_IntegrationFieldEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index):Object(emotion_react_jsx_runtime_browser_esm.b)(FieldsForm_TextEditor,{label,path,ref:ref=>{this.setRef(path,ref)},field,object:options,onChange:this.props.onChange,elementRefs:this.elementRefsHash},index)}})}))}),path)},this.listContent=Object(mobxreact_esm.observer)(({width,height})=>Object(emotion_react_jsx_runtime_browser_esm.b)(es.d,{deferredMeasurementCache:cache,height,rowCount:this.fields.length,rowHeight:cache.rowHeight,rowRenderer:this.rowRenderer,width})),this.rowContent=Object(mobxreact_esm.observer)(({index,style,measure})=>Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:style},{children:this.getFieldEditor(this.fields[index],index)}))),this.rowRenderer=({index,key,parent,style})=>Object(emotion_react_jsx_runtime_browser_esm.b)(es.b,Object.assign({cache,columnIndex:0,overscanRowCount:10,parent,rowIndex:index},{children:({measure})=>Object(emotion_react_jsx_runtime_browser_esm.b)(this.rowContent,{index,measure,css:style},key)}),key)}get fieldRefs(){return Object.keys(this.refsHash).map(key=>this.refsHash[key])}validate(){const errors=[];for(const ref of this.fieldRefs){const errorMessage=ref.validateCurrentValue();errorMessage?(ref.errorMessage=errorMessage,errors.push(errorMessage)):ref.errorMessage=""}return this.isValid=!errors.length,errors}componentDidMount(){if(this.rootRef)for(const event of["input","change","keypress","click"])this.safeListenToEvent(this.rootRef,event,()=>{this.debouncedTriggerUpdate()},{capture:!0})}async focusField(path){var _a2;if(this.rootRef){let changedIndex=!1;if(path.includes(".")){const split=path.split("."),index=Number(split[1]);if(!isNaN(index))for(const ref of this.fieldRefs){const prefix=split[0];ref.props.path===prefix&&ref instanceof FieldsForm_ListEditor&&ref.expandedIndex!==index&&(ref.expandedIndex=index,changedIndex=!0)}}const el=this.rootRef.querySelector(`[data-field-path="${path}"]`);if(document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),(_a2=window.getSelection())===null||_a2===void 0||_a2.empty(),el){const{activeElement}=document;activeElement&&activeElement.blur&&activeElement.blur(),changedIndex&&await Object(delay_function.a)(300),el.scrollIntoView({block:"center",inline:"nearest"});const input=el.querySelector('input,textarea:not([tabindex="-1"]),[contenteditable="true"]'),selectElementContents=el2=>{const range=document.createRange();range.selectNodeContents(el2);const sel=window.getSelection();sel&&(sel.removeAllRanges(),sel.addRange(range))};input&&(input.focus(),input.select?input.select():selectElementContents(input)),this.highlightField=path,setTimeout(()=>{this.highlightField===path&&(this.highlightField=null)},1e3)}}}get uiFields(){return this.props.fields&&this.props.fields.filter(field=>!(field.hideFromUI||field.hidden||app_state_constant.appState.designerState.useNewDesigner&&field.type==="uiBlocks")).filter(field=>app_state_constant.appState.user.isSignedIn&&field.requiredPermissions?field.requiredPermissions.every(permission=>app_state_constant.appState.user.can(permission)):!0)||[]}debouncedTriggerUpdate(){this.props.onInput&&this.props.onInput(this.props.object)}get fields(){return this.uiFields.filter(field=>!field.advanced)}get advancedFields(){return this.uiFields.filter(field=>field.advanced)}get keys(){return Object(lodash.sortBy)(this.uiFields,"priority").map(field=>({label:field.friendlyName||Object(human_case_function.a)(field.name),value:field.name}))}convertToNonLocalizedField(field){Object(mobx_module.runInAction)(()=>{var _a2,_b2,_c2,_d2,_e2,_f2;const options=this.props.object,fieldValue=((_b2=(_a2=options.get(field.name))===null||_a2===void 0?void 0:_a2.get)===null||_b2===void 0?void 0:_b2.call(_a2,app_state_constant.appState.designerState.locale))||((_d2=(_c2=options.get(field.name))===null||_c2===void 0?void 0:_c2.get)===null||_d2===void 0?void 0:_d2.call(_c2,"Default"))||field.defaultValue;fieldValue?options.set(field.name,Object(fast_clone_function.b)(fieldValue)):options.delete(field.name),(_f2=(_e2=this.props).onChange)===null||_f2===void 0||_f2.call(_e2,this.props.object)})}convertTolocalizedField(field,resetValue=!1){Object(mobx_module.runInAction)(()=>{var _a2,_b2,_c2,_d2,_e2,_f2,_g,_h,_j;try{const options=this.props.object,defaultValue=(_a2=options.get(field.name))!==null&&_a2!==void 0?_a2:field.defaultValue,fieldValue=defaultValue&&Object(fast_clone_function.b)(defaultValue);options.delete(field.name),options.set(field.name,{"@type":content_model.d}),!is_empty_function_isEmpty(fieldValue)&&!resetValue&&((_d2=(_c2=(_b2=options?.get)===null||_b2===void 0?void 0:_b2.call(options,field.name))===null||_c2===void 0?void 0:_c2.set)===null||_d2===void 0||_d2.call(_c2,"Default",fieldValue),app_state_constant.appState.designerState.locale&&((_g=(_f2=(_e2=options?.get)===null||_e2===void 0?void 0:_e2.call(options,field.name))===null||_f2===void 0?void 0:_f2.set)===null||_g===void 0||_g.call(_f2,app_state_constant.appState.designerState.locale,fieldValue))),(_j=(_h=this.props).onChange)===null||_j===void 0||_j.call(_h,this.props.object)}catch(e){console.warn("Failed to convert to localized field",e)}})}getFieldLabel({field,path,showActions,value,onChange,fieldBound,hideAllActions}){return Object(emotion_react_jsx_runtime_browser_esm.b)(FieldLabel,{fieldBound,value,onChange,onLocaleToggle:isLocalized=>{const options=this.props.object;isLocalized?this.convertTolocalizedField(field):this.convertToNonLocalizedField(field)},field,path,showActions,hideAllActions,bindingIconProps:{fieldType:field.type,anchorElement:this.elementRefsHash[path],path:Object(binding_icon.c)(path)},folded:this.props.folded,keysPickerProps:{tooltip:!showActions&&this.props.keysHelperText,Icon:this.props.keysIcon,value:this.selectedKey,options:this.keys,tooltipPlacement:"top-start",onChange:option=>{var _a2,_b2;option&&(this.selectedKey=option,(_b2=(_a2=this.props).onKeyChange)===null||_b2===void 0||_b2.call(_a2,option.value))}},simple:this.props.simple})}render(){var _a2,_b2;let fieldsToRender=this.fields.filter(field=>{var _a3;if(field.showIf){let parent=Object(lodash.attempt)(()=>Object(mobx_state_tree_module.getParent)(this.props.object));Object(lodash.isError)(parent)&&(parent=null);const parentElements=getParentElements(this.props.object);return Object(safe_evaluate_function.a)(field.showIf,{parent,options:this.props.object,parentElements},[this.props.object,parent,parentElements])}return this.props.folded?field.name===((_a3=this.selectedKey)===null||_a3===void 0?void 0:_a3.value):!0}).map((field,index)=>this.getFieldEditor(field,index)),advancedFieldsToRender=this.advancedFields.filter(field=>{var _a3;if(field.showIf){let parent=Object(lodash.attempt)(()=>Object(mobx_state_tree_module.getParent)(this.props.object));return Object(lodash.isError)(parent)&&(parent=null),Object(safe_evaluate_function.a)(field.showIf,{parent,options:this.props.object},[this.props.object,parent])}return this.props.folded?field.name===((_a3=this.selectedKey)===null||_a3===void 0?void 0:_a3.value):!0}).map((field,index)=>this.getFieldEditor(field,index));return!fieldsToRender.length&&advancedFieldsToRender.length&&(fieldsToRender=advancedFieldsToRender,advancedFieldsToRender=[]),!((_a2=this.fields)===null||_a2===void 0)&&_a2.length||!((_b2=this.advancedFields)===null||_b2===void 0)&&_b2.length?Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({ref:ref=>this.rootRef=ref},{children:[!this.props.onlyShowAdvanced&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",{children:fieldsToRender.length?fieldsToRender:Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{marginLeft:25,fontSize:13,opacity:.5}},{children:"No editable fields"}))}),!!((this.showAdvanced||this.props.onlyShowAdvanced)&&!this.props.hideAdvanced&&advancedFieldsToRender.length)&&advancedFieldsToRender,!!(this.advancedFields.length&&advancedFieldsToRender.length)&&!this.props.alwaysShowAdvanced&&!this.props.hideAdvanced&&!this.props.onlyShowAdvanced&&Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{display:"flex",marginTop:15}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Button_default.a,Object.assign({css:{margin:"auto",color:"var(--text-caption)"},onClick:()=>this.showAdvanced=!this.showAdvanced},{children:this.showAdvanced?Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:["Hide advanced",Object(emotion_react_jsx_runtime_browser_esm.b)(ExpandLess_default.a,{css:{marginLeft:8}})]}):Object(emotion_react_jsx_runtime_browser_esm.c)(emotion_react_jsx_runtime_browser_esm.a,{children:["Show advanced",Object(emotion_react_jsx_runtime_browser_esm.b)(ExpandMore_default.a,{css:{marginLeft:8}})]})}))}))]})):null}};FieldsForm_FieldsFormEditor.contextType=bindable_context.a,Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FieldsFormEditor.prototype,"showAdvanced",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FieldsFormEditor.prototype,"isValid",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FieldsFormEditor.prototype,"highlightField",void 0),Object(tslib_es6.a)([mobx_module.observable],FieldsForm_FieldsFormEditor.prototype,"selectedKey",void 0),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_FieldsFormEditor.prototype,"uiFields",null),Object(tslib_es6.a)([Object(lodash_decorators.Debounce)(16,{trailing:!0,leading:!1})],FieldsForm_FieldsFormEditor.prototype,"debouncedTriggerUpdate",null),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_FieldsFormEditor.prototype,"fields",null),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_FieldsFormEditor.prototype,"advancedFields",null),Object(tslib_es6.a)([mobx_module.computed],FieldsForm_FieldsFormEditor.prototype,"keys",null),FieldsForm_FieldsFormEditor=Object(tslib_es6.a)([mobxreact_esm.observer],FieldsForm_FieldsFormEditor);var FieldsForm=__webpack_exports__.c=FieldsForm_FieldsFormEditor;const FieldBoundMessage=({fieldType,message,camelName,path,elementRefs})=>Object(emotion_react_jsx_runtime_browser_esm.b)("div",{children:Object(emotion_react_jsx_runtime_browser_esm.b)(Paper_default.a,Object.assign({css:{padding:"10px 12px",marginBottom:20,marginTop:6,backgroundColor:"var(--background)"}},{children:Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{display:"flex",alignItems:"center"}},{children:[Object(emotion_react_jsx_runtime_browser_esm.c)("div",Object.assign({css:{fontSize:14,marginLeft:5,flexGrow:1}},{children:[Object(emotion_react_jsx_runtime_browser_esm.b)("b",{children:Object(human_case_function.a)(camelName)||"This Field"})," is ",message||"bound to dynamic data"]})),Object(emotion_react_jsx_runtime_browser_esm.b)("div",Object.assign({css:{fontSize:15}},{children:Object(emotion_react_jsx_runtime_browser_esm.b)(binding_icon.a,{fieldType,anchorElement:elementRefs?.[path],path:Object(binding_icon.c)(path),css:{marginLeft:"auto"}})}))]}))}))})},2028:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return VirtualizedSelect});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5),_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),react_select__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(685),react_select_creatable__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(2383),react_window__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(2435),match_sorter__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2091),react__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(3),react__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__),_designer_components_style_editor_input_style__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(2094),_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(7),_material_ui_core__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(236),_material_ui_core__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_9__),_material_ui_core__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(105),_material_ui_core__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_10__),_material_ui_core__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(289),_material_ui_core__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_11__),_material_ui_core__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(446),_material_ui_core__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_12__),_material_ui_core__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(131),_material_ui_core__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_13__),_material_ui_core__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(2657),_material_ui_core__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_14__),lodash_uniqBy__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(550),lodash_uniqBy__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_15__),_Loading__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(57),lodash_orderBy__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(2434),lodash_orderBy__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_17__),_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(1);const DEFAULT_MENU_DIMENSIONS={optionHeight:40,rows:6,width:320},menuDimensionsContext=Object(react__WEBPACK_IMPORTED_MODULE_6__.createContext)(DEFAULT_MENU_DIMENSIONS),MenuList=props=>{var _a2,_b2,_c2;const{options,children,getValue,isMulti,setValue,clearValue}=props;if(!Array.isArray(children))return Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)("div",{children});const{optionHeight,rows,width}=Object(react__WEBPACK_IMPORTED_MODULE_6__.useContext)(menuDimensionsContext),isMultipleGroups=Array.isArray((_a2=options?.[0])===null||_a2===void 0?void 0:_a2.options),hasMultiplelabeledGroups=Array.isArray((_b2=options?.[0])===null||_b2===void 0?void 0:_b2.options)&&Array.isArray((_c2=options?.[1])===null||_c2===void 0?void 0:_c2.options);if(isMultipleGroups)return Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.a,{children:children.map((group,i)=>{var _a3;const activeOptionData=group.props.data,value2=getValue().map(v=>v.value),grandChildren=group.props.children,height=Math.min(grandChildren.length,rows)*optionHeight+(grandChildren.length>rows?Math.round(optionHeight/2):0),optionValues=((_a3=activeOptionData.options)===null||_a3===void 0?void 0:_a3.map(opt=>opt.value))||[],allSelected=optionValues.every(val=>value2.includes(val)),indeterminate=!allSelected&&value2.find(val=>optionValues.includes(val));return Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.c)("div",{children:[activeOptionData.label&&hasMultiplelabeledGroups&&!!optionValues.length&&Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_9___default.a,{disabled:!isMulti,css:{marginLeft:"auto",marginRight:0,width:"100%",height:optionHeight,transition:"opacity 0.2s"},onChange:(_,checked)=>{if(checked)setValue(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_15___default()(getValue().concat(activeOptionData.options),"value"),"select-option");else{const val=getValue().filter(opt=>!optionValues.includes(opt.value));setValue(val,"deselect-option")}},label:Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_10___default.a,Object.assign({css:{width:"100%"},variant:"caption"},{children:activeOptionData.label})),control:isMulti?Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_11___default.a,{checked:allSelected,indeterminate:!!indeterminate,color:"primary"}):Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)("div",{css:{padding:5}})}),Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)("div",Object.assign({style:hasMultiplelabeledGroups?{backgroundColor:"var(--off-background)"}:{paddingLeft:0}},{children:activeOptionData.loading?Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_Loading__WEBPACK_IMPORTED_MODULE_16__.a,{css:{margin:"auto"}}):optionValues.length?Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(react_window__WEBPACK_IMPORTED_MODULE_4__.a,Object.assign({height,width,itemCount:grandChildren.length,itemSize:optionHeight},{children:({style,index})=>Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_12___default.a,Object.assign({style:Object.assign(Object.assign({},style),!hasMultiplelabeledGroups&&{padding:0})},{children:Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_9___default.a,{css:{marginLeft:"auto",marginRight:0,width:"100%",transition:"opacity 0.2s"},style:value2[0]===activeOptionData.options[index].value?{backgroundColor:"var(--off-background)"}:{},onClick:event=>{var _a4;if(event.preventDefault(),isMulti)if(!getValue().find(opt=>activeOptionData.options[index].value===opt.value))setValue(getValue().concat(activeOptionData.options[index]),"select-option");else{const val=getValue().filter(opt=>opt.value!==activeOptionData.options[index].value);setValue(val,"deselect-option")}else((_a4=getValue()[0])===null||_a4===void 0?void 0:_a4.value)!==activeOptionData.options[index].value?setValue(activeOptionData.options[index],"select-option"):clearValue()},label:Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_13___default.a,Object.assign({disableHoverListener:!activeOptionData.options[index].caption,title:activeOptionData.options[index].caption||"",placement:"right"},{children:Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_10___default.a,Object.assign({css:{width:"100%",whiteSpace:"nowrap"},variant:"subheading"},{children:activeOptionData.options[index].label}))})),control:isMulti?Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_11___default.a,{checked:value2?.includes(activeOptionData.options[index].value),color:"primary"}):Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(_material_ui_core__WEBPACK_IMPORTED_MODULE_14___default.a,{checked:value2[0]===activeOptionData.options[index].value,color:"primary"})})}),index)})):group}))]},i)})});const[value]=getValue(),indexOfValue=options.indexOf(value),initialOffset=children.length>=rows&&indexOfValue>=rows?indexOfValue*optionHeight-optionHeight*5:0,rowsToShow=children.length>=rows?rows:children.length;return Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(react_window__WEBPACK_IMPORTED_MODULE_4__.a,Object.assign({height:rowsToShow*optionHeight,width,itemCount:children.length,itemSize:optionHeight,initialScrollOffset:initialOffset},{children:({style,index})=>Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)("div",Object.assign({style},{children:children[index]}))}))},VirtualizedSelect=_a2=>{var{components,styles,options,isCreatable=!1,menuDimensions=DEFAULT_MENU_DIMENSIONS,getSearchValue}=_a2,otherProps=Object(tslib__WEBPACK_IMPORTED_MODULE_0__.b)(_a2,["components","styles","options","isCreatable","menuDimensions","getSearchValue"]);const[sortedOptions,setSortedOptions]=Object(react__WEBPACK_IMPORTED_MODULE_6__.useState)(options);Object(react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(()=>{var _a3;if(Array.isArray((_a3=options[0])===null||_a3===void 0?void 0:_a3.options)){const cloned=options.map(opt=>Object.assign(Object.assign({},opt),{options:lodash_orderBy__WEBPACK_IMPORTED_MODULE_17___default()(opt.options,["count","label"],["desc","asc"])}));setSortedOptions(cloned)}else setSortedOptions(options)},[options]);const onInputChange=Object(react__WEBPACK_IMPORTED_MODULE_6__.useCallback)((value,{action})=>{if(action==="input-change")if(Array.isArray(options[0].options)){const cloned=options.map(opt=>Object.assign(Object.assign({},opt),{options:Object(match_sorter__WEBPACK_IMPORTED_MODULE_5__.a)(opt.options,value,{keys:["label","count"]})}));setSortedOptions(cloned)}else{const filteredOptions=Object(match_sorter__WEBPACK_IMPORTED_MODULE_5__.a)(options,value,{keys:["label"]});setSortedOptions(filteredOptions),getSearchValue&&getSearchValue(value)}else action==="menu-close"&&setSortedOptions(options)},[options,setSortedOptions]),dimensions=Object.assign(Object.assign({},DEFAULT_MENU_DIMENSIONS),menuDimensions),props=Object.assign(Object.assign({},otherProps),{onInputChange,components:Object.assign({MenuList},components),filterOption:()=>!0,styles:Object.assign(Object.assign({},styles),{option(provided,props2){const{isFocused,isSelected}=props2,isSelectedStyle={backgroundColor:_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_18__.appState.theme.isDarkMode?_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_18__.appState.theme.colors.primaryVeryLight:"var(--select-selected-background)",color:"var(--text-regular)"},isFocusedStyle={backgroundColor:"var(--select-hover-background)"},style={color:"inherit",cursor:"pointer","&:active":{backgroundColor:"var(--select-selected-background)"}};return isFocused&&Object.assign(style,isFocusedStyle),isSelected&&Object.assign(style,isSelectedStyle),Object.assign(Object.assign({},provided),style)},menu:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign(Object.assign({},provided),{border:"var(--control-border-color)",boxShadow:"var(--shadow)",overflow:"hidden",width:"initial",zIndex:6}),(_a3=styles?.menu)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2)),{backgroundColor:"var(--background)"})},control:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},provided),{minWidth:100,minHeight:0}),_designer_components_style_editor_input_style__WEBPACK_IMPORTED_MODULE_7__.a),{boxShadow:"none",background:"transparent",cursor:"pointer"}),(_a3=styles?.control)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2))},container:(provided,props2)=>{var _a3;return Object.assign(Object.assign({},provided),(_a3=styles?.container)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2))},input:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),(_a3=styles?.input)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2)),{color:"var(--text-regular)"})},valueContainer:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),(_a3=styles?.valueContainer)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2)),{padding:2})},singleValue:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),{color:"inherit"}),(_a3=styles?.singleValue)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2))},multiValue:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),{color:"inherit",backgroundColor:_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.isDarkMode?_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.colors.grey:_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.colors.grey10}),(_a3=styles?.multiValue)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2))},multiValueLabel:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),{color:"var(--text-regular)"}),(_a3=styles?.multiValueLabel)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2))},multiValueRemove:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),{color:_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.isDarkMode?_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.colors.text.regular:"var(--text-light)",":hover":{color:_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.isDarkMode?_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.colors.text.light:"var(--text-regular)"}}),(_a3=styles?.multiValueRemove)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2))},dropdownIndicator:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),(_a3=styles?.dropdownIndicator)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2)),{padding:2,width:15,height:15,alignItems:"center",color:_constants_theme_constant__WEBPACK_IMPORTED_MODULE_8__.a.colors.iconColor})},indicatorSeparator:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),(_a3=styles?.indicatorSeparator)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2)),{margin:0,display:"none"})},placeholder:(provided,props2)=>{var _a3;return Object.assign(Object.assign(Object.assign({},provided),(_a3=styles?.placeholder)===null||_a3===void 0?void 0:_a3.call(styles,provided,props2)),{whiteSpace:"nowrap"})}}),options:sortedOptions});return Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(menuDimensionsContext.Provider,Object.assign({value:dimensions},{children:isCreatable?Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(react_select_creatable__WEBPACK_IMPORTED_MODULE_3__.a,Object.assign({},props)):Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.b)(react_select__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props))}))}},2029:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"g",function(){return getAutoInstallLiquidSectionIncludeCode}),__webpack_require__.d(__webpack_exports__,"f",function(){return createBlueprintModel}),__webpack_require__.d(__webpack_exports__,"k",function(){return publishShopifyTemplate}),__webpack_require__.d(__webpack_exports__,"j",function(){return installModelLiquidCode}),__webpack_require__.d(__webpack_exports__,"i",function(){return installBuilderCode}),__webpack_require__.d(__webpack_exports__,"c",function(){return BLOG_ARTICLE_MODEL_NAME}),__webpack_require__.d(__webpack_exports__,"d",function(){return DEPRECATED_BLOG_ARTICLE_MODEL_NAME}),__webpack_require__.d(__webpack_exports__,"h",function(){return installBlogArticle}),__webpack_require__.d(__webpack_exports__,"a",function(){return ANNOUNCEMENT_BAR_MODEL_NAME}),__webpack_require__.d(__webpack_exports__,"e",function(){return InstallSection}),__webpack_require__.d(__webpack_exports__,"b",function(){return AutoInstallAnnouncementBar});var _emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1),_components_TextLink__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(84),_models_model_model__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(125),dedent__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(277),dedent__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_5__),_constants_generated_by_builder_constant__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(2039),_functions_human_case_function__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(73),_ThemeV2__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(2126),_material_ui_core__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(105),_material_ui_core__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_9__),_material_ui_core__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(40),_material_ui_core__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_material_ui_core__WEBPACK_IMPORTED_MODULE_10__),mobx_react__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(90),_models_content_model__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(118),mobx_state_tree__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(2),_models_liquid_targeting_model__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(396),_material_ui_icons_ArrowBack__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(2134),_material_ui_icons_ArrowBack__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_material_ui_icons_ArrowBack__WEBPACK_IMPORTED_MODULE_15__),_CreateNewThemePageV2__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(2098),_components_ShopifyLiquidTargeting__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(2231),_functions_fast_clone_function__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(25),_functions_shopify_render_tag_name__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(2051);const getAutoInstallLiquidSectionIncludeCode=modelName=>`{% ${Object(_functions_shopify_render_tag_name__WEBPACK_IMPORTED_MODULE_19__.a)()} 'model.${modelName.toLowerCase()}.builder' %}`,checkBlueprintRan=(modelName,showMessage=!0)=>{var _a2,_b2;if(!((_a2=_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.user.organization)===null||_a2===void 0?void 0:_a2.value.settings.shopifyFullThemeEditing))return _constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.dialogs.alert("Your organization has disabled full shopify theme editing, which means you are unable to create or modofy theme pages.","Full theme editing not enabled"),!0;const currentModel=(_b2=_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.models)===null||_b2===void 0?void 0:_b2.result.find(item=>item.name===modelName);return currentModel?(showMessage&&_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.dialogs.alert(Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.a,{children:["You can create collection heroes by going to"," ",Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.b)(_components_TextLink__WEBPACK_IMPORTED_MODULE_3__.a,Object.assign({onClick:()=>_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.location.go(`/content?model=${currentModel.id}`)},{children:"builder.io/content"}))," ","and creating new ",Object(_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.b)("b",{children:Object(_functions_human_case_function__WEBPACK_IMPORTED_MODULE_7__.a)(modelName)})," entries"]}),"You have already installed this section"),!0):!1},createBlueprintModel=async(modelName,info={},showMessage=!0)=>{if(await checkBlueprintRan(modelName,showMessage))return null;const modelInfo=Object.assign({name:modelName,kind:"component",fields:[{name:"blocks",required:!0,hideFromFieldsEditor:!0,type:"uiBlocks"}]},info),model=Object(_models_model_model__WEBPACK_IMPORTED_MODULE_4__.f)(modelInfo);return await _constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.models.add(model),model},publishShopifyTemplate=async(assetPath,value)=>{await fetch(`${_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.config.apiRoot()}/api/v1/shopify/themes/${_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.shopify.useTheme}/assets.json?apiKey=${_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.user.apiKey}`,{headers:_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.user.authHeaders,method:"PUT",body:JSON.stringify({asset:{value,key:assetPath}})}).then(throwIfNotOk())},installModelLiquidCode=async modelName=>{const assetPath=`snippets/model.${modelName}.builder.liquid`;let currentAssetValue;try{currentAssetValue=await fetch(`${_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.config.apiRoot()}/api/v1/shopify/themes/${_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.shopify.useTheme}/assets.json?apiKey=${_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.user.apiKey}&asset[key]=${assetPath}`,{headers:_constants_app_state_constant__WEBPACK_IMPORTED_MODULE_2__.appState.user.authHeaders}).then(throwIfNotOk()).then(res=>res.asset.value)}catch{}if(currentAssetValue)return;const templateValue=dedent__WEBPACK_IMPORTED_MODULE_5___default.a(_a||(_a=__template([` + {% comment %} + `,` + You can edit this code at any time + {% endcomment %} + + + + +