text: function sjeClass(){return new ValueTransformer}var ValueTransformer=function(){this.displayName="Find and replace",this.shortDescription="Find & replace text using text or regular expression.",this.isEditingDisabled=!0,this.infoUrl="https://github.com/SmartJSONEditor/PublicDocuments/wiki/ValueTransformer-FindAndReplace",this.parameters=function(){var e=[{displayName:"String",value:"string"},{displayName:"Regular Expression",value:"format"}],a={name:"popup",type:"Popup",displayName:"Find & Replace type",description:"Select between simple string replacement or javascript regular expression.",defaultValue:e},r={type:"String",name:"search",displayName:"Search  String / Format",description:"Input your search string or regular expression format such /blue/gi",defaultValue:""},t={type:"String",name:"replace",displayName:"Replace with",description:"Input your replacement string",defaultValue:""};return[a,r,t]},this.transform=function(inputValue,jsonValue,arrayIndex,parameters,info){var type=void 0===parameters.type?"string":parameters.type,search=parameters.search,replace=parameters.replace,value="";return"string"==type&&(value=inputValue.replace(eval("/"+search+"/g"),replace)),"format"==type&&(value=inputValue.replace(eval(search),replace)),value},this.randomArrayIndex=function(e){return Math.floor(Math.random()*e)}};