www.monroviaca.gov
Open in
urlscan Pro
2a02:26f0:ab00::214:8e72
Public Scan
URL:
https://www.monroviaca.gov/Scripts/Components/ScriptsFEBundle.jsbnd?v%3D1GquWamO-1yFawhg-EPdqWJj3BSpuEsyv1Hz5iRvi0M1
Submission: On November 19 via manual from US — Scanned from DE
Submission: On November 19 via manual from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
(function(n,t){"use strict";var u,r,i;n.visionLiveConfig.flexibleComponent=n.visionLiveConfig.flexibleComponent||{serverURL:""};n.viCurrentModule&&n.viCurrentModule.requires.push("vi.fe.componentbuilder.widget");u=t.module("vi.fe.componentbuilder.widget",["blockUI","viAppVisionLiveFlexibleComponentFields","vi.ui","vi.frontend.list.module"]);r=t.extend({apiEndPoint:""},n.visionLiveConfig||{});r.apiEndPoint=n.visionLiveConfig.flexibleComponent.serverURL;i=r.apiEndPoint;r.apiEndPoint=i.lastIndexOf("/")==i.length-1?i.substring(0,i.length-1)+"/":i+"/";u.constant("builderConfig",r)})(window,angular),function(n,t){"use strict";function r(n,i,r,u,f,e,o){function s(s){var c,l,h;s.title="viServiceFinder";s.visionOptions=visionOptions;s.visionApps=visionApps;s.config=t.fromJson(t.element("."+s.scriptClass).text());s.currentStep=1;s.buttonText="";s.showEditButtonText=!1;s.category={};s.categories=[];s.service={};s.services=[];s.filterdServices=[];i.get(s.visionOptions.virtualApplicationPath+"Home/Components/ServiceDirectory/ServiceFrontEnd/ServiceFinderGetList").then(function(n){s.dataObject=n.data;s.categories=n.data.categories;s.services=n.data.services});s.$broadcast("SetFocus");s.getServices=function(t){s.service={};s.detail=null;s.filterdServices=t.id==0?s.services:n("filter")(s.services,{categories:{id:t.id}});h(2)};s.serviceDetailChange=function(){s.buttonText=s.service.selected.name;s.showEditButtonText=!1;h(3)};s.getDetail=function(){s.showEditButtonText?(console.log("todo - focus category dropdownlist"),s.showEditButtonText=!1,h(1),f(function(){$(".filter-block.filter-category .ui-select-match-text").click()})):t.isDefined(s.service.selected.id)&&(i.get(s.visionOptions.virtualApplicationPath+"Home/Components/ServiceDirectory/ServiceFrontEnd/ServiceFinderGetDetail?id="+s.service.selected.id).then(function(t){s.detail=t.data;t.data.details&&(s.detail.details=o.trustAsHtml(n("maskText")(s.detail.details)),s.detail.ShowRightPanel=s.config.showDepartmentInDetailView&&s.detail.departments&&s.detail.departments.length>0||s.config.showDivisionInDetailView&&s.detail.categories&&s.detail.categories.length>0||s.config.showPhoneInDetailView&&s.detail.phone&&s.detail.phone.length>0||s.config.showFaxInDetailView&&s.detail.fax&&s.detail.fax.length>0||s.config.showEmailInDetailView&&s.detail.email&&s.detail.email.length>0);s.config.detailDisplayMode=="2"?c():s.config.detailDisplayMode=="3"&&l()}),s.showEditButtonText=!0,h(3))};c=function(){e.open({template:s.config.htmlDetailTemplateUrl,className:"ngdialog-theme-default vi-sevice-finder-dialog",scope:s})};l=function(){if(s.config.detailDisplayMode=="3"&&t.isString(s.config.appendedElement)){var n=t.element(document.querySelector(s.config.appendedElement));u(s.config.htmlDetailTemplateUrl).then(function(i){var u=t.element(i);n.html(r(u)(s))})}};s.reset=function(){s.category={};s.service={};s.detail={};s.filterdServices=[]};s.getButtonText=function(){return t.equals({},s.service)?"":s.service&&!s.showEditButtonText?s.service.selected.name:s.service&&s.showEditButtonText?"Edit Search":void 0};s.getServiceText=function(){return t.equals({},s.category)?"":s.category.selected.name+" Options"};h=function(n){var i,r;n==1?(s.currentStep=1,s.$broadcast("SetFocus")):n==2?(s.currentStep=2,s.$broadcast("SetFocus2")):n==3?(s.currentStep=3,i=t.element(document.querySelector(".filter-block.filter-button")),i.addClass("filter-block-active"),r=t.element(document.querySelector(".filter-block.filter-button .filter-button-link")),setTimeout(function(){r.focus()},100)):s.currentStep=0}}return{link:s,restrict:"EA",templateUrl:function(n,t){return t.templateUrl||visionOptions.mainFolderPath+"scripts/ServiceFinder/serviceFinder.html"},scope:{scriptClass:"@config"}}}n.viCurrentModule&&n.viCurrentModule.requires.push("serviceFinderApp");var i=t.module("serviceFinderApp",["ngSanitize","ui.select","ngDialog"]);i.filter("phone",function(){return function(n){return n==null?"":$.viFormatPhone(n,"".replace(/9/g,"0"))}});i.directive("viServiceFinder",r);r.$inject=["$filter","$http","$compile","$templateRequest","$timeout","ngDialog","$sce"]}(window,angular),function(n,t){"use strict";var i=t.module("vi.fe.componentbuilder.widget");i.controller("flexComponentWidgetController",["viFrontendListService","flexComponentService","$scope","$http","fieldTypeManager","$filter",function(i,r,u,f,e){u.sysConfig={TemplateUrl:"",Thumbnail:{ShowImageLink:"",ShowThumbnailLink:"",ConvertToString:function(n,t){return n?t===!0?this.ShowThumbnailLink.replace("99887766",n):this.ShowImageLink.replace("99887766",n):""}},Phone:{PhoneAndFaxNumberFormatting:"",ConvertToString:function(n){return n==null?"":$.viFormatPhone(n,this.PhoneAndFaxNumberFormatting.replace(/9/g,"0"))}},DateTime:{TimeAMFormat:"",TimePMFormat:"",ConvertToString:function(t,i){if(!t)return"";var r=JSON.parse(i);return r&&r.datetimeUseDateOnly?$.formatDate($.parseDate(t),n.visionApps.cms_core.DateFormat):$.formatDate($.parseDate(t),n.visionApps.cms_core.DateFormat+" "+n.visionApps.cms_core.TimeFormat).replace(/am/ig,this.TimeAMFormat).replace(/pm/ig,this.TimePMFormat)}},DetailUrl:{DefaultLink:"",FlexComponentUrl:"",FlexListUrl:"",NavUrl:"",NavId:0,HrefLink:function(n){return this.DefaultLink.replace("5412688293275612",n)}},Email:{AsciiEncode:function(n){return n}},Website:{UseSplash:!1,ApplicationPath:"",MaskSplashText:function(t){var i;if(!t)return"";if(i=t.indexOf("http")==0,i){var u=this.ApplicationPath+"?splash="+t+"&____isexternal=true",r=!1,f=new Array(t);return $.ajax({url:n.location.origin+visionOptions.virtualApplicationPath+"Shared/SplashPageListAll",type:"POST",data:{links:f},"async":!1,success:function(n){r=n[0].Allow}}),this.UseSplash&&i&&r?t:u}return t}}};u.detail={};u.detailInit={init:function(n,f){var h=t.element("#flexible-ext-data-"+f).text(),o=JSON.parse(h),c=JSON.parse(t.element("#flexible-data-"+f).text()),s;t.merge(u.sysConfig,o);s={id:c.itemId,componentGuid:n.componentGuid,listUniqueName:n.listUniqueName,dataPromise:r.loadDetailInfo};u.detail=i.detail(s);u.detail.fieldTypeManager=e;u.detail.fieldTypeManager.init({fieldOptions:{relativeTemplatePath:o.TemplateUrl}});u.$watch(function(){return(u.detail.fields||[]).length},function(){t.forEach(u.detail.fields,function(n){n.meta.setting&&(n.meta.settingObj=t.fromJson(n.meta.setting))})})}};u.builder={};u.builderInit={init:function(n,f){var l=this,c=t.element("#flexible-ext-data-"+f).text(),o=JSON.parse(c),s,h;t.merge(u.sysConfig,o);s=JSON.parse(t.element("#flexible-data-"+f).text());h={listViewInfo:s,componentGuid:n.componentGuid,listUniqueName:n.listUniqueName,dataPromise:r.loadListInfo,getFilters:r.getFilters,getListDataSource:r.getListDataSource,getMultiDataSource:r.getMultiDataSource,setLookupDataForList:function(n,i,r){var u=Enumerable.From(i).Where("c => c.fieldTypeID==29").ToArray();t.forEach(u,function(i){var u=JSON.parse(i.setting||"{}");if(u&&u.selectedSourceValue){var s=i.uniqueName+"_Setting",f=i.uniqueName+"_SettingObj",e=i.uniqueName+"_RefData",o=Enumerable.From(r).Where("c => c.data =="+u.selectedSourceValue).FirstOrDefault().items;t.forEach(n,function(n){n[e]=Enumerable.From(o).Where("c => c.ID=="+n[i.uniqueName]).FirstOrDefault();n[f]=u})}})},setupData:function(n){var t=u.sysConfig.DetailUrl;t.DefaultLink=t.DefaultLink.replace(t.FlexComponentUrl,n.componentInfo.componentUrl);t.DefaultLink=t.DefaultLink.replace(t.FlexListUrl,n.componentInfo.listUrl);t.DefaultLink=t.DefaultLink.replace(t.NavUrl,t.NavId?t.NavId:"");u.sysConfig.DetailUrl=t},fieldTypeManager:e};u.builder=i.builder(h);u.builder.fieldTypeManager||(u.builder.fieldTypeManager=e);u.builder.fieldTypeManager.init({fieldOptions:{relativeTemplatePath:o.TemplateUrl}})}}}])}(window,angular),function(n,t){"use strict";function i(n,t){function i(i){var r=t.apiEndPoint+"api/FeFlexComponent/GetDetail";return n({method:"POST",url:r,data:i})}function r(i){var r=t.apiEndPoint+"api/FeFlexComponent/GetFilters";return n({method:"POST",url:r,data:i})}function u(i){var r=t.apiEndPoint+"api/FeFlexComponent/getListDataSource";return n({method:"POST",url:r,data:i})}function f(i){var r=t.apiEndPoint+"api/FeFlexComponent/getMultiDataSource";return n({method:"POST",url:r,data:i})}function e(i){var r=t.apiEndPoint+"api/FeFlexComponent/Get";return n({method:"POST",url:r,data:i})}function o(i){var r=t.apiEndPoint+"api/FeFlexComponent/GetLookupData";return n({method:"POST",url:r,data:i})}return{loadDetailInfo:i,loadListInfo:e,getLookupValues:o,getFilters:r,getListDataSource:u,getMultiDataSource:f}}var r=t.module("vi.fe.componentbuilder.widget");r.factory("flexComponentService",i);i.$inject=["$http","builderConfig"]}(window,angular),function(n,t){var i=t.module("viAppVisionLiveFlexibleComponentFields",["vi.ui"]);i.constant("builderConfig",{apiEndPoint:"",cms6Endpoint:""});i.config(["builderConfig",function(t){t.apiEndPoint=n.visionLiveConfig.flexibleComponent.serverURL}]);i.filter("to_trusted",["$sce",function(n){return function(t){return n.trustAsHtml(t)}}])}(window,angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("componentLookupItem",["$compile",function(n){return{restrict:"AE",replace:!1,scope:{format:"=lookupFormat",m:"=lookupRecord"},link:function(t,i){t.$watch(function(){return t.format},function(){t&&t.m&&(i.html(t.format),n(i.contents())(t))})}}}])}(window,window.angular),function(n,t){function u(){}function f(){this._items={};this._baseType=u;this._options={fieldOptions:{}};this._fieldTypes=[];this.fieldTypeDataList=FIELDTYPEDATALIST}function i(n){return t.isUndefined(n)||n===""||n===null||n!==n||typeof n==undefined}function r(n){var i="^",r="$",t=n;return n.indexOf(i)!=0&&(t=i+t),n.indexOf(r)!=n.length-1&&(t=t+r),t}var e=t.module("viAppVisionLiveFlexibleComponentFields");FIELDVALUETYPES={NUMBER:1,STRING:2,HTML:3,DATETIME:4,TIME:5,FLOAT:6,BIT:7,LOOKUP:8};FIELDTYPEDATALIST=[{id:1,name:"SingleLineText",displayName:"Single Line Text",css:"single-line-icon",order:1,advanced:!1,sortable:!0,listShown:!0},{id:2,name:"ParagraphText",displayName:"Paragraph Text",css:"paragraph-icon",order:2,advanced:!1,sortable:!0,listShown:!0},{id:3,name:"SingleDropdown",displayName:"Single Dropdown",css:"single-dropdown-icon",order:3,advanced:!1,sortable:!0,listShown:!0},{id:5,name:"Number",displayName:"Number",css:"number-icon",order:5,advanced:!1,sortable:!0,listShown:!0},{id:8,name:"RichHtml",displayName:"Rich-text Editor (HTML)",css:"editor-icon",order:8,advanced:!1,sortable:!0,listShown:!1},{id:21,name:"DateTime",displayName:"Date/Time",css:"date-time-icon",order:21,advanced:!0,sortable:!0,listShown:!0},{id:23,name:"Phone",displayName:"Phone",css:"phone-icon",order:23,advanced:!0,sortable:!0,listShown:!0},{id:25,name:"Website",displayName:"Website",css:"website-icon",order:25,advanced:!0,sortable:!0,listShown:!0},{id:26,name:"Email",displayName:"Email",css:"email-icon",order:26,advanced:!0,sortable:!0,listShown:!0},{id:27,name:"Thumbnail",displayName:"Thumbnail",css:"thumbnail-icon",order:27,advanced:!0,sortable:!1,listShown:!0},{id:29,name:"Lookup",displayName:"Lookup",order:29,advanced:!0,sortable:!1,listShown:!0},];PATTERNS={numberPattern:"[0-9]+",uniqueNamePattern:"[a-zA-Z][a-zA-Z0-9_]*",emailPattern:"([\\w\\-\\.]+)@(([[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w\\-]+\\.)+))([a-zA-Z]{1,4}|[0-9]{1,3})(]?)",urlPattern:"(((http|ftp|https)://)?[\\w-]+(\\.[\\w-]+)+([\\w.,@?^=%&:\\/~+#-]*[\\w@?^=%&\\/~+#-])?)|((\\/?[\\w-]+)(\\/[\\w-]+)*\\/?)",internalUrlPattern:"(\\/?[\\w-]+)(\\/[\\w-?&=]+)*\\/?",cssClassNamePattern:"([a-zA-Z0-9\\-_]+)( [a-zA-Z0-9\\-_]+)?",phonePattern:"(\\d{3})(\\d{3})(\\d{4})"};u.prototype={_seed:new Date,_name:"fieldTypeBase",_options:{relativeTemplatePath:""},uniqueNameValidator:"fieldSettingUniqueName, fieldSettingUniqueNameAllow",_getSrc:function(n){return this._options.relativeTemplatePath+n+this._name+".tpl?t="+this._seed.getMilliseconds()},init:function(n){this._seed=new Date;t.extend(this,PATTERNS);t.extend(this._options,n||{})},_mergeDefaultFieldMeta:function(n){var i=t.extend({allowSearch:!1,allowDuplicate:!0,valueType:FIELDVALUETYPES.STRING},n);return this._redefineProperties(i),i},_makeNameUnique:function(n){typeof n.id!="undefined"&&n.id||(n.uniqueName=(n._label||"").replace(/[^0-9a-z_]+/ig,""))},_redefineProperties:function(n){var t=this;Object.defineProperty(n,"checkForDuplicates",{get:function(){return!this.allowDuplicate},set:function(n){this.allowDuplicate=!n}});n._label=n.label;t._makeNameUnique(n);Object.defineProperty(n,"label",{get:function(){return this._label},set:function(n){this._label=n;t._makeNameUnique(this)}})},createFieldMeta:function(){return{}},initFieldMeta:function(n){var i=this.createFieldMeta();n.meta.setting&&(i.settingObj=t.fromJson(n.meta.setting));n.meta=t.extend(i,n.meta);n.meta.errorMessages={flexComponentFieldDuplicate:"This field value already exists."};n.meta.requiredErrorMessage&&(n.meta.errorMessages.required=n.meta.requiredErrorMessage);this.initAdditionalErrorMesssages(n)},saveFieldMeta:function(n){n.meta.settingObj!=undefined&&(n.meta.setting=t.toJson(n.meta.settingObj))},initFieldData:function(n,i){var r=!i||i.id<=0;n.data=n.data||{fieldMetaID:n.meta.id};r&&(n.data.valueNumber||(n.data.valueNumber=n.meta.defaultValueNumber),n.data.valueString||(n.data.valueString=n.meta.defaultValueString),n.data.valueHTML||(n.data.valueHTML=n.meta.defaultValueHTML),n.data.valueFloat||(n.data.valueFloat=n.meta.defaultValueFloat),n.data.valueDatetime||(n.data.valueDatetime=n.meta.defaultValueDatetime),n.data.valueTime||(n.data.valueTime=n.meta.defaultValueTime),n.data.valueBit||(n.data.valueBit=n.meta.defaultValueBit));t.forEach(n.meta.children,function(n){n.data=n.data||{fieldMetaID:n.meta.id};r&&(n.data.valueNumber||(n.data.valueNumber=n.meta.defaultValueNumber),n.data.valueString||(n.data.valueString=n.meta.defaultValueString),n.data.valueHTML||(n.data.valueHTML=n.meta.defaultValueHTML),n.data.valueFloat||(n.data.valueFloat=n.meta.defaultValueFloat),n.data.valueDatetime||(n.data.valueDatetime=n.meta.defaultValueDatetime),n.data.valueTime||(n.data.valueTime=n.meta.defaultValueTime),n.data.valueBit||(n.data.valueBit=n.meta.defaultValueBit))});this.initAdditionalFieldData(n,r)},initAdditionalFieldData:function(){},initAdditionalErrorMesssages:function(){},formatGridData:function(n){return{value:n!=null?n.toString():n,isHtml:!1,formatStr:null}},getBuilderSettingSrc:function(){return this._getSrc("FieldBuSetting/")},getBuilderDisplaySrc:function(){return this._getSrc("FieldBuDisplay/")},getBackendEditSrc:function(){return this._getSrc("FieldBeEdit/")},getBackendDisplaySrc:function(){return this._getSrc("FieldBeDisplay/")},getFrontendDisplaySrc:function(){return this._getSrc("FieldFeDisplay/")},getFrontendListDisplaySrc:function(){return this._getSrc("FieldFeLiDisplay/")},validateField:function(n,t){return this.validateFieldBase(n,t)},validateFieldBase:function(n,t){var r=!0,u="";return t.isRequired&&i(n)&&(r=!1,u+=t.requiredErrorMessage?t.requiredErrorMessage:t.uniqueName+" is required."),{valid:r,message:u}}};f.prototype={_defineClass:function(n,i,r){i&&t.extend(n.prototype,i.prototype);r&&t.extend(n.prototype,r)},init:function(n){var i=this;t.extend(i._options,n||{});t.forEach(i._items,function(n,t){var r=new n;r.init(i._options.fieldOptions);i._fieldTypes[t]=r})},defineFieldType:function(n,t,i){var f=this._baseType,r,u;return t&&this._items[t]!=undefined&&(f=this._items[t]),r=function(){},this._defineClass(r,f,i),u=Enumerable.From(FIELDTYPEDATALIST).Where('$.name=="'+n+'"').FirstOrDefault(),r.prototype._name=n,r.prototype.className=n.toLocaleLowerCase(),r.prototype.data=u,r.prototype.sortable=u?u.sortable:!0,this._items[n]=r,r},getFieldTypes:function(){return this._fieldTypes},getFieldType:function(n){var t=Enumerable.From(FIELDTYPEDATALIST).Where("$.id == "+n).Select("$.name").FirstOrDefault();return this._fieldTypes[t]}};e.factory("fieldTypeManager",["$http","$interpolate","jsonDataUtil","viUIDateTimeConverter",function(u,e,o,s){var h=new f;return o.init(),h.defineFieldType("SingleLineText",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,label:"Single Line Text",listIsSortable:!0,settingObj:{rangeMin:0,rangeMax:70,rangeErrorMessage:null,regex:null,regexErrorMessage:null}})},initAdditionalErrorMesssages:function(n){n.meta.settingObj.rangeErrorMessage&&(n.meta.errorMessages.minlength=n.meta.settingObj.rangeErrorMessage,n.meta.errorMessages.maxlength=n.meta.settingObj.rangeErrorMessage);n.meta.settingObj.regexErrorMessage&&(n.meta.errorMessages.pattern=n.meta.settingObj.regexErrorMessage)},validateField:function(n,t){var f=this.validateFieldBase(n,t),u;return i(n)||t.setting&&(u=JSON.parse(t.setting),u.rangeMin>0&&n.length<u.rangeMin&&(f.valid=!1,f.message+=u.rangeErrorMessage?u.rangeErrorMessage:t.uniqueName+" should not be less than "+u.rangeMin+" character(s).",f.message+="\n"),n.length>u.rangeMax&&(f.valid=!1,f.message+=u.rangeErrorMessage?u.rangeErrorMessage:t.uniqueName+" should not be more than "+u.rangeMax+" characters.",f.message+="\n"),u.regex&&(f.valid=n.match(r(u.regex)),f.valid||(f.message+=u.regexErrorMessage?u.regexErrorMessage:"Invalid "+t.uniqueName+".",f.message+="\n"))),f}}),h.defineFieldType("Number",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.NUMBER,label:"Number",listIsSortable:!0,settingObj:{rangeMin:0,rangeMax:50,rangeErrorMessage:null}})},initAdditionalErrorMesssages:function(n){n.meta.settingObj.rangeErrorMessage&&(n.meta.errorMessages.min=n.meta.settingObj.rangeErrorMessage,n.meta.errorMessages.max=n.meta.settingObj.rangeErrorMessage);n.meta.errorMessages.pattern="This field is a number."},validateField:function(n,t){var u=this.validateFieldBase(n,t),e,f;return i(n)||(e=parseInt(n),(isNaN(e)||!n.match(/^\d+$/))&&(u.valid=!1,u.message+="Invalid "+t.uniqueName,u.message+="\n"),e&&t.setting&&(f=JSON.parse(t.setting),(e<f.rangeMin||e>f.rangeMax)&&(u.valid=!1,u.message+=f.rangeErrorMessage?f.rangeErrorMessage:t.uniqueName+" should be between "+f.rangeMin+" and "+f.rangeMax+".",u.message+="\n"),f.regex&&(u.valid=e.match(r(f.regex)),u.valid||(u.message+=f.regexErrorMessage?f.regexErrorMessage:"Invalid "+t.uniqueName+" format.",u.message+="\n")))),u}}),h.defineFieldType("SingleDropdown",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,label:"Single Dropdown",maxID:0,includeInBeList:!1,listIsSortable:!0,settingObj:{selectedValue:"",sourceTypeID:"0",customSource:[{value:"Option 1",text:"Option 1"},{value:"Option 2",text:"Option 2"},{value:"Option 3",text:"Option 3"}]},_sourceTypes:[{id:"0",name:"Custom"},{id:"1",name:"U.S.States"},{id:"2",name:"Canadian Provinces"}],_dataSource:o.states,indexes:[],initDatasource:function(){var n=0,t;this.maxID=0;for(t in this.settingObj.customSource)this.indexes[n++]=this.maxID++},addItem:function(n,i){var r=t.element(n.target).scope(),u;r&&r.scrollSticky&&r.scrollSticky();u={value:" ",text:""};this.settingObj.customSource.splice(i+1,0,u);this.indexes.splice(i+1,0,this.maxID++)},removeItem:function(n){this.settingObj.customSource.splice(n,1);this.indexes.splice(n,1)},sort:function(n,t){var i=n,r=t.next!=undefined?i>t.next?t.next:t.next-1:this.settingObj.customSource.length-1;this.settingObj.customSource.splice(r,0,this.settingObj.customSource.splice(i,1)[0])}})},initAdditionalFieldData:function(n,t){t&&!n.data.valueString&&n.meta.settingObj&&n.meta.settingObj.selectedValue&&(n.data.valueString=n.meta.settingObj.selectedValue)},validateField:function(n,t){var u=this.validateFieldBase(n,t),f,r;if(!i(n)){f=JSON.parse(t.setting);r=null;switch(f.sourceTypeID){case"0":r=Enumerable.From(f.customSource).Where("$.value.toLocaleLowerCase() == '"+n.toLocaleLowerCase()+"'").FirstOrDefault();r&&(u.value=r.value);break;case"1":r=Enumerable.From(o.states).Where("$.Country == 'US' && $.Abbreviation == '"+n.toLocaleUpperCase()+"'").FirstOrDefault();r&&(u.value=r.Abbreviation);break;case"2":r=Enumerable.From(o.states).Where("$.Country == 'CA' && $.Abbreviation == '"+n.toLocaleUpperCase()+"'").FirstOrDefault();r&&(u.value=r.Abbreviation)}r||(u.valid=!1,u.message+="Invalid "+t.uniqueName+".\n")}return u}}),h.defineFieldType("Address",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,label:"Address"})}}),h.defineFieldType("FullName",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,label:"Full Name"})}}),h.defineFieldType("Website",null,{createFieldMeta:function(){var n=this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,label:"Website",listIsSortable:!0,settingObj:{allowExternal:!1,allowExternalErrorMessage:null},children:{Text:{valueType:FIELDVALUETYPES.STRING,label:"Text",display:!1,fieldTypeId:1},Link:{valueType:FIELDVALUETYPES.STRING,label:"Link",display:!0,fieldTypeId:25}}});return Object.defineProperty(n,"urlpattern",{get:function(){return this.settingObj&&this.settingObj.allowExternal==!0?PATTERNS.urlPattern:PATTERNS.internalUrlPattern},set:function(){}}),n},initAdditionalErrorMesssages:function(n){n.meta.settingObj&&n.meta.settingObj.allowExternalErrorMessage&&(n.meta.errorMessages.pattern=n.meta.settingObj.allowExternalErrorMessage)},validateField:function(t,r){var e="Invalid "+r.uniqueName+" format.\n",u=this.validateFieldBase(t,r),f;return i(t)||(f=JSON.parse(r.setting),f.allowExternal?(u.valid=$.isUrl(t)||$.isIntranetUrl(n.visionOptions.virtualApplicationPath+t),u.valid||(u.message+=e)):(u.valid=$.isIntranetUrl(n.visionOptions.virtualApplicationPath+t),u.valid?$.isUrl(t)&&(u.valid=!1,u.message+=f.allowExternalErrorMessage?f.allowExternalErrorMessage:e):u.message+=e)),u},formatGridData:function(n,t,i,r){var u=r&&r.Text&&r.Text.display&&i[r.Text.field]||r&&r.Link&&r.Link.display&&i[r.Link.field]||n,f=r&&r.Link&&r.Link.display?i[r.Link.field]:n;return{value:f?"<a class='ellipsis' title='"+u+"' href='"+f+"' target='_blank'>"+$("<div><\/div>").text(u).html()+"<\/a>":"",isHtml:!0}}}),h.defineFieldType("RichHtml",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.HTML,listIsSortable:!1,label:"Rich-text Editor"})}}),h.defineFieldType("DateTime",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.DATETIME,label:"Date and Time",listIsSortable:!0,settingObj:{datetimeRangeMin:null,datetimeRangeMax:null,datetimeRangeErrorMessage:null,datetimeUseDateOnly:!1},minDateTimeFrom:function(){return"1/1/1800 12:00 AM"},maxDateTimeTo:function(){return"12/31/2099 12:00 AM"},minDateTime:function(){return this.settingObj.datetimeRangeMin||"1/1/1800 12:00 AM"},maxDateTime:function(){return this.settingObj.datetimeRangeMax||"12/31/2099 12:00 AM"}})},initAdditionalErrorMesssages:function(n){n.meta.settingObj&&n.meta.settingObj.datetimeRangeErrorMessage&&(n.meta.errorMessages.datetimerange=n.meta.settingObj.datetimeRangeErrorMessage);n.meta.requiredErrorMessage&&(n.meta.errorMessages.required=n.meta.requiredErrorMessage)},formatGridData:function(n,t){var u=t.currentSettingExt&&t.currentSettingExt.datetimeUseDateOnly?t.ShortDateFormatString:t.ShortDateFormatString+" "+t.ShortTimeFormatStringWithoutSecond,r="",i=s.stringToDateTime(null,n,null,!0);return i&&(r=t.currentSettingExt&&t.currentSettingExt.datetimeUseDateOnly?s.dateToString(null,i):s.dateTimeToString(null,i," ")),{value:r,isHtml:!1,formatStr:u}},validateField:function(n,t){var r=this.validateFieldBase(n,t),f,u;if(!i(n))try{f=Date.parse(n);isNaN(f)?(r.valid=!1,r.valid||(r.message+="Invalid "+t.uniqueName+".\n")):f&&t.setting&&(u=JSON.parse(t.setting),(f>Date.parse(u.datetimeRangeMax)||f<Date.parse(u.datetimeRangeMin))&&(r.valid=!1,r.message+=u.datetimeRangeErrorMessage?u.datetimeRangeErrorMessage:t.uniqueName+" should be between "+u.datetimeRangeMin+" and "+$.formatDate($.parseDate(u.datetimeRangeMax),"MM/dd/yyyy hh:mm tt"),r.message+="\n"))}catch(e){r.valid=!1;r.valid||(r.message+="Invalid "+t.uniqueName+".\n")}return r}}),h.defineFieldType("ParagraphText",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,label:"Paragraph Text",listIsSortable:!0,settingObj:{rangeMin:0,rangeMax:500,rangeErrorMessage:null,regex:null,regexErrorMessage:null}})},initAdditionalErrorMesssages:function(n){n.meta.settingObj.rangeErrorMessage&&(n.meta.errorMessages.minlength=n.meta.settingObj.rangeErrorMessage,n.meta.errorMessages.maxlength=n.meta.settingObj.rangeErrorMessage);n.meta.settingObj.regexErrorMessage&&(n.meta.errorMessages.pattern=n.meta.settingObj.regexErrorMessage)},validateField:function(n,t){var f=this.validateFieldBase(n,t),u;return i(n)||t.setting&&(u=JSON.parse(t.setting),u.rangeMin>0&&n.length<u.rangeMin&&(f.valid=!1,f.message+=u.rangeErrorMessage?u.rangeErrorMessage:t.uniqueName+" should not be less than "+u.rangeMin+" character(s).",f.message+="\n"),n.length>u.rangeMax&&(f.valid=!1,f.message+=u.rangeErrorMessage?u.rangeErrorMessage:t.uniqueName+" should not be more than "+u.rangeMax+" characters.",f.message+="\n"),u.regex&&(f.valid=n.match(r(u.regex)),f.valid||(f.message+=u.regexErrorMessage?u.regexErrorMessage:"Invalid "+t.uniqueName+".",f.message+="\n"))),f}}),h.defineFieldType("Email",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,listIsSortable:!0,label:"Email"})},validateField:function(n,t){var r=this.validateFieldBase(n,t);return i(n)||(r.valid=n.match(this.emailPattern),r.valid||(r.message+="Invalid "+t.uniqueName+".\n")),r}}),h.defineFieldType("Phone",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.STRING,listIsSortable:!0,label:"Phone",format:n.visionApps.cms_core.PhoneFormat})},formatGridData:function(n,t){return{value:$.viFormatPhone(n,t.PhoneFormatString),isHtml:!1,formatStr:t.PhoneFormatString}},validateField:function(n,t){var r=this.validateFieldBase(n,t);return i(n)||(r.valid=n.match(this.phonePattern)&&n.length==10,r.valid||(r.message+="Invalid "+t.uniqueName+".\n")),r}}),h.defineFieldType("Thumbnail",null,{createFieldMeta:function(){return this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.NUMBER,listIsSortable:!1,label:"Thumbnail"})},formatGridData:function(n,t){return{value:n?'<img src="'+t.imgBaseUrl+"?id="+n+'" alt=""/>':"",isHtml:!0}}}),h.defineFieldType("Lookup",null,{createFieldMeta:function(){var n=this._options.apiEndPoint,r=this._options.currentComponentID,i=this._mergeDefaultFieldMeta({valueType:FIELDVALUETYPES.LOOKUP,listIsSortable:!1,lookupListID:null,label:"Component Source",settingObj:{displayFormat:"",selectedSourceValue:"",sortBy:""},applyComponentSource:function(){var i=this;this.lookupListID=this.settingObj.selectedSourceValue;n&&u({method:"POST",data:{currentNonPublishedComponentID:r},url:n+"admin/api/component/builderGetComponentSource"}).then(function(n){i._componentSource.splice(0,i._componentSource.length);t.forEach(n.data,function(n){i._componentSource.push({text:n.name,value:""+n.listMetaID,fieldNames:n.fieldNames,singleLineTextFieldName:n.singleLineTextFieldName})})})},applyDataSource:function(){function o(n,t){return t.CreatedDate=t.CreatedDate.replace("T"," "),n.CreatedDate=n.CreatedDate.replace("T"," "),new Date(n.CreatedDate).valueOf()-new Date(t.CreatedDate).valueOf()}function s(n,t){return n.CreatedDate=n.CreatedDate.replace("T"," "),t.CreatedDate=t.CreatedDate.replace("T"," "),new Date(t.CreatedDate).valueOf()-new Date(n.CreatedDate).valueOf()}function h(n,t){var i=e(n);return i({m:t})}var i=this,f,r;this.lookupListID=this.settingObj.selectedSourceValue;f=i.settingObj.sortBy||"";r=i.settingObj.displayFormat;n&&u({method:"POST",data:{listMetaID:this.settingObj.selectedSourceValue},url:n+"api/feFlexComponent/getListDataSource"}).then(function(n){var c,e,l,a,v,u,y;if(i._dataSource.splice(0,i._dataSource.length),t.forEach(n.data,function(n){i._dataSource.push(n)}),f=="0")i._dataSource.sort(s);else if(f=="1")i._dataSource.sort(o);else if(c=new RegExp("{{([a-zA-Z0-9.]*?)}}","g"),c.test(r)){for(e=Enumerable.From(i._dataSource),l=r.match(c),u=0;u<l.length;u++)a=l[u].replace("{{","").replace("m.","").replace("}}",""),e=u==0?e.OrderBy("$."+a):e.ThenBy("$."+a);i._dataSource=e.ToArray()}if(v=[],i._dataSource)for(u=0;u<i._dataSource.length;u++)y=i._dataSource[u],v.push({text:h(r,y),value:""+y.ID});i._sourceItems=v})},changeComponentSource:function(){var n=this,t,i,r;if(n.lookupListID=n.settingObj.selectedSourceValue,t=null,n.settingObj.selectedSourceValue)for(i=0,r=n._componentSource.length;i<r;i++)if(n._componentSource[i].value==n.settingObj.selectedSourceValue){t=n._componentSource[i];break}t&&t.length!=0?(n.settingObj.displayFormat="{{m."+t.singleLineTextFieldName+"}}",n.applyDataSource()):(n.settingObj.displayFormat="",n._dataSource.splice(0,n._dataSource.length))},changeSortBy:function(){var n=this;n.applyDataSource()},_componentSource:[],_dataSource:[]});return i.applyComponentSource(),i},initAdditionalErrorMesssages:function(n){n.meta.applyDataSource()}}),h}])}(window,angular),function(n,t){var i=t.module("viAppVisionLiveFlexibleComponentFields");i.factory("jsonDataUtil",["$http","$q",function(t){function r(){u()}function u(){t({method:"GET",url:n.visionOptions.cmsAdminEndPoint+"Components/Scripts/app/jsondata/states.json"}).then(function(n){i.states=n.data})}var i={init:r,states:[]};return i}])}(window,angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeDatetime",["$compile",function(n){var t='<vi-sys-format-date cur-val="curVal" setting-str="settingStr" ><\/vi-sys-format-date>';return{restrict:"EA",template:t,link:function(i,r){i.curVal=i.record[i.field.meta.uniqueName];i.settingStr=i.field.meta.setting;r.html(t);n(r.contents())(i)}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeEmail",["$compile",function(){return{restrict:"EA",template:"{{formatter.Email.AsciiEncode(record[field.meta.uniqueName])}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeLookup",["$compile",function(){return{restrict:"EA",template:'<component-lookup-item lookup-format="field.meta.settingObj.displayFormat" lookup-record="record[field.meta.uniqueName+\'_RefData\']"><\/component-lookup-item>',link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeNumber",["$compile",function(){return{restrict:"EA",template:"{{record[field.meta.uniqueName]}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeParagraphtext",["$compile",function(){return{restrict:"EA",template:"{{record[field.meta.uniqueName]}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDePhone",["$compile",function(){return{restrict:"EA",template:'<a class="phone_link" ng-if="record[field.meta.uniqueName]" href="tel:{{record[field.meta.uniqueName]}}">{{formatter.Phone.ConvertToString(record[field.meta.uniqueName])}}<\/a>',link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeRichhtml",["$compile","$sce","$filter",function(n,t,i){return{restrict:"EA",template:'<ng-bind-html ng-bind-html="trustedContent"><\/ng-bind-html>',link:function(n){n.trustedContent=t.trustAsHtml(i("maskText")(n.field.data.valueHtml))}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeShared",["$compile",function(n){return{restrict:"EA",scope:{field:"=",record:"=",formatter:"=",listTypes:"="},link:function(t,i){var r=Enumerable.From(t.listTypes).Where("c => c.id=="+t.field.meta.fieldTypeID).FirstOrDefault().name.toLowerCase(),u="<vi-flex-fe-de-"+r+"><\/vi-flex-fe-de-"+r+">";i.html(u);n(i.contents())(t)}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeSingledropdown",["$compile",function(){return{restrict:"EA",template:"{{record[field.meta.uniqueName]}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeSinglelinetext",["$compile",function(){return{restrict:"EA",template:"{{record[field.meta.uniqueName]}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeThumbnail",["$compile",function(){return{restrict:"EA",template:'<img src="{{formatter.Thumbnail.ConvertToString(record[field.meta.uniqueName],true)}}" alt="" />',link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeDeWebsite",["$compile",function(){return{restrict:"EA",template:'<a href="{{formatter.Website.MaskSplashText(websiteLink)}}" target="_blank">{{websiteText}}<\/a>',link:function(n){n.websiteText=n.record[n.field.meta.uniqueName+"_Text"]||n.record[n.field.meta.uniqueName+"_Link"]||n.record[n.field.meta.uniqueName];n.websiteLink=n.record[n.field.meta.uniqueName+"_Link"]||n.record[n.field.meta.uniqueName]}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiDatetime",["$compile",function(n){var t='<vi-sys-format-date cur-val="curVal" setting-str="settingStr" ><\/vi-sys-format-date>';return{restrict:"EA",template:t,link:function(i,r){i.curVal=i.record[i.header.uniqueName];i.settingStr=i.header.setting;r.html(t);n(r.contents())(i)}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiEmail",["$compile",function(){return{restrict:"EA",template:"{{formatter.Email.AsciiEncode(record[header.uniqueName])}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiLookup",["$compile",function(){return{restrict:"EA",template:"<component-lookup-item lookup-format=\"record[header.uniqueName+'_SettingObj'].displayFormat\" lookup-record=\"record[header.uniqueName+'_RefData']\"><\/component-lookup-item>",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiNumber",["$compile",function(){return{restrict:"EA",template:"{{record[header.uniqueName]}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiParagraphtext",["$compile",function(){return{restrict:"EA",template:"{{record[header.uniqueName]}}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiPhone",["$compile",function(){return{restrict:"EA",template:'<a class="phone_link" ng-if="record[header.uniqueName]" href="tel:{{record[header.uniqueName]}}">{{ formatter.Phone.ConvertToString(record[header.uniqueName]) }}<\/a>',link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiRichhtml",["$compile",function(){return{restrict:"EA",template:'<ng-bind-html ng-bind-html="record[header.uniqueName]"><\/ng-bind-html>',link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiShared",["$compile",function(n){return{restrict:"EA",scope:{header:"=",record:"=",formatter:"=",listTypes:"="},link:function(t,i){var r=Enumerable.From(t.listTypes).Where("c => c.id=="+t.header.fieldTypeID).FirstOrDefault().name.toLowerCase(),u="<vi-flex-fe-li-"+r+"><\/vi-flex-fe-li-"+r+">";i.html(u);n(i.contents())(t)}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiSingledropdown",["$compile",function(){return{restrict:"EA",template:"{{record[header.uniqueName] }}",link:function(){}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiSinglelinetext",["$compile",function(){return{restrict:"EA",template:'<span ng-if="!header.isFirstTextColumn">{{record[header.uniqueName]}}<\/span><a ng-if="header.isFirstTextColumn && isEditMode" href="javascript:void(0);" title="You cannot click this link in Edit Mode">{{record[header.uniqueName]}}<\/a><a ng-if="header.isFirstTextColumn && isReviewMode" href="javascript:void(0);">{{record[header.uniqueName]}}<\/a><a ng-if="header.isFirstTextColumn && !isEditMode && !isReviewMode" href="{{href}}">{{record[header.uniqueName]}}<\/a>',link:function(n){var t=location.href.indexOf("&loadingmode=EditContent")>=0||location.href.indexOf("/-loadingmode-EditContent")>=0||location.href.indexOf("?loadingmode=EditContent")>=0,i=location.href.indexOf("&loadingmode=ReviewContent")>=0||location.href.indexOf("/-loadingmode-ReviewContent")>=0||location.href.indexOf("?loadingmode=ReviewContent")>=0;n.isEditMode=visionOptions.loggedIn?t:!1;n.isReviewMode=visionOptions.loggedIn?i:!1;n.isEditMode||n.isReviewMode||(n.href=n.formatter.DetailUrl.HrefLink(n.record.ID))}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiThumbnail",["$compile",function(){return{restrict:"EA",template:'<img ng-if="imageSrc" src="{{imageSrc}}" alt="" />',link:function(n){var t=n.record[n.header.uniqueName];t&&(n.imageSrc=n.formatter.Thumbnail.ConvertToString(t,!0))}}}])}(window,window.angular),function(n,t){"use strict";var i=t.module("viAppVisionLiveFlexibleComponentFields");i.directive("viFlexFeLiWebsite",["$compile",function(){return{restrict:"EA",template:'<a ng-if="showField" href="{{linkUrl}}" target="_blank">{{webSite}}<\/a>',link:function(n){var t=n.header,i=n.record,r=n.formatter,u=t.children?i[t.children.Link.field]:i[t.uniqueName],f=r.Website.MaskSplashText(t.children?i[t.children.Link.field]:i[t.uniqueName]),e=t.children?t.children.Text.display&&i[t.children.Text.field]?i[t.children.Text.field]:i[t.children.Link.field]:i[t.uniqueName];n.showField=u;n.linkUrl=f;n.webSite=e}}}])}(window,window.angular);;