From 893287cf3ad01bbb24e84f194467e5a3504ec192 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 25 Sep 2017 15:36:32 +0200 Subject: [PATCH 01/18] first attemt to enhance relations in additional data --- OpenContent/Components/Json/JsonUtils.cs | 15 +++++--- .../Components/Render/ModelFactoryBase.cs | 37 +++++++++++-------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/OpenContent/Components/Json/JsonUtils.cs b/OpenContent/Components/Json/JsonUtils.cs index 8d1f8dff..a12f32b7 100644 --- a/OpenContent/Components/Json/JsonUtils.cs +++ b/OpenContent/Components/Json/JsonUtils.cs @@ -173,7 +173,7 @@ public static void SimplifyJson(JToken o, string culture) } } - public static void LookupJson(JObject o, JObject additionalData, JObject schema, JObject options, bool includelabels, List includes, Func objFromCollection, string prefix = "") + public static void LookupJson(JObject o, JObject additionalData, JObject schema, JObject options, bool includelabels, List includes, Func objFromCollection, Func alpacaForAddData, string prefix = "") { foreach (var child in o.Children().ToList()) { @@ -229,7 +229,7 @@ public static void LookupJson(JObject o, JObject additionalData, JObject schema, var obj = value as JObject; if (obj != null) { - LookupJson(obj, additionalData, sch["items"] as JObject, opt["items"] as JObject, includelabels, includes, objFromCollection, field); + LookupJson(obj, additionalData, sch["items"] as JObject, opt["items"] as JObject, includelabels, includes, objFromCollection, alpacaForAddData, field); } else if (lookup) { @@ -238,7 +238,10 @@ public static void LookupJson(JObject o, JObject additionalData, JObject schema, { try { - newArray.Add(GenerateObject(additionalData, dataKey, val.ToString(), dataMember, valueField, childrenField)); + var genObj = GenerateObject(additionalData, dataKey, val.ToString(), dataMember, valueField, childrenField); + newArray.Add(genObj); + var alpaca = alpacaForAddData(dataKey); + LookupJson(genObj, additionalData, alpaca["schema"]?["items"] as JObject, alpaca["options"]?["items"] as JObject, includelabels, includes, objFromCollection, alpacaForAddData, field); } catch (System.Exception) { @@ -289,7 +292,7 @@ public static void LookupJson(JObject o, JObject additionalData, JObject schema, else if (childProperty.Value is JObject) { var obj = childProperty.Value as JObject; - LookupJson(obj, additionalData, sch, opt, includelabels, includes, objFromCollection, field); + LookupJson(obj, additionalData, sch, opt, includelabels, includes, objFromCollection, alpacaForAddData, field); } else if (childProperty.Value is JValue) { @@ -298,7 +301,9 @@ public static void LookupJson(JObject o, JObject additionalData, JObject schema, string val = childProperty.Value.ToString(); try { - o[childProperty.Name] = GenerateObject(additionalData, dataKey, val, dataMember, valueField, childrenField); + var obj = GenerateObject(additionalData, dataKey, val, dataMember, valueField, childrenField); + o[childProperty.Name] = obj; + LookupJson(obj, additionalData, sch, opt, includelabels, includes, objFromCollection, alpacaForAddData, field); } catch (System.Exception) { diff --git a/OpenContent/Components/Render/ModelFactoryBase.cs b/OpenContent/Components/Render/ModelFactoryBase.cs index 9a426eaf..5a8b902a 100644 --- a/OpenContent/Components/Render/ModelFactoryBase.cs +++ b/OpenContent/Components/Render/ModelFactoryBase.cs @@ -150,24 +150,29 @@ protected void EnhanceSelect2(JObject model) var includelabels = _templateFiles != null && _templateFiles.LabelsInTemplate; var ds = DataSourceManager.GetDataSource(_manifest.DataSource); var dsContext = OpenContentUtils.CreateDataContext(_module); - JsonUtils.LookupJson(model, _additionalData, _schemaJson, _optionsJson, includelabels, includes, (col, id) => - { - // collection enhancement - dsContext.Collection = col; - var dsItem = ds.Get(dsContext, id); - if (dsItem != null && dsItem.Data is JObject) + JsonUtils.LookupJson(model, _additionalData, _schemaJson, _optionsJson, includelabels, includes, + (col, id) => { - return dsItem.Data as JObject; - } - else + // collection enhancement + dsContext.Collection = col; + var dsItem = ds.Get(dsContext, id); + if (dsItem != null && dsItem.Data is JObject) + { + return dsItem.Data as JObject; + } + else + { + JObject res = new JObject(); + res["Id"] = id; + res["Collection"] = col; + res["Title"] = "unknow"; + return res; + } + }, + (key) => { - JObject res = new JObject(); - res["Id"] = id; - res["Collection"] = col; - res["Title"] = "unknow"; - return res; - } - }); + return ds.GetDataAlpaca(dsContext, true, true, false, key); + }); } if (_optionsJson != null) { From f503f0813ab52c3b594bf94ec99c3d24d16eb30f Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 25 Sep 2017 15:37:43 +0200 Subject: [PATCH 02/18] edit addional data with bootstrap and accordion --- OpenContent/EditAddData.ascx.cs | 7 ++++++- OpenContent/js/builder/formbuilder.js | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/OpenContent/EditAddData.ascx.cs b/OpenContent/EditAddData.ascx.cs index 9ecebd67..779c5194 100644 --- a/OpenContent/EditAddData.ascx.cs +++ b/OpenContent/EditAddData.ascx.cs @@ -24,14 +24,19 @@ public partial class EditAddData : PortalModuleBase protected override void OnInit(EventArgs e) { base.OnInit(e); + var globalSettingsController = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(ModuleContext.PortalId); + var bootstrap = globalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN; + bool loadBootstrap = bootstrap && globalSettingsController.GetLoadBootstrap(); Key = Request.QueryString["key"]; hlCancel.NavigateUrl = Globals.NavigateURL(); cmdSave.NavigateUrl = Globals.NavigateURL(); OpenContentSettings settings = this.OpenContentSettings(); AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, settings.Template.ManifestFolderUri.FolderPath, Key); - alpaca.RegisterAll(false,false); + alpaca.RegisterAll(bootstrap,loadBootstrap); string itemId = null;//Request.QueryString["id"] == null ? -1 : int.Parse(Request.QueryString["id"]); AlpacaContext = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null); + AlpacaContext.Bootstrap = bootstrap; + AlpacaContext.Horizontal = globalSettingsController.GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal; } public AlpacaContext AlpacaContext { get; private set; } diff --git a/OpenContent/js/builder/formbuilder.js b/OpenContent/js/builder/formbuilder.js index 456977a0..f95064ac 100644 --- a/OpenContent/js/builder/formbuilder.js +++ b/OpenContent/js/builder/formbuilder.js @@ -394,6 +394,7 @@ function getOptions(formdef) { var fields = options.fields; if (formdef.formtype == "array") { options = { + "type":"accordion", "items": { "type": "object", "fields": {} @@ -407,8 +408,8 @@ function getOptions(formdef) { var field = baseFields(index, value, oldOptions); fields[value.fieldname] = field; - }); - } + }); + } return options; } From 46445f13175c17b578519fb017cb3bcb203206e7 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 25 Sep 2017 15:41:14 +0200 Subject: [PATCH 03/18] better backward compatibity for cachbuster in urls --- OpenContent/alpaca/js/fields/dnn/FileField.js | 1 + OpenContent/alpaca/js/fields/dnn/ImageCrop2Field.js | 5 +++++ OpenContent/alpaca/js/fields/dnn/ImageField.js | 1 + OpenContent/alpaca/js/fields/dnn/dnnfields.js | 7 +++++++ OpenContent/alpaca/js/fields/dnn/dnnfields.min.js | 2 +- 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenContent/alpaca/js/fields/dnn/FileField.js b/OpenContent/alpaca/js/fields/dnn/FileField.js index cd5cbffc..3a082649 100644 --- a/OpenContent/alpaca/js/fields/dnn/FileField.js +++ b/OpenContent/alpaca/js/fields/dnn/FileField.js @@ -67,6 +67,7 @@ el.val(""); } else { + //if (value) value = value.split("?")[0]; el.val(value); } } diff --git a/OpenContent/alpaca/js/fields/dnn/ImageCrop2Field.js b/OpenContent/alpaca/js/fields/dnn/ImageCrop2Field.js index 778d45a2..e662e681 100644 --- a/OpenContent/alpaca/js/fields/dnn/ImageCrop2Field.js +++ b/OpenContent/alpaca/js/fields/dnn/ImageCrop2Field.js @@ -95,6 +95,7 @@ this.control.val(val); } */ + if (this.control && typeof (val) != "undefined" && val != null) { //this.base(val); ??? if (Alpaca.isEmpty(val)) { @@ -103,6 +104,10 @@ $(self.getControlEl()).attr('data-cropurl', ''); } else if (Alpaca.isObject(val)) { + // Fix for OC data that still has the Cachebuster SQ parameter + if (val.url) val.url = val.url.split("?")[0]; + if (val.cropUrl) val.cropUrl = val.cropUrl.split("?")[0]; + if (val.cropdata && Object.keys(val.cropdata).length > 0) { // compatibility with imagecropper var firstcropdata = val.cropdata[Object.keys(val.cropdata)[0]]; self.cropper(val.url, firstcropdata.cropper); diff --git a/OpenContent/alpaca/js/fields/dnn/ImageField.js b/OpenContent/alpaca/js/fields/dnn/ImageField.js index d2974ddf..03ff8e32 100644 --- a/OpenContent/alpaca/js/fields/dnn/ImageField.js +++ b/OpenContent/alpaca/js/fields/dnn/ImageField.js @@ -58,6 +58,7 @@ el.val(""); } else { + //if (value) value = value.split("?")[0]; el.val(value); $(self.control).parent().find('.alpaca-image-display img').attr('src', value); } diff --git a/OpenContent/alpaca/js/fields/dnn/dnnfields.js b/OpenContent/alpaca/js/fields/dnn/dnnfields.js index 24a4c8d9..df3ff79f 100644 --- a/OpenContent/alpaca/js/fields/dnn/dnnfields.js +++ b/OpenContent/alpaca/js/fields/dnn/dnnfields.js @@ -2128,6 +2128,7 @@ el.val(""); } else { + //if (value) value = value.split("?")[0]; el.val(value); } } @@ -6654,6 +6655,7 @@ el.val(""); } else { + //if (value) value = value.split("?")[0]; el.val(value); $(self.control).parent().find('.alpaca-image-display img').attr('src', value); } @@ -7549,6 +7551,7 @@ this.control.val(val); } */ + if (this.control && typeof (val) != "undefined" && val != null) { //this.base(val); ??? if (Alpaca.isEmpty(val)) { @@ -7557,6 +7560,10 @@ $(self.getControlEl()).attr('data-cropurl', ''); } else if (Alpaca.isObject(val)) { + // Fix for OC data that still has the Cachebuster SQ parameter + if (val.url) val.url = val.url.split("?")[0]; + if (val.cropUrl) val.cropUrl = val.cropUrl.split("?")[0]; + if (val.cropdata && Object.keys(val.cropdata).length > 0) { // compatibility with imagecropper var firstcropdata = val.cropdata[Object.keys(val.cropdata)[0]]; self.cropper(val.url, firstcropdata.cropper); diff --git a/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js b/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js index 21de4e4e..65468f9d 100644 --- a/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js +++ b/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js @@ -1 +1 @@ -(function(n){function r(t,i){var r="";return t&&t.address_components&&n.each(t.address_components,function(t,u){n.each(u.types,function(n,t){if(t==i){r=u.long_name;return}});r!=""}),r}function u(t){var i="";return t&&t.address_components&&n.each(t.address_components,function(t,r){n.each(r.types,function(n,t){if(t=="country"){i=r.short_name;return}});i!=""}),i}function f(n){for(n=n.toUpperCase(),index=0;index<\/div>').appendTo(t),o=n('Geocode Address<\/a>').appendTo(t),o.button&&o.button({text:!0}),o.click(function(){if(google&&google.maps){var i=new google.maps.Geocoder,r=e.getAddress();i&&i.geocode({address:r},function(i,r){r===google.maps.GeocoderStatus.OK?(n(".alpaca-field.lng input.alpaca-control",t).val(i[0].geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i[0].geometry.location.lat())):e.displayMessage("Geocoding failed: "+r)})}else e.displayMessage("Google Map API is not installed.");return!1}).wrap(""),s=n(".alpaca-field.googlesearch input.alpaca-control",t)[0],s&&typeof google!="undefined"&&google&&google.maps&&(h=new google.maps.places.SearchBox(s),google.maps.event.addListener(h,"places_changed",function(){var e=h.getPlaces(),i;e.length!=0&&(i=e[0],n(".alpaca-field.postalcode input.alpaca-control",t).val(r(i,"postal_code")),n(".alpaca-field.city input.alpaca-control",t).val(r(i,"locality")),n(".alpaca-field.street input.alpaca-control",t).val(r(i,"route")),n(".alpaca-field.number input.alpaca-control",t).val(r(i,"street_number")),n(".alpaca-field.country select.alpaca-control",t).val(f(u(i,"country"))),n(".alpaca-field.lng input.alpaca-control",t).val(i.geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i.geometry.location.lat()),s.value="")}),google.maps.event.addDomListener(s,"keydown",function(n){n.keyCode==13&&n.preventDefault()})),e.options.showMapOnLoad&&o.click());i()})},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Address with Street, City, State, Postal code and Country. Also comes with support for Google map."},getSchemaOfOptions:function(){return i.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return i.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t=[{countryName:"Afghanistan",iso2:"AF",iso3:"AFG",phoneCode:"93"},{countryName:"Albania",iso2:"AL",iso3:"ALB",phoneCode:"355"},{countryName:"Algeria",iso2:"DZ",iso3:"DZA",phoneCode:"213"},{countryName:"American Samoa",iso2:"AS",iso3:"ASM",phoneCode:"1 684"},{countryName:"Andorra",iso2:"AD",iso3:"AND",phoneCode:"376"},{countryName:"Angola",iso2:"AO",iso3:"AGO",phoneCode:"244"},{countryName:"Anguilla",iso2:"AI",iso3:"AIA",phoneCode:"1 264"},{countryName:"Antarctica",iso2:"AQ",iso3:"ATA",phoneCode:"672"},{countryName:"Antigua and Barbuda",iso2:"AG",iso3:"ATG",phoneCode:"1 268"},{countryName:"Argentina",iso2:"AR",iso3:"ARG",phoneCode:"54"},{countryName:"Armenia",iso2:"AM",iso3:"ARM",phoneCode:"374"},{countryName:"Aruba",iso2:"AW",iso3:"ABW",phoneCode:"297"},{countryName:"Australia",iso2:"AU",iso3:"AUS",phoneCode:"61"},{countryName:"Austria",iso2:"AT",iso3:"AUT",phoneCode:"43"},{countryName:"Azerbaijan",iso2:"AZ",iso3:"AZE",phoneCode:"994"},{countryName:"Bahamas",iso2:"BS",iso3:"BHS",phoneCode:"1 242"},{countryName:"Bahrain",iso2:"BH",iso3:"BHR",phoneCode:"973"},{countryName:"Bangladesh",iso2:"BD",iso3:"BGD",phoneCode:"880"},{countryName:"Barbados",iso2:"BB",iso3:"BRB",phoneCode:"1 246"},{countryName:"Belarus",iso2:"BY",iso3:"BLR",phoneCode:"375"},{countryName:"Belgium",iso2:"BE",iso3:"BEL",phoneCode:"32"},{countryName:"Belize",iso2:"BZ",iso3:"BLZ",phoneCode:"501"},{countryName:"Benin",iso2:"BJ",iso3:"BEN",phoneCode:"229"},{countryName:"Bermuda",iso2:"BM",iso3:"BMU",phoneCode:"1 441"},{countryName:"Bhutan",iso2:"BT",iso3:"BTN",phoneCode:"975"},{countryName:"Bolivia",iso2:"BO",iso3:"BOL",phoneCode:"591"},{countryName:"Bosnia and Herzegovina",iso2:"BA",iso3:"BIH",phoneCode:"387"},{countryName:"Botswana",iso2:"BW",iso3:"BWA",phoneCode:"267"},{countryName:"Brazil",iso2:"BR",iso3:"BRA",phoneCode:"55"},{countryName:"British Indian Ocean Territory",iso2:"IO",iso3:"IOT",phoneCode:""},{countryName:"British Virgin Islands",iso2:"VG",iso3:"VGB",phoneCode:"1 284"},{countryName:"Brunei",iso2:"BN",iso3:"BRN",phoneCode:"673"},{countryName:"Bulgaria",iso2:"BG",iso3:"BGR",phoneCode:"359"},{countryName:"Burkina Faso",iso2:"BF",iso3:"BFA",phoneCode:"226"},{countryName:"Burma (Myanmar)",iso2:"MM",iso3:"MMR",phoneCode:"95"},{countryName:"Burundi",iso2:"BI",iso3:"BDI",phoneCode:"257"},{countryName:"Cambodia",iso2:"KH",iso3:"KHM",phoneCode:"855"},{countryName:"Cameroon",iso2:"CM",iso3:"CMR",phoneCode:"237"},{countryName:"Canada",iso2:"CA",iso3:"CAN",phoneCode:"1"},{countryName:"Cape Verde",iso2:"CV",iso3:"CPV",phoneCode:"238"},{countryName:"Cayman Islands",iso2:"KY",iso3:"CYM",phoneCode:"1 345"},{countryName:"Central African Republic",iso2:"CF",iso3:"CAF",phoneCode:"236"},{countryName:"Chad",iso2:"TD",iso3:"TCD",phoneCode:"235"},{countryName:"Chile",iso2:"CL",iso3:"CHL",phoneCode:"56"},{countryName:"China",iso2:"CN",iso3:"CHN",phoneCode:"86"},{countryName:"Christmas Island",iso2:"CX",iso3:"CXR",phoneCode:"61"},{countryName:"Cocos (Keeling) Islands",iso2:"CC",iso3:"CCK",phoneCode:"61"},{countryName:"Colombia",iso2:"CO",iso3:"COL",phoneCode:"57"},{countryName:"Comoros",iso2:"KM",iso3:"COM",phoneCode:"269"},{countryName:"Cook Islands",iso2:"CK",iso3:"COK",phoneCode:"682"},{countryName:"Costa Rica",iso2:"CR",iso3:"CRC",phoneCode:"506"},{countryName:"Croatia",iso2:"HR",iso3:"HRV",phoneCode:"385"},{countryName:"Cuba",iso2:"CU",iso3:"CUB",phoneCode:"53"},{countryName:"Cyprus",iso2:"CY",iso3:"CYP",phoneCode:"357"},{countryName:"Czech Republic",iso2:"CZ",iso3:"CZE",phoneCode:"420"},{countryName:"Democratic Republic of the Congo",iso2:"CD",iso3:"COD",phoneCode:"243"},{countryName:"Denmark",iso2:"DK",iso3:"DNK",phoneCode:"45"},{countryName:"Djibouti",iso2:"DJ",iso3:"DJI",phoneCode:"253"},{countryName:"Dominica",iso2:"DM",iso3:"DMA",phoneCode:"1 767"},{countryName:"Dominican Republic",iso2:"DO",iso3:"DOM",phoneCode:"1 809"},{countryName:"Ecuador",iso2:"EC",iso3:"ECU",phoneCode:"593"},{countryName:"Egypt",iso2:"EG",iso3:"EGY",phoneCode:"20"},{countryName:"El Salvador",iso2:"SV",iso3:"SLV",phoneCode:"503"},{countryName:"Equatorial Guinea",iso2:"GQ",iso3:"GNQ",phoneCode:"240"},{countryName:"Eritrea",iso2:"ER",iso3:"ERI",phoneCode:"291"},{countryName:"Estonia",iso2:"EE",iso3:"EST",phoneCode:"372"},{countryName:"Ethiopia",iso2:"ET",iso3:"ETH",phoneCode:"251"},{countryName:"Falkland Islands",iso2:"FK",iso3:"FLK",phoneCode:"500"},{countryName:"Faroe Islands",iso2:"FO",iso3:"FRO",phoneCode:"298"},{countryName:"Fiji",iso2:"FJ",iso3:"FJI",phoneCode:"679"},{countryName:"Finland",iso2:"FI",iso3:"FIN",phoneCode:"358"},{countryName:"France",iso2:"FR",iso3:"FRA",phoneCode:"33"},{countryName:"French Polynesia",iso2:"PF",iso3:"PYF",phoneCode:"689"},{countryName:"Gabon",iso2:"GA",iso3:"GAB",phoneCode:"241"},{countryName:"Gambia",iso2:"GM",iso3:"GMB",phoneCode:"220"},{countryName:"Gaza Strip",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Georgia",iso2:"GE",iso3:"GEO",phoneCode:"995"},{countryName:"Germany",iso2:"DE",iso3:"DEU",phoneCode:"49"},{countryName:"Ghana",iso2:"GH",iso3:"GHA",phoneCode:"233"},{countryName:"Gibraltar",iso2:"GI",iso3:"GIB",phoneCode:"350"},{countryName:"Greece",iso2:"GR",iso3:"GRC",phoneCode:"30"},{countryName:"Greenland",iso2:"GL",iso3:"GRL",phoneCode:"299"},{countryName:"Grenada",iso2:"GD",iso3:"GRD",phoneCode:"1 473"},{countryName:"Guam",iso2:"GU",iso3:"GUM",phoneCode:"1 671"},{countryName:"Guatemala",iso2:"GT",iso3:"GTM",phoneCode:"502"},{countryName:"Guinea",iso2:"GN",iso3:"GIN",phoneCode:"224"},{countryName:"Guinea-Bissau",iso2:"GW",iso3:"GNB",phoneCode:"245"},{countryName:"Guyana",iso2:"GY",iso3:"GUY",phoneCode:"592"},{countryName:"Haiti",iso2:"HT",iso3:"HTI",phoneCode:"509"},{countryName:"Holy See (Vatican City)",iso2:"VA",iso3:"VAT",phoneCode:"39"},{countryName:"Honduras",iso2:"HN",iso3:"HND",phoneCode:"504"},{countryName:"Hong Kong",iso2:"HK",iso3:"HKG",phoneCode:"852"},{countryName:"Hungary",iso2:"HU",iso3:"HUN",phoneCode:"36"},{countryName:"Iceland",iso2:"IS",iso3:"IS",phoneCode:"354"},{countryName:"India",iso2:"IN",iso3:"IND",phoneCode:"91"},{countryName:"Indonesia",iso2:"ID",iso3:"IDN",phoneCode:"62"},{countryName:"Iran",iso2:"IR",iso3:"IRN",phoneCode:"98"},{countryName:"Iraq",iso2:"IQ",iso3:"IRQ",phoneCode:"964"},{countryName:"Ireland",iso2:"IE",iso3:"IRL",phoneCode:"353"},{countryName:"Isle of Man",iso2:"IM",iso3:"IMN",phoneCode:"44"},{countryName:"Israel",iso2:"IL",iso3:"ISR",phoneCode:"972"},{countryName:"Italy",iso2:"IT",iso3:"ITA",phoneCode:"39"},{countryName:"Ivory Coast",iso2:"CI",iso3:"CIV",phoneCode:"225"},{countryName:"Jamaica",iso2:"JM",iso3:"JAM",phoneCode:"1 876"},{countryName:"Japan",iso2:"JP",iso3:"JPN",phoneCode:"81"},{countryName:"Jersey",iso2:"JE",iso3:"JEY",phoneCode:""},{countryName:"Jordan",iso2:"JO",iso3:"JOR",phoneCode:"962"},{countryName:"Kazakhstan",iso2:"KZ",iso3:"KAZ",phoneCode:"7"},{countryName:"Kenya",iso2:"KE",iso3:"KEN",phoneCode:"254"},{countryName:"Kiribati",iso2:"KI",iso3:"KIR",phoneCode:"686"},{countryName:"Kosovo",iso2:"",iso3:"",phoneCode:"381"},{countryName:"Kuwait",iso2:"KW",iso3:"KWT",phoneCode:"965"},{countryName:"Kyrgyzstan",iso2:"KG",iso3:"KGZ",phoneCode:"996"},{countryName:"Laos",iso2:"LA",iso3:"LAO",phoneCode:"856"},{countryName:"Latvia",iso2:"LV",iso3:"LVA",phoneCode:"371"},{countryName:"Lebanon",iso2:"LB",iso3:"LBN",phoneCode:"961"},{countryName:"Lesotho",iso2:"LS",iso3:"LSO",phoneCode:"266"},{countryName:"Liberia",iso2:"LR",iso3:"LBR",phoneCode:"231"},{countryName:"Libya",iso2:"LY",iso3:"LBY",phoneCode:"218"},{countryName:"Liechtenstein",iso2:"LI",iso3:"LIE",phoneCode:"423"},{countryName:"Lithuania",iso2:"LT",iso3:"LTU",phoneCode:"370"},{countryName:"Luxembourg",iso2:"LU",iso3:"LUX",phoneCode:"352"},{countryName:"Macau",iso2:"MO",iso3:"MAC",phoneCode:"853"},{countryName:"Macedonia",iso2:"MK",iso3:"MKD",phoneCode:"389"},{countryName:"Madagascar",iso2:"MG",iso3:"MDG",phoneCode:"261"},{countryName:"Malawi",iso2:"MW",iso3:"MWI",phoneCode:"265"},{countryName:"Malaysia",iso2:"MY",iso3:"MYS",phoneCode:"60"},{countryName:"Maldives",iso2:"MV",iso3:"MDV",phoneCode:"960"},{countryName:"Mali",iso2:"ML",iso3:"MLI",phoneCode:"223"},{countryName:"Malta",iso2:"MT",iso3:"MLT",phoneCode:"356"},{countryName:"Marshall Islands",iso2:"MH",iso3:"MHL",phoneCode:"692"},{countryName:"Mauritania",iso2:"MR",iso3:"MRT",phoneCode:"222"},{countryName:"Mauritius",iso2:"MU",iso3:"MUS",phoneCode:"230"},{countryName:"Mayotte",iso2:"YT",iso3:"MYT",phoneCode:"262"},{countryName:"Mexico",iso2:"MX",iso3:"MEX",phoneCode:"52"},{countryName:"Micronesia",iso2:"FM",iso3:"FSM",phoneCode:"691"},{countryName:"Moldova",iso2:"MD",iso3:"MDA",phoneCode:"373"},{countryName:"Monaco",iso2:"MC",iso3:"MCO",phoneCode:"377"},{countryName:"Mongolia",iso2:"MN",iso3:"MNG",phoneCode:"976"},{countryName:"Montenegro",iso2:"ME",iso3:"MNE",phoneCode:"382"},{countryName:"Montserrat",iso2:"MS",iso3:"MSR",phoneCode:"1 664"},{countryName:"Morocco",iso2:"MA",iso3:"MAR",phoneCode:"212"},{countryName:"Mozambique",iso2:"MZ",iso3:"MOZ",phoneCode:"258"},{countryName:"Namibia",iso2:"NA",iso3:"NAM",phoneCode:"264"},{countryName:"Nauru",iso2:"NR",iso3:"NRU",phoneCode:"674"},{countryName:"Nepal",iso2:"NP",iso3:"NPL",phoneCode:"977"},{countryName:"Netherlands",iso2:"NL",iso3:"NLD",phoneCode:"31"},{countryName:"Netherlands Antilles",iso2:"AN",iso3:"ANT",phoneCode:"599"},{countryName:"New Caledonia",iso2:"NC",iso3:"NCL",phoneCode:"687"},{countryName:"New Zealand",iso2:"NZ",iso3:"NZL",phoneCode:"64"},{countryName:"Nicaragua",iso2:"NI",iso3:"NIC",phoneCode:"505"},{countryName:"Niger",iso2:"NE",iso3:"NER",phoneCode:"227"},{countryName:"Nigeria",iso2:"NG",iso3:"NGA",phoneCode:"234"},{countryName:"Niue",iso2:"NU",iso3:"NIU",phoneCode:"683"},{countryName:"Norfolk Island",iso2:"",iso3:"NFK",phoneCode:"672"},{countryName:"North Korea",iso2:"KP",iso3:"PRK",phoneCode:"850"},{countryName:"Northern Mariana Islands",iso2:"MP",iso3:"MNP",phoneCode:"1 670"},{countryName:"Norway",iso2:"NO",iso3:"NOR",phoneCode:"47"},{countryName:"Oman",iso2:"OM",iso3:"OMN",phoneCode:"968"},{countryName:"Pakistan",iso2:"PK",iso3:"PAK",phoneCode:"92"},{countryName:"Palau",iso2:"PW",iso3:"PLW",phoneCode:"680"},{countryName:"Panama",iso2:"PA",iso3:"PAN",phoneCode:"507"},{countryName:"Papua New Guinea",iso2:"PG",iso3:"PNG",phoneCode:"675"},{countryName:"Paraguay",iso2:"PY",iso3:"PRY",phoneCode:"595"},{countryName:"Peru",iso2:"PE",iso3:"PER",phoneCode:"51"},{countryName:"Philippines",iso2:"PH",iso3:"PHL",phoneCode:"63"},{countryName:"Pitcairn Islands",iso2:"PN",iso3:"PCN",phoneCode:"870"},{countryName:"Poland",iso2:"PL",iso3:"POL",phoneCode:"48"},{countryName:"Portugal",iso2:"PT",iso3:"PRT",phoneCode:"351"},{countryName:"Puerto Rico",iso2:"PR",iso3:"PRI",phoneCode:"1"},{countryName:"Qatar",iso2:"QA",iso3:"QAT",phoneCode:"974"},{countryName:"Republic of the Congo",iso2:"CG",iso3:"COG",phoneCode:"242"},{countryName:"Romania",iso2:"RO",iso3:"ROU",phoneCode:"40"},{countryName:"Russia",iso2:"RU",iso3:"RUS",phoneCode:"7"},{countryName:"Rwanda",iso2:"RW",iso3:"RWA",phoneCode:"250"},{countryName:"Saint Barthelemy",iso2:"BL",iso3:"BLM",phoneCode:"590"},{countryName:"Saint Helena",iso2:"SH",iso3:"SHN",phoneCode:"290"},{countryName:"Saint Kitts and Nevis",iso2:"KN",iso3:"KNA",phoneCode:"1 869"},{countryName:"Saint Lucia",iso2:"LC",iso3:"LCA",phoneCode:"1 758"},{countryName:"Saint Martin",iso2:"MF",iso3:"MAF",phoneCode:"1 599"},{countryName:"Saint Pierre and Miquelon",iso2:"PM",iso3:"SPM",phoneCode:"508"},{countryName:"Saint Vincent and the Grenadines",iso2:"VC",iso3:"VCT",phoneCode:"1 784"},{countryName:"Samoa",iso2:"WS",iso3:"WSM",phoneCode:"685"},{countryName:"San Marino",iso2:"SM",iso3:"SMR",phoneCode:"378"},{countryName:"Sao Tome and Principe",iso2:"ST",iso3:"STP",phoneCode:"239"},{countryName:"Saudi Arabia",iso2:"SA",iso3:"SAU",phoneCode:"966"},{countryName:"Senegal",iso2:"SN",iso3:"SEN",phoneCode:"221"},{countryName:"Serbia",iso2:"RS",iso3:"SRB",phoneCode:"381"},{countryName:"Seychelles",iso2:"SC",iso3:"SYC",phoneCode:"248"},{countryName:"Sierra Leone",iso2:"SL",iso3:"SLE",phoneCode:"232"},{countryName:"Singapore",iso2:"SG",iso3:"SGP",phoneCode:"65"},{countryName:"Slovakia",iso2:"SK",iso3:"SVK",phoneCode:"421"},{countryName:"Slovenia",iso2:"SI",iso3:"SVN",phoneCode:"386"},{countryName:"Solomon Islands",iso2:"SB",iso3:"SLB",phoneCode:"677"},{countryName:"Somalia",iso2:"SO",iso3:"SOM",phoneCode:"252"},{countryName:"South Africa",iso2:"ZA",iso3:"ZAF",phoneCode:"27"},{countryName:"South Korea",iso2:"KR",iso3:"KOR",phoneCode:"82"},{countryName:"Spain",iso2:"ES",iso3:"ESP",phoneCode:"34"},{countryName:"Sri Lanka",iso2:"LK",iso3:"LKA",phoneCode:"94"},{countryName:"Sudan",iso2:"SD",iso3:"SDN",phoneCode:"249"},{countryName:"Suriname",iso2:"SR",iso3:"SUR",phoneCode:"597"},{countryName:"Svalbard",iso2:"SJ",iso3:"SJM",phoneCode:""},{countryName:"Swaziland",iso2:"SZ",iso3:"SWZ",phoneCode:"268"},{countryName:"Sweden",iso2:"SE",iso3:"SWE",phoneCode:"46"},{countryName:"Switzerland",iso2:"CH",iso3:"CHE",phoneCode:"41"},{countryName:"Syria",iso2:"SY",iso3:"SYR",phoneCode:"963"},{countryName:"Taiwan",iso2:"TW",iso3:"TWN",phoneCode:"886"},{countryName:"Tajikistan",iso2:"TJ",iso3:"TJK",phoneCode:"992"},{countryName:"Tanzania",iso2:"TZ",iso3:"TZA",phoneCode:"255"},{countryName:"Thailand",iso2:"TH",iso3:"THA",phoneCode:"66"},{countryName:"Timor-Leste",iso2:"TL",iso3:"TLS",phoneCode:"670"},{countryName:"Togo",iso2:"TG",iso3:"TGO",phoneCode:"228"},{countryName:"Tokelau",iso2:"TK",iso3:"TKL",phoneCode:"690"},{countryName:"Tonga",iso2:"TO",iso3:"TON",phoneCode:"676"},{countryName:"Trinidad and Tobago",iso2:"TT",iso3:"TTO",phoneCode:"1 868"},{countryName:"Tunisia",iso2:"TN",iso3:"TUN",phoneCode:"216"},{countryName:"Turkey",iso2:"TR",iso3:"TUR",phoneCode:"90"},{countryName:"Turkmenistan",iso2:"TM",iso3:"TKM",phoneCode:"993"},{countryName:"Turks and Caicos Islands",iso2:"TC",iso3:"TCA",phoneCode:"1 649"},{countryName:"Tuvalu",iso2:"TV",iso3:"TUV",phoneCode:"688"},{countryName:"Uganda",iso2:"UG",iso3:"UGA",phoneCode:"256"},{countryName:"Ukraine",iso2:"UA",iso3:"UKR",phoneCode:"380"},{countryName:"United Arab Emirates",iso2:"AE",iso3:"ARE",phoneCode:"971"},{countryName:"United Kingdom",iso2:"GB",iso3:"GBR",phoneCode:"44"},{countryName:"United States",iso2:"US",iso3:"USA",phoneCode:"1"},{countryName:"Uruguay",iso2:"UY",iso3:"URY",phoneCode:"598"},{countryName:"US Virgin Islands",iso2:"VI",iso3:"VIR",phoneCode:"1 340"},{countryName:"Uzbekistan",iso2:"UZ",iso3:"UZB",phoneCode:"998"},{countryName:"Vanuatu",iso2:"VU",iso3:"VUT",phoneCode:"678"},{countryName:"Venezuela",iso2:"VE",iso3:"VEN",phoneCode:"58"},{countryName:"Vietnam",iso2:"VN",iso3:"VNM",phoneCode:"84"},{countryName:"Wallis and Futuna",iso2:"WF",iso3:"WLF",phoneCode:"681"},{countryName:"West Bank",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Western Sahara",iso2:"EH",iso3:"ESH",phoneCode:""},{countryName:"Yemen",iso2:"YE",iso3:"YEM",phoneCode:"967"},{countryName:"Zambia",iso2:"ZM",iso3:"ZMB",phoneCode:"260"},{countryName:"Zimbabwe",iso2:"ZW",iso3:"ZWE",phoneCode:"263"}];i.registerFieldClass("address",i.Fields.AddressField)})(jQuery),function(n){var t=n.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data="");this.base();typeof this.options.ckeditor=="undefined"&&(this.options.ckeditor={});typeof this.options.configset=="undefined"&&(this.options.configset="")},afterRenderControl:function(t,i){var r=this;this.base(t,function(){var t,u;if(!r.isDisplayOnly()&&r.control&&typeof CKEDITOR!="undefined"){t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]};r.options.configset=="basic"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="standard"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Table","Smiley","SpecialChar","Iframe"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","ShowBlocks","Source"]}],format_tags:"p;h1;h2;h3;pre;div",extraAllowedContent:"table tr th td caption[*](*);div span(*);",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="full"&&(t={toolbar:[{name:"document",items:["Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About","-","Source"]}],format_tags:"p;h1;h2;h3;pre;div",allowedContentRules:!0,removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]});u=n.extend({},t,r.options.ckeditor);r.on("ready",function(){r.editor||(r.editor=CKEDITOR.replace(n(r.control)[0],u),r.initCKEditorEvents())})}n(r.control).bind("destroyed",function(){if(r.editor){r.editor.removeAllListeners();try{r.editor.destroy(!1)}catch(n){}r.editor=null}});i()})},initCKEditorEvents:function(){var n=this;if(n.editor){n.editor.on("click",function(t){n.onClick.call(n,t);n.trigger("click",t)});n.editor.on("change",function(t){n.onChange();n.triggerWithPropagation("change",t)});n.editor.on("blur",function(t){n.onBlur();n.trigger("blur",t)});n.editor.on("focus",function(t){n.onFocus.call(n,t);n.trigger("focus",t)});n.editor.on("key",function(t){n.onKeyPress.call(n,t);n.trigger("keypress",t)})}},setValue:function(n){var t=this;this.base(n);t.editor&&t.editor.setData(n)},getControlValue:function(){var n=this,t=null;return n.editor&&(t=n.editor.getData()),t},destroy:function(){var n=this;n.editor&&(n.editor.destroy(),n.editor=null);this.base()},getTitle:function(){return"CK Editor"},getDescription:function(){return"Provides an instance of a CK Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{ckeditor:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{ckeditor:{type:"any"}}})}});t.registerFieldClass("ckeditor",t.Fields.CKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return"MM/DD/YYYY"},getDefaultExtraFormats:function(){return[]},setup:function(){var n=this,t;this.base();n.options.picker||(n.options.picker={});typeof n.options.picker.useCurrent=="undefined"&&(n.options.picker.useCurrent=!1);!n.options.dateFormat;n.options.picker.format||(n.options.picker.format=n.options.dateFormat);n.options.picker.extraFormats||(t=n.getDefaultExtraFormats(),t&&(n.options.picker.extraFormats=t));typeof n.options.manualEntry=="undefined"&&(n.options.manualEntry=!1);typeof n.options.icon=="undefined"&&(n.options.icon=!1)},onKeyPress:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},onKeyDown:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},beforeRenderControl:function(n,t){this.field.css("position","relative");t()},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(r.view.type!=="display"){if(t=r.getControlEl(),r.options.icon){r.getControlEl().wrap('
<\/div>');r.getControlEl().after('<\/span><\/span>');var t=r.getControlEl().parent()}if(n.fn.datetimepicker){t.datetimepicker(r.options.picker);r.picker=t.data("DateTimePicker");t.on("dp.change",function(n){setTimeout(function(){r.onChange.call(r,n);r.triggerWithPropagation("change",n)},250)});r.data&&r.picker.date(r.data)}}i()})},getDate:function(){var n=this,t=null;try{t=n.picker?n.picker.date()?n.picker.date()._d:null:new Date(this.getValue())}catch(i){console.error(i)}return t},date:function(){return this.getDate()},onChange:function(){this.base();this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var r=this.base(),n=this.validation,i=this._validateDateFormat();return n.invalidDate={message:i?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:i},r&&n.invalidDate.status},_validateDateFormat:function(){var n=this,r=!0,u,i,t;if(n.options.dateFormat&&(u=n.getValue(),u||n.isRequired())){if(i=[],i.push(n.options.dateFormat),n.options.picker&&n.options.picker.extraFormats)for(t=0;tBootstrap DateTime Picker<\/a>.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dateFormat:{type:"text"},picker:{type:"any"}}})}});t.registerMessages({invalidDate:"Invalid date for format {0}"});t.registerFieldClass("date",t.Fields.DateField);t.registerDefaultFormatFieldMapping("date","date")}(jQuery),function(n){var t=n.alpaca;t.Fields.MultiUploadField=t.Fields.ArrayField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.itemsCount=0},setup:function(){var t,n;if(this.base(),this.options.uploadfolder||(this.options.uploadfolder=""),this.urlfield="",this.options&&this.options.items&&(this.options.items.fields||this.options.items.type)&&this.options.items.type!="image"&&this.options.items.fields)for(t in this.options.items.fields)if(n=this.options.items.fields[t],n.type=="image"||n.type=="mlimage"||n.type=="imagecrop"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="file"||n.type=="mlfile"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="image2"||n.type=="mlimage2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}else if(n.type=="file2"||n.type=="mlfile2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}},afterRenderContainer:function(t,i){var r=this;this.base(t,function(){var t=r.getContainerEl(),f,u;r.isDisplayOnly()||(n('
<\/div>').prependTo(t),f=n('
<\/div><\/div>').prependTo(t),u=n('').prependTo(t),this.wrapper=n("<\/span>"),this.wrapper.text("Upload muliple files"),u.wrap(this.wrapper),r.sf&&u.fileupload({dataType:"json",url:r.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:r.options.uploadfolder},beforeSend:r.sf.setModuleHeaders,change:function(){r.itemsCount=r.children.length},add:function(n,t){t.submit()},progressall:function(t,i){var r=parseInt(i.loaded/i.total*100,10);n(".bar",f).css("width",r+"%").find("span").html(r+"%")},done:function(t,i){i.result&&n.each(i.result,function(n,t){r.handleActionBarAddItemClick(r.itemsCount-1,function(n){var i=n.getValue();r.urlfield==""?i=t.url:i[r.urlfield]=t.url;n.setValue(i)});r.itemsCount++})}}).data("loaded",!0));i()})},getTitle:function(){return"Multi Upload"},getDescription:function(){return"Multi Upload for images and files"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("multiupload",t.Fields.MultiUploadField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DocumentsField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Title:{title:"Title",type:"string"},File:{title:"File",type:"string"}}};t.merge(this.options.items,{fields:{File:{type:"file"}}});this.urlfield="File"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("documents",t.Fields.DocumentsField)}(jQuery),function(n){var t=n.alpaca;t.Fields.File2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"file2"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.options.showUrlUpload||(this.options.showUrlUpload=!1);this.options.showFileUpload||(this.options.showFileUpload=!1);this.options.showUrlUpload&&(this.options.buttons={downloadButton:{value:"Upload External File",click:function(){this.DownLoadFile()}}});n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FilesLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"*",d:n.options.folder,filter:n.options.filter,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(i=n(this.control).find("select").val(),typeof i=="undefined")i=this.data;else if(t.isArray(i))for(r=0;r0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n("select",u.getControlEl()).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.folder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){if(t&&t.files&&t.files.length>0)if(u.isFilter(t.files[0].name))t.submit();else{alert("file not in filter");return}},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){$select=n(u.control).find("select");u.options.lazyLoading?u.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):u.refresh(function(){$select=n(u.control).find("select");$select.val(i.id).change()})})}}).data("loaded",!0);r()})},getFileUrl:function(t,i){var r=this,u;r.sf&&(u={fileid:t,folder:r.options.folder},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error getFileUrl "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=u.val(),r;if(!i||!t.isURL(i)){alert("url not valid");return}if(!t.isFilter(i)){alert("url not in filter");return}r={url:i,uploadfolder:t.options.folder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):($select=n(t.control).find("select"),t.options.lazyLoading?t.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):t.refresh(function(){$select=n(t.control).find("select");$select.val(i.id).change()}));setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)},isFilter:function(n){if(this.options.filter){var t=new RegExp(this.options.filter,"i");return n.length<2083&&t.test(n)}return!0},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("file2",t.Fields.File2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.FileField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"file"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.downloadButton||(this.options.downloadButton=!1);this.options.downloadButton&&(this.options.buttons={downloadButton:{value:"Download",click:function(){this.DownLoadFile()}}});this.base()},getTitle:function(){return"File Field"},getDescription:function(){return"File Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):i.val(n));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl();i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Files?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=t.getValue(),f=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|(www‌​.)?){1}([0-9A-Za-z-‌​\\.@:%_+~#=]+)+((\\‌​.[a-zA-Z]{2,3})+)(/(‌​.)*)?(\\?(.)*)?"),r;if(!i||!t.isURL(i)){alert("url not valid");return}r={url:i,uploadfolder:t.options.uploadfolder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):(t.setValue(i.url),n(u).change());setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)}});t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Folder2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("folder2",t.Fields.Folder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.GalleryField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Image:{title:"Image",type:"string"}}};t.merge(this.options.items,{fields:{Image:{type:"image"}}});this.urlfield="Image"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("gallery",t.Fields.GalleryField)}(jQuery),function(n){var t=n.alpaca;t.Fields.GuidField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f)},setup:function(){var n=this;this.base()},setValue:function(n){t.isEmpty(n)&&(n=this.createGuid());this.base(n)},getValue:function(){var n=this.base();return(t.isEmpty(n)||n=="")&&(n=this.createGuid()),n},createGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})},getTitle:function(){return"Guid Field"},getDescription:function(){return"Guid field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("guid",t.Fields.GuidField)}(jQuery),function(n){var t=n.alpaca;t.Fields.IconField=t.Fields.TextField.extend({setup:function(){this.options.glyphicons===undefined&&(this.options.glyphicons=!1);this.options.bootstrap===undefined&&(this.options.bootstrap=!1);this.options.fontawesome===undefined&&(this.options.fontawesome=!0);this.base()},setValue:function(n){this.base(n);this.loadIcons()},getTitle:function(){return"Icon Field"},getDescription:function(){return"Font Icon Field."},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(n){var t=this,i=this.control;this.control.fontIconPicker({emptyIcon:!0,hasSearch:!0});this.loadIcons();n()},loadIcons:function(){var o=this,t=[],e;if(this.options.bootstrap&&n.each(i,function(n,i){t.push("glyphicon "+i)}),this.options.fontawesome)for(e in r)t.push("fa "+e);this.options.glyphicons&&(n.each(u,function(n,i){t.push("glyphicons "+i)}),n.each(f,function(n,i){t.push("social "+i)}));this.control.fontIconPicker().setIcons(t)}});t.registerFieldClass("icon",t.Fields.IconField);var i=["glyphicon-glass","glyphicon-music","glyphicon-search","glyphicon-envelope","glyphicon-heart","glyphicon-star","glyphicon-star-empty","glyphicon-user","glyphicon-film","glyphicon-th-large","glyphicon-th","glyphicon-th-list","glyphicon-ok","glyphicon-remove","glyphicon-zoom-in","glyphicon-zoom-out","glyphicon-off","glyphicon-signal","glyphicon-cog","glyphicon-trash","glyphicon-home","glyphicon-file","glyphicon-time","glyphicon-road","glyphicon-download-alt","glyphicon-download","glyphicon-upload","glyphicon-inbox","glyphicon-play-circle","glyphicon-repeat","glyphicon-refresh","glyphicon-list-alt","glyphicon-lock","glyphicon-flag","glyphicon-headphones","glyphicon-volume-off","glyphicon-volume-down","glyphicon-volume-up","glyphicon-qrcode","glyphicon-barcode","glyphicon-tag","glyphicon-tags","glyphicon-book","glyphicon-bookmark","glyphicon-print","glyphicon-camera","glyphicon-font","glyphicon-bold","glyphicon-italic","glyphicon-text-height","glyphicon-text-width","glyphicon-align-left","glyphicon-align-center","glyphicon-align-right","glyphicon-align-justify","glyphicon-list","glyphicon-indent-left","glyphicon-indent-right","glyphicon-facetime-video","glyphicon-picture","glyphicon-pencil","glyphicon-map-marker","glyphicon-adjust","glyphicon-tint","glyphicon-edit","glyphicon-share","glyphicon-check","glyphicon-move","glyphicon-step-backward","glyphicon-fast-backward","glyphicon-backward","glyphicon-play","glyphicon-pause","glyphicon-stop","glyphicon-forward","glyphicon-fast-forward","glyphicon-step-forward","glyphicon-eject","glyphicon-chevron-left","glyphicon-chevron-right","glyphicon-plus-sign","glyphicon-minus-sign","glyphicon-remove-sign","glyphicon-ok-sign","glyphicon-question-sign","glyphicon-info-sign","glyphicon-screenshot","glyphicon-remove-circle","glyphicon-ok-circle","glyphicon-ban-circle","glyphicon-arrow-left","glyphicon-arrow-right","glyphicon-arrow-up","glyphicon-arrow-down","glyphicon-share-alt","glyphicon-resize-full","glyphicon-resize-small","glyphicon-plus","glyphicon-minus","glyphicon-asterisk","glyphicon-exclamation-sign","glyphicon-gift","glyphicon-leaf","glyphicon-fire","glyphicon-eye-open","glyphicon-eye-close","glyphicon-warning-sign","glyphicon-plane","glyphicon-calendar","glyphicon-random","glyphicon-comment","glyphicon-magnet","glyphicon-chevron-up","glyphicon-chevron-down","glyphicon-retweet","glyphicon-shopping-cart","glyphicon-folder-close","glyphicon-folder-open","glyphicon-resize-vertical","glyphicon-resize-horizontal","glyphicon-hdd","glyphicon-bullhorn","glyphicon-bell","glyphicon-certificate","glyphicon-thumbs-up","glyphicon-thumbs-down","glyphicon-hand-right","glyphicon-hand-left","glyphicon-hand-up","glyphicon-hand-down","glyphicon-circle-arrow-right","glyphicon-circle-arrow-left","glyphicon-circle-arrow-up","glyphicon-circle-arrow-down","glyphicon-globe","glyphicon-wrench","glyphicon-tasks","glyphicon-filter","glyphicon-briefcase","glyphicon-fullscreen","glyphicon-dashboard","glyphicon-paperclip","glyphicon-heart-empty","glyphicon-link","glyphicon-phone","glyphicon-pushpin","glyphicon-euro","glyphicon-usd","glyphicon-gbp","glyphicon-sort","glyphicon-sort-by-alphabet","glyphicon-sort-by-alphabet-alt","glyphicon-sort-by-order","glyphicon-sort-by-order-alt","glyphicon-sort-by-attributes","glyphicon-sort-by-attributes-alt","glyphicon-unchecked","glyphicon-expand","glyphicon-collapse","glyphicon-collapse-top"],r={"fa-500px":{unicode:"\\f26e",name:"500px"},"fa-address-book":{unicode:"\\f2b9",name:"Address book"},"fa-address-book-o":{unicode:"\\f2ba",name:"Address book o"},"fa-address-card":{unicode:"\\f2bb",name:"Address card"},"fa-address-card-o":{unicode:"\\f2bc",name:"Address card o"},"fa-adjust":{unicode:"\\f042",name:"Adjust"},"fa-adn":{unicode:"\\f170",name:"Adn"},"fa-align-center":{unicode:"\\f037",name:"Align center"},"fa-align-justify":{unicode:"\\f039",name:"Align justify"},"fa-align-left":{unicode:"\\f036",name:"Align left"},"fa-align-right":{unicode:"\\f038",name:"Align right"},"fa-amazon":{unicode:"\\f270",name:"Amazon"},"fa-ambulance":{unicode:"\\f0f9",name:"Ambulance"},"fa-american-sign-language-interpreting":{unicode:"\\f2a3",name:"American sign language interpreting"},"fa-anchor":{unicode:"\\f13d",name:"Anchor"},"fa-android":{unicode:"\\f17b",name:"Android"},"fa-angellist":{unicode:"\\f209",name:"Angellist"},"fa-angle-double-down":{unicode:"\\f103",name:"Angle double down"},"fa-angle-double-left":{unicode:"\\f100",name:"Angle double left"},"fa-angle-double-right":{unicode:"\\f101",name:"Angle double right"},"fa-angle-double-up":{unicode:"\\f102",name:"Angle double up"},"fa-angle-down":{unicode:"\\f107",name:"Angle down"},"fa-angle-left":{unicode:"\\f104",name:"Angle left"},"fa-angle-right":{unicode:"\\f105",name:"Angle right"},"fa-angle-up":{unicode:"\\f106",name:"Angle up"},"fa-apple":{unicode:"\\f179",name:"Apple"},"fa-archive":{unicode:"\\f187",name:"Archive"},"fa-area-chart":{unicode:"\\f1fe",name:"Area chart"},"fa-arrow-circle-down":{unicode:"\\f0ab",name:"Arrow circle down"},"fa-arrow-circle-left":{unicode:"\\f0a8",name:"Arrow circle left"},"fa-arrow-circle-o-down":{unicode:"\\f01a",name:"Arrow circle o down"},"fa-arrow-circle-o-left":{unicode:"\\f190",name:"Arrow circle o left"},"fa-arrow-circle-o-right":{unicode:"\\f18e",name:"Arrow circle o right"},"fa-arrow-circle-o-up":{unicode:"\\f01b",name:"Arrow circle o up"},"fa-arrow-circle-right":{unicode:"\\f0a9",name:"Arrow circle right"},"fa-arrow-circle-up":{unicode:"\\f0aa",name:"Arrow circle up"},"fa-arrow-down":{unicode:"\\f063",name:"Arrow down"},"fa-arrow-left":{unicode:"\\f060",name:"Arrow left"},"fa-arrow-right":{unicode:"\\f061",name:"Arrow right"},"fa-arrow-up":{unicode:"\\f062",name:"Arrow up"},"fa-arrows":{unicode:"\\f047",name:"Arrows"},"fa-arrows-alt":{unicode:"\\f0b2",name:"Arrows alt"},"fa-arrows-h":{unicode:"\\f07e",name:"Arrows h"},"fa-arrows-v":{unicode:"\\f07d",name:"Arrows v"},"fa-assistive-listening-systems":{unicode:"\\f2a2",name:"Assistive listening systems"},"fa-asterisk":{unicode:"\\f069",name:"Asterisk"},"fa-at":{unicode:"\\f1fa",name:"At"},"fa-audio-description":{unicode:"\\f29e",name:"Audio description"},"fa-backward":{unicode:"\\f04a",name:"Backward"},"fa-balance-scale":{unicode:"\\f24e",name:"Balance scale"},"fa-ban":{unicode:"\\f05e",name:"Ban"},"fa-bandcamp":{unicode:"\\f2d5",name:"Bandcamp"},"fa-bar-chart":{unicode:"\\f080",name:"Bar chart"},"fa-barcode":{unicode:"\\f02a",name:"Barcode"},"fa-bars":{unicode:"\\f0c9",name:"Bars"},"fa-bath":{unicode:"\\f2cd",name:"Bath"},"fa-battery-empty":{unicode:"\\f244",name:"Battery empty"},"fa-battery-full":{unicode:"\\f240",name:"Battery full"},"fa-battery-half":{unicode:"\\f242",name:"Battery half"},"fa-battery-quarter":{unicode:"\\f243",name:"Battery quarter"},"fa-battery-three-quarters":{unicode:"\\f241",name:"Battery three quarters"},"fa-bed":{unicode:"\\f236",name:"Bed"},"fa-beer":{unicode:"\\f0fc",name:"Beer"},"fa-behance":{unicode:"\\f1b4",name:"Behance"},"fa-behance-square":{unicode:"\\f1b5",name:"Behance square"},"fa-bell":{unicode:"\\f0f3",name:"Bell"},"fa-bell-o":{unicode:"\\f0a2",name:"Bell o"},"fa-bell-slash":{unicode:"\\f1f6",name:"Bell slash"},"fa-bell-slash-o":{unicode:"\\f1f7",name:"Bell slash o"},"fa-bicycle":{unicode:"\\f206",name:"Bicycle"},"fa-binoculars":{unicode:"\\f1e5",name:"Binoculars"},"fa-birthday-cake":{unicode:"\\f1fd",name:"Birthday cake"},"fa-bitbucket":{unicode:"\\f171",name:"Bitbucket"},"fa-bitbucket-square":{unicode:"\\f172",name:"Bitbucket square"},"fa-black-tie":{unicode:"\\f27e",name:"Black tie"},"fa-blind":{unicode:"\\f29d",name:"Blind"},"fa-bluetooth":{unicode:"\\f293",name:"Bluetooth"},"fa-bluetooth-b":{unicode:"\\f294",name:"Bluetooth b"},"fa-bold":{unicode:"\\f032",name:"Bold"},"fa-bolt":{unicode:"\\f0e7",name:"Bolt"},"fa-bomb":{unicode:"\\f1e2",name:"Bomb"},"fa-book":{unicode:"\\f02d",name:"Book"},"fa-bookmark":{unicode:"\\f02e",name:"Bookmark"},"fa-bookmark-o":{unicode:"\\f097",name:"Bookmark o"},"fa-braille":{unicode:"\\f2a1",name:"Braille"},"fa-briefcase":{unicode:"\\f0b1",name:"Briefcase"},"fa-btc":{unicode:"\\f15a",name:"Btc"},"fa-bug":{unicode:"\\f188",name:"Bug"},"fa-building":{unicode:"\\f1ad",name:"Building"},"fa-building-o":{unicode:"\\f0f7",name:"Building o"},"fa-bullhorn":{unicode:"\\f0a1",name:"Bullhorn"},"fa-bullseye":{unicode:"\\f140",name:"Bullseye"},"fa-bus":{unicode:"\\f207",name:"Bus"},"fa-buysellads":{unicode:"\\f20d",name:"Buysellads"},"fa-calculator":{unicode:"\\f1ec",name:"Calculator"},"fa-calendar":{unicode:"\\f073",name:"Calendar"},"fa-calendar-check-o":{unicode:"\\f274",name:"Calendar check o"},"fa-calendar-minus-o":{unicode:"\\f272",name:"Calendar minus o"},"fa-calendar-o":{unicode:"\\f133",name:"Calendar o"},"fa-calendar-plus-o":{unicode:"\\f271",name:"Calendar plus o"},"fa-calendar-times-o":{unicode:"\\f273",name:"Calendar times o"},"fa-camera":{unicode:"\\f030",name:"Camera"},"fa-camera-retro":{unicode:"\\f083",name:"Camera retro"},"fa-car":{unicode:"\\f1b9",name:"Car"},"fa-caret-down":{unicode:"\\f0d7",name:"Caret down"},"fa-caret-left":{unicode:"\\f0d9",name:"Caret left"},"fa-caret-right":{unicode:"\\f0da",name:"Caret right"},"fa-caret-square-o-down":{unicode:"\\f150",name:"Caret square o down"},"fa-caret-square-o-left":{unicode:"\\f191",name:"Caret square o left"},"fa-caret-square-o-right":{unicode:"\\f152",name:"Caret square o right"},"fa-caret-square-o-up":{unicode:"\\f151",name:"Caret square o up"},"fa-caret-up":{unicode:"\\f0d8",name:"Caret up"},"fa-cart-arrow-down":{unicode:"\\f218",name:"Cart arrow down"},"fa-cart-plus":{unicode:"\\f217",name:"Cart plus"},"fa-cc":{unicode:"\\f20a",name:"Cc"},"fa-cc-amex":{unicode:"\\f1f3",name:"Cc amex"},"fa-cc-diners-club":{unicode:"\\f24c",name:"Cc diners club"},"fa-cc-discover":{unicode:"\\f1f2",name:"Cc discover"},"fa-cc-jcb":{unicode:"\\f24b",name:"Cc jcb"},"fa-cc-mastercard":{unicode:"\\f1f1",name:"Cc mastercard"},"fa-cc-paypal":{unicode:"\\f1f4",name:"Cc paypal"},"fa-cc-stripe":{unicode:"\\f1f5",name:"Cc stripe"},"fa-cc-visa":{unicode:"\\f1f0",name:"Cc visa"},"fa-certificate":{unicode:"\\f0a3",name:"Certificate"},"fa-chain-broken":{unicode:"\\f127",name:"Chain broken"},"fa-check":{unicode:"\\f00c",name:"Check"},"fa-check-circle":{unicode:"\\f058",name:"Check circle"},"fa-check-circle-o":{unicode:"\\f05d",name:"Check circle o"},"fa-check-square":{unicode:"\\f14a",name:"Check square"},"fa-check-square-o":{unicode:"\\f046",name:"Check square o"},"fa-chevron-circle-down":{unicode:"\\f13a",name:"Chevron circle down"},"fa-chevron-circle-left":{unicode:"\\f137",name:"Chevron circle left"},"fa-chevron-circle-right":{unicode:"\\f138",name:"Chevron circle right"},"fa-chevron-circle-up":{unicode:"\\f139",name:"Chevron circle up"},"fa-chevron-down":{unicode:"\\f078",name:"Chevron down"},"fa-chevron-left":{unicode:"\\f053",name:"Chevron left"},"fa-chevron-right":{unicode:"\\f054",name:"Chevron right"},"fa-chevron-up":{unicode:"\\f077",name:"Chevron up"},"fa-child":{unicode:"\\f1ae",name:"Child"},"fa-chrome":{unicode:"\\f268",name:"Chrome"},"fa-circle":{unicode:"\\f111",name:"Circle"},"fa-circle-o":{unicode:"\\f10c",name:"Circle o"},"fa-circle-o-notch":{unicode:"\\f1ce",name:"Circle o notch"},"fa-circle-thin":{unicode:"\\f1db",name:"Circle thin"},"fa-clipboard":{unicode:"\\f0ea",name:"Clipboard"},"fa-clock-o":{unicode:"\\f017",name:"Clock o"},"fa-clone":{unicode:"\\f24d",name:"Clone"},"fa-cloud":{unicode:"\\f0c2",name:"Cloud"},"fa-cloud-download":{unicode:"\\f0ed",name:"Cloud download"},"fa-cloud-upload":{unicode:"\\f0ee",name:"Cloud upload"},"fa-code":{unicode:"\\f121",name:"Code"},"fa-code-fork":{unicode:"\\f126",name:"Code fork"},"fa-codepen":{unicode:"\\f1cb",name:"Codepen"},"fa-codiepie":{unicode:"\\f284",name:"Codiepie"},"fa-coffee":{unicode:"\\f0f4",name:"Coffee"},"fa-cog":{unicode:"\\f013",name:"Cog"},"fa-cogs":{unicode:"\\f085",name:"Cogs"},"fa-columns":{unicode:"\\f0db",name:"Columns"},"fa-comment":{unicode:"\\f075",name:"Comment"},"fa-comment-o":{unicode:"\\f0e5",name:"Comment o"},"fa-commenting":{unicode:"\\f27a",name:"Commenting"},"fa-commenting-o":{unicode:"\\f27b",name:"Commenting o"},"fa-comments":{unicode:"\\f086",name:"Comments"},"fa-comments-o":{unicode:"\\f0e6",name:"Comments o"},"fa-compass":{unicode:"\\f14e",name:"Compass"},"fa-compress":{unicode:"\\f066",name:"Compress"},"fa-connectdevelop":{unicode:"\\f20e",name:"Connectdevelop"},"fa-contao":{unicode:"\\f26d",name:"Contao"},"fa-copyright":{unicode:"\\f1f9",name:"Copyright"},"fa-creative-commons":{unicode:"\\f25e",name:"Creative commons"},"fa-credit-card":{unicode:"\\f09d",name:"Credit card"},"fa-credit-card-alt":{unicode:"\\f283",name:"Credit card alt"},"fa-crop":{unicode:"\\f125",name:"Crop"},"fa-crosshairs":{unicode:"\\f05b",name:"Crosshairs"},"fa-css3":{unicode:"\\f13c",name:"Css3"},"fa-cube":{unicode:"\\f1b2",name:"Cube"},"fa-cubes":{unicode:"\\f1b3",name:"Cubes"},"fa-cutlery":{unicode:"\\f0f5",name:"Cutlery"},"fa-dashcube":{unicode:"\\f210",name:"Dashcube"},"fa-database":{unicode:"\\f1c0",name:"Database"},"fa-deaf":{unicode:"\\f2a4",name:"Deaf"},"fa-delicious":{unicode:"\\f1a5",name:"Delicious"},"fa-desktop":{unicode:"\\f108",name:"Desktop"},"fa-deviantart":{unicode:"\\f1bd",name:"Deviantart"},"fa-diamond":{unicode:"\\f219",name:"Diamond"},"fa-digg":{unicode:"\\f1a6",name:"Digg"},"fa-dot-circle-o":{unicode:"\\f192",name:"Dot circle o"},"fa-download":{unicode:"\\f019",name:"Download"},"fa-dribbble":{unicode:"\\f17d",name:"Dribbble"},"fa-dropbox":{unicode:"\\f16b",name:"Dropbox"},"fa-drupal":{unicode:"\\f1a9",name:"Drupal"},"fa-edge":{unicode:"\\f282",name:"Edge"},"fa-eercast":{unicode:"\\f2da",name:"Eercast"},"fa-eject":{unicode:"\\f052",name:"Eject"},"fa-ellipsis-h":{unicode:"\\f141",name:"Ellipsis h"},"fa-ellipsis-v":{unicode:"\\f142",name:"Ellipsis v"},"fa-empire":{unicode:"\\f1d1",name:"Empire"},"fa-envelope":{unicode:"\\f0e0",name:"Envelope"},"fa-envelope-o":{unicode:"\\f003",name:"Envelope o"},"fa-envelope-open":{unicode:"\\f2b6",name:"Envelope open"},"fa-envelope-open-o":{unicode:"\\f2b7",name:"Envelope open o"},"fa-envelope-square":{unicode:"\\f199",name:"Envelope square"},"fa-envira":{unicode:"\\f299",name:"Envira"},"fa-eraser":{unicode:"\\f12d",name:"Eraser"},"fa-etsy":{unicode:"\\f2d7",name:"Etsy"},"fa-eur":{unicode:"\\f153",name:"Eur"},"fa-exchange":{unicode:"\\f0ec",name:"Exchange"},"fa-exclamation":{unicode:"\\f12a",name:"Exclamation"},"fa-exclamation-circle":{unicode:"\\f06a",name:"Exclamation circle"},"fa-exclamation-triangle":{unicode:"\\f071",name:"Exclamation triangle"},"fa-expand":{unicode:"\\f065",name:"Expand"},"fa-expeditedssl":{unicode:"\\f23e",name:"Expeditedssl"},"fa-external-link":{unicode:"\\f08e",name:"External link"},"fa-external-link-square":{unicode:"\\f14c",name:"External link square"},"fa-eye":{unicode:"\\f06e",name:"Eye"},"fa-eye-slash":{unicode:"\\f070",name:"Eye slash"},"fa-eyedropper":{unicode:"\\f1fb",name:"Eyedropper"},"fa-facebook":{unicode:"\\f09a",name:"Facebook"},"fa-facebook-official":{unicode:"\\f230",name:"Facebook official"},"fa-facebook-square":{unicode:"\\f082",name:"Facebook square"},"fa-fast-backward":{unicode:"\\f049",name:"Fast backward"},"fa-fast-forward":{unicode:"\\f050",name:"Fast forward"},"fa-fax":{unicode:"\\f1ac",name:"Fax"},"fa-female":{unicode:"\\f182",name:"Female"},"fa-fighter-jet":{unicode:"\\f0fb",name:"Fighter jet"},"fa-file":{unicode:"\\f15b",name:"File"},"fa-file-archive-o":{unicode:"\\f1c6",name:"File archive o"},"fa-file-audio-o":{unicode:"\\f1c7",name:"File audio o"},"fa-file-code-o":{unicode:"\\f1c9",name:"File code o"},"fa-file-excel-o":{unicode:"\\f1c3",name:"File excel o"},"fa-file-image-o":{unicode:"\\f1c5",name:"File image o"},"fa-file-o":{unicode:"\\f016",name:"File o"},"fa-file-pdf-o":{unicode:"\\f1c1",name:"File pdf o"},"fa-file-powerpoint-o":{unicode:"\\f1c4",name:"File powerpoint o"},"fa-file-text":{unicode:"\\f15c",name:"File text"},"fa-file-text-o":{unicode:"\\f0f6",name:"File text o"},"fa-file-video-o":{unicode:"\\f1c8",name:"File video o"},"fa-file-word-o":{unicode:"\\f1c2",name:"File word o"},"fa-files-o":{unicode:"\\f0c5",name:"Files o"},"fa-film":{unicode:"\\f008",name:"Film"},"fa-filter":{unicode:"\\f0b0",name:"Filter"},"fa-fire":{unicode:"\\f06d",name:"Fire"},"fa-fire-extinguisher":{unicode:"\\f134",name:"Fire extinguisher"},"fa-firefox":{unicode:"\\f269",name:"Firefox"},"fa-first-order":{unicode:"\\f2b0",name:"First order"},"fa-flag":{unicode:"\\f024",name:"Flag"},"fa-flag-checkered":{unicode:"\\f11e",name:"Flag checkered"},"fa-flag-o":{unicode:"\\f11d",name:"Flag o"},"fa-flask":{unicode:"\\f0c3",name:"Flask"},"fa-flickr":{unicode:"\\f16e",name:"Flickr"},"fa-floppy-o":{unicode:"\\f0c7",name:"Floppy o"},"fa-folder":{unicode:"\\f07b",name:"Folder"},"fa-folder-o":{unicode:"\\f114",name:"Folder o"},"fa-folder-open":{unicode:"\\f07c",name:"Folder open"},"fa-folder-open-o":{unicode:"\\f115",name:"Folder open o"},"fa-font":{unicode:"\\f031",name:"Font"},"fa-font-awesome":{unicode:"\\f2b4",name:"Font awesome"},"fa-fonticons":{unicode:"\\f280",name:"Fonticons"},"fa-fort-awesome":{unicode:"\\f286",name:"Fort awesome"},"fa-forumbee":{unicode:"\\f211",name:"Forumbee"},"fa-forward":{unicode:"\\f04e",name:"Forward"},"fa-foursquare":{unicode:"\\f180",name:"Foursquare"},"fa-free-code-camp":{unicode:"\\f2c5",name:"Free code camp"},"fa-frown-o":{unicode:"\\f119",name:"Frown o"},"fa-futbol-o":{unicode:"\\f1e3",name:"Futbol o"},"fa-gamepad":{unicode:"\\f11b",name:"Gamepad"},"fa-gavel":{unicode:"\\f0e3",name:"Gavel"},"fa-gbp":{unicode:"\\f154",name:"Gbp"},"fa-genderless":{unicode:"\\f22d",name:"Genderless"},"fa-get-pocket":{unicode:"\\f265",name:"Get pocket"},"fa-gg":{unicode:"\\f260",name:"Gg"},"fa-gg-circle":{unicode:"\\f261",name:"Gg circle"},"fa-gift":{unicode:"\\f06b",name:"Gift"},"fa-git":{unicode:"\\f1d3",name:"Git"},"fa-git-square":{unicode:"\\f1d2",name:"Git square"},"fa-github":{unicode:"\\f09b",name:"Github"},"fa-github-alt":{unicode:"\\f113",name:"Github alt"},"fa-github-square":{unicode:"\\f092",name:"Github square"},"fa-gitlab":{unicode:"\\f296",name:"Gitlab"},"fa-glass":{unicode:"\\f000",name:"Glass"},"fa-glide":{unicode:"\\f2a5",name:"Glide"},"fa-glide-g":{unicode:"\\f2a6",name:"Glide g"},"fa-globe":{unicode:"\\f0ac",name:"Globe"},"fa-google":{unicode:"\\f1a0",name:"Google"},"fa-google-plus":{unicode:"\\f0d5",name:"Google plus"},"fa-google-plus-official":{unicode:"\\f2b3",name:"Google plus official"},"fa-google-plus-square":{unicode:"\\f0d4",name:"Google plus square"},"fa-google-wallet":{unicode:"\\f1ee",name:"Google wallet"},"fa-graduation-cap":{unicode:"\\f19d",name:"Graduation cap"},"fa-gratipay":{unicode:"\\f184",name:"Gratipay"},"fa-grav":{unicode:"\\f2d6",name:"Grav"},"fa-h-square":{unicode:"\\f0fd",name:"H square"},"fa-hacker-news":{unicode:"\\f1d4",name:"Hacker news"},"fa-hand-lizard-o":{unicode:"\\f258",name:"Hand lizard o"},"fa-hand-o-down":{unicode:"\\f0a7",name:"Hand o down"},"fa-hand-o-left":{unicode:"\\f0a5",name:"Hand o left"},"fa-hand-o-right":{unicode:"\\f0a4",name:"Hand o right"},"fa-hand-o-up":{unicode:"\\f0a6",name:"Hand o up"},"fa-hand-paper-o":{unicode:"\\f256",name:"Hand paper o"},"fa-hand-peace-o":{unicode:"\\f25b",name:"Hand peace o"},"fa-hand-pointer-o":{unicode:"\\f25a",name:"Hand pointer o"},"fa-hand-rock-o":{unicode:"\\f255",name:"Hand rock o"},"fa-hand-scissors-o":{unicode:"\\f257",name:"Hand scissors o"},"fa-hand-spock-o":{unicode:"\\f259",name:"Hand spock o"},"fa-handshake-o":{unicode:"\\f2b5",name:"Handshake o"},"fa-hashtag":{unicode:"\\f292",name:"Hashtag"},"fa-hdd-o":{unicode:"\\f0a0",name:"Hdd o"},"fa-header":{unicode:"\\f1dc",name:"Header"},"fa-headphones":{unicode:"\\f025",name:"Headphones"},"fa-heart":{unicode:"\\f004",name:"Heart"},"fa-heart-o":{unicode:"\\f08a",name:"Heart o"},"fa-heartbeat":{unicode:"\\f21e",name:"Heartbeat"},"fa-history":{unicode:"\\f1da",name:"History"},"fa-home":{unicode:"\\f015",name:"Home"},"fa-hospital-o":{unicode:"\\f0f8",name:"Hospital o"},"fa-hourglass":{unicode:"\\f254",name:"Hourglass"},"fa-hourglass-end":{unicode:"\\f253",name:"Hourglass end"},"fa-hourglass-half":{unicode:"\\f252",name:"Hourglass half"},"fa-hourglass-o":{unicode:"\\f250",name:"Hourglass o"},"fa-hourglass-start":{unicode:"\\f251",name:"Hourglass start"},"fa-houzz":{unicode:"\\f27c",name:"Houzz"},"fa-html5":{unicode:"\\f13b",name:"Html5"},"fa-i-cursor":{unicode:"\\f246",name:"I cursor"},"fa-id-badge":{unicode:"\\f2c1",name:"Id badge"},"fa-id-card":{unicode:"\\f2c2",name:"Id card"},"fa-id-card-o":{unicode:"\\f2c3",name:"Id card o"},"fa-ils":{unicode:"\\f20b",name:"Ils"},"fa-imdb":{unicode:"\\f2d8",name:"Imdb"},"fa-inbox":{unicode:"\\f01c",name:"Inbox"},"fa-indent":{unicode:"\\f03c",name:"Indent"},"fa-industry":{unicode:"\\f275",name:"Industry"},"fa-info":{unicode:"\\f129",name:"Info"},"fa-info-circle":{unicode:"\\f05a",name:"Info circle"},"fa-inr":{unicode:"\\f156",name:"Inr"},"fa-instagram":{unicode:"\\f16d",name:"Instagram"},"fa-internet-explorer":{unicode:"\\f26b",name:"Internet explorer"},"fa-ioxhost":{unicode:"\\f208",name:"Ioxhost"},"fa-italic":{unicode:"\\f033",name:"Italic"},"fa-joomla":{unicode:"\\f1aa",name:"Joomla"},"fa-jpy":{unicode:"\\f157",name:"Jpy"},"fa-jsfiddle":{unicode:"\\f1cc",name:"Jsfiddle"},"fa-key":{unicode:"\\f084",name:"Key"},"fa-keyboard-o":{unicode:"\\f11c",name:"Keyboard o"},"fa-krw":{unicode:"\\f159",name:"Krw"},"fa-language":{unicode:"\\f1ab",name:"Language"},"fa-laptop":{unicode:"\\f109",name:"Laptop"},"fa-lastfm":{unicode:"\\f202",name:"Lastfm"},"fa-lastfm-square":{unicode:"\\f203",name:"Lastfm square"},"fa-leaf":{unicode:"\\f06c",name:"Leaf"},"fa-leanpub":{unicode:"\\f212",name:"Leanpub"},"fa-lemon-o":{unicode:"\\f094",name:"Lemon o"},"fa-level-down":{unicode:"\\f149",name:"Level down"},"fa-level-up":{unicode:"\\f148",name:"Level up"},"fa-life-ring":{unicode:"\\f1cd",name:"Life ring"},"fa-lightbulb-o":{unicode:"\\f0eb",name:"Lightbulb o"},"fa-line-chart":{unicode:"\\f201",name:"Line chart"},"fa-link":{unicode:"\\f0c1",name:"Link"},"fa-linkedin":{unicode:"\\f0e1",name:"Linkedin"},"fa-linkedin-square":{unicode:"\\f08c",name:"Linkedin square"},"fa-linode":{unicode:"\\f2b8",name:"Linode"},"fa-linux":{unicode:"\\f17c",name:"Linux"},"fa-list":{unicode:"\\f03a",name:"List"},"fa-list-alt":{unicode:"\\f022",name:"List alt"},"fa-list-ol":{unicode:"\\f0cb",name:"List ol"},"fa-list-ul":{unicode:"\\f0ca",name:"List ul"},"fa-location-arrow":{unicode:"\\f124",name:"Location arrow"},"fa-lock":{unicode:"\\f023",name:"Lock"},"fa-long-arrow-down":{unicode:"\\f175",name:"Long arrow down"},"fa-long-arrow-left":{unicode:"\\f177",name:"Long arrow left"},"fa-long-arrow-right":{unicode:"\\f178",name:"Long arrow right"},"fa-long-arrow-up":{unicode:"\\f176",name:"Long arrow up"},"fa-low-vision":{unicode:"\\f2a8",name:"Low vision"},"fa-magic":{unicode:"\\f0d0",name:"Magic"},"fa-magnet":{unicode:"\\f076",name:"Magnet"},"fa-male":{unicode:"\\f183",name:"Male"},"fa-map":{unicode:"\\f279",name:"Map"},"fa-map-marker":{unicode:"\\f041",name:"Map marker"},"fa-map-o":{unicode:"\\f278",name:"Map o"},"fa-map-pin":{unicode:"\\f276",name:"Map pin"},"fa-map-signs":{unicode:"\\f277",name:"Map signs"},"fa-mars":{unicode:"\\f222",name:"Mars"},"fa-mars-double":{unicode:"\\f227",name:"Mars double"},"fa-mars-stroke":{unicode:"\\f229",name:"Mars stroke"},"fa-mars-stroke-h":{unicode:"\\f22b",name:"Mars stroke h"},"fa-mars-stroke-v":{unicode:"\\f22a",name:"Mars stroke v"},"fa-maxcdn":{unicode:"\\f136",name:"Maxcdn"},"fa-meanpath":{unicode:"\\f20c",name:"Meanpath"},"fa-medium":{unicode:"\\f23a",name:"Medium"},"fa-medkit":{unicode:"\\f0fa",name:"Medkit"},"fa-meetup":{unicode:"\\f2e0",name:"Meetup"},"fa-meh-o":{unicode:"\\f11a",name:"Meh o"},"fa-mercury":{unicode:"\\f223",name:"Mercury"},"fa-microchip":{unicode:"\\f2db",name:"Microchip"},"fa-microphone":{unicode:"\\f130",name:"Microphone"},"fa-microphone-slash":{unicode:"\\f131",name:"Microphone slash"},"fa-minus":{unicode:"\\f068",name:"Minus"},"fa-minus-circle":{unicode:"\\f056",name:"Minus circle"},"fa-minus-square":{unicode:"\\f146",name:"Minus square"},"fa-minus-square-o":{unicode:"\\f147",name:"Minus square o"},"fa-mixcloud":{unicode:"\\f289",name:"Mixcloud"},"fa-mobile":{unicode:"\\f10b",name:"Mobile"},"fa-modx":{unicode:"\\f285",name:"Modx"},"fa-money":{unicode:"\\f0d6",name:"Money"},"fa-moon-o":{unicode:"\\f186",name:"Moon o"},"fa-motorcycle":{unicode:"\\f21c",name:"Motorcycle"},"fa-mouse-pointer":{unicode:"\\f245",name:"Mouse pointer"},"fa-music":{unicode:"\\f001",name:"Music"},"fa-neuter":{unicode:"\\f22c",name:"Neuter"},"fa-newspaper-o":{unicode:"\\f1ea",name:"Newspaper o"},"fa-object-group":{unicode:"\\f247",name:"Object group"},"fa-object-ungroup":{unicode:"\\f248",name:"Object ungroup"},"fa-odnoklassniki":{unicode:"\\f263",name:"Odnoklassniki"},"fa-odnoklassniki-square":{unicode:"\\f264",name:"Odnoklassniki square"},"fa-opencart":{unicode:"\\f23d",name:"Opencart"},"fa-openid":{unicode:"\\f19b",name:"Openid"},"fa-opera":{unicode:"\\f26a",name:"Opera"},"fa-optin-monster":{unicode:"\\f23c",name:"Optin monster"},"fa-outdent":{unicode:"\\f03b",name:"Outdent"},"fa-pagelines":{unicode:"\\f18c",name:"Pagelines"},"fa-paint-brush":{unicode:"\\f1fc",name:"Paint brush"},"fa-paper-plane":{unicode:"\\f1d8",name:"Paper plane"},"fa-paper-plane-o":{unicode:"\\f1d9",name:"Paper plane o"},"fa-paperclip":{unicode:"\\f0c6",name:"Paperclip"},"fa-paragraph":{unicode:"\\f1dd",name:"Paragraph"},"fa-pause":{unicode:"\\f04c",name:"Pause"},"fa-pause-circle":{unicode:"\\f28b",name:"Pause circle"},"fa-pause-circle-o":{unicode:"\\f28c",name:"Pause circle o"},"fa-paw":{unicode:"\\f1b0",name:"Paw"},"fa-paypal":{unicode:"\\f1ed",name:"Paypal"},"fa-pencil":{unicode:"\\f040",name:"Pencil"},"fa-pencil-square":{unicode:"\\f14b",name:"Pencil square"},"fa-pencil-square-o":{unicode:"\\f044",name:"Pencil square o"},"fa-percent":{unicode:"\\f295",name:"Percent"},"fa-phone":{unicode:"\\f095",name:"Phone"},"fa-phone-square":{unicode:"\\f098",name:"Phone square"},"fa-picture-o":{unicode:"\\f03e",name:"Picture o"},"fa-pie-chart":{unicode:"\\f200",name:"Pie chart"},"fa-pied-piper":{unicode:"\\f2ae",name:"Pied piper"},"fa-pied-piper-alt":{unicode:"\\f1a8",name:"Pied piper alt"},"fa-pied-piper-pp":{unicode:"\\f1a7",name:"Pied piper pp"},"fa-pinterest":{unicode:"\\f0d2",name:"Pinterest"},"fa-pinterest-p":{unicode:"\\f231",name:"Pinterest p"},"fa-pinterest-square":{unicode:"\\f0d3",name:"Pinterest square"},"fa-plane":{unicode:"\\f072",name:"Plane"},"fa-play":{unicode:"\\f04b",name:"Play"},"fa-play-circle":{unicode:"\\f144",name:"Play circle"},"fa-play-circle-o":{unicode:"\\f01d",name:"Play circle o"},"fa-plug":{unicode:"\\f1e6",name:"Plug"},"fa-plus":{unicode:"\\f067",name:"Plus"},"fa-plus-circle":{unicode:"\\f055",name:"Plus circle"},"fa-plus-square":{unicode:"\\f0fe",name:"Plus square"},"fa-plus-square-o":{unicode:"\\f196",name:"Plus square o"},"fa-podcast":{unicode:"\\f2ce",name:"Podcast"},"fa-power-off":{unicode:"\\f011",name:"Power off"},"fa-print":{unicode:"\\f02f",name:"Print"},"fa-product-hunt":{unicode:"\\f288",name:"Product hunt"},"fa-puzzle-piece":{unicode:"\\f12e",name:"Puzzle piece"},"fa-qq":{unicode:"\\f1d6",name:"Qq"},"fa-qrcode":{unicode:"\\f029",name:"Qrcode"},"fa-question":{unicode:"\\f128",name:"Question"},"fa-question-circle":{unicode:"\\f059",name:"Question circle"},"fa-question-circle-o":{unicode:"\\f29c",name:"Question circle o"},"fa-quora":{unicode:"\\f2c4",name:"Quora"},"fa-quote-left":{unicode:"\\f10d",name:"Quote left"},"fa-quote-right":{unicode:"\\f10e",name:"Quote right"},"fa-random":{unicode:"\\f074",name:"Random"},"fa-ravelry":{unicode:"\\f2d9",name:"Ravelry"},"fa-rebel":{unicode:"\\f1d0",name:"Rebel"},"fa-recycle":{unicode:"\\f1b8",name:"Recycle"},"fa-reddit":{unicode:"\\f1a1",name:"Reddit"},"fa-reddit-alien":{unicode:"\\f281",name:"Reddit alien"},"fa-reddit-square":{unicode:"\\f1a2",name:"Reddit square"},"fa-refresh":{unicode:"\\f021",name:"Refresh"},"fa-registered":{unicode:"\\f25d",name:"Registered"},"fa-renren":{unicode:"\\f18b",name:"Renren"},"fa-repeat":{unicode:"\\f01e",name:"Repeat"},"fa-reply":{unicode:"\\f112",name:"Reply"},"fa-reply-all":{unicode:"\\f122",name:"Reply all"},"fa-retweet":{unicode:"\\f079",name:"Retweet"},"fa-road":{unicode:"\\f018",name:"Road"},"fa-rocket":{unicode:"\\f135",name:"Rocket"},"fa-rss":{unicode:"\\f09e",name:"Rss"},"fa-rss-square":{unicode:"\\f143",name:"Rss square"},"fa-rub":{unicode:"\\f158",name:"Rub"},"fa-safari":{unicode:"\\f267",name:"Safari"},"fa-scissors":{unicode:"\\f0c4",name:"Scissors"},"fa-scribd":{unicode:"\\f28a",name:"Scribd"},"fa-search":{unicode:"\\f002",name:"Search"},"fa-search-minus":{unicode:"\\f010",name:"Search minus"},"fa-search-plus":{unicode:"\\f00e",name:"Search plus"},"fa-sellsy":{unicode:"\\f213",name:"Sellsy"},"fa-server":{unicode:"\\f233",name:"Server"},"fa-share":{unicode:"\\f064",name:"Share"},"fa-share-alt":{unicode:"\\f1e0",name:"Share alt"},"fa-share-alt-square":{unicode:"\\f1e1",name:"Share alt square"},"fa-share-square":{unicode:"\\f14d",name:"Share square"},"fa-share-square-o":{unicode:"\\f045",name:"Share square o"},"fa-shield":{unicode:"\\f132",name:"Shield"},"fa-ship":{unicode:"\\f21a",name:"Ship"},"fa-shirtsinbulk":{unicode:"\\f214",name:"Shirtsinbulk"},"fa-shopping-bag":{unicode:"\\f290",name:"Shopping bag"},"fa-shopping-basket":{unicode:"\\f291",name:"Shopping basket"},"fa-shopping-cart":{unicode:"\\f07a",name:"Shopping cart"},"fa-shower":{unicode:"\\f2cc",name:"Shower"},"fa-sign-in":{unicode:"\\f090",name:"Sign in"},"fa-sign-language":{unicode:"\\f2a7",name:"Sign language"},"fa-sign-out":{unicode:"\\f08b",name:"Sign out"},"fa-signal":{unicode:"\\f012",name:"Signal"},"fa-simplybuilt":{unicode:"\\f215",name:"Simplybuilt"},"fa-sitemap":{unicode:"\\f0e8",name:"Sitemap"},"fa-skyatlas":{unicode:"\\f216",name:"Skyatlas"},"fa-skype":{unicode:"\\f17e",name:"Skype"},"fa-slack":{unicode:"\\f198",name:"Slack"},"fa-sliders":{unicode:"\\f1de",name:"Sliders"},"fa-slideshare":{unicode:"\\f1e7",name:"Slideshare"},"fa-smile-o":{unicode:"\\f118",name:"Smile o"},"fa-snapchat":{unicode:"\\f2ab",name:"Snapchat"},"fa-snapchat-ghost":{unicode:"\\f2ac",name:"Snapchat ghost"},"fa-snapchat-square":{unicode:"\\f2ad",name:"Snapchat square"},"fa-snowflake-o":{unicode:"\\f2dc",name:"Snowflake o"},"fa-sort":{unicode:"\\f0dc",name:"Sort"},"fa-sort-alpha-asc":{unicode:"\\f15d",name:"Sort alpha asc"},"fa-sort-alpha-desc":{unicode:"\\f15e",name:"Sort alpha desc"},"fa-sort-amount-asc":{unicode:"\\f160",name:"Sort amount asc"},"fa-sort-amount-desc":{unicode:"\\f161",name:"Sort amount desc"},"fa-sort-asc":{unicode:"\\f0de",name:"Sort asc"},"fa-sort-desc":{unicode:"\\f0dd",name:"Sort desc"},"fa-sort-numeric-asc":{unicode:"\\f162",name:"Sort numeric asc"},"fa-sort-numeric-desc":{unicode:"\\f163",name:"Sort numeric desc"},"fa-soundcloud":{unicode:"\\f1be",name:"Soundcloud"},"fa-space-shuttle":{unicode:"\\f197",name:"Space shuttle"},"fa-spinner":{unicode:"\\f110",name:"Spinner"},"fa-spoon":{unicode:"\\f1b1",name:"Spoon"},"fa-spotify":{unicode:"\\f1bc",name:"Spotify"},"fa-square":{unicode:"\\f0c8",name:"Square"},"fa-square-o":{unicode:"\\f096",name:"Square o"},"fa-stack-exchange":{unicode:"\\f18d",name:"Stack exchange"},"fa-stack-overflow":{unicode:"\\f16c",name:"Stack overflow"},"fa-star":{unicode:"\\f005",name:"Star"},"fa-star-half":{unicode:"\\f089",name:"Star half"},"fa-star-half-o":{unicode:"\\f123",name:"Star half o"},"fa-star-o":{unicode:"\\f006",name:"Star o"},"fa-steam":{unicode:"\\f1b6",name:"Steam"},"fa-steam-square":{unicode:"\\f1b7",name:"Steam square"},"fa-step-backward":{unicode:"\\f048",name:"Step backward"},"fa-step-forward":{unicode:"\\f051",name:"Step forward"},"fa-stethoscope":{unicode:"\\f0f1",name:"Stethoscope"},"fa-sticky-note":{unicode:"\\f249",name:"Sticky note"},"fa-sticky-note-o":{unicode:"\\f24a",name:"Sticky note o"},"fa-stop":{unicode:"\\f04d",name:"Stop"},"fa-stop-circle":{unicode:"\\f28d",name:"Stop circle"},"fa-stop-circle-o":{unicode:"\\f28e",name:"Stop circle o"},"fa-street-view":{unicode:"\\f21d",name:"Street view"},"fa-strikethrough":{unicode:"\\f0cc",name:"Strikethrough"},"fa-stumbleupon":{unicode:"\\f1a4",name:"Stumbleupon"},"fa-stumbleupon-circle":{unicode:"\\f1a3",name:"Stumbleupon circle"},"fa-subscript":{unicode:"\\f12c",name:"Subscript"},"fa-subway":{unicode:"\\f239",name:"Subway"},"fa-suitcase":{unicode:"\\f0f2",name:"Suitcase"},"fa-sun-o":{unicode:"\\f185",name:"Sun o"},"fa-superpowers":{unicode:"\\f2dd",name:"Superpowers"},"fa-superscript":{unicode:"\\f12b",name:"Superscript"},"fa-table":{unicode:"\\f0ce",name:"Table"},"fa-tablet":{unicode:"\\f10a",name:"Tablet"},"fa-tachometer":{unicode:"\\f0e4",name:"Tachometer"},"fa-tag":{unicode:"\\f02b",name:"Tag"},"fa-tags":{unicode:"\\f02c",name:"Tags"},"fa-tasks":{unicode:"\\f0ae",name:"Tasks"},"fa-taxi":{unicode:"\\f1ba",name:"Taxi"},"fa-telegram":{unicode:"\\f2c6",name:"Telegram"},"fa-television":{unicode:"\\f26c",name:"Television"},"fa-tencent-weibo":{unicode:"\\f1d5",name:"Tencent weibo"},"fa-terminal":{unicode:"\\f120",name:"Terminal"},"fa-text-height":{unicode:"\\f034",name:"Text height"},"fa-text-width":{unicode:"\\f035",name:"Text width"},"fa-th":{unicode:"\\f00a",name:"Th"},"fa-th-large":{unicode:"\\f009",name:"Th large"},"fa-th-list":{unicode:"\\f00b",name:"Th list"},"fa-themeisle":{unicode:"\\f2b2",name:"Themeisle"},"fa-thermometer-empty":{unicode:"\\f2cb",name:"Thermometer empty"},"fa-thermometer-full":{unicode:"\\f2c7",name:"Thermometer full"},"fa-thermometer-half":{unicode:"\\f2c9",name:"Thermometer half"},"fa-thermometer-quarter":{unicode:"\\f2ca",name:"Thermometer quarter"},"fa-thermometer-three-quarters":{unicode:"\\f2c8",name:"Thermometer three quarters"},"fa-thumb-tack":{unicode:"\\f08d",name:"Thumb tack"},"fa-thumbs-down":{unicode:"\\f165",name:"Thumbs down"},"fa-thumbs-o-down":{unicode:"\\f088",name:"Thumbs o down"},"fa-thumbs-o-up":{unicode:"\\f087",name:"Thumbs o up"},"fa-thumbs-up":{unicode:"\\f164",name:"Thumbs up"},"fa-ticket":{unicode:"\\f145",name:"Ticket"},"fa-times":{unicode:"\\f00d",name:"Times"},"fa-times-circle":{unicode:"\\f057",name:"Times circle"},"fa-times-circle-o":{unicode:"\\f05c",name:"Times circle o"},"fa-tint":{unicode:"\\f043",name:"Tint"},"fa-toggle-off":{unicode:"\\f204",name:"Toggle off"},"fa-toggle-on":{unicode:"\\f205",name:"Toggle on"},"fa-trademark":{unicode:"\\f25c",name:"Trademark"},"fa-train":{unicode:"\\f238",name:"Train"},"fa-transgender":{unicode:"\\f224",name:"Transgender"},"fa-transgender-alt":{unicode:"\\f225",name:"Transgender alt"},"fa-trash":{unicode:"\\f1f8",name:"Trash"},"fa-trash-o":{unicode:"\\f014",name:"Trash o"},"fa-tree":{unicode:"\\f1bb",name:"Tree"},"fa-trello":{unicode:"\\f181",name:"Trello"},"fa-tripadvisor":{unicode:"\\f262",name:"Tripadvisor"},"fa-trophy":{unicode:"\\f091",name:"Trophy"},"fa-truck":{unicode:"\\f0d1",name:"Truck"},"fa-try":{unicode:"\\f195",name:"Try"},"fa-tty":{unicode:"\\f1e4",name:"Tty"},"fa-tumblr":{unicode:"\\f173",name:"Tumblr"},"fa-tumblr-square":{unicode:"\\f174",name:"Tumblr square"},"fa-twitch":{unicode:"\\f1e8",name:"Twitch"},"fa-twitter":{unicode:"\\f099",name:"Twitter"},"fa-twitter-square":{unicode:"\\f081",name:"Twitter square"},"fa-umbrella":{unicode:"\\f0e9",name:"Umbrella"},"fa-underline":{unicode:"\\f0cd",name:"Underline"},"fa-undo":{unicode:"\\f0e2",name:"Undo"},"fa-universal-access":{unicode:"\\f29a",name:"Universal access"},"fa-university":{unicode:"\\f19c",name:"University"},"fa-unlock":{unicode:"\\f09c",name:"Unlock"},"fa-unlock-alt":{unicode:"\\f13e",name:"Unlock alt"},"fa-upload":{unicode:"\\f093",name:"Upload"},"fa-usb":{unicode:"\\f287",name:"Usb"},"fa-usd":{unicode:"\\f155",name:"Usd"},"fa-user":{unicode:"\\f007",name:"User"},"fa-user-circle":{unicode:"\\f2bd",name:"User circle"},"fa-user-circle-o":{unicode:"\\f2be",name:"User circle o"},"fa-user-md":{unicode:"\\f0f0",name:"User md"},"fa-user-o":{unicode:"\\f2c0",name:"User o"},"fa-user-plus":{unicode:"\\f234",name:"User plus"},"fa-user-secret":{unicode:"\\f21b",name:"User secret"},"fa-user-times":{unicode:"\\f235",name:"User times"},"fa-users":{unicode:"\\f0c0",name:"Users"},"fa-venus":{unicode:"\\f221",name:"Venus"},"fa-venus-double":{unicode:"\\f226",name:"Venus double"},"fa-venus-mars":{unicode:"\\f228",name:"Venus mars"},"fa-viacoin":{unicode:"\\f237",name:"Viacoin"},"fa-viadeo":{unicode:"\\f2a9",name:"Viadeo"},"fa-viadeo-square":{unicode:"\\f2aa",name:"Viadeo square"},"fa-video-camera":{unicode:"\\f03d",name:"Video camera"},"fa-vimeo":{unicode:"\\f27d",name:"Vimeo"},"fa-vimeo-square":{unicode:"\\f194",name:"Vimeo square"},"fa-vine":{unicode:"\\f1ca",name:"Vine"},"fa-vk":{unicode:"\\f189",name:"Vk"},"fa-volume-control-phone":{unicode:"\\f2a0",name:"Volume control phone"},"fa-volume-down":{unicode:"\\f027",name:"Volume down"},"fa-volume-off":{unicode:"\\f026",name:"Volume off"},"fa-volume-up":{unicode:"\\f028",name:"Volume up"},"fa-weibo":{unicode:"\\f18a",name:"Weibo"},"fa-weixin":{unicode:"\\f1d7",name:"Weixin"},"fa-whatsapp":{unicode:"\\f232",name:"Whatsapp"},"fa-wheelchair":{unicode:"\\f193",name:"Wheelchair"},"fa-wheelchair-alt":{unicode:"\\f29b",name:"Wheelchair alt"},"fa-wifi":{unicode:"\\f1eb",name:"Wifi"},"fa-wikipedia-w":{unicode:"\\f266",name:"Wikipedia w"},"fa-window-close":{unicode:"\\f2d3",name:"Window close"},"fa-window-close-o":{unicode:"\\f2d4",name:"Window close o"},"fa-window-maximize":{unicode:"\\f2d0",name:"Window maximize"},"fa-window-minimize":{unicode:"\\f2d1",name:"Window minimize"},"fa-window-restore":{unicode:"\\f2d2",name:"Window restore"},"fa-windows":{unicode:"\\f17a",name:"Windows"},"fa-wordpress":{unicode:"\\f19a",name:"Wordpress"},"fa-wpbeginner":{unicode:"\\f297",name:"Wpbeginner"},"fa-wpexplorer":{unicode:"\\f2de",name:"Wpexplorer"},"fa-wpforms":{unicode:"\\f298",name:"Wpforms"},"fa-wrench":{unicode:"\\f0ad",name:"Wrench"},"fa-xing":{unicode:"\\f168",name:"Xing"},"fa-xing-square":{unicode:"\\f169",name:"Xing square"},"fa-y-combinator":{unicode:"\\f23b",name:"Y combinator"},"fa-yahoo":{unicode:"\\f19e",name:"Yahoo"},"fa-yelp":{unicode:"\\f1e9",name:"Yelp"},"fa-yoast":{unicode:"\\f2b1",name:"Yoast"},"fa-youtube":{unicode:"\\f167",name:"Youtube"},"fa-youtube-play":{unicode:"\\f16a",name:"Youtube play"},"fa-youtube-square":{unicode:"\\f166",name:"Youtube square"}},u=["glyph-glass","glyph-leaf","glyph-dog","glyph-user","glyph-girl","glyph-car","glyph-user-add","glyph-user-remove","glyph-film","glyph-magic","glyph-envelope","glyph-camera","glyph-heart","glyph-beach-umbrella","glyph-train","glyph-print","glyph-bin","glyph-music","glyph-note","glyph-heart-empty","glyph-home","glyph-snowflake","glyph-fire","glyph-magnet","glyph-parents","glyph-binoculars","glyph-road","glyph-search","glyph-cars","glyph-notes-2","glyph-pencil","glyph-bus","glyph-wifi-alt","glyph-luggage","glyph-old-man","glyph-woman","glyph-file","glyph-coins","glyph-airplane","glyph-notes","glyph-stats","glyph-charts","glyph-pie-chart","glyph-group","glyph-keys","glyph-calendar","glyph-router","glyph-camera-small","glyph-dislikes","glyph-star","glyph-link","glyph-eye-open","glyph-eye-close","glyph-alarm","glyph-clock","glyph-stopwatch","glyph-projector","glyph-history","glyph-truck","glyph-cargo","glyph-compass","glyph-keynote","glyph-paperclip","glyph-power","glyph-lightbulb","glyph-tag","glyph-tags","glyph-cleaning","glyph-ruller","glyph-gift","glyph-umbrella","glyph-book","glyph-bookmark","glyph-wifi","glyph-cup","glyph-stroller","glyph-headphones","glyph-headset","glyph-warning-sign","glyph-signal","glyph-retweet","glyph-refresh","glyph-roundabout","glyph-random","glyph-heat","glyph-repeat","glyph-display","glyph-log-book","glyph-address-book","glyph-building","glyph-eyedropper","glyph-adjust","glyph-tint","glyph-crop","glyph-vector-path-square","glyph-vector-path-circle","glyph-vector-path-polygon","glyph-vector-path-line","glyph-vector-path-curve","glyph-vector-path-all","glyph-font","glyph-italic","glyph-bold","glyph-text-underline","glyph-text-strike","glyph-text-height","glyph-text-width","glyph-text-resize","glyph-left-indent","glyph-right-indent","glyph-align-left","glyph-align-center","glyph-align-right","glyph-justify","glyph-list","glyph-text-smaller","glyph-text-bigger","glyph-embed","glyph-embed-close","glyph-table","glyph-message-full","glyph-message-empty","glyph-message-in","glyph-message-out","glyph-message-plus","glyph-message-minus","glyph-message-ban","glyph-message-flag","glyph-message-lock","glyph-message-new","glyph-inbox","glyph-inbox-plus","glyph-inbox-minus","glyph-inbox-lock","glyph-inbox-in","glyph-inbox-out","glyph-cogwheel","glyph-cogwheels","glyph-picture","glyph-adjust-alt","glyph-database-lock","glyph-database-plus","glyph-database-minus","glyph-database-ban","glyph-folder-open","glyph-folder-plus","glyph-folder-minus","glyph-folder-lock","glyph-folder-flag","glyph-folder-new","glyph-edit","glyph-new-window","glyph-check","glyph-unchecked","glyph-more-windows","glyph-show-big-thumbnails","glyph-show-thumbnails","glyph-show-thumbnails-with-lines","glyph-show-lines","glyph-playlist","glyph-imac","glyph-macbook","glyph-ipad","glyph-iphone","glyph-iphone-transfer","glyph-iphone-exchange","glyph-ipod","glyph-ipod-shuffle","glyph-ear-plugs","glyph-record","glyph-step-backward","glyph-fast-backward","glyph-rewind","glyph-play","glyph-pause","glyph-stop","glyph-forward","glyph-fast-forward","glyph-step-forward","glyph-eject","glyph-facetime-video","glyph-download-alt","glyph-mute","glyph-volume-down","glyph-volume-up","glyph-screenshot","glyph-move","glyph-more","glyph-brightness-reduce","glyph-brightness-increase","glyph-circle-plus","glyph-circle-minus","glyph-circle-remove","glyph-circle-ok","glyph-circle-question-mark","glyph-circle-info","glyph-circle-exclamation-mark","glyph-remove","glyph-ok","glyph-ban","glyph-download","glyph-upload","glyph-shopping-cart","glyph-lock","glyph-unlock","glyph-electricity","glyph-ok-2","glyph-remove-2","glyph-cart-out","glyph-cart-in","glyph-left-arrow","glyph-right-arrow","glyph-down-arrow","glyph-up-arrow","glyph-resize-small","glyph-resize-full","glyph-circle-arrow-left","glyph-circle-arrow-right","glyph-circle-arrow-top","glyph-circle-arrow-down","glyph-play-button","glyph-unshare","glyph-share","glyph-chevron-right","glyph-chevron-left","glyph-bluetooth","glyph-euro","glyph-usd","glyph-gbp","glyph-retweet-2","glyph-moon","glyph-sun","glyph-cloud","glyph-direction","glyph-brush","glyph-pen","glyph-zoom-in","glyph-zoom-out","glyph-pin","glyph-albums","glyph-rotation-lock","glyph-flash","glyph-google-maps","glyph-anchor","glyph-conversation","glyph-chat","glyph-male","glyph-female","glyph-asterisk","glyph-divide","glyph-snorkel-diving","glyph-scuba-diving","glyph-oxygen-bottle","glyph-fins","glyph-fishes","glyph-boat","glyph-delete","glyph-sheriffs-star","glyph-qrcode","glyph-barcode","glyph-pool","glyph-buoy","glyph-spade","glyph-bank","glyph-vcard","glyph-electrical-plug","glyph-flag","glyph-credit-card","glyph-keyboard-wireless","glyph-keyboard-wired","glyph-shield","glyph-ring","glyph-cake","glyph-drink","glyph-beer","glyph-fast-food","glyph-cutlery","glyph-pizza","glyph-birthday-cake","glyph-tablet","glyph-settings","glyph-bullets","glyph-cardio","glyph-t-shirt","glyph-pants","glyph-sweater","glyph-fabric","glyph-leather","glyph-scissors","glyph-bomb","glyph-skull","glyph-celebration","glyph-tea-kettle","glyph-french-press","glyph-coffe-cup","glyph-pot","glyph-grater","glyph-kettle","glyph-hospital","glyph-hospital-h","glyph-microphone","glyph-webcam","glyph-temple-christianity-church","glyph-temple-islam","glyph-temple-hindu","glyph-temple-buddhist","glyph-bicycle","glyph-life-preserver","glyph-share-alt","glyph-comments","glyph-flower","glyph-baseball","glyph-rugby","glyph-ax","glyph-table-tennis","glyph-bowling","glyph-tree-conifer","glyph-tree-deciduous","glyph-more-items","glyph-sort","glyph-filter","glyph-gamepad","glyph-playing-dices","glyph-calculator","glyph-tie","glyph-wallet","glyph-piano","glyph-sampler","glyph-podium","glyph-soccer-ball","glyph-blog","glyph-dashboard","glyph-certificate","glyph-bell","glyph-candle","glyph-pushpin","glyph-iphone-shake","glyph-pin-flag","glyph-turtle","glyph-rabbit","glyph-globe","glyph-briefcase","glyph-hdd","glyph-thumbs-up","glyph-thumbs-down","glyph-hand-right","glyph-hand-left","glyph-hand-up","glyph-hand-down","glyph-fullscreen","glyph-shopping-bag","glyph-book-open","glyph-nameplate","glyph-nameplate-alt","glyph-vases","glyph-bullhorn","glyph-dumbbell","glyph-suitcase","glyph-file-import","glyph-file-export","glyph-bug","glyph-crown","glyph-smoking","glyph-cloud-upload","glyph-cloud-download","glyph-restart","glyph-security-camera","glyph-expand","glyph-collapse","glyph-collapse-top","glyph-globe-af","glyph-global","glyph-spray","glyph-nails","glyph-claw-hammer","glyph-classic-hammer","glyph-hand-saw","glyph-riflescope","glyph-electrical-socket-eu","glyph-electrical-socket-us","glyph-message-forward","glyph-coat-hanger","glyph-dress","glyph-bathrobe","glyph-shirt","glyph-underwear","glyph-log-in","glyph-log-out","glyph-exit","glyph-new-window-alt","glyph-video-sd","glyph-video-hd","glyph-subtitles","glyph-sound-stereo","glyph-sound-dolby","glyph-sound-5-1","glyph-sound-6-1","glyph-sound-7-1","glyph-copyright-mark","glyph-registration-mark","glyph-radar","glyph-skateboard","glyph-golf-course","glyph-sorting","glyph-sort-by-alphabet","glyph-sort-by-alphabet-alt","glyph-sort-by-order","glyph-sort-by-order-alt","glyph-sort-by-attributes","glyph-sort-by-attributes-alt","glyph-compressed","glyph-package","glyph-cloud-plus","glyph-cloud-minus","glyph-disk-save","glyph-disk-open","glyph-disk-saved","glyph-disk-remove","glyph-disk-import","glyph-disk-export","glyph-tower","glyph-send","glyph-git-branch","glyph-git-create","glyph-git-private","glyph-git-delete","glyph-git-merge","glyph-git-pull-request","glyph-git-compare","glyph-git-commit","glyph-construction-cone","glyph-shoe-steps","glyph-plus","glyph-minus","glyph-redo","glyph-undo","glyph-golf","glyph-hockey","glyph-pipe","glyph-wrench","glyph-folder-closed","glyph-phone-alt","glyph-earphone","glyph-floppy-disk","glyph-floppy-saved","glyph-floppy-remove","glyph-floppy-save","glyph-floppy-open","glyph-translate","glyph-fax","glyph-factory","glyph-shop-window","glyph-shop","glyph-kiosk","glyph-kiosk-wheels","glyph-kiosk-light","glyph-kiosk-food","glyph-transfer","glyph-money","glyph-header","glyph-blacksmith","glyph-saw-blade","glyph-basketball","glyph-server","glyph-server-plus","glyph-server-minus","glyph-server-ban","glyph-server-flag","glyph-server-lock","glyph-server-new"],f=["social-pinterest","social-dropbox","social-google-plus","social-jolicloud","social-yahoo","social-blogger","social-picasa","social-amazon","social-tumblr","social-wordpress","social-instapaper","social-evernote","social-xing","social-zootool","social-dribbble","social-deviantart","social-read-it-later","social-linked-in","social-forrst","social-pinboard","social-behance","social-github","social-youtube","social-skitch","social-foursquare","social-quora","social-badoo","social-spotify","social-stumbleupon","social-readability","social-facebook","social-twitter","social-instagram","social-posterous-spaces","social-vimeo","social-flickr","social-last-fm","social-rss","social-skype","social-e-mail","social-vine","social-myspace","social-goodreads","social-apple","social-windows","social-yelp","social-playstation","social-xbox","social-android","social-ios"]}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"image"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.base()},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(i){var u=this,r=this.getTextControlEl();r&&r.length>0&&(t.isEmpty(i)?r.val(""):(r.val(i),n(u.control).parent().find(".alpaca-image-display img").attr("src",i)));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);n(r).change(function(){var t=n(this).val();n(i.control).parent().find(".alpaca-image-display img").attr("src",t)});i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()));t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=r.options.typeahead.datasets,i||(i={}),i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Image2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){if(self.sf){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})}},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("image2",t.Fields.Image2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCrop2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"imagecrop2"},setup:function(){var n=this;this.options.uploadfolder||(this.options.uploadfolder="");this.options.cropfolder||(this.options.cropfolder=this.options.uploadfolder);this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.width&&this.options.height&&(this.options.cropper.aspectRatio=this.options.width/this.options.height);this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.options.cropButtonHidden||(this.options.cropButtonHidden=!1);this.options.cropButtonHidden||(this.options.buttons={check:{value:"Crop",click:function(){this.cropImage()}}});this.base()},getValue:function(){var i=this,t;if(this.control&&this.control.length>0)return t=null,$image=i.getImage(),t=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},t.url=n(this.control).find("select").val(),t.url&&(this.dataSource&&this.dataSource[t.url]&&(t.id=this.dataSource[t.url].id),t.cropUrl=n(i.getControlEl()).attr("data-cropurl")),t},setValue:function(i){var r=this,u;i!==this.getValue()&&this.control&&typeof i!="undefined"&&i!=null&&(t.isEmpty(i)?(r.cropper(""),n(this.control).find("select").val(""),n(r.getControlEl()).attr("data-cropurl","")):t.isObject(i)?i.cropdata&&Object.keys(i.cropdata).length>0?(u=i.cropdata[Object.keys(i.cropdata)[0]],r.cropper(i.url,u.cropper),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",u.url)):(r.cropper(i.url,i),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",i.cropUrl)):(r.cropper(i),n(this.control).find("select").val(i),n(r.getControlEl()).attr("data-cropurl","")),n(this.control).find("select").trigger("change.select2"))},getEnum:function(){if(this.schema){if(this.schema["enum"])return this.schema["enum"];if(this.schema.type&&this.schema.type==="array"&&this.schema.items&&this.schema.items["enum"])return this.schema.items["enum"]}},initControlEvents:function(){var n=this,t;if(n.base(),n.options.multiple){t=this.control.parent().find(".select2-search__field");t.focus(function(t){n.suspendBlurFocus||(n.onFocus.call(n,t),n.trigger("focus",t))});t.blur(function(t){n.suspendBlurFocus||(n.onBlur.call(n,t),n.trigger("blur",t))});this.control.on("change",function(t){n.onChange.call(n,t);n.trigger("change",t)})}},beforeRenderControl:function(i,r){var u=this;this.base(i,function(){if(u.selectOptions=[],u.sf){var f=function(){u.schema.enum=[];u.options.optionLabels=[];for(var n=0;n0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl().find("select")).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.uploadfolder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(n,t){u.refresh(function(){u.setValue(t.url)})})}}).data("loaded",!0);r()})},cropImage:function(){var t=this,i=t.getValue(),r={url:i.url,cropfolder:t.options.cropfolder,crop:i,id:"crop"};t.options.width&&t.options.height&&(r.resize={width:t.options.width,height:t.options.height});n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){n(t.getControlEl()).attr("data-cropurl",i.url);setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},getFileUrl:function(t){var i=this,r;i.sf&&(r={fileid:t},n.ajax({url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:i.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:r,success:function(n){return n},error:function(){return""}}))},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?((t!=r.originalUrl||r.url&&t!=r.url)&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data?this.data.url:"",!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).find("select");i.focus();t&&t(this)}},getTitle:function(){return"Image Crop 2 Field"},getDescription:function(){return"Image Crop 2 Field"}});t.registerFieldClass("imagecrop2",t.Fields.ImageCrop2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecrop"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Crop Field"},getDescription:function(){return"Image Crop Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var r=this,i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?(i.val(""),r.cropper("")):t.isObject(n)?(i.val(n.url),r.cropper(n.url,n)):(i.val(n),r.cropper(n)));this.updateMaxLengthIndicator()},getValue:function(){var i=this,n=null,t=this.getTextControlEl();return $image=i.getImage(),t&&t.length>0&&(n=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},n.url=t.val()),n},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;$image=n(i.control).parent().find(".alpaca-image-display img");i.sf?(i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){n(r).val(i.url);n(r).change()})}}).data("loaded",!0),n(r).change(function(){var t=n(this).val();i.cropper(t)}),i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()))):$image.hide();t()},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?(t!=r.originalUrl&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)&&u.sf){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){n(r).val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){n(r).val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecrop",t.Fields.ImageCropField)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropperField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecropper"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Cropper Field"},getDescription:function(){return"Image Cropper Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):t.isString(n)?i.val(n):(i.val(n.url),this.setCroppedData(n.cropdata)));this.updateMaxLengthIndicator()},getValue:function(){var n=null,t=this.getTextControlEl();return t&&t.length>0&&(n={url:t.val()},n.cropdata=this.getCroppedData()),n},getCroppedData:function(){var f=this.getTextControlEl(),i={};for(var t in this.options.croppers){var e=this.options.croppers[t],r=this.id+"-"+t,u=n("#"+r);i[t]=u.data("cropdata")}return i},cropAllImages:function(t){var i=this;for(var r in this.options.croppers){var f=this.id+"-"+r,s=n("#"+f),u=this.options.croppers[r],e={x:-1,y:-1,width:u.width,height:u.height,rotate:0},o=JSON.stringify({url:t,id:r,crop:e,resize:u,cropfolder:this.options.cropfolder});n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",async:!1,data:o,beforeSend:i.sf.setModuleHeaders}).done(function(n){var t={url:n.url,cropper:{}};i.setCroppedDataForId(f,t)}).fail(function(n,t,i){alert("Uh-oh, something broke: "+i)})}},setCroppedData:function(i){var e=this.getTextControlEl(),h=this.getFieldEl(),u,r,f,o;if(e&&e.length>0&&!t.isEmpty(i))for(r in this.options.croppers){var o=this.options.croppers[r],c=this.id+"-"+r,s=n("#"+c);cropdata=i[r];cropdata&&s.data("cropdata",cropdata);u||(u=s,n(u).addClass("active"),cropdata&&(f=n(h).find(".alpaca-image-display img.image"),o=f.data("cropper"),o&&f.cropper("setData",cropdata.cropper)))}},setCroppedDataForId:function(t,i){var u=this.getTextControlEl(),r;i&&(r=n("#"+t),r.data("cropdata",i))},getCurrentCropData:function(){var t=this.getFieldEl(),i=n(t).parent().find(".alpaca-form-tab.active");return n(i).data("cropdata")},setCurrentCropData:function(t){var i=this.getFieldEl(),r=n(i).parent().find(".alpaca-form-tab.active");n(r).data("cropdata",t)},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},cropChange:function(t){var u=t.data,f=u.getCurrentCropData(),e;if(f){var r=f.cropper,o=this,i=n(this).cropper("getData",{rounded:!0});(i.x!=r.x||i.y!=r.y||i.width!=r.width||i.height!=r.height||i.rotate!=r.rotate)&&(e={url:"",cropper:i},u.setCurrentCropData(e))}},getCropppersData:function(){var n,t,i;for(n in self.options.croppers)t=self.options.croppers[n],i=self.id+"-"+n},handlePostRender:function(t){var i=this,f=this.getTextControlEl(),s=this.getFieldEl(),r=n('Crop<\/a>'),e,o,u,a;r.click(function(){var u=i.getCroppedData(),e=JSON.stringify({url:f.val(),cropfolder:i.options.cropfolder,cropdata:u,croppers:i.options.croppers}),t;return n(r).css("cursor","wait"),t="CropImages",n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/"+t,contentType:"application/json; charset=utf-8",dataType:"json",data:e,beforeSend:i.sf.setModuleHeaders}).done(function(t){var u,f;for(u in i.options.croppers){var s=i.options.croppers[u],e=i.id+"-"+u,o=n("#"+e);t.cropdata[u]&&(f={url:t.cropdata[u].url,cropper:t.cropdata[u].crop},f&&o.data("cropdata",f))}setTimeout(function(){n(r).css("cursor","initial")},500)}).fail(function(t,i,r){alert("Uh-oh, something broke: "+r);n(s).css("cursor","initial")}),!1});for(o in i.options.croppers){var c=i.options.croppers[o],l=i.id+"-"+o,h=n(''+o+"<\/a>").appendTo(n(f).parent());h.data("cropopt",c);h.click(function(){u.off("crop.cropper");var t=n(this).data("cropdata"),f=n(this).data("cropopt");u.cropper("setAspectRatio",f.width/f.height);t?u.cropper("setData",t.cropper):u.cropper("reset");r.data("cropperButtonId",this.id);r.data("cropperId",n(this).attr("data-id"));n(this).parent().find(".alpaca-form-tab").removeClass("active");n(this).addClass("active");u.on("crop.cropper",i,i.cropChange);return!1});e||(e=h,n(e).addClass("active"),r.data("cropperButtonId",n(e).attr("id")),r.data("cropperId",n(e).attr("data-id")))}u=n(s).find(".alpaca-image-display img.image");u.cropper(i.options.cropper).on("built.cropper",function(){var t=n(e).data("cropopt"),r,u;t&&n(this).cropper("setAspectRatio",t.width/t.height);r=n(e).data("cropdata");r&&n(this).cropper("setData",r.cropper);u=n(s).find(".alpaca-image-display img.image");u.on("crop.cropper",i,i.cropChange)});i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){f.val(i.url);n(f).change()})}}).data("loaded",!0);n(f).change(function(){var t=n(this).val();n(s).find(".alpaca-image-display img.image").attr("src",t);u.cropper("replace",t);t&&i.cropAllImages(t)});r.appendTo(n(f).parent());i.options.manageurl&&(a=n('Manage files<\/a>').appendTo(n(f).parent()));t()},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){r.val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){r.val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecropper",t.Fields.ImageCropperField)}(jQuery),function(n){var t=n.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.numberDecimalSeparator=f.numberDecimalSeparator},setup:function(){this.base()},getFieldType:function(){return"number"},getValue:function(){var n=this._getControlVal(!1);return typeof n=="undefined"||""==n?n:(this.numberDecimalSeparator!="."&&(n=(""+n).replace(this.numberDecimalSeparator,".")),parseFloat(n))},setValue:function(n){var i=n;this.numberDecimalSeparator!="."&&(i=t.isEmpty(n)?"":(""+n).replace(".",this.numberDecimalSeparator));this.base(i)},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateNumber();return i.stringNotANumber={message:n?"":this.view.getMessage("stringNotANumber"),status:n},n=this._validateDivisibleBy(),i.stringDivisibleBy={message:n?"":t.substituteTokens(this.view.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:n},n=this._validateMaximum(),i.stringValueTooLarge={message:"",status:n},n||(i.stringValueTooLarge.message=this.schema.exclusiveMaximum?t.substituteTokens(this.view.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):t.substituteTokens(this.view.getMessage("stringValueTooLarge"),[this.schema.maximum])),n=this._validateMinimum(),i.stringValueTooSmall={message:"",status:n},n||(i.stringValueTooSmall.message=this.schema.exclusiveMinimum?t.substituteTokens(this.view.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):t.substituteTokens(this.view.getMessage("stringValueTooSmall"),[this.schema.minimum])),n=this._validateMultipleOf(),i.stringValueNotMultipleOf={message:"",status:n},n||(i.stringValueNotMultipleOf.message=t.substituteTokens(this.view.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),r&&i.stringNotANumber.status&&i.stringDivisibleBy.status&&i.stringValueTooLarge.status&&i.stringValueTooSmall.status&&i.stringValueNotMultipleOf.status},_validateNumber:function(){var n=this._getControlVal(),i,r;return(this.numberDecimalSeparator!="."&&(n=n.replace(this.numberDecimalSeparator,".")),typeof n=="number"&&(n=""+n),t.isValEmpty(n))?!0:(i=t.testRegex(t.regexps.number,n),!i)?!1:(r=this.getValue(),isNaN(r))?!1:!0},_validateDivisibleBy:function(){var n=this.getValue();return!t.isEmpty(this.schema.divisibleBy)&&n%this.schema.divisibleBy!=0?!1:!0},_validateMaximum:function(){var n=this.getValue();return!t.isEmpty(this.schema.maximum)&&(n>this.schema.maximum||!t.isEmpty(this.schema.exclusiveMaximum)&&n==this.schema.maximum&&this.schema.exclusiveMaximum)?!1:!0},_validateMinimum:function(){var n=this.getValue();return!t.isEmpty(this.schema.minimum)&&(n0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("role2",t.Fields.Role2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.User2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.role||(this.options.role="");n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/UsersLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"",d:n.options.folder,role:n.options.role,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getUserName:function(t,i){var r=this,u;r.sf&&(u={userid:t},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/GetUserInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error GetUserInfo "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},getTitle:function(){return"Select User Field"},getDescription:function(){return"Select User Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("user2",t.Fields.User2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.Select2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("select2",t.Fields.Select2Field)}(jQuery),function(n){var t=n.alpaca;n.alpaca.Fields.DnnUrlField=n.alpaca.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.sf=f.servicesFramework},setup:function(){this.base()},applyTypeAhead:function(){var t=this,f,i,r,u,e,o,s,h;if(t.sf){if(f=f={},i=i={},i.name||(i.name=t.getId()),r=r={},u={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},u.remote={url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Tabs?q=%QUERY&l="+t.culture,ajax:{beforeSend:t.sf.setModuleHeaders}},i.filter&&(u.remote.filter=i.filter),i.replace&&(u.remote.replace=i.replace),e=new Bloodhound(u),e.initialize(),i.source=e.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(o in i.templates)s=i.templates[o],typeof s=="string"&&(i.templates[o]=Handlebars.compile(s));n(t.control).typeahead(f,i);n(t.control).on("typeahead:autocompleted",function(i,r){t.setValue(r.value);n(t.control).change()});n(t.control).on("typeahead:selected",function(i,r){t.setValue(r.value);n(t.control).change()});if(r){if(r.autocompleted)n(t.control).on("typeahead:autocompleted",function(n,t){r.autocompleted(n,t)});if(r.selected)n(t.control).on("typeahead:selected",function(n,t){r.selected(n,t)})}h=n(t.control);n(t.control).change(function(){var i=n(this).val(),t=n(h).typeahead("val");t!==i&&n(h).typeahead("val",t)});n(t.field).find("span.twitter-typeahead").first().css("display","block");n(t.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("url",t.Fields.DnnUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Url2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.culture=f.culture;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("url2",t.Fields.Url2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.wysihtmlField=t.Fields.TextAreaField.extend({getFieldType:function(){return"wysihtml"},setup:function(){this.data||(this.data="");this.base();typeof this.options.wysihtml=="undefined"&&(this.options.wysihtml={})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control){var t=r.control,u=n(t).find("#"+r.id)[0];r.editor=new wysihtml5.Editor(u,{toolbar:n(t).find("#"+r.id+"-toolbar")[0],parserRules:wysihtml5ParserRules});wysihtml5.commands.custom_class={exec:function(n,t,i){return wysihtml5.commands.formatBlock.exec(n,t,"p",i,new RegExp(i,"g"))},state:function(n,t,i){return wysihtml5.commands.formatBlock.state(n,t,"p",i,new RegExp(i,"g"))}}}i()})},getEditor:function(){return this.editor},setValue:function(n){var t=this;this.editor&&this.editor.setValue(n);this.base(n)},getValue:function(){var n=null;return this.editor&&(n=this.editor.currentView=="source"?this.editor.sourceView.textarea.value:this.editor.getValue()),n},getTitle:function(){return"wysihtml"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("wysihtml",t.Fields.wysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.SummernoteField=t.Fields.TextAreaField.extend({getFieldType:function(){return"summernote"},setup:function(){this.data||(this.data="");this.base();typeof this.options.summernote=="undefined"&&(this.options.summernote={height:null,minHeight:null,maxHeight:null,focus:!0})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control&&n.fn.summernote)r.on("ready",function(){n(r.control).summernote(r.options.summernote)});n(r.control).bind("destroyed",function(){try{n(r.control).summernote("destroy")}catch(t){}});i()})},getTitle:function(){return"Summernote Editor"},getDescription:function(){return"Provides an instance of a Summernote Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{summernote:{title:"Summernote Editor options",description:"Use this entry to provide configuration options to the underlying Summernote plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{summernote:{type:"any"}}})}});t.registerFieldClass("summernote",t.Fields.SummernoteField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLCKEditorField=t.Fields.CKEditorField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base();this.options.ckeditor||(this.options.ckeditor={});CKEDITOR.config.enableConfigHelper&&!this.options.ckeditor.extraPlugins&&(this.options.ckeditor.extraPlugins="dnnpages,confighelper")},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlckeditor",t.Fields.MLCKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFile2Field=t.Fields.File2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).after('')}});t.registerFieldClass("mlfile2",t.Fields.MLFile2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFileField=t.Fields.FileField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlfile",t.Fields.MLFileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFolder2Field=t.Fields.Folder2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlfolder2",t.Fields.MLFolder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImage2Field=t.Fields.Image2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlimage2",t.Fields.MLImage2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImageField=t.Fields.ImageField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlimage",t.Fields.MLImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextAreaField=t.Fields.TextAreaField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltextarea",t.Fields.MLTextAreaField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltext",t.Fields.MLTextField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrl2Field=t.Fields.Url2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlurl2",t.Fields.MLUrl2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrlField=t.Fields.DnnUrlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlurl",t.Fields.MLUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLwysihtmlField=t.Fields.wysihtmlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"ML wysihtml Field"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing MLHTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("mlwysihtml",t.Fields.MLwysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Accordion=t.Fields.ArrayField.extend({getFieldType:function(){return"accordion"},setup:function(){var n=this;this.base();n.options.titleField||n.schema.items&&n.schema.items.properties&&Object.keys(n.schema.items.properties).length&&(n.options.titleField=Object.keys(n.schema.items.properties)[0])},createItem:function(t,i,r,u,f){var e=this;this.base(t,i,r,u,function(t){var u="[no title]",r=t.childrenByPropertyId[e.options.titleField],i;if(r){i=r.getValue();i=i?i:u;t.getContainerEl().closest(".panel").find(".panel-title a").first().text(i);r.on("keyup",function(){var t=this.getValue();t=t?t:u;n(this.getControlEl()).closest(".panel").find(".panel-title a").first().text(t)})}f&&f(t)})},getType:function(){return"array"},getTitle:function(){return"accordion Field"},getDescription:function(){return"Renders array with title"}});t.registerFieldClass("accordion",t.Fields.Accordion)}(jQuery); \ No newline at end of file +(function(n){function r(t,i){var r="";return t&&t.address_components&&n.each(t.address_components,function(t,u){n.each(u.types,function(n,t){if(t==i){r=u.long_name;return}});r!=""}),r}function u(t){var i="";return t&&t.address_components&&n.each(t.address_components,function(t,r){n.each(r.types,function(n,t){if(t=="country"){i=r.short_name;return}});i!=""}),i}function f(n){for(n=n.toUpperCase(),index=0;index<\/div>').appendTo(t),o=n('Geocode Address<\/a>').appendTo(t),o.button&&o.button({text:!0}),o.click(function(){if(google&&google.maps){var i=new google.maps.Geocoder,r=e.getAddress();i&&i.geocode({address:r},function(i,r){r===google.maps.GeocoderStatus.OK?(n(".alpaca-field.lng input.alpaca-control",t).val(i[0].geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i[0].geometry.location.lat())):e.displayMessage("Geocoding failed: "+r)})}else e.displayMessage("Google Map API is not installed.");return!1}).wrap(""),s=n(".alpaca-field.googlesearch input.alpaca-control",t)[0],s&&typeof google!="undefined"&&google&&google.maps&&(h=new google.maps.places.SearchBox(s),google.maps.event.addListener(h,"places_changed",function(){var e=h.getPlaces(),i;e.length!=0&&(i=e[0],n(".alpaca-field.postalcode input.alpaca-control",t).val(r(i,"postal_code")),n(".alpaca-field.city input.alpaca-control",t).val(r(i,"locality")),n(".alpaca-field.street input.alpaca-control",t).val(r(i,"route")),n(".alpaca-field.number input.alpaca-control",t).val(r(i,"street_number")),n(".alpaca-field.country select.alpaca-control",t).val(f(u(i,"country"))),n(".alpaca-field.lng input.alpaca-control",t).val(i.geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i.geometry.location.lat()),s.value="")}),google.maps.event.addDomListener(s,"keydown",function(n){n.keyCode==13&&n.preventDefault()})),e.options.showMapOnLoad&&o.click());i()})},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Address with Street, City, State, Postal code and Country. Also comes with support for Google map."},getSchemaOfOptions:function(){return i.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return i.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t=[{countryName:"Afghanistan",iso2:"AF",iso3:"AFG",phoneCode:"93"},{countryName:"Albania",iso2:"AL",iso3:"ALB",phoneCode:"355"},{countryName:"Algeria",iso2:"DZ",iso3:"DZA",phoneCode:"213"},{countryName:"American Samoa",iso2:"AS",iso3:"ASM",phoneCode:"1 684"},{countryName:"Andorra",iso2:"AD",iso3:"AND",phoneCode:"376"},{countryName:"Angola",iso2:"AO",iso3:"AGO",phoneCode:"244"},{countryName:"Anguilla",iso2:"AI",iso3:"AIA",phoneCode:"1 264"},{countryName:"Antarctica",iso2:"AQ",iso3:"ATA",phoneCode:"672"},{countryName:"Antigua and Barbuda",iso2:"AG",iso3:"ATG",phoneCode:"1 268"},{countryName:"Argentina",iso2:"AR",iso3:"ARG",phoneCode:"54"},{countryName:"Armenia",iso2:"AM",iso3:"ARM",phoneCode:"374"},{countryName:"Aruba",iso2:"AW",iso3:"ABW",phoneCode:"297"},{countryName:"Australia",iso2:"AU",iso3:"AUS",phoneCode:"61"},{countryName:"Austria",iso2:"AT",iso3:"AUT",phoneCode:"43"},{countryName:"Azerbaijan",iso2:"AZ",iso3:"AZE",phoneCode:"994"},{countryName:"Bahamas",iso2:"BS",iso3:"BHS",phoneCode:"1 242"},{countryName:"Bahrain",iso2:"BH",iso3:"BHR",phoneCode:"973"},{countryName:"Bangladesh",iso2:"BD",iso3:"BGD",phoneCode:"880"},{countryName:"Barbados",iso2:"BB",iso3:"BRB",phoneCode:"1 246"},{countryName:"Belarus",iso2:"BY",iso3:"BLR",phoneCode:"375"},{countryName:"Belgium",iso2:"BE",iso3:"BEL",phoneCode:"32"},{countryName:"Belize",iso2:"BZ",iso3:"BLZ",phoneCode:"501"},{countryName:"Benin",iso2:"BJ",iso3:"BEN",phoneCode:"229"},{countryName:"Bermuda",iso2:"BM",iso3:"BMU",phoneCode:"1 441"},{countryName:"Bhutan",iso2:"BT",iso3:"BTN",phoneCode:"975"},{countryName:"Bolivia",iso2:"BO",iso3:"BOL",phoneCode:"591"},{countryName:"Bosnia and Herzegovina",iso2:"BA",iso3:"BIH",phoneCode:"387"},{countryName:"Botswana",iso2:"BW",iso3:"BWA",phoneCode:"267"},{countryName:"Brazil",iso2:"BR",iso3:"BRA",phoneCode:"55"},{countryName:"British Indian Ocean Territory",iso2:"IO",iso3:"IOT",phoneCode:""},{countryName:"British Virgin Islands",iso2:"VG",iso3:"VGB",phoneCode:"1 284"},{countryName:"Brunei",iso2:"BN",iso3:"BRN",phoneCode:"673"},{countryName:"Bulgaria",iso2:"BG",iso3:"BGR",phoneCode:"359"},{countryName:"Burkina Faso",iso2:"BF",iso3:"BFA",phoneCode:"226"},{countryName:"Burma (Myanmar)",iso2:"MM",iso3:"MMR",phoneCode:"95"},{countryName:"Burundi",iso2:"BI",iso3:"BDI",phoneCode:"257"},{countryName:"Cambodia",iso2:"KH",iso3:"KHM",phoneCode:"855"},{countryName:"Cameroon",iso2:"CM",iso3:"CMR",phoneCode:"237"},{countryName:"Canada",iso2:"CA",iso3:"CAN",phoneCode:"1"},{countryName:"Cape Verde",iso2:"CV",iso3:"CPV",phoneCode:"238"},{countryName:"Cayman Islands",iso2:"KY",iso3:"CYM",phoneCode:"1 345"},{countryName:"Central African Republic",iso2:"CF",iso3:"CAF",phoneCode:"236"},{countryName:"Chad",iso2:"TD",iso3:"TCD",phoneCode:"235"},{countryName:"Chile",iso2:"CL",iso3:"CHL",phoneCode:"56"},{countryName:"China",iso2:"CN",iso3:"CHN",phoneCode:"86"},{countryName:"Christmas Island",iso2:"CX",iso3:"CXR",phoneCode:"61"},{countryName:"Cocos (Keeling) Islands",iso2:"CC",iso3:"CCK",phoneCode:"61"},{countryName:"Colombia",iso2:"CO",iso3:"COL",phoneCode:"57"},{countryName:"Comoros",iso2:"KM",iso3:"COM",phoneCode:"269"},{countryName:"Cook Islands",iso2:"CK",iso3:"COK",phoneCode:"682"},{countryName:"Costa Rica",iso2:"CR",iso3:"CRC",phoneCode:"506"},{countryName:"Croatia",iso2:"HR",iso3:"HRV",phoneCode:"385"},{countryName:"Cuba",iso2:"CU",iso3:"CUB",phoneCode:"53"},{countryName:"Cyprus",iso2:"CY",iso3:"CYP",phoneCode:"357"},{countryName:"Czech Republic",iso2:"CZ",iso3:"CZE",phoneCode:"420"},{countryName:"Democratic Republic of the Congo",iso2:"CD",iso3:"COD",phoneCode:"243"},{countryName:"Denmark",iso2:"DK",iso3:"DNK",phoneCode:"45"},{countryName:"Djibouti",iso2:"DJ",iso3:"DJI",phoneCode:"253"},{countryName:"Dominica",iso2:"DM",iso3:"DMA",phoneCode:"1 767"},{countryName:"Dominican Republic",iso2:"DO",iso3:"DOM",phoneCode:"1 809"},{countryName:"Ecuador",iso2:"EC",iso3:"ECU",phoneCode:"593"},{countryName:"Egypt",iso2:"EG",iso3:"EGY",phoneCode:"20"},{countryName:"El Salvador",iso2:"SV",iso3:"SLV",phoneCode:"503"},{countryName:"Equatorial Guinea",iso2:"GQ",iso3:"GNQ",phoneCode:"240"},{countryName:"Eritrea",iso2:"ER",iso3:"ERI",phoneCode:"291"},{countryName:"Estonia",iso2:"EE",iso3:"EST",phoneCode:"372"},{countryName:"Ethiopia",iso2:"ET",iso3:"ETH",phoneCode:"251"},{countryName:"Falkland Islands",iso2:"FK",iso3:"FLK",phoneCode:"500"},{countryName:"Faroe Islands",iso2:"FO",iso3:"FRO",phoneCode:"298"},{countryName:"Fiji",iso2:"FJ",iso3:"FJI",phoneCode:"679"},{countryName:"Finland",iso2:"FI",iso3:"FIN",phoneCode:"358"},{countryName:"France",iso2:"FR",iso3:"FRA",phoneCode:"33"},{countryName:"French Polynesia",iso2:"PF",iso3:"PYF",phoneCode:"689"},{countryName:"Gabon",iso2:"GA",iso3:"GAB",phoneCode:"241"},{countryName:"Gambia",iso2:"GM",iso3:"GMB",phoneCode:"220"},{countryName:"Gaza Strip",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Georgia",iso2:"GE",iso3:"GEO",phoneCode:"995"},{countryName:"Germany",iso2:"DE",iso3:"DEU",phoneCode:"49"},{countryName:"Ghana",iso2:"GH",iso3:"GHA",phoneCode:"233"},{countryName:"Gibraltar",iso2:"GI",iso3:"GIB",phoneCode:"350"},{countryName:"Greece",iso2:"GR",iso3:"GRC",phoneCode:"30"},{countryName:"Greenland",iso2:"GL",iso3:"GRL",phoneCode:"299"},{countryName:"Grenada",iso2:"GD",iso3:"GRD",phoneCode:"1 473"},{countryName:"Guam",iso2:"GU",iso3:"GUM",phoneCode:"1 671"},{countryName:"Guatemala",iso2:"GT",iso3:"GTM",phoneCode:"502"},{countryName:"Guinea",iso2:"GN",iso3:"GIN",phoneCode:"224"},{countryName:"Guinea-Bissau",iso2:"GW",iso3:"GNB",phoneCode:"245"},{countryName:"Guyana",iso2:"GY",iso3:"GUY",phoneCode:"592"},{countryName:"Haiti",iso2:"HT",iso3:"HTI",phoneCode:"509"},{countryName:"Holy See (Vatican City)",iso2:"VA",iso3:"VAT",phoneCode:"39"},{countryName:"Honduras",iso2:"HN",iso3:"HND",phoneCode:"504"},{countryName:"Hong Kong",iso2:"HK",iso3:"HKG",phoneCode:"852"},{countryName:"Hungary",iso2:"HU",iso3:"HUN",phoneCode:"36"},{countryName:"Iceland",iso2:"IS",iso3:"IS",phoneCode:"354"},{countryName:"India",iso2:"IN",iso3:"IND",phoneCode:"91"},{countryName:"Indonesia",iso2:"ID",iso3:"IDN",phoneCode:"62"},{countryName:"Iran",iso2:"IR",iso3:"IRN",phoneCode:"98"},{countryName:"Iraq",iso2:"IQ",iso3:"IRQ",phoneCode:"964"},{countryName:"Ireland",iso2:"IE",iso3:"IRL",phoneCode:"353"},{countryName:"Isle of Man",iso2:"IM",iso3:"IMN",phoneCode:"44"},{countryName:"Israel",iso2:"IL",iso3:"ISR",phoneCode:"972"},{countryName:"Italy",iso2:"IT",iso3:"ITA",phoneCode:"39"},{countryName:"Ivory Coast",iso2:"CI",iso3:"CIV",phoneCode:"225"},{countryName:"Jamaica",iso2:"JM",iso3:"JAM",phoneCode:"1 876"},{countryName:"Japan",iso2:"JP",iso3:"JPN",phoneCode:"81"},{countryName:"Jersey",iso2:"JE",iso3:"JEY",phoneCode:""},{countryName:"Jordan",iso2:"JO",iso3:"JOR",phoneCode:"962"},{countryName:"Kazakhstan",iso2:"KZ",iso3:"KAZ",phoneCode:"7"},{countryName:"Kenya",iso2:"KE",iso3:"KEN",phoneCode:"254"},{countryName:"Kiribati",iso2:"KI",iso3:"KIR",phoneCode:"686"},{countryName:"Kosovo",iso2:"",iso3:"",phoneCode:"381"},{countryName:"Kuwait",iso2:"KW",iso3:"KWT",phoneCode:"965"},{countryName:"Kyrgyzstan",iso2:"KG",iso3:"KGZ",phoneCode:"996"},{countryName:"Laos",iso2:"LA",iso3:"LAO",phoneCode:"856"},{countryName:"Latvia",iso2:"LV",iso3:"LVA",phoneCode:"371"},{countryName:"Lebanon",iso2:"LB",iso3:"LBN",phoneCode:"961"},{countryName:"Lesotho",iso2:"LS",iso3:"LSO",phoneCode:"266"},{countryName:"Liberia",iso2:"LR",iso3:"LBR",phoneCode:"231"},{countryName:"Libya",iso2:"LY",iso3:"LBY",phoneCode:"218"},{countryName:"Liechtenstein",iso2:"LI",iso3:"LIE",phoneCode:"423"},{countryName:"Lithuania",iso2:"LT",iso3:"LTU",phoneCode:"370"},{countryName:"Luxembourg",iso2:"LU",iso3:"LUX",phoneCode:"352"},{countryName:"Macau",iso2:"MO",iso3:"MAC",phoneCode:"853"},{countryName:"Macedonia",iso2:"MK",iso3:"MKD",phoneCode:"389"},{countryName:"Madagascar",iso2:"MG",iso3:"MDG",phoneCode:"261"},{countryName:"Malawi",iso2:"MW",iso3:"MWI",phoneCode:"265"},{countryName:"Malaysia",iso2:"MY",iso3:"MYS",phoneCode:"60"},{countryName:"Maldives",iso2:"MV",iso3:"MDV",phoneCode:"960"},{countryName:"Mali",iso2:"ML",iso3:"MLI",phoneCode:"223"},{countryName:"Malta",iso2:"MT",iso3:"MLT",phoneCode:"356"},{countryName:"Marshall Islands",iso2:"MH",iso3:"MHL",phoneCode:"692"},{countryName:"Mauritania",iso2:"MR",iso3:"MRT",phoneCode:"222"},{countryName:"Mauritius",iso2:"MU",iso3:"MUS",phoneCode:"230"},{countryName:"Mayotte",iso2:"YT",iso3:"MYT",phoneCode:"262"},{countryName:"Mexico",iso2:"MX",iso3:"MEX",phoneCode:"52"},{countryName:"Micronesia",iso2:"FM",iso3:"FSM",phoneCode:"691"},{countryName:"Moldova",iso2:"MD",iso3:"MDA",phoneCode:"373"},{countryName:"Monaco",iso2:"MC",iso3:"MCO",phoneCode:"377"},{countryName:"Mongolia",iso2:"MN",iso3:"MNG",phoneCode:"976"},{countryName:"Montenegro",iso2:"ME",iso3:"MNE",phoneCode:"382"},{countryName:"Montserrat",iso2:"MS",iso3:"MSR",phoneCode:"1 664"},{countryName:"Morocco",iso2:"MA",iso3:"MAR",phoneCode:"212"},{countryName:"Mozambique",iso2:"MZ",iso3:"MOZ",phoneCode:"258"},{countryName:"Namibia",iso2:"NA",iso3:"NAM",phoneCode:"264"},{countryName:"Nauru",iso2:"NR",iso3:"NRU",phoneCode:"674"},{countryName:"Nepal",iso2:"NP",iso3:"NPL",phoneCode:"977"},{countryName:"Netherlands",iso2:"NL",iso3:"NLD",phoneCode:"31"},{countryName:"Netherlands Antilles",iso2:"AN",iso3:"ANT",phoneCode:"599"},{countryName:"New Caledonia",iso2:"NC",iso3:"NCL",phoneCode:"687"},{countryName:"New Zealand",iso2:"NZ",iso3:"NZL",phoneCode:"64"},{countryName:"Nicaragua",iso2:"NI",iso3:"NIC",phoneCode:"505"},{countryName:"Niger",iso2:"NE",iso3:"NER",phoneCode:"227"},{countryName:"Nigeria",iso2:"NG",iso3:"NGA",phoneCode:"234"},{countryName:"Niue",iso2:"NU",iso3:"NIU",phoneCode:"683"},{countryName:"Norfolk Island",iso2:"",iso3:"NFK",phoneCode:"672"},{countryName:"North Korea",iso2:"KP",iso3:"PRK",phoneCode:"850"},{countryName:"Northern Mariana Islands",iso2:"MP",iso3:"MNP",phoneCode:"1 670"},{countryName:"Norway",iso2:"NO",iso3:"NOR",phoneCode:"47"},{countryName:"Oman",iso2:"OM",iso3:"OMN",phoneCode:"968"},{countryName:"Pakistan",iso2:"PK",iso3:"PAK",phoneCode:"92"},{countryName:"Palau",iso2:"PW",iso3:"PLW",phoneCode:"680"},{countryName:"Panama",iso2:"PA",iso3:"PAN",phoneCode:"507"},{countryName:"Papua New Guinea",iso2:"PG",iso3:"PNG",phoneCode:"675"},{countryName:"Paraguay",iso2:"PY",iso3:"PRY",phoneCode:"595"},{countryName:"Peru",iso2:"PE",iso3:"PER",phoneCode:"51"},{countryName:"Philippines",iso2:"PH",iso3:"PHL",phoneCode:"63"},{countryName:"Pitcairn Islands",iso2:"PN",iso3:"PCN",phoneCode:"870"},{countryName:"Poland",iso2:"PL",iso3:"POL",phoneCode:"48"},{countryName:"Portugal",iso2:"PT",iso3:"PRT",phoneCode:"351"},{countryName:"Puerto Rico",iso2:"PR",iso3:"PRI",phoneCode:"1"},{countryName:"Qatar",iso2:"QA",iso3:"QAT",phoneCode:"974"},{countryName:"Republic of the Congo",iso2:"CG",iso3:"COG",phoneCode:"242"},{countryName:"Romania",iso2:"RO",iso3:"ROU",phoneCode:"40"},{countryName:"Russia",iso2:"RU",iso3:"RUS",phoneCode:"7"},{countryName:"Rwanda",iso2:"RW",iso3:"RWA",phoneCode:"250"},{countryName:"Saint Barthelemy",iso2:"BL",iso3:"BLM",phoneCode:"590"},{countryName:"Saint Helena",iso2:"SH",iso3:"SHN",phoneCode:"290"},{countryName:"Saint Kitts and Nevis",iso2:"KN",iso3:"KNA",phoneCode:"1 869"},{countryName:"Saint Lucia",iso2:"LC",iso3:"LCA",phoneCode:"1 758"},{countryName:"Saint Martin",iso2:"MF",iso3:"MAF",phoneCode:"1 599"},{countryName:"Saint Pierre and Miquelon",iso2:"PM",iso3:"SPM",phoneCode:"508"},{countryName:"Saint Vincent and the Grenadines",iso2:"VC",iso3:"VCT",phoneCode:"1 784"},{countryName:"Samoa",iso2:"WS",iso3:"WSM",phoneCode:"685"},{countryName:"San Marino",iso2:"SM",iso3:"SMR",phoneCode:"378"},{countryName:"Sao Tome and Principe",iso2:"ST",iso3:"STP",phoneCode:"239"},{countryName:"Saudi Arabia",iso2:"SA",iso3:"SAU",phoneCode:"966"},{countryName:"Senegal",iso2:"SN",iso3:"SEN",phoneCode:"221"},{countryName:"Serbia",iso2:"RS",iso3:"SRB",phoneCode:"381"},{countryName:"Seychelles",iso2:"SC",iso3:"SYC",phoneCode:"248"},{countryName:"Sierra Leone",iso2:"SL",iso3:"SLE",phoneCode:"232"},{countryName:"Singapore",iso2:"SG",iso3:"SGP",phoneCode:"65"},{countryName:"Slovakia",iso2:"SK",iso3:"SVK",phoneCode:"421"},{countryName:"Slovenia",iso2:"SI",iso3:"SVN",phoneCode:"386"},{countryName:"Solomon Islands",iso2:"SB",iso3:"SLB",phoneCode:"677"},{countryName:"Somalia",iso2:"SO",iso3:"SOM",phoneCode:"252"},{countryName:"South Africa",iso2:"ZA",iso3:"ZAF",phoneCode:"27"},{countryName:"South Korea",iso2:"KR",iso3:"KOR",phoneCode:"82"},{countryName:"Spain",iso2:"ES",iso3:"ESP",phoneCode:"34"},{countryName:"Sri Lanka",iso2:"LK",iso3:"LKA",phoneCode:"94"},{countryName:"Sudan",iso2:"SD",iso3:"SDN",phoneCode:"249"},{countryName:"Suriname",iso2:"SR",iso3:"SUR",phoneCode:"597"},{countryName:"Svalbard",iso2:"SJ",iso3:"SJM",phoneCode:""},{countryName:"Swaziland",iso2:"SZ",iso3:"SWZ",phoneCode:"268"},{countryName:"Sweden",iso2:"SE",iso3:"SWE",phoneCode:"46"},{countryName:"Switzerland",iso2:"CH",iso3:"CHE",phoneCode:"41"},{countryName:"Syria",iso2:"SY",iso3:"SYR",phoneCode:"963"},{countryName:"Taiwan",iso2:"TW",iso3:"TWN",phoneCode:"886"},{countryName:"Tajikistan",iso2:"TJ",iso3:"TJK",phoneCode:"992"},{countryName:"Tanzania",iso2:"TZ",iso3:"TZA",phoneCode:"255"},{countryName:"Thailand",iso2:"TH",iso3:"THA",phoneCode:"66"},{countryName:"Timor-Leste",iso2:"TL",iso3:"TLS",phoneCode:"670"},{countryName:"Togo",iso2:"TG",iso3:"TGO",phoneCode:"228"},{countryName:"Tokelau",iso2:"TK",iso3:"TKL",phoneCode:"690"},{countryName:"Tonga",iso2:"TO",iso3:"TON",phoneCode:"676"},{countryName:"Trinidad and Tobago",iso2:"TT",iso3:"TTO",phoneCode:"1 868"},{countryName:"Tunisia",iso2:"TN",iso3:"TUN",phoneCode:"216"},{countryName:"Turkey",iso2:"TR",iso3:"TUR",phoneCode:"90"},{countryName:"Turkmenistan",iso2:"TM",iso3:"TKM",phoneCode:"993"},{countryName:"Turks and Caicos Islands",iso2:"TC",iso3:"TCA",phoneCode:"1 649"},{countryName:"Tuvalu",iso2:"TV",iso3:"TUV",phoneCode:"688"},{countryName:"Uganda",iso2:"UG",iso3:"UGA",phoneCode:"256"},{countryName:"Ukraine",iso2:"UA",iso3:"UKR",phoneCode:"380"},{countryName:"United Arab Emirates",iso2:"AE",iso3:"ARE",phoneCode:"971"},{countryName:"United Kingdom",iso2:"GB",iso3:"GBR",phoneCode:"44"},{countryName:"United States",iso2:"US",iso3:"USA",phoneCode:"1"},{countryName:"Uruguay",iso2:"UY",iso3:"URY",phoneCode:"598"},{countryName:"US Virgin Islands",iso2:"VI",iso3:"VIR",phoneCode:"1 340"},{countryName:"Uzbekistan",iso2:"UZ",iso3:"UZB",phoneCode:"998"},{countryName:"Vanuatu",iso2:"VU",iso3:"VUT",phoneCode:"678"},{countryName:"Venezuela",iso2:"VE",iso3:"VEN",phoneCode:"58"},{countryName:"Vietnam",iso2:"VN",iso3:"VNM",phoneCode:"84"},{countryName:"Wallis and Futuna",iso2:"WF",iso3:"WLF",phoneCode:"681"},{countryName:"West Bank",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Western Sahara",iso2:"EH",iso3:"ESH",phoneCode:""},{countryName:"Yemen",iso2:"YE",iso3:"YEM",phoneCode:"967"},{countryName:"Zambia",iso2:"ZM",iso3:"ZMB",phoneCode:"260"},{countryName:"Zimbabwe",iso2:"ZW",iso3:"ZWE",phoneCode:"263"}];i.registerFieldClass("address",i.Fields.AddressField)})(jQuery),function(n){var t=n.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data="");this.base();typeof this.options.ckeditor=="undefined"&&(this.options.ckeditor={});typeof this.options.configset=="undefined"&&(this.options.configset="")},afterRenderControl:function(t,i){var r=this;this.base(t,function(){var t,u;if(!r.isDisplayOnly()&&r.control&&typeof CKEDITOR!="undefined"){t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]};r.options.configset=="basic"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="standard"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Table","Smiley","SpecialChar","Iframe"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","ShowBlocks","Source"]}],format_tags:"p;h1;h2;h3;pre;div",extraAllowedContent:"table tr th td caption[*](*);div span(*);",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="full"&&(t={toolbar:[{name:"document",items:["Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About","-","Source"]}],format_tags:"p;h1;h2;h3;pre;div",allowedContentRules:!0,removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]});u=n.extend({},t,r.options.ckeditor);r.on("ready",function(){r.editor||(r.editor=CKEDITOR.replace(n(r.control)[0],u),r.initCKEditorEvents())})}n(r.control).bind("destroyed",function(){if(r.editor){r.editor.removeAllListeners();try{r.editor.destroy(!1)}catch(n){}r.editor=null}});i()})},initCKEditorEvents:function(){var n=this;if(n.editor){n.editor.on("click",function(t){n.onClick.call(n,t);n.trigger("click",t)});n.editor.on("change",function(t){n.onChange();n.triggerWithPropagation("change",t)});n.editor.on("blur",function(t){n.onBlur();n.trigger("blur",t)});n.editor.on("focus",function(t){n.onFocus.call(n,t);n.trigger("focus",t)});n.editor.on("key",function(t){n.onKeyPress.call(n,t);n.trigger("keypress",t)})}},setValue:function(n){var t=this;this.base(n);t.editor&&t.editor.setData(n)},getControlValue:function(){var n=this,t=null;return n.editor&&(t=n.editor.getData()),t},destroy:function(){var n=this;n.editor&&(n.editor.destroy(),n.editor=null);this.base()},getTitle:function(){return"CK Editor"},getDescription:function(){return"Provides an instance of a CK Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{ckeditor:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{ckeditor:{type:"any"}}})}});t.registerFieldClass("ckeditor",t.Fields.CKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return"MM/DD/YYYY"},getDefaultExtraFormats:function(){return[]},setup:function(){var n=this,t;this.base();n.options.picker||(n.options.picker={});typeof n.options.picker.useCurrent=="undefined"&&(n.options.picker.useCurrent=!1);!n.options.dateFormat;n.options.picker.format||(n.options.picker.format=n.options.dateFormat);n.options.picker.extraFormats||(t=n.getDefaultExtraFormats(),t&&(n.options.picker.extraFormats=t));typeof n.options.manualEntry=="undefined"&&(n.options.manualEntry=!1);typeof n.options.icon=="undefined"&&(n.options.icon=!1)},onKeyPress:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},onKeyDown:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},beforeRenderControl:function(n,t){this.field.css("position","relative");t()},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(r.view.type!=="display"){if(t=r.getControlEl(),r.options.icon){r.getControlEl().wrap('
<\/div>');r.getControlEl().after('<\/span><\/span>');var t=r.getControlEl().parent()}if(n.fn.datetimepicker){t.datetimepicker(r.options.picker);r.picker=t.data("DateTimePicker");t.on("dp.change",function(n){setTimeout(function(){r.onChange.call(r,n);r.triggerWithPropagation("change",n)},250)});r.data&&r.picker.date(r.data)}}i()})},getDate:function(){var n=this,t=null;try{t=n.picker?n.picker.date()?n.picker.date()._d:null:new Date(this.getValue())}catch(i){console.error(i)}return t},date:function(){return this.getDate()},onChange:function(){this.base();this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var r=this.base(),n=this.validation,i=this._validateDateFormat();return n.invalidDate={message:i?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:i},r&&n.invalidDate.status},_validateDateFormat:function(){var n=this,r=!0,u,i,t;if(n.options.dateFormat&&(u=n.getValue(),u||n.isRequired())){if(i=[],i.push(n.options.dateFormat),n.options.picker&&n.options.picker.extraFormats)for(t=0;tBootstrap DateTime Picker<\/a>.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dateFormat:{type:"text"},picker:{type:"any"}}})}});t.registerMessages({invalidDate:"Invalid date for format {0}"});t.registerFieldClass("date",t.Fields.DateField);t.registerDefaultFormatFieldMapping("date","date")}(jQuery),function(n){var t=n.alpaca;t.Fields.MultiUploadField=t.Fields.ArrayField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.itemsCount=0},setup:function(){var t,n;if(this.base(),this.options.uploadfolder||(this.options.uploadfolder=""),this.urlfield="",this.options&&this.options.items&&(this.options.items.fields||this.options.items.type)&&this.options.items.type!="image"&&this.options.items.fields)for(t in this.options.items.fields)if(n=this.options.items.fields[t],n.type=="image"||n.type=="mlimage"||n.type=="imagecrop"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="file"||n.type=="mlfile"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="image2"||n.type=="mlimage2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}else if(n.type=="file2"||n.type=="mlfile2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}},afterRenderContainer:function(t,i){var r=this;this.base(t,function(){var t=r.getContainerEl(),f,u;r.isDisplayOnly()||(n('
<\/div>').prependTo(t),f=n('
<\/div><\/div>').prependTo(t),u=n('').prependTo(t),this.wrapper=n("<\/span>"),this.wrapper.text("Upload muliple files"),u.wrap(this.wrapper),r.sf&&u.fileupload({dataType:"json",url:r.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:r.options.uploadfolder},beforeSend:r.sf.setModuleHeaders,change:function(){r.itemsCount=r.children.length},add:function(n,t){t.submit()},progressall:function(t,i){var r=parseInt(i.loaded/i.total*100,10);n(".bar",f).css("width",r+"%").find("span").html(r+"%")},done:function(t,i){i.result&&n.each(i.result,function(n,t){r.handleActionBarAddItemClick(r.itemsCount-1,function(n){var i=n.getValue();r.urlfield==""?i=t.url:i[r.urlfield]=t.url;n.setValue(i)});r.itemsCount++})}}).data("loaded",!0));i()})},getTitle:function(){return"Multi Upload"},getDescription:function(){return"Multi Upload for images and files"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("multiupload",t.Fields.MultiUploadField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DocumentsField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Title:{title:"Title",type:"string"},File:{title:"File",type:"string"}}};t.merge(this.options.items,{fields:{File:{type:"file"}}});this.urlfield="File"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("documents",t.Fields.DocumentsField)}(jQuery),function(n){var t=n.alpaca;t.Fields.File2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"file2"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.options.showUrlUpload||(this.options.showUrlUpload=!1);this.options.showFileUpload||(this.options.showFileUpload=!1);this.options.showUrlUpload&&(this.options.buttons={downloadButton:{value:"Upload External File",click:function(){this.DownLoadFile()}}});n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FilesLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"*",d:n.options.folder,filter:n.options.filter,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(i=n(this.control).find("select").val(),typeof i=="undefined")i=this.data;else if(t.isArray(i))for(r=0;r0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n("select",u.getControlEl()).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.folder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){if(t&&t.files&&t.files.length>0)if(u.isFilter(t.files[0].name))t.submit();else{alert("file not in filter");return}},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){$select=n(u.control).find("select");u.options.lazyLoading?u.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):u.refresh(function(){$select=n(u.control).find("select");$select.val(i.id).change()})})}}).data("loaded",!0);r()})},getFileUrl:function(t,i){var r=this,u;r.sf&&(u={fileid:t,folder:r.options.folder},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error getFileUrl "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=u.val(),r;if(!i||!t.isURL(i)){alert("url not valid");return}if(!t.isFilter(i)){alert("url not in filter");return}r={url:i,uploadfolder:t.options.folder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):($select=n(t.control).find("select"),t.options.lazyLoading?t.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):t.refresh(function(){$select=n(t.control).find("select");$select.val(i.id).change()}));setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)},isFilter:function(n){if(this.options.filter){var t=new RegExp(this.options.filter,"i");return n.length<2083&&t.test(n)}return!0},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("file2",t.Fields.File2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.FileField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"file"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.downloadButton||(this.options.downloadButton=!1);this.options.downloadButton&&(this.options.buttons={downloadButton:{value:"Download",click:function(){this.DownLoadFile()}}});this.base()},getTitle:function(){return"File Field"},getDescription:function(){return"File Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):i.val(n));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl();i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Files?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=t.getValue(),f=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|(www‌​.)?){1}([0-9A-Za-z-‌​\\.@:%_+~#=]+)+((\\‌​.[a-zA-Z]{2,3})+)(/(‌​.)*)?(\\?(.)*)?"),r;if(!i||!t.isURL(i)){alert("url not valid");return}r={url:i,uploadfolder:t.options.uploadfolder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):(t.setValue(i.url),n(u).change());setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)}});t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Folder2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("folder2",t.Fields.Folder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.GalleryField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Image:{title:"Image",type:"string"}}};t.merge(this.options.items,{fields:{Image:{type:"image"}}});this.urlfield="Image"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("gallery",t.Fields.GalleryField)}(jQuery),function(n){var t=n.alpaca;t.Fields.GuidField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f)},setup:function(){var n=this;this.base()},setValue:function(n){t.isEmpty(n)&&(n=this.createGuid());this.base(n)},getValue:function(){var n=this.base();return(t.isEmpty(n)||n=="")&&(n=this.createGuid()),n},createGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})},getTitle:function(){return"Guid Field"},getDescription:function(){return"Guid field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("guid",t.Fields.GuidField)}(jQuery),function(n){var t=n.alpaca;t.Fields.IconField=t.Fields.TextField.extend({setup:function(){this.options.glyphicons===undefined&&(this.options.glyphicons=!1);this.options.bootstrap===undefined&&(this.options.bootstrap=!1);this.options.fontawesome===undefined&&(this.options.fontawesome=!0);this.base()},setValue:function(n){this.base(n);this.loadIcons()},getTitle:function(){return"Icon Field"},getDescription:function(){return"Font Icon Field."},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(n){var t=this,i=this.control;this.control.fontIconPicker({emptyIcon:!0,hasSearch:!0});this.loadIcons();n()},loadIcons:function(){var o=this,t=[],e;if(this.options.bootstrap&&n.each(i,function(n,i){t.push("glyphicon "+i)}),this.options.fontawesome)for(e in r)t.push("fa "+e);this.options.glyphicons&&(n.each(u,function(n,i){t.push("glyphicons "+i)}),n.each(f,function(n,i){t.push("social "+i)}));this.control.fontIconPicker().setIcons(t)}});t.registerFieldClass("icon",t.Fields.IconField);var i=["glyphicon-glass","glyphicon-music","glyphicon-search","glyphicon-envelope","glyphicon-heart","glyphicon-star","glyphicon-star-empty","glyphicon-user","glyphicon-film","glyphicon-th-large","glyphicon-th","glyphicon-th-list","glyphicon-ok","glyphicon-remove","glyphicon-zoom-in","glyphicon-zoom-out","glyphicon-off","glyphicon-signal","glyphicon-cog","glyphicon-trash","glyphicon-home","glyphicon-file","glyphicon-time","glyphicon-road","glyphicon-download-alt","glyphicon-download","glyphicon-upload","glyphicon-inbox","glyphicon-play-circle","glyphicon-repeat","glyphicon-refresh","glyphicon-list-alt","glyphicon-lock","glyphicon-flag","glyphicon-headphones","glyphicon-volume-off","glyphicon-volume-down","glyphicon-volume-up","glyphicon-qrcode","glyphicon-barcode","glyphicon-tag","glyphicon-tags","glyphicon-book","glyphicon-bookmark","glyphicon-print","glyphicon-camera","glyphicon-font","glyphicon-bold","glyphicon-italic","glyphicon-text-height","glyphicon-text-width","glyphicon-align-left","glyphicon-align-center","glyphicon-align-right","glyphicon-align-justify","glyphicon-list","glyphicon-indent-left","glyphicon-indent-right","glyphicon-facetime-video","glyphicon-picture","glyphicon-pencil","glyphicon-map-marker","glyphicon-adjust","glyphicon-tint","glyphicon-edit","glyphicon-share","glyphicon-check","glyphicon-move","glyphicon-step-backward","glyphicon-fast-backward","glyphicon-backward","glyphicon-play","glyphicon-pause","glyphicon-stop","glyphicon-forward","glyphicon-fast-forward","glyphicon-step-forward","glyphicon-eject","glyphicon-chevron-left","glyphicon-chevron-right","glyphicon-plus-sign","glyphicon-minus-sign","glyphicon-remove-sign","glyphicon-ok-sign","glyphicon-question-sign","glyphicon-info-sign","glyphicon-screenshot","glyphicon-remove-circle","glyphicon-ok-circle","glyphicon-ban-circle","glyphicon-arrow-left","glyphicon-arrow-right","glyphicon-arrow-up","glyphicon-arrow-down","glyphicon-share-alt","glyphicon-resize-full","glyphicon-resize-small","glyphicon-plus","glyphicon-minus","glyphicon-asterisk","glyphicon-exclamation-sign","glyphicon-gift","glyphicon-leaf","glyphicon-fire","glyphicon-eye-open","glyphicon-eye-close","glyphicon-warning-sign","glyphicon-plane","glyphicon-calendar","glyphicon-random","glyphicon-comment","glyphicon-magnet","glyphicon-chevron-up","glyphicon-chevron-down","glyphicon-retweet","glyphicon-shopping-cart","glyphicon-folder-close","glyphicon-folder-open","glyphicon-resize-vertical","glyphicon-resize-horizontal","glyphicon-hdd","glyphicon-bullhorn","glyphicon-bell","glyphicon-certificate","glyphicon-thumbs-up","glyphicon-thumbs-down","glyphicon-hand-right","glyphicon-hand-left","glyphicon-hand-up","glyphicon-hand-down","glyphicon-circle-arrow-right","glyphicon-circle-arrow-left","glyphicon-circle-arrow-up","glyphicon-circle-arrow-down","glyphicon-globe","glyphicon-wrench","glyphicon-tasks","glyphicon-filter","glyphicon-briefcase","glyphicon-fullscreen","glyphicon-dashboard","glyphicon-paperclip","glyphicon-heart-empty","glyphicon-link","glyphicon-phone","glyphicon-pushpin","glyphicon-euro","glyphicon-usd","glyphicon-gbp","glyphicon-sort","glyphicon-sort-by-alphabet","glyphicon-sort-by-alphabet-alt","glyphicon-sort-by-order","glyphicon-sort-by-order-alt","glyphicon-sort-by-attributes","glyphicon-sort-by-attributes-alt","glyphicon-unchecked","glyphicon-expand","glyphicon-collapse","glyphicon-collapse-top"],r={"fa-500px":{unicode:"\\f26e",name:"500px"},"fa-address-book":{unicode:"\\f2b9",name:"Address book"},"fa-address-book-o":{unicode:"\\f2ba",name:"Address book o"},"fa-address-card":{unicode:"\\f2bb",name:"Address card"},"fa-address-card-o":{unicode:"\\f2bc",name:"Address card o"},"fa-adjust":{unicode:"\\f042",name:"Adjust"},"fa-adn":{unicode:"\\f170",name:"Adn"},"fa-align-center":{unicode:"\\f037",name:"Align center"},"fa-align-justify":{unicode:"\\f039",name:"Align justify"},"fa-align-left":{unicode:"\\f036",name:"Align left"},"fa-align-right":{unicode:"\\f038",name:"Align right"},"fa-amazon":{unicode:"\\f270",name:"Amazon"},"fa-ambulance":{unicode:"\\f0f9",name:"Ambulance"},"fa-american-sign-language-interpreting":{unicode:"\\f2a3",name:"American sign language interpreting"},"fa-anchor":{unicode:"\\f13d",name:"Anchor"},"fa-android":{unicode:"\\f17b",name:"Android"},"fa-angellist":{unicode:"\\f209",name:"Angellist"},"fa-angle-double-down":{unicode:"\\f103",name:"Angle double down"},"fa-angle-double-left":{unicode:"\\f100",name:"Angle double left"},"fa-angle-double-right":{unicode:"\\f101",name:"Angle double right"},"fa-angle-double-up":{unicode:"\\f102",name:"Angle double up"},"fa-angle-down":{unicode:"\\f107",name:"Angle down"},"fa-angle-left":{unicode:"\\f104",name:"Angle left"},"fa-angle-right":{unicode:"\\f105",name:"Angle right"},"fa-angle-up":{unicode:"\\f106",name:"Angle up"},"fa-apple":{unicode:"\\f179",name:"Apple"},"fa-archive":{unicode:"\\f187",name:"Archive"},"fa-area-chart":{unicode:"\\f1fe",name:"Area chart"},"fa-arrow-circle-down":{unicode:"\\f0ab",name:"Arrow circle down"},"fa-arrow-circle-left":{unicode:"\\f0a8",name:"Arrow circle left"},"fa-arrow-circle-o-down":{unicode:"\\f01a",name:"Arrow circle o down"},"fa-arrow-circle-o-left":{unicode:"\\f190",name:"Arrow circle o left"},"fa-arrow-circle-o-right":{unicode:"\\f18e",name:"Arrow circle o right"},"fa-arrow-circle-o-up":{unicode:"\\f01b",name:"Arrow circle o up"},"fa-arrow-circle-right":{unicode:"\\f0a9",name:"Arrow circle right"},"fa-arrow-circle-up":{unicode:"\\f0aa",name:"Arrow circle up"},"fa-arrow-down":{unicode:"\\f063",name:"Arrow down"},"fa-arrow-left":{unicode:"\\f060",name:"Arrow left"},"fa-arrow-right":{unicode:"\\f061",name:"Arrow right"},"fa-arrow-up":{unicode:"\\f062",name:"Arrow up"},"fa-arrows":{unicode:"\\f047",name:"Arrows"},"fa-arrows-alt":{unicode:"\\f0b2",name:"Arrows alt"},"fa-arrows-h":{unicode:"\\f07e",name:"Arrows h"},"fa-arrows-v":{unicode:"\\f07d",name:"Arrows v"},"fa-assistive-listening-systems":{unicode:"\\f2a2",name:"Assistive listening systems"},"fa-asterisk":{unicode:"\\f069",name:"Asterisk"},"fa-at":{unicode:"\\f1fa",name:"At"},"fa-audio-description":{unicode:"\\f29e",name:"Audio description"},"fa-backward":{unicode:"\\f04a",name:"Backward"},"fa-balance-scale":{unicode:"\\f24e",name:"Balance scale"},"fa-ban":{unicode:"\\f05e",name:"Ban"},"fa-bandcamp":{unicode:"\\f2d5",name:"Bandcamp"},"fa-bar-chart":{unicode:"\\f080",name:"Bar chart"},"fa-barcode":{unicode:"\\f02a",name:"Barcode"},"fa-bars":{unicode:"\\f0c9",name:"Bars"},"fa-bath":{unicode:"\\f2cd",name:"Bath"},"fa-battery-empty":{unicode:"\\f244",name:"Battery empty"},"fa-battery-full":{unicode:"\\f240",name:"Battery full"},"fa-battery-half":{unicode:"\\f242",name:"Battery half"},"fa-battery-quarter":{unicode:"\\f243",name:"Battery quarter"},"fa-battery-three-quarters":{unicode:"\\f241",name:"Battery three quarters"},"fa-bed":{unicode:"\\f236",name:"Bed"},"fa-beer":{unicode:"\\f0fc",name:"Beer"},"fa-behance":{unicode:"\\f1b4",name:"Behance"},"fa-behance-square":{unicode:"\\f1b5",name:"Behance square"},"fa-bell":{unicode:"\\f0f3",name:"Bell"},"fa-bell-o":{unicode:"\\f0a2",name:"Bell o"},"fa-bell-slash":{unicode:"\\f1f6",name:"Bell slash"},"fa-bell-slash-o":{unicode:"\\f1f7",name:"Bell slash o"},"fa-bicycle":{unicode:"\\f206",name:"Bicycle"},"fa-binoculars":{unicode:"\\f1e5",name:"Binoculars"},"fa-birthday-cake":{unicode:"\\f1fd",name:"Birthday cake"},"fa-bitbucket":{unicode:"\\f171",name:"Bitbucket"},"fa-bitbucket-square":{unicode:"\\f172",name:"Bitbucket square"},"fa-black-tie":{unicode:"\\f27e",name:"Black tie"},"fa-blind":{unicode:"\\f29d",name:"Blind"},"fa-bluetooth":{unicode:"\\f293",name:"Bluetooth"},"fa-bluetooth-b":{unicode:"\\f294",name:"Bluetooth b"},"fa-bold":{unicode:"\\f032",name:"Bold"},"fa-bolt":{unicode:"\\f0e7",name:"Bolt"},"fa-bomb":{unicode:"\\f1e2",name:"Bomb"},"fa-book":{unicode:"\\f02d",name:"Book"},"fa-bookmark":{unicode:"\\f02e",name:"Bookmark"},"fa-bookmark-o":{unicode:"\\f097",name:"Bookmark o"},"fa-braille":{unicode:"\\f2a1",name:"Braille"},"fa-briefcase":{unicode:"\\f0b1",name:"Briefcase"},"fa-btc":{unicode:"\\f15a",name:"Btc"},"fa-bug":{unicode:"\\f188",name:"Bug"},"fa-building":{unicode:"\\f1ad",name:"Building"},"fa-building-o":{unicode:"\\f0f7",name:"Building o"},"fa-bullhorn":{unicode:"\\f0a1",name:"Bullhorn"},"fa-bullseye":{unicode:"\\f140",name:"Bullseye"},"fa-bus":{unicode:"\\f207",name:"Bus"},"fa-buysellads":{unicode:"\\f20d",name:"Buysellads"},"fa-calculator":{unicode:"\\f1ec",name:"Calculator"},"fa-calendar":{unicode:"\\f073",name:"Calendar"},"fa-calendar-check-o":{unicode:"\\f274",name:"Calendar check o"},"fa-calendar-minus-o":{unicode:"\\f272",name:"Calendar minus o"},"fa-calendar-o":{unicode:"\\f133",name:"Calendar o"},"fa-calendar-plus-o":{unicode:"\\f271",name:"Calendar plus o"},"fa-calendar-times-o":{unicode:"\\f273",name:"Calendar times o"},"fa-camera":{unicode:"\\f030",name:"Camera"},"fa-camera-retro":{unicode:"\\f083",name:"Camera retro"},"fa-car":{unicode:"\\f1b9",name:"Car"},"fa-caret-down":{unicode:"\\f0d7",name:"Caret down"},"fa-caret-left":{unicode:"\\f0d9",name:"Caret left"},"fa-caret-right":{unicode:"\\f0da",name:"Caret right"},"fa-caret-square-o-down":{unicode:"\\f150",name:"Caret square o down"},"fa-caret-square-o-left":{unicode:"\\f191",name:"Caret square o left"},"fa-caret-square-o-right":{unicode:"\\f152",name:"Caret square o right"},"fa-caret-square-o-up":{unicode:"\\f151",name:"Caret square o up"},"fa-caret-up":{unicode:"\\f0d8",name:"Caret up"},"fa-cart-arrow-down":{unicode:"\\f218",name:"Cart arrow down"},"fa-cart-plus":{unicode:"\\f217",name:"Cart plus"},"fa-cc":{unicode:"\\f20a",name:"Cc"},"fa-cc-amex":{unicode:"\\f1f3",name:"Cc amex"},"fa-cc-diners-club":{unicode:"\\f24c",name:"Cc diners club"},"fa-cc-discover":{unicode:"\\f1f2",name:"Cc discover"},"fa-cc-jcb":{unicode:"\\f24b",name:"Cc jcb"},"fa-cc-mastercard":{unicode:"\\f1f1",name:"Cc mastercard"},"fa-cc-paypal":{unicode:"\\f1f4",name:"Cc paypal"},"fa-cc-stripe":{unicode:"\\f1f5",name:"Cc stripe"},"fa-cc-visa":{unicode:"\\f1f0",name:"Cc visa"},"fa-certificate":{unicode:"\\f0a3",name:"Certificate"},"fa-chain-broken":{unicode:"\\f127",name:"Chain broken"},"fa-check":{unicode:"\\f00c",name:"Check"},"fa-check-circle":{unicode:"\\f058",name:"Check circle"},"fa-check-circle-o":{unicode:"\\f05d",name:"Check circle o"},"fa-check-square":{unicode:"\\f14a",name:"Check square"},"fa-check-square-o":{unicode:"\\f046",name:"Check square o"},"fa-chevron-circle-down":{unicode:"\\f13a",name:"Chevron circle down"},"fa-chevron-circle-left":{unicode:"\\f137",name:"Chevron circle left"},"fa-chevron-circle-right":{unicode:"\\f138",name:"Chevron circle right"},"fa-chevron-circle-up":{unicode:"\\f139",name:"Chevron circle up"},"fa-chevron-down":{unicode:"\\f078",name:"Chevron down"},"fa-chevron-left":{unicode:"\\f053",name:"Chevron left"},"fa-chevron-right":{unicode:"\\f054",name:"Chevron right"},"fa-chevron-up":{unicode:"\\f077",name:"Chevron up"},"fa-child":{unicode:"\\f1ae",name:"Child"},"fa-chrome":{unicode:"\\f268",name:"Chrome"},"fa-circle":{unicode:"\\f111",name:"Circle"},"fa-circle-o":{unicode:"\\f10c",name:"Circle o"},"fa-circle-o-notch":{unicode:"\\f1ce",name:"Circle o notch"},"fa-circle-thin":{unicode:"\\f1db",name:"Circle thin"},"fa-clipboard":{unicode:"\\f0ea",name:"Clipboard"},"fa-clock-o":{unicode:"\\f017",name:"Clock o"},"fa-clone":{unicode:"\\f24d",name:"Clone"},"fa-cloud":{unicode:"\\f0c2",name:"Cloud"},"fa-cloud-download":{unicode:"\\f0ed",name:"Cloud download"},"fa-cloud-upload":{unicode:"\\f0ee",name:"Cloud upload"},"fa-code":{unicode:"\\f121",name:"Code"},"fa-code-fork":{unicode:"\\f126",name:"Code fork"},"fa-codepen":{unicode:"\\f1cb",name:"Codepen"},"fa-codiepie":{unicode:"\\f284",name:"Codiepie"},"fa-coffee":{unicode:"\\f0f4",name:"Coffee"},"fa-cog":{unicode:"\\f013",name:"Cog"},"fa-cogs":{unicode:"\\f085",name:"Cogs"},"fa-columns":{unicode:"\\f0db",name:"Columns"},"fa-comment":{unicode:"\\f075",name:"Comment"},"fa-comment-o":{unicode:"\\f0e5",name:"Comment o"},"fa-commenting":{unicode:"\\f27a",name:"Commenting"},"fa-commenting-o":{unicode:"\\f27b",name:"Commenting o"},"fa-comments":{unicode:"\\f086",name:"Comments"},"fa-comments-o":{unicode:"\\f0e6",name:"Comments o"},"fa-compass":{unicode:"\\f14e",name:"Compass"},"fa-compress":{unicode:"\\f066",name:"Compress"},"fa-connectdevelop":{unicode:"\\f20e",name:"Connectdevelop"},"fa-contao":{unicode:"\\f26d",name:"Contao"},"fa-copyright":{unicode:"\\f1f9",name:"Copyright"},"fa-creative-commons":{unicode:"\\f25e",name:"Creative commons"},"fa-credit-card":{unicode:"\\f09d",name:"Credit card"},"fa-credit-card-alt":{unicode:"\\f283",name:"Credit card alt"},"fa-crop":{unicode:"\\f125",name:"Crop"},"fa-crosshairs":{unicode:"\\f05b",name:"Crosshairs"},"fa-css3":{unicode:"\\f13c",name:"Css3"},"fa-cube":{unicode:"\\f1b2",name:"Cube"},"fa-cubes":{unicode:"\\f1b3",name:"Cubes"},"fa-cutlery":{unicode:"\\f0f5",name:"Cutlery"},"fa-dashcube":{unicode:"\\f210",name:"Dashcube"},"fa-database":{unicode:"\\f1c0",name:"Database"},"fa-deaf":{unicode:"\\f2a4",name:"Deaf"},"fa-delicious":{unicode:"\\f1a5",name:"Delicious"},"fa-desktop":{unicode:"\\f108",name:"Desktop"},"fa-deviantart":{unicode:"\\f1bd",name:"Deviantart"},"fa-diamond":{unicode:"\\f219",name:"Diamond"},"fa-digg":{unicode:"\\f1a6",name:"Digg"},"fa-dot-circle-o":{unicode:"\\f192",name:"Dot circle o"},"fa-download":{unicode:"\\f019",name:"Download"},"fa-dribbble":{unicode:"\\f17d",name:"Dribbble"},"fa-dropbox":{unicode:"\\f16b",name:"Dropbox"},"fa-drupal":{unicode:"\\f1a9",name:"Drupal"},"fa-edge":{unicode:"\\f282",name:"Edge"},"fa-eercast":{unicode:"\\f2da",name:"Eercast"},"fa-eject":{unicode:"\\f052",name:"Eject"},"fa-ellipsis-h":{unicode:"\\f141",name:"Ellipsis h"},"fa-ellipsis-v":{unicode:"\\f142",name:"Ellipsis v"},"fa-empire":{unicode:"\\f1d1",name:"Empire"},"fa-envelope":{unicode:"\\f0e0",name:"Envelope"},"fa-envelope-o":{unicode:"\\f003",name:"Envelope o"},"fa-envelope-open":{unicode:"\\f2b6",name:"Envelope open"},"fa-envelope-open-o":{unicode:"\\f2b7",name:"Envelope open o"},"fa-envelope-square":{unicode:"\\f199",name:"Envelope square"},"fa-envira":{unicode:"\\f299",name:"Envira"},"fa-eraser":{unicode:"\\f12d",name:"Eraser"},"fa-etsy":{unicode:"\\f2d7",name:"Etsy"},"fa-eur":{unicode:"\\f153",name:"Eur"},"fa-exchange":{unicode:"\\f0ec",name:"Exchange"},"fa-exclamation":{unicode:"\\f12a",name:"Exclamation"},"fa-exclamation-circle":{unicode:"\\f06a",name:"Exclamation circle"},"fa-exclamation-triangle":{unicode:"\\f071",name:"Exclamation triangle"},"fa-expand":{unicode:"\\f065",name:"Expand"},"fa-expeditedssl":{unicode:"\\f23e",name:"Expeditedssl"},"fa-external-link":{unicode:"\\f08e",name:"External link"},"fa-external-link-square":{unicode:"\\f14c",name:"External link square"},"fa-eye":{unicode:"\\f06e",name:"Eye"},"fa-eye-slash":{unicode:"\\f070",name:"Eye slash"},"fa-eyedropper":{unicode:"\\f1fb",name:"Eyedropper"},"fa-facebook":{unicode:"\\f09a",name:"Facebook"},"fa-facebook-official":{unicode:"\\f230",name:"Facebook official"},"fa-facebook-square":{unicode:"\\f082",name:"Facebook square"},"fa-fast-backward":{unicode:"\\f049",name:"Fast backward"},"fa-fast-forward":{unicode:"\\f050",name:"Fast forward"},"fa-fax":{unicode:"\\f1ac",name:"Fax"},"fa-female":{unicode:"\\f182",name:"Female"},"fa-fighter-jet":{unicode:"\\f0fb",name:"Fighter jet"},"fa-file":{unicode:"\\f15b",name:"File"},"fa-file-archive-o":{unicode:"\\f1c6",name:"File archive o"},"fa-file-audio-o":{unicode:"\\f1c7",name:"File audio o"},"fa-file-code-o":{unicode:"\\f1c9",name:"File code o"},"fa-file-excel-o":{unicode:"\\f1c3",name:"File excel o"},"fa-file-image-o":{unicode:"\\f1c5",name:"File image o"},"fa-file-o":{unicode:"\\f016",name:"File o"},"fa-file-pdf-o":{unicode:"\\f1c1",name:"File pdf o"},"fa-file-powerpoint-o":{unicode:"\\f1c4",name:"File powerpoint o"},"fa-file-text":{unicode:"\\f15c",name:"File text"},"fa-file-text-o":{unicode:"\\f0f6",name:"File text o"},"fa-file-video-o":{unicode:"\\f1c8",name:"File video o"},"fa-file-word-o":{unicode:"\\f1c2",name:"File word o"},"fa-files-o":{unicode:"\\f0c5",name:"Files o"},"fa-film":{unicode:"\\f008",name:"Film"},"fa-filter":{unicode:"\\f0b0",name:"Filter"},"fa-fire":{unicode:"\\f06d",name:"Fire"},"fa-fire-extinguisher":{unicode:"\\f134",name:"Fire extinguisher"},"fa-firefox":{unicode:"\\f269",name:"Firefox"},"fa-first-order":{unicode:"\\f2b0",name:"First order"},"fa-flag":{unicode:"\\f024",name:"Flag"},"fa-flag-checkered":{unicode:"\\f11e",name:"Flag checkered"},"fa-flag-o":{unicode:"\\f11d",name:"Flag o"},"fa-flask":{unicode:"\\f0c3",name:"Flask"},"fa-flickr":{unicode:"\\f16e",name:"Flickr"},"fa-floppy-o":{unicode:"\\f0c7",name:"Floppy o"},"fa-folder":{unicode:"\\f07b",name:"Folder"},"fa-folder-o":{unicode:"\\f114",name:"Folder o"},"fa-folder-open":{unicode:"\\f07c",name:"Folder open"},"fa-folder-open-o":{unicode:"\\f115",name:"Folder open o"},"fa-font":{unicode:"\\f031",name:"Font"},"fa-font-awesome":{unicode:"\\f2b4",name:"Font awesome"},"fa-fonticons":{unicode:"\\f280",name:"Fonticons"},"fa-fort-awesome":{unicode:"\\f286",name:"Fort awesome"},"fa-forumbee":{unicode:"\\f211",name:"Forumbee"},"fa-forward":{unicode:"\\f04e",name:"Forward"},"fa-foursquare":{unicode:"\\f180",name:"Foursquare"},"fa-free-code-camp":{unicode:"\\f2c5",name:"Free code camp"},"fa-frown-o":{unicode:"\\f119",name:"Frown o"},"fa-futbol-o":{unicode:"\\f1e3",name:"Futbol o"},"fa-gamepad":{unicode:"\\f11b",name:"Gamepad"},"fa-gavel":{unicode:"\\f0e3",name:"Gavel"},"fa-gbp":{unicode:"\\f154",name:"Gbp"},"fa-genderless":{unicode:"\\f22d",name:"Genderless"},"fa-get-pocket":{unicode:"\\f265",name:"Get pocket"},"fa-gg":{unicode:"\\f260",name:"Gg"},"fa-gg-circle":{unicode:"\\f261",name:"Gg circle"},"fa-gift":{unicode:"\\f06b",name:"Gift"},"fa-git":{unicode:"\\f1d3",name:"Git"},"fa-git-square":{unicode:"\\f1d2",name:"Git square"},"fa-github":{unicode:"\\f09b",name:"Github"},"fa-github-alt":{unicode:"\\f113",name:"Github alt"},"fa-github-square":{unicode:"\\f092",name:"Github square"},"fa-gitlab":{unicode:"\\f296",name:"Gitlab"},"fa-glass":{unicode:"\\f000",name:"Glass"},"fa-glide":{unicode:"\\f2a5",name:"Glide"},"fa-glide-g":{unicode:"\\f2a6",name:"Glide g"},"fa-globe":{unicode:"\\f0ac",name:"Globe"},"fa-google":{unicode:"\\f1a0",name:"Google"},"fa-google-plus":{unicode:"\\f0d5",name:"Google plus"},"fa-google-plus-official":{unicode:"\\f2b3",name:"Google plus official"},"fa-google-plus-square":{unicode:"\\f0d4",name:"Google plus square"},"fa-google-wallet":{unicode:"\\f1ee",name:"Google wallet"},"fa-graduation-cap":{unicode:"\\f19d",name:"Graduation cap"},"fa-gratipay":{unicode:"\\f184",name:"Gratipay"},"fa-grav":{unicode:"\\f2d6",name:"Grav"},"fa-h-square":{unicode:"\\f0fd",name:"H square"},"fa-hacker-news":{unicode:"\\f1d4",name:"Hacker news"},"fa-hand-lizard-o":{unicode:"\\f258",name:"Hand lizard o"},"fa-hand-o-down":{unicode:"\\f0a7",name:"Hand o down"},"fa-hand-o-left":{unicode:"\\f0a5",name:"Hand o left"},"fa-hand-o-right":{unicode:"\\f0a4",name:"Hand o right"},"fa-hand-o-up":{unicode:"\\f0a6",name:"Hand o up"},"fa-hand-paper-o":{unicode:"\\f256",name:"Hand paper o"},"fa-hand-peace-o":{unicode:"\\f25b",name:"Hand peace o"},"fa-hand-pointer-o":{unicode:"\\f25a",name:"Hand pointer o"},"fa-hand-rock-o":{unicode:"\\f255",name:"Hand rock o"},"fa-hand-scissors-o":{unicode:"\\f257",name:"Hand scissors o"},"fa-hand-spock-o":{unicode:"\\f259",name:"Hand spock o"},"fa-handshake-o":{unicode:"\\f2b5",name:"Handshake o"},"fa-hashtag":{unicode:"\\f292",name:"Hashtag"},"fa-hdd-o":{unicode:"\\f0a0",name:"Hdd o"},"fa-header":{unicode:"\\f1dc",name:"Header"},"fa-headphones":{unicode:"\\f025",name:"Headphones"},"fa-heart":{unicode:"\\f004",name:"Heart"},"fa-heart-o":{unicode:"\\f08a",name:"Heart o"},"fa-heartbeat":{unicode:"\\f21e",name:"Heartbeat"},"fa-history":{unicode:"\\f1da",name:"History"},"fa-home":{unicode:"\\f015",name:"Home"},"fa-hospital-o":{unicode:"\\f0f8",name:"Hospital o"},"fa-hourglass":{unicode:"\\f254",name:"Hourglass"},"fa-hourglass-end":{unicode:"\\f253",name:"Hourglass end"},"fa-hourglass-half":{unicode:"\\f252",name:"Hourglass half"},"fa-hourglass-o":{unicode:"\\f250",name:"Hourglass o"},"fa-hourglass-start":{unicode:"\\f251",name:"Hourglass start"},"fa-houzz":{unicode:"\\f27c",name:"Houzz"},"fa-html5":{unicode:"\\f13b",name:"Html5"},"fa-i-cursor":{unicode:"\\f246",name:"I cursor"},"fa-id-badge":{unicode:"\\f2c1",name:"Id badge"},"fa-id-card":{unicode:"\\f2c2",name:"Id card"},"fa-id-card-o":{unicode:"\\f2c3",name:"Id card o"},"fa-ils":{unicode:"\\f20b",name:"Ils"},"fa-imdb":{unicode:"\\f2d8",name:"Imdb"},"fa-inbox":{unicode:"\\f01c",name:"Inbox"},"fa-indent":{unicode:"\\f03c",name:"Indent"},"fa-industry":{unicode:"\\f275",name:"Industry"},"fa-info":{unicode:"\\f129",name:"Info"},"fa-info-circle":{unicode:"\\f05a",name:"Info circle"},"fa-inr":{unicode:"\\f156",name:"Inr"},"fa-instagram":{unicode:"\\f16d",name:"Instagram"},"fa-internet-explorer":{unicode:"\\f26b",name:"Internet explorer"},"fa-ioxhost":{unicode:"\\f208",name:"Ioxhost"},"fa-italic":{unicode:"\\f033",name:"Italic"},"fa-joomla":{unicode:"\\f1aa",name:"Joomla"},"fa-jpy":{unicode:"\\f157",name:"Jpy"},"fa-jsfiddle":{unicode:"\\f1cc",name:"Jsfiddle"},"fa-key":{unicode:"\\f084",name:"Key"},"fa-keyboard-o":{unicode:"\\f11c",name:"Keyboard o"},"fa-krw":{unicode:"\\f159",name:"Krw"},"fa-language":{unicode:"\\f1ab",name:"Language"},"fa-laptop":{unicode:"\\f109",name:"Laptop"},"fa-lastfm":{unicode:"\\f202",name:"Lastfm"},"fa-lastfm-square":{unicode:"\\f203",name:"Lastfm square"},"fa-leaf":{unicode:"\\f06c",name:"Leaf"},"fa-leanpub":{unicode:"\\f212",name:"Leanpub"},"fa-lemon-o":{unicode:"\\f094",name:"Lemon o"},"fa-level-down":{unicode:"\\f149",name:"Level down"},"fa-level-up":{unicode:"\\f148",name:"Level up"},"fa-life-ring":{unicode:"\\f1cd",name:"Life ring"},"fa-lightbulb-o":{unicode:"\\f0eb",name:"Lightbulb o"},"fa-line-chart":{unicode:"\\f201",name:"Line chart"},"fa-link":{unicode:"\\f0c1",name:"Link"},"fa-linkedin":{unicode:"\\f0e1",name:"Linkedin"},"fa-linkedin-square":{unicode:"\\f08c",name:"Linkedin square"},"fa-linode":{unicode:"\\f2b8",name:"Linode"},"fa-linux":{unicode:"\\f17c",name:"Linux"},"fa-list":{unicode:"\\f03a",name:"List"},"fa-list-alt":{unicode:"\\f022",name:"List alt"},"fa-list-ol":{unicode:"\\f0cb",name:"List ol"},"fa-list-ul":{unicode:"\\f0ca",name:"List ul"},"fa-location-arrow":{unicode:"\\f124",name:"Location arrow"},"fa-lock":{unicode:"\\f023",name:"Lock"},"fa-long-arrow-down":{unicode:"\\f175",name:"Long arrow down"},"fa-long-arrow-left":{unicode:"\\f177",name:"Long arrow left"},"fa-long-arrow-right":{unicode:"\\f178",name:"Long arrow right"},"fa-long-arrow-up":{unicode:"\\f176",name:"Long arrow up"},"fa-low-vision":{unicode:"\\f2a8",name:"Low vision"},"fa-magic":{unicode:"\\f0d0",name:"Magic"},"fa-magnet":{unicode:"\\f076",name:"Magnet"},"fa-male":{unicode:"\\f183",name:"Male"},"fa-map":{unicode:"\\f279",name:"Map"},"fa-map-marker":{unicode:"\\f041",name:"Map marker"},"fa-map-o":{unicode:"\\f278",name:"Map o"},"fa-map-pin":{unicode:"\\f276",name:"Map pin"},"fa-map-signs":{unicode:"\\f277",name:"Map signs"},"fa-mars":{unicode:"\\f222",name:"Mars"},"fa-mars-double":{unicode:"\\f227",name:"Mars double"},"fa-mars-stroke":{unicode:"\\f229",name:"Mars stroke"},"fa-mars-stroke-h":{unicode:"\\f22b",name:"Mars stroke h"},"fa-mars-stroke-v":{unicode:"\\f22a",name:"Mars stroke v"},"fa-maxcdn":{unicode:"\\f136",name:"Maxcdn"},"fa-meanpath":{unicode:"\\f20c",name:"Meanpath"},"fa-medium":{unicode:"\\f23a",name:"Medium"},"fa-medkit":{unicode:"\\f0fa",name:"Medkit"},"fa-meetup":{unicode:"\\f2e0",name:"Meetup"},"fa-meh-o":{unicode:"\\f11a",name:"Meh o"},"fa-mercury":{unicode:"\\f223",name:"Mercury"},"fa-microchip":{unicode:"\\f2db",name:"Microchip"},"fa-microphone":{unicode:"\\f130",name:"Microphone"},"fa-microphone-slash":{unicode:"\\f131",name:"Microphone slash"},"fa-minus":{unicode:"\\f068",name:"Minus"},"fa-minus-circle":{unicode:"\\f056",name:"Minus circle"},"fa-minus-square":{unicode:"\\f146",name:"Minus square"},"fa-minus-square-o":{unicode:"\\f147",name:"Minus square o"},"fa-mixcloud":{unicode:"\\f289",name:"Mixcloud"},"fa-mobile":{unicode:"\\f10b",name:"Mobile"},"fa-modx":{unicode:"\\f285",name:"Modx"},"fa-money":{unicode:"\\f0d6",name:"Money"},"fa-moon-o":{unicode:"\\f186",name:"Moon o"},"fa-motorcycle":{unicode:"\\f21c",name:"Motorcycle"},"fa-mouse-pointer":{unicode:"\\f245",name:"Mouse pointer"},"fa-music":{unicode:"\\f001",name:"Music"},"fa-neuter":{unicode:"\\f22c",name:"Neuter"},"fa-newspaper-o":{unicode:"\\f1ea",name:"Newspaper o"},"fa-object-group":{unicode:"\\f247",name:"Object group"},"fa-object-ungroup":{unicode:"\\f248",name:"Object ungroup"},"fa-odnoklassniki":{unicode:"\\f263",name:"Odnoklassniki"},"fa-odnoklassniki-square":{unicode:"\\f264",name:"Odnoklassniki square"},"fa-opencart":{unicode:"\\f23d",name:"Opencart"},"fa-openid":{unicode:"\\f19b",name:"Openid"},"fa-opera":{unicode:"\\f26a",name:"Opera"},"fa-optin-monster":{unicode:"\\f23c",name:"Optin monster"},"fa-outdent":{unicode:"\\f03b",name:"Outdent"},"fa-pagelines":{unicode:"\\f18c",name:"Pagelines"},"fa-paint-brush":{unicode:"\\f1fc",name:"Paint brush"},"fa-paper-plane":{unicode:"\\f1d8",name:"Paper plane"},"fa-paper-plane-o":{unicode:"\\f1d9",name:"Paper plane o"},"fa-paperclip":{unicode:"\\f0c6",name:"Paperclip"},"fa-paragraph":{unicode:"\\f1dd",name:"Paragraph"},"fa-pause":{unicode:"\\f04c",name:"Pause"},"fa-pause-circle":{unicode:"\\f28b",name:"Pause circle"},"fa-pause-circle-o":{unicode:"\\f28c",name:"Pause circle o"},"fa-paw":{unicode:"\\f1b0",name:"Paw"},"fa-paypal":{unicode:"\\f1ed",name:"Paypal"},"fa-pencil":{unicode:"\\f040",name:"Pencil"},"fa-pencil-square":{unicode:"\\f14b",name:"Pencil square"},"fa-pencil-square-o":{unicode:"\\f044",name:"Pencil square o"},"fa-percent":{unicode:"\\f295",name:"Percent"},"fa-phone":{unicode:"\\f095",name:"Phone"},"fa-phone-square":{unicode:"\\f098",name:"Phone square"},"fa-picture-o":{unicode:"\\f03e",name:"Picture o"},"fa-pie-chart":{unicode:"\\f200",name:"Pie chart"},"fa-pied-piper":{unicode:"\\f2ae",name:"Pied piper"},"fa-pied-piper-alt":{unicode:"\\f1a8",name:"Pied piper alt"},"fa-pied-piper-pp":{unicode:"\\f1a7",name:"Pied piper pp"},"fa-pinterest":{unicode:"\\f0d2",name:"Pinterest"},"fa-pinterest-p":{unicode:"\\f231",name:"Pinterest p"},"fa-pinterest-square":{unicode:"\\f0d3",name:"Pinterest square"},"fa-plane":{unicode:"\\f072",name:"Plane"},"fa-play":{unicode:"\\f04b",name:"Play"},"fa-play-circle":{unicode:"\\f144",name:"Play circle"},"fa-play-circle-o":{unicode:"\\f01d",name:"Play circle o"},"fa-plug":{unicode:"\\f1e6",name:"Plug"},"fa-plus":{unicode:"\\f067",name:"Plus"},"fa-plus-circle":{unicode:"\\f055",name:"Plus circle"},"fa-plus-square":{unicode:"\\f0fe",name:"Plus square"},"fa-plus-square-o":{unicode:"\\f196",name:"Plus square o"},"fa-podcast":{unicode:"\\f2ce",name:"Podcast"},"fa-power-off":{unicode:"\\f011",name:"Power off"},"fa-print":{unicode:"\\f02f",name:"Print"},"fa-product-hunt":{unicode:"\\f288",name:"Product hunt"},"fa-puzzle-piece":{unicode:"\\f12e",name:"Puzzle piece"},"fa-qq":{unicode:"\\f1d6",name:"Qq"},"fa-qrcode":{unicode:"\\f029",name:"Qrcode"},"fa-question":{unicode:"\\f128",name:"Question"},"fa-question-circle":{unicode:"\\f059",name:"Question circle"},"fa-question-circle-o":{unicode:"\\f29c",name:"Question circle o"},"fa-quora":{unicode:"\\f2c4",name:"Quora"},"fa-quote-left":{unicode:"\\f10d",name:"Quote left"},"fa-quote-right":{unicode:"\\f10e",name:"Quote right"},"fa-random":{unicode:"\\f074",name:"Random"},"fa-ravelry":{unicode:"\\f2d9",name:"Ravelry"},"fa-rebel":{unicode:"\\f1d0",name:"Rebel"},"fa-recycle":{unicode:"\\f1b8",name:"Recycle"},"fa-reddit":{unicode:"\\f1a1",name:"Reddit"},"fa-reddit-alien":{unicode:"\\f281",name:"Reddit alien"},"fa-reddit-square":{unicode:"\\f1a2",name:"Reddit square"},"fa-refresh":{unicode:"\\f021",name:"Refresh"},"fa-registered":{unicode:"\\f25d",name:"Registered"},"fa-renren":{unicode:"\\f18b",name:"Renren"},"fa-repeat":{unicode:"\\f01e",name:"Repeat"},"fa-reply":{unicode:"\\f112",name:"Reply"},"fa-reply-all":{unicode:"\\f122",name:"Reply all"},"fa-retweet":{unicode:"\\f079",name:"Retweet"},"fa-road":{unicode:"\\f018",name:"Road"},"fa-rocket":{unicode:"\\f135",name:"Rocket"},"fa-rss":{unicode:"\\f09e",name:"Rss"},"fa-rss-square":{unicode:"\\f143",name:"Rss square"},"fa-rub":{unicode:"\\f158",name:"Rub"},"fa-safari":{unicode:"\\f267",name:"Safari"},"fa-scissors":{unicode:"\\f0c4",name:"Scissors"},"fa-scribd":{unicode:"\\f28a",name:"Scribd"},"fa-search":{unicode:"\\f002",name:"Search"},"fa-search-minus":{unicode:"\\f010",name:"Search minus"},"fa-search-plus":{unicode:"\\f00e",name:"Search plus"},"fa-sellsy":{unicode:"\\f213",name:"Sellsy"},"fa-server":{unicode:"\\f233",name:"Server"},"fa-share":{unicode:"\\f064",name:"Share"},"fa-share-alt":{unicode:"\\f1e0",name:"Share alt"},"fa-share-alt-square":{unicode:"\\f1e1",name:"Share alt square"},"fa-share-square":{unicode:"\\f14d",name:"Share square"},"fa-share-square-o":{unicode:"\\f045",name:"Share square o"},"fa-shield":{unicode:"\\f132",name:"Shield"},"fa-ship":{unicode:"\\f21a",name:"Ship"},"fa-shirtsinbulk":{unicode:"\\f214",name:"Shirtsinbulk"},"fa-shopping-bag":{unicode:"\\f290",name:"Shopping bag"},"fa-shopping-basket":{unicode:"\\f291",name:"Shopping basket"},"fa-shopping-cart":{unicode:"\\f07a",name:"Shopping cart"},"fa-shower":{unicode:"\\f2cc",name:"Shower"},"fa-sign-in":{unicode:"\\f090",name:"Sign in"},"fa-sign-language":{unicode:"\\f2a7",name:"Sign language"},"fa-sign-out":{unicode:"\\f08b",name:"Sign out"},"fa-signal":{unicode:"\\f012",name:"Signal"},"fa-simplybuilt":{unicode:"\\f215",name:"Simplybuilt"},"fa-sitemap":{unicode:"\\f0e8",name:"Sitemap"},"fa-skyatlas":{unicode:"\\f216",name:"Skyatlas"},"fa-skype":{unicode:"\\f17e",name:"Skype"},"fa-slack":{unicode:"\\f198",name:"Slack"},"fa-sliders":{unicode:"\\f1de",name:"Sliders"},"fa-slideshare":{unicode:"\\f1e7",name:"Slideshare"},"fa-smile-o":{unicode:"\\f118",name:"Smile o"},"fa-snapchat":{unicode:"\\f2ab",name:"Snapchat"},"fa-snapchat-ghost":{unicode:"\\f2ac",name:"Snapchat ghost"},"fa-snapchat-square":{unicode:"\\f2ad",name:"Snapchat square"},"fa-snowflake-o":{unicode:"\\f2dc",name:"Snowflake o"},"fa-sort":{unicode:"\\f0dc",name:"Sort"},"fa-sort-alpha-asc":{unicode:"\\f15d",name:"Sort alpha asc"},"fa-sort-alpha-desc":{unicode:"\\f15e",name:"Sort alpha desc"},"fa-sort-amount-asc":{unicode:"\\f160",name:"Sort amount asc"},"fa-sort-amount-desc":{unicode:"\\f161",name:"Sort amount desc"},"fa-sort-asc":{unicode:"\\f0de",name:"Sort asc"},"fa-sort-desc":{unicode:"\\f0dd",name:"Sort desc"},"fa-sort-numeric-asc":{unicode:"\\f162",name:"Sort numeric asc"},"fa-sort-numeric-desc":{unicode:"\\f163",name:"Sort numeric desc"},"fa-soundcloud":{unicode:"\\f1be",name:"Soundcloud"},"fa-space-shuttle":{unicode:"\\f197",name:"Space shuttle"},"fa-spinner":{unicode:"\\f110",name:"Spinner"},"fa-spoon":{unicode:"\\f1b1",name:"Spoon"},"fa-spotify":{unicode:"\\f1bc",name:"Spotify"},"fa-square":{unicode:"\\f0c8",name:"Square"},"fa-square-o":{unicode:"\\f096",name:"Square o"},"fa-stack-exchange":{unicode:"\\f18d",name:"Stack exchange"},"fa-stack-overflow":{unicode:"\\f16c",name:"Stack overflow"},"fa-star":{unicode:"\\f005",name:"Star"},"fa-star-half":{unicode:"\\f089",name:"Star half"},"fa-star-half-o":{unicode:"\\f123",name:"Star half o"},"fa-star-o":{unicode:"\\f006",name:"Star o"},"fa-steam":{unicode:"\\f1b6",name:"Steam"},"fa-steam-square":{unicode:"\\f1b7",name:"Steam square"},"fa-step-backward":{unicode:"\\f048",name:"Step backward"},"fa-step-forward":{unicode:"\\f051",name:"Step forward"},"fa-stethoscope":{unicode:"\\f0f1",name:"Stethoscope"},"fa-sticky-note":{unicode:"\\f249",name:"Sticky note"},"fa-sticky-note-o":{unicode:"\\f24a",name:"Sticky note o"},"fa-stop":{unicode:"\\f04d",name:"Stop"},"fa-stop-circle":{unicode:"\\f28d",name:"Stop circle"},"fa-stop-circle-o":{unicode:"\\f28e",name:"Stop circle o"},"fa-street-view":{unicode:"\\f21d",name:"Street view"},"fa-strikethrough":{unicode:"\\f0cc",name:"Strikethrough"},"fa-stumbleupon":{unicode:"\\f1a4",name:"Stumbleupon"},"fa-stumbleupon-circle":{unicode:"\\f1a3",name:"Stumbleupon circle"},"fa-subscript":{unicode:"\\f12c",name:"Subscript"},"fa-subway":{unicode:"\\f239",name:"Subway"},"fa-suitcase":{unicode:"\\f0f2",name:"Suitcase"},"fa-sun-o":{unicode:"\\f185",name:"Sun o"},"fa-superpowers":{unicode:"\\f2dd",name:"Superpowers"},"fa-superscript":{unicode:"\\f12b",name:"Superscript"},"fa-table":{unicode:"\\f0ce",name:"Table"},"fa-tablet":{unicode:"\\f10a",name:"Tablet"},"fa-tachometer":{unicode:"\\f0e4",name:"Tachometer"},"fa-tag":{unicode:"\\f02b",name:"Tag"},"fa-tags":{unicode:"\\f02c",name:"Tags"},"fa-tasks":{unicode:"\\f0ae",name:"Tasks"},"fa-taxi":{unicode:"\\f1ba",name:"Taxi"},"fa-telegram":{unicode:"\\f2c6",name:"Telegram"},"fa-television":{unicode:"\\f26c",name:"Television"},"fa-tencent-weibo":{unicode:"\\f1d5",name:"Tencent weibo"},"fa-terminal":{unicode:"\\f120",name:"Terminal"},"fa-text-height":{unicode:"\\f034",name:"Text height"},"fa-text-width":{unicode:"\\f035",name:"Text width"},"fa-th":{unicode:"\\f00a",name:"Th"},"fa-th-large":{unicode:"\\f009",name:"Th large"},"fa-th-list":{unicode:"\\f00b",name:"Th list"},"fa-themeisle":{unicode:"\\f2b2",name:"Themeisle"},"fa-thermometer-empty":{unicode:"\\f2cb",name:"Thermometer empty"},"fa-thermometer-full":{unicode:"\\f2c7",name:"Thermometer full"},"fa-thermometer-half":{unicode:"\\f2c9",name:"Thermometer half"},"fa-thermometer-quarter":{unicode:"\\f2ca",name:"Thermometer quarter"},"fa-thermometer-three-quarters":{unicode:"\\f2c8",name:"Thermometer three quarters"},"fa-thumb-tack":{unicode:"\\f08d",name:"Thumb tack"},"fa-thumbs-down":{unicode:"\\f165",name:"Thumbs down"},"fa-thumbs-o-down":{unicode:"\\f088",name:"Thumbs o down"},"fa-thumbs-o-up":{unicode:"\\f087",name:"Thumbs o up"},"fa-thumbs-up":{unicode:"\\f164",name:"Thumbs up"},"fa-ticket":{unicode:"\\f145",name:"Ticket"},"fa-times":{unicode:"\\f00d",name:"Times"},"fa-times-circle":{unicode:"\\f057",name:"Times circle"},"fa-times-circle-o":{unicode:"\\f05c",name:"Times circle o"},"fa-tint":{unicode:"\\f043",name:"Tint"},"fa-toggle-off":{unicode:"\\f204",name:"Toggle off"},"fa-toggle-on":{unicode:"\\f205",name:"Toggle on"},"fa-trademark":{unicode:"\\f25c",name:"Trademark"},"fa-train":{unicode:"\\f238",name:"Train"},"fa-transgender":{unicode:"\\f224",name:"Transgender"},"fa-transgender-alt":{unicode:"\\f225",name:"Transgender alt"},"fa-trash":{unicode:"\\f1f8",name:"Trash"},"fa-trash-o":{unicode:"\\f014",name:"Trash o"},"fa-tree":{unicode:"\\f1bb",name:"Tree"},"fa-trello":{unicode:"\\f181",name:"Trello"},"fa-tripadvisor":{unicode:"\\f262",name:"Tripadvisor"},"fa-trophy":{unicode:"\\f091",name:"Trophy"},"fa-truck":{unicode:"\\f0d1",name:"Truck"},"fa-try":{unicode:"\\f195",name:"Try"},"fa-tty":{unicode:"\\f1e4",name:"Tty"},"fa-tumblr":{unicode:"\\f173",name:"Tumblr"},"fa-tumblr-square":{unicode:"\\f174",name:"Tumblr square"},"fa-twitch":{unicode:"\\f1e8",name:"Twitch"},"fa-twitter":{unicode:"\\f099",name:"Twitter"},"fa-twitter-square":{unicode:"\\f081",name:"Twitter square"},"fa-umbrella":{unicode:"\\f0e9",name:"Umbrella"},"fa-underline":{unicode:"\\f0cd",name:"Underline"},"fa-undo":{unicode:"\\f0e2",name:"Undo"},"fa-universal-access":{unicode:"\\f29a",name:"Universal access"},"fa-university":{unicode:"\\f19c",name:"University"},"fa-unlock":{unicode:"\\f09c",name:"Unlock"},"fa-unlock-alt":{unicode:"\\f13e",name:"Unlock alt"},"fa-upload":{unicode:"\\f093",name:"Upload"},"fa-usb":{unicode:"\\f287",name:"Usb"},"fa-usd":{unicode:"\\f155",name:"Usd"},"fa-user":{unicode:"\\f007",name:"User"},"fa-user-circle":{unicode:"\\f2bd",name:"User circle"},"fa-user-circle-o":{unicode:"\\f2be",name:"User circle o"},"fa-user-md":{unicode:"\\f0f0",name:"User md"},"fa-user-o":{unicode:"\\f2c0",name:"User o"},"fa-user-plus":{unicode:"\\f234",name:"User plus"},"fa-user-secret":{unicode:"\\f21b",name:"User secret"},"fa-user-times":{unicode:"\\f235",name:"User times"},"fa-users":{unicode:"\\f0c0",name:"Users"},"fa-venus":{unicode:"\\f221",name:"Venus"},"fa-venus-double":{unicode:"\\f226",name:"Venus double"},"fa-venus-mars":{unicode:"\\f228",name:"Venus mars"},"fa-viacoin":{unicode:"\\f237",name:"Viacoin"},"fa-viadeo":{unicode:"\\f2a9",name:"Viadeo"},"fa-viadeo-square":{unicode:"\\f2aa",name:"Viadeo square"},"fa-video-camera":{unicode:"\\f03d",name:"Video camera"},"fa-vimeo":{unicode:"\\f27d",name:"Vimeo"},"fa-vimeo-square":{unicode:"\\f194",name:"Vimeo square"},"fa-vine":{unicode:"\\f1ca",name:"Vine"},"fa-vk":{unicode:"\\f189",name:"Vk"},"fa-volume-control-phone":{unicode:"\\f2a0",name:"Volume control phone"},"fa-volume-down":{unicode:"\\f027",name:"Volume down"},"fa-volume-off":{unicode:"\\f026",name:"Volume off"},"fa-volume-up":{unicode:"\\f028",name:"Volume up"},"fa-weibo":{unicode:"\\f18a",name:"Weibo"},"fa-weixin":{unicode:"\\f1d7",name:"Weixin"},"fa-whatsapp":{unicode:"\\f232",name:"Whatsapp"},"fa-wheelchair":{unicode:"\\f193",name:"Wheelchair"},"fa-wheelchair-alt":{unicode:"\\f29b",name:"Wheelchair alt"},"fa-wifi":{unicode:"\\f1eb",name:"Wifi"},"fa-wikipedia-w":{unicode:"\\f266",name:"Wikipedia w"},"fa-window-close":{unicode:"\\f2d3",name:"Window close"},"fa-window-close-o":{unicode:"\\f2d4",name:"Window close o"},"fa-window-maximize":{unicode:"\\f2d0",name:"Window maximize"},"fa-window-minimize":{unicode:"\\f2d1",name:"Window minimize"},"fa-window-restore":{unicode:"\\f2d2",name:"Window restore"},"fa-windows":{unicode:"\\f17a",name:"Windows"},"fa-wordpress":{unicode:"\\f19a",name:"Wordpress"},"fa-wpbeginner":{unicode:"\\f297",name:"Wpbeginner"},"fa-wpexplorer":{unicode:"\\f2de",name:"Wpexplorer"},"fa-wpforms":{unicode:"\\f298",name:"Wpforms"},"fa-wrench":{unicode:"\\f0ad",name:"Wrench"},"fa-xing":{unicode:"\\f168",name:"Xing"},"fa-xing-square":{unicode:"\\f169",name:"Xing square"},"fa-y-combinator":{unicode:"\\f23b",name:"Y combinator"},"fa-yahoo":{unicode:"\\f19e",name:"Yahoo"},"fa-yelp":{unicode:"\\f1e9",name:"Yelp"},"fa-yoast":{unicode:"\\f2b1",name:"Yoast"},"fa-youtube":{unicode:"\\f167",name:"Youtube"},"fa-youtube-play":{unicode:"\\f16a",name:"Youtube play"},"fa-youtube-square":{unicode:"\\f166",name:"Youtube square"}},u=["glyph-glass","glyph-leaf","glyph-dog","glyph-user","glyph-girl","glyph-car","glyph-user-add","glyph-user-remove","glyph-film","glyph-magic","glyph-envelope","glyph-camera","glyph-heart","glyph-beach-umbrella","glyph-train","glyph-print","glyph-bin","glyph-music","glyph-note","glyph-heart-empty","glyph-home","glyph-snowflake","glyph-fire","glyph-magnet","glyph-parents","glyph-binoculars","glyph-road","glyph-search","glyph-cars","glyph-notes-2","glyph-pencil","glyph-bus","glyph-wifi-alt","glyph-luggage","glyph-old-man","glyph-woman","glyph-file","glyph-coins","glyph-airplane","glyph-notes","glyph-stats","glyph-charts","glyph-pie-chart","glyph-group","glyph-keys","glyph-calendar","glyph-router","glyph-camera-small","glyph-dislikes","glyph-star","glyph-link","glyph-eye-open","glyph-eye-close","glyph-alarm","glyph-clock","glyph-stopwatch","glyph-projector","glyph-history","glyph-truck","glyph-cargo","glyph-compass","glyph-keynote","glyph-paperclip","glyph-power","glyph-lightbulb","glyph-tag","glyph-tags","glyph-cleaning","glyph-ruller","glyph-gift","glyph-umbrella","glyph-book","glyph-bookmark","glyph-wifi","glyph-cup","glyph-stroller","glyph-headphones","glyph-headset","glyph-warning-sign","glyph-signal","glyph-retweet","glyph-refresh","glyph-roundabout","glyph-random","glyph-heat","glyph-repeat","glyph-display","glyph-log-book","glyph-address-book","glyph-building","glyph-eyedropper","glyph-adjust","glyph-tint","glyph-crop","glyph-vector-path-square","glyph-vector-path-circle","glyph-vector-path-polygon","glyph-vector-path-line","glyph-vector-path-curve","glyph-vector-path-all","glyph-font","glyph-italic","glyph-bold","glyph-text-underline","glyph-text-strike","glyph-text-height","glyph-text-width","glyph-text-resize","glyph-left-indent","glyph-right-indent","glyph-align-left","glyph-align-center","glyph-align-right","glyph-justify","glyph-list","glyph-text-smaller","glyph-text-bigger","glyph-embed","glyph-embed-close","glyph-table","glyph-message-full","glyph-message-empty","glyph-message-in","glyph-message-out","glyph-message-plus","glyph-message-minus","glyph-message-ban","glyph-message-flag","glyph-message-lock","glyph-message-new","glyph-inbox","glyph-inbox-plus","glyph-inbox-minus","glyph-inbox-lock","glyph-inbox-in","glyph-inbox-out","glyph-cogwheel","glyph-cogwheels","glyph-picture","glyph-adjust-alt","glyph-database-lock","glyph-database-plus","glyph-database-minus","glyph-database-ban","glyph-folder-open","glyph-folder-plus","glyph-folder-minus","glyph-folder-lock","glyph-folder-flag","glyph-folder-new","glyph-edit","glyph-new-window","glyph-check","glyph-unchecked","glyph-more-windows","glyph-show-big-thumbnails","glyph-show-thumbnails","glyph-show-thumbnails-with-lines","glyph-show-lines","glyph-playlist","glyph-imac","glyph-macbook","glyph-ipad","glyph-iphone","glyph-iphone-transfer","glyph-iphone-exchange","glyph-ipod","glyph-ipod-shuffle","glyph-ear-plugs","glyph-record","glyph-step-backward","glyph-fast-backward","glyph-rewind","glyph-play","glyph-pause","glyph-stop","glyph-forward","glyph-fast-forward","glyph-step-forward","glyph-eject","glyph-facetime-video","glyph-download-alt","glyph-mute","glyph-volume-down","glyph-volume-up","glyph-screenshot","glyph-move","glyph-more","glyph-brightness-reduce","glyph-brightness-increase","glyph-circle-plus","glyph-circle-minus","glyph-circle-remove","glyph-circle-ok","glyph-circle-question-mark","glyph-circle-info","glyph-circle-exclamation-mark","glyph-remove","glyph-ok","glyph-ban","glyph-download","glyph-upload","glyph-shopping-cart","glyph-lock","glyph-unlock","glyph-electricity","glyph-ok-2","glyph-remove-2","glyph-cart-out","glyph-cart-in","glyph-left-arrow","glyph-right-arrow","glyph-down-arrow","glyph-up-arrow","glyph-resize-small","glyph-resize-full","glyph-circle-arrow-left","glyph-circle-arrow-right","glyph-circle-arrow-top","glyph-circle-arrow-down","glyph-play-button","glyph-unshare","glyph-share","glyph-chevron-right","glyph-chevron-left","glyph-bluetooth","glyph-euro","glyph-usd","glyph-gbp","glyph-retweet-2","glyph-moon","glyph-sun","glyph-cloud","glyph-direction","glyph-brush","glyph-pen","glyph-zoom-in","glyph-zoom-out","glyph-pin","glyph-albums","glyph-rotation-lock","glyph-flash","glyph-google-maps","glyph-anchor","glyph-conversation","glyph-chat","glyph-male","glyph-female","glyph-asterisk","glyph-divide","glyph-snorkel-diving","glyph-scuba-diving","glyph-oxygen-bottle","glyph-fins","glyph-fishes","glyph-boat","glyph-delete","glyph-sheriffs-star","glyph-qrcode","glyph-barcode","glyph-pool","glyph-buoy","glyph-spade","glyph-bank","glyph-vcard","glyph-electrical-plug","glyph-flag","glyph-credit-card","glyph-keyboard-wireless","glyph-keyboard-wired","glyph-shield","glyph-ring","glyph-cake","glyph-drink","glyph-beer","glyph-fast-food","glyph-cutlery","glyph-pizza","glyph-birthday-cake","glyph-tablet","glyph-settings","glyph-bullets","glyph-cardio","glyph-t-shirt","glyph-pants","glyph-sweater","glyph-fabric","glyph-leather","glyph-scissors","glyph-bomb","glyph-skull","glyph-celebration","glyph-tea-kettle","glyph-french-press","glyph-coffe-cup","glyph-pot","glyph-grater","glyph-kettle","glyph-hospital","glyph-hospital-h","glyph-microphone","glyph-webcam","glyph-temple-christianity-church","glyph-temple-islam","glyph-temple-hindu","glyph-temple-buddhist","glyph-bicycle","glyph-life-preserver","glyph-share-alt","glyph-comments","glyph-flower","glyph-baseball","glyph-rugby","glyph-ax","glyph-table-tennis","glyph-bowling","glyph-tree-conifer","glyph-tree-deciduous","glyph-more-items","glyph-sort","glyph-filter","glyph-gamepad","glyph-playing-dices","glyph-calculator","glyph-tie","glyph-wallet","glyph-piano","glyph-sampler","glyph-podium","glyph-soccer-ball","glyph-blog","glyph-dashboard","glyph-certificate","glyph-bell","glyph-candle","glyph-pushpin","glyph-iphone-shake","glyph-pin-flag","glyph-turtle","glyph-rabbit","glyph-globe","glyph-briefcase","glyph-hdd","glyph-thumbs-up","glyph-thumbs-down","glyph-hand-right","glyph-hand-left","glyph-hand-up","glyph-hand-down","glyph-fullscreen","glyph-shopping-bag","glyph-book-open","glyph-nameplate","glyph-nameplate-alt","glyph-vases","glyph-bullhorn","glyph-dumbbell","glyph-suitcase","glyph-file-import","glyph-file-export","glyph-bug","glyph-crown","glyph-smoking","glyph-cloud-upload","glyph-cloud-download","glyph-restart","glyph-security-camera","glyph-expand","glyph-collapse","glyph-collapse-top","glyph-globe-af","glyph-global","glyph-spray","glyph-nails","glyph-claw-hammer","glyph-classic-hammer","glyph-hand-saw","glyph-riflescope","glyph-electrical-socket-eu","glyph-electrical-socket-us","glyph-message-forward","glyph-coat-hanger","glyph-dress","glyph-bathrobe","glyph-shirt","glyph-underwear","glyph-log-in","glyph-log-out","glyph-exit","glyph-new-window-alt","glyph-video-sd","glyph-video-hd","glyph-subtitles","glyph-sound-stereo","glyph-sound-dolby","glyph-sound-5-1","glyph-sound-6-1","glyph-sound-7-1","glyph-copyright-mark","glyph-registration-mark","glyph-radar","glyph-skateboard","glyph-golf-course","glyph-sorting","glyph-sort-by-alphabet","glyph-sort-by-alphabet-alt","glyph-sort-by-order","glyph-sort-by-order-alt","glyph-sort-by-attributes","glyph-sort-by-attributes-alt","glyph-compressed","glyph-package","glyph-cloud-plus","glyph-cloud-minus","glyph-disk-save","glyph-disk-open","glyph-disk-saved","glyph-disk-remove","glyph-disk-import","glyph-disk-export","glyph-tower","glyph-send","glyph-git-branch","glyph-git-create","glyph-git-private","glyph-git-delete","glyph-git-merge","glyph-git-pull-request","glyph-git-compare","glyph-git-commit","glyph-construction-cone","glyph-shoe-steps","glyph-plus","glyph-minus","glyph-redo","glyph-undo","glyph-golf","glyph-hockey","glyph-pipe","glyph-wrench","glyph-folder-closed","glyph-phone-alt","glyph-earphone","glyph-floppy-disk","glyph-floppy-saved","glyph-floppy-remove","glyph-floppy-save","glyph-floppy-open","glyph-translate","glyph-fax","glyph-factory","glyph-shop-window","glyph-shop","glyph-kiosk","glyph-kiosk-wheels","glyph-kiosk-light","glyph-kiosk-food","glyph-transfer","glyph-money","glyph-header","glyph-blacksmith","glyph-saw-blade","glyph-basketball","glyph-server","glyph-server-plus","glyph-server-minus","glyph-server-ban","glyph-server-flag","glyph-server-lock","glyph-server-new"],f=["social-pinterest","social-dropbox","social-google-plus","social-jolicloud","social-yahoo","social-blogger","social-picasa","social-amazon","social-tumblr","social-wordpress","social-instapaper","social-evernote","social-xing","social-zootool","social-dribbble","social-deviantart","social-read-it-later","social-linked-in","social-forrst","social-pinboard","social-behance","social-github","social-youtube","social-skitch","social-foursquare","social-quora","social-badoo","social-spotify","social-stumbleupon","social-readability","social-facebook","social-twitter","social-instagram","social-posterous-spaces","social-vimeo","social-flickr","social-last-fm","social-rss","social-skype","social-e-mail","social-vine","social-myspace","social-goodreads","social-apple","social-windows","social-yelp","social-playstation","social-xbox","social-android","social-ios"]}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"image"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.base()},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(i){var u=this,r=this.getTextControlEl();r&&r.length>0&&(t.isEmpty(i)?r.val(""):(r.val(i),n(u.control).parent().find(".alpaca-image-display img").attr("src",i)));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);n(r).change(function(){var t=n(this).val();n(i.control).parent().find(".alpaca-image-display img").attr("src",t)});i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()));t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=r.options.typeahead.datasets,i||(i={}),i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Image2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){if(self.sf){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})}},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("image2",t.Fields.Image2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCrop2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"imagecrop2"},setup:function(){var n=this;this.options.uploadfolder||(this.options.uploadfolder="");this.options.cropfolder||(this.options.cropfolder=this.options.uploadfolder);this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.width&&this.options.height&&(this.options.cropper.aspectRatio=this.options.width/this.options.height);this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.options.cropButtonHidden||(this.options.cropButtonHidden=!1);this.options.cropButtonHidden||(this.options.buttons={check:{value:"Crop",click:function(){this.cropImage()}}});this.base()},getValue:function(){var i=this,t;if(this.control&&this.control.length>0)return t=null,$image=i.getImage(),t=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},t.url=n(this.control).find("select").val(),t.url&&(this.dataSource&&this.dataSource[t.url]&&(t.id=this.dataSource[t.url].id),t.cropUrl=n(i.getControlEl()).attr("data-cropurl")),t},setValue:function(i){var r=this,u;i!==this.getValue()&&this.control&&typeof i!="undefined"&&i!=null&&(t.isEmpty(i)?(r.cropper(""),n(this.control).find("select").val(""),n(r.getControlEl()).attr("data-cropurl","")):t.isObject(i)?(i.url&&(i.url=i.url.split("?")[0]),i.cropUrl&&(i.cropUrl=i.cropUrl.split("?")[0]),i.cropdata&&Object.keys(i.cropdata).length>0?(u=i.cropdata[Object.keys(i.cropdata)[0]],r.cropper(i.url,u.cropper),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",u.url)):(r.cropper(i.url,i),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",i.cropUrl))):(r.cropper(i),n(this.control).find("select").val(i),n(r.getControlEl()).attr("data-cropurl","")),n(this.control).find("select").trigger("change.select2"))},getEnum:function(){if(this.schema){if(this.schema["enum"])return this.schema["enum"];if(this.schema.type&&this.schema.type==="array"&&this.schema.items&&this.schema.items["enum"])return this.schema.items["enum"]}},initControlEvents:function(){var n=this,t;if(n.base(),n.options.multiple){t=this.control.parent().find(".select2-search__field");t.focus(function(t){n.suspendBlurFocus||(n.onFocus.call(n,t),n.trigger("focus",t))});t.blur(function(t){n.suspendBlurFocus||(n.onBlur.call(n,t),n.trigger("blur",t))});this.control.on("change",function(t){n.onChange.call(n,t);n.trigger("change",t)})}},beforeRenderControl:function(i,r){var u=this;this.base(i,function(){if(u.selectOptions=[],u.sf){var f=function(){u.schema.enum=[];u.options.optionLabels=[];for(var n=0;n0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl().find("select")).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.uploadfolder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(n,t){u.refresh(function(){u.setValue(t.url)})})}}).data("loaded",!0);r()})},cropImage:function(){var t=this,i=t.getValue(),r={url:i.url,cropfolder:t.options.cropfolder,crop:i,id:"crop"};t.options.width&&t.options.height&&(r.resize={width:t.options.width,height:t.options.height});n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){n(t.getControlEl()).attr("data-cropurl",i.url);setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},getFileUrl:function(t){var i=this,r;i.sf&&(r={fileid:t},n.ajax({url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:i.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:r,success:function(n){return n},error:function(){return""}}))},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?((t!=r.originalUrl||r.url&&t!=r.url)&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data?this.data.url:"",!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).find("select");i.focus();t&&t(this)}},getTitle:function(){return"Image Crop 2 Field"},getDescription:function(){return"Image Crop 2 Field"}});t.registerFieldClass("imagecrop2",t.Fields.ImageCrop2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecrop"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Crop Field"},getDescription:function(){return"Image Crop Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var r=this,i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?(i.val(""),r.cropper("")):t.isObject(n)?(i.val(n.url),r.cropper(n.url,n)):(i.val(n),r.cropper(n)));this.updateMaxLengthIndicator()},getValue:function(){var i=this,n=null,t=this.getTextControlEl();return $image=i.getImage(),t&&t.length>0&&(n=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},n.url=t.val()),n},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;$image=n(i.control).parent().find(".alpaca-image-display img");i.sf?(i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){n(r).val(i.url);n(r).change()})}}).data("loaded",!0),n(r).change(function(){var t=n(this).val();i.cropper(t)}),i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()))):$image.hide();t()},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?(t!=r.originalUrl&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)&&u.sf){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){n(r).val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){n(r).val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecrop",t.Fields.ImageCropField)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropperField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecropper"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Cropper Field"},getDescription:function(){return"Image Cropper Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):t.isString(n)?i.val(n):(i.val(n.url),this.setCroppedData(n.cropdata)));this.updateMaxLengthIndicator()},getValue:function(){var n=null,t=this.getTextControlEl();return t&&t.length>0&&(n={url:t.val()},n.cropdata=this.getCroppedData()),n},getCroppedData:function(){var f=this.getTextControlEl(),i={};for(var t in this.options.croppers){var e=this.options.croppers[t],r=this.id+"-"+t,u=n("#"+r);i[t]=u.data("cropdata")}return i},cropAllImages:function(t){var i=this;for(var r in this.options.croppers){var f=this.id+"-"+r,s=n("#"+f),u=this.options.croppers[r],e={x:-1,y:-1,width:u.width,height:u.height,rotate:0},o=JSON.stringify({url:t,id:r,crop:e,resize:u,cropfolder:this.options.cropfolder});n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",async:!1,data:o,beforeSend:i.sf.setModuleHeaders}).done(function(n){var t={url:n.url,cropper:{}};i.setCroppedDataForId(f,t)}).fail(function(n,t,i){alert("Uh-oh, something broke: "+i)})}},setCroppedData:function(i){var e=this.getTextControlEl(),h=this.getFieldEl(),u,r,f,o;if(e&&e.length>0&&!t.isEmpty(i))for(r in this.options.croppers){var o=this.options.croppers[r],c=this.id+"-"+r,s=n("#"+c);cropdata=i[r];cropdata&&s.data("cropdata",cropdata);u||(u=s,n(u).addClass("active"),cropdata&&(f=n(h).find(".alpaca-image-display img.image"),o=f.data("cropper"),o&&f.cropper("setData",cropdata.cropper)))}},setCroppedDataForId:function(t,i){var u=this.getTextControlEl(),r;i&&(r=n("#"+t),r.data("cropdata",i))},getCurrentCropData:function(){var t=this.getFieldEl(),i=n(t).parent().find(".alpaca-form-tab.active");return n(i).data("cropdata")},setCurrentCropData:function(t){var i=this.getFieldEl(),r=n(i).parent().find(".alpaca-form-tab.active");n(r).data("cropdata",t)},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},cropChange:function(t){var u=t.data,f=u.getCurrentCropData(),e;if(f){var r=f.cropper,o=this,i=n(this).cropper("getData",{rounded:!0});(i.x!=r.x||i.y!=r.y||i.width!=r.width||i.height!=r.height||i.rotate!=r.rotate)&&(e={url:"",cropper:i},u.setCurrentCropData(e))}},getCropppersData:function(){var n,t,i;for(n in self.options.croppers)t=self.options.croppers[n],i=self.id+"-"+n},handlePostRender:function(t){var i=this,f=this.getTextControlEl(),s=this.getFieldEl(),r=n('Crop<\/a>'),e,o,u,a;r.click(function(){var u=i.getCroppedData(),e=JSON.stringify({url:f.val(),cropfolder:i.options.cropfolder,cropdata:u,croppers:i.options.croppers}),t;return n(r).css("cursor","wait"),t="CropImages",n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/"+t,contentType:"application/json; charset=utf-8",dataType:"json",data:e,beforeSend:i.sf.setModuleHeaders}).done(function(t){var u,f;for(u in i.options.croppers){var s=i.options.croppers[u],e=i.id+"-"+u,o=n("#"+e);t.cropdata[u]&&(f={url:t.cropdata[u].url,cropper:t.cropdata[u].crop},f&&o.data("cropdata",f))}setTimeout(function(){n(r).css("cursor","initial")},500)}).fail(function(t,i,r){alert("Uh-oh, something broke: "+r);n(s).css("cursor","initial")}),!1});for(o in i.options.croppers){var c=i.options.croppers[o],l=i.id+"-"+o,h=n(''+o+"<\/a>").appendTo(n(f).parent());h.data("cropopt",c);h.click(function(){u.off("crop.cropper");var t=n(this).data("cropdata"),f=n(this).data("cropopt");u.cropper("setAspectRatio",f.width/f.height);t?u.cropper("setData",t.cropper):u.cropper("reset");r.data("cropperButtonId",this.id);r.data("cropperId",n(this).attr("data-id"));n(this).parent().find(".alpaca-form-tab").removeClass("active");n(this).addClass("active");u.on("crop.cropper",i,i.cropChange);return!1});e||(e=h,n(e).addClass("active"),r.data("cropperButtonId",n(e).attr("id")),r.data("cropperId",n(e).attr("data-id")))}u=n(s).find(".alpaca-image-display img.image");u.cropper(i.options.cropper).on("built.cropper",function(){var t=n(e).data("cropopt"),r,u;t&&n(this).cropper("setAspectRatio",t.width/t.height);r=n(e).data("cropdata");r&&n(this).cropper("setData",r.cropper);u=n(s).find(".alpaca-image-display img.image");u.on("crop.cropper",i,i.cropChange)});i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){f.val(i.url);n(f).change()})}}).data("loaded",!0);n(f).change(function(){var t=n(this).val();n(s).find(".alpaca-image-display img.image").attr("src",t);u.cropper("replace",t);t&&i.cropAllImages(t)});r.appendTo(n(f).parent());i.options.manageurl&&(a=n('Manage files<\/a>').appendTo(n(f).parent()));t()},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){r.val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){r.val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecropper",t.Fields.ImageCropperField)}(jQuery),function(n){var t=n.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.numberDecimalSeparator=f.numberDecimalSeparator},setup:function(){this.base()},getFieldType:function(){return"number"},getValue:function(){var n=this._getControlVal(!1);return typeof n=="undefined"||""==n?n:(this.numberDecimalSeparator!="."&&(n=(""+n).replace(this.numberDecimalSeparator,".")),parseFloat(n))},setValue:function(n){var i=n;this.numberDecimalSeparator!="."&&(i=t.isEmpty(n)?"":(""+n).replace(".",this.numberDecimalSeparator));this.base(i)},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateNumber();return i.stringNotANumber={message:n?"":this.view.getMessage("stringNotANumber"),status:n},n=this._validateDivisibleBy(),i.stringDivisibleBy={message:n?"":t.substituteTokens(this.view.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:n},n=this._validateMaximum(),i.stringValueTooLarge={message:"",status:n},n||(i.stringValueTooLarge.message=this.schema.exclusiveMaximum?t.substituteTokens(this.view.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):t.substituteTokens(this.view.getMessage("stringValueTooLarge"),[this.schema.maximum])),n=this._validateMinimum(),i.stringValueTooSmall={message:"",status:n},n||(i.stringValueTooSmall.message=this.schema.exclusiveMinimum?t.substituteTokens(this.view.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):t.substituteTokens(this.view.getMessage("stringValueTooSmall"),[this.schema.minimum])),n=this._validateMultipleOf(),i.stringValueNotMultipleOf={message:"",status:n},n||(i.stringValueNotMultipleOf.message=t.substituteTokens(this.view.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),r&&i.stringNotANumber.status&&i.stringDivisibleBy.status&&i.stringValueTooLarge.status&&i.stringValueTooSmall.status&&i.stringValueNotMultipleOf.status},_validateNumber:function(){var n=this._getControlVal(),i,r;return(this.numberDecimalSeparator!="."&&(n=n.replace(this.numberDecimalSeparator,".")),typeof n=="number"&&(n=""+n),t.isValEmpty(n))?!0:(i=t.testRegex(t.regexps.number,n),!i)?!1:(r=this.getValue(),isNaN(r))?!1:!0},_validateDivisibleBy:function(){var n=this.getValue();return!t.isEmpty(this.schema.divisibleBy)&&n%this.schema.divisibleBy!=0?!1:!0},_validateMaximum:function(){var n=this.getValue();return!t.isEmpty(this.schema.maximum)&&(n>this.schema.maximum||!t.isEmpty(this.schema.exclusiveMaximum)&&n==this.schema.maximum&&this.schema.exclusiveMaximum)?!1:!0},_validateMinimum:function(){var n=this.getValue();return!t.isEmpty(this.schema.minimum)&&(n0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("role2",t.Fields.Role2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.User2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.role||(this.options.role="");n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/UsersLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"",d:n.options.folder,role:n.options.role,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getUserName:function(t,i){var r=this,u;r.sf&&(u={userid:t},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/GetUserInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error GetUserInfo "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},getTitle:function(){return"Select User Field"},getDescription:function(){return"Select User Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("user2",t.Fields.User2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.Select2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("select2",t.Fields.Select2Field)}(jQuery),function(n){var t=n.alpaca;n.alpaca.Fields.DnnUrlField=n.alpaca.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.sf=f.servicesFramework},setup:function(){this.base()},applyTypeAhead:function(){var t=this,f,i,r,u,e,o,s,h;if(t.sf){if(f=f={},i=i={},i.name||(i.name=t.getId()),r=r={},u={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},u.remote={url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Tabs?q=%QUERY&l="+t.culture,ajax:{beforeSend:t.sf.setModuleHeaders}},i.filter&&(u.remote.filter=i.filter),i.replace&&(u.remote.replace=i.replace),e=new Bloodhound(u),e.initialize(),i.source=e.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(o in i.templates)s=i.templates[o],typeof s=="string"&&(i.templates[o]=Handlebars.compile(s));n(t.control).typeahead(f,i);n(t.control).on("typeahead:autocompleted",function(i,r){t.setValue(r.value);n(t.control).change()});n(t.control).on("typeahead:selected",function(i,r){t.setValue(r.value);n(t.control).change()});if(r){if(r.autocompleted)n(t.control).on("typeahead:autocompleted",function(n,t){r.autocompleted(n,t)});if(r.selected)n(t.control).on("typeahead:selected",function(n,t){r.selected(n,t)})}h=n(t.control);n(t.control).change(function(){var i=n(this).val(),t=n(h).typeahead("val");t!==i&&n(h).typeahead("val",t)});n(t.field).find("span.twitter-typeahead").first().css("display","block");n(t.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("url",t.Fields.DnnUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Url2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.culture=f.culture;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("url2",t.Fields.Url2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.wysihtmlField=t.Fields.TextAreaField.extend({getFieldType:function(){return"wysihtml"},setup:function(){this.data||(this.data="");this.base();typeof this.options.wysihtml=="undefined"&&(this.options.wysihtml={})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control){var t=r.control,u=n(t).find("#"+r.id)[0];r.editor=new wysihtml5.Editor(u,{toolbar:n(t).find("#"+r.id+"-toolbar")[0],parserRules:wysihtml5ParserRules});wysihtml5.commands.custom_class={exec:function(n,t,i){return wysihtml5.commands.formatBlock.exec(n,t,"p",i,new RegExp(i,"g"))},state:function(n,t,i){return wysihtml5.commands.formatBlock.state(n,t,"p",i,new RegExp(i,"g"))}}}i()})},getEditor:function(){return this.editor},setValue:function(n){var t=this;this.editor&&this.editor.setValue(n);this.base(n)},getValue:function(){var n=null;return this.editor&&(n=this.editor.currentView=="source"?this.editor.sourceView.textarea.value:this.editor.getValue()),n},getTitle:function(){return"wysihtml"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("wysihtml",t.Fields.wysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.SummernoteField=t.Fields.TextAreaField.extend({getFieldType:function(){return"summernote"},setup:function(){this.data||(this.data="");this.base();typeof this.options.summernote=="undefined"&&(this.options.summernote={height:null,minHeight:null,maxHeight:null,focus:!0})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control&&n.fn.summernote)r.on("ready",function(){n(r.control).summernote(r.options.summernote)});n(r.control).bind("destroyed",function(){try{n(r.control).summernote("destroy")}catch(t){}});i()})},getTitle:function(){return"Summernote Editor"},getDescription:function(){return"Provides an instance of a Summernote Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{summernote:{title:"Summernote Editor options",description:"Use this entry to provide configuration options to the underlying Summernote plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{summernote:{type:"any"}}})}});t.registerFieldClass("summernote",t.Fields.SummernoteField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLCKEditorField=t.Fields.CKEditorField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base();this.options.ckeditor||(this.options.ckeditor={});CKEDITOR.config.enableConfigHelper&&!this.options.ckeditor.extraPlugins&&(this.options.ckeditor.extraPlugins="dnnpages,confighelper")},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlckeditor",t.Fields.MLCKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFile2Field=t.Fields.File2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).after('')}});t.registerFieldClass("mlfile2",t.Fields.MLFile2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFileField=t.Fields.FileField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlfile",t.Fields.MLFileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFolder2Field=t.Fields.Folder2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlfolder2",t.Fields.MLFolder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImage2Field=t.Fields.Image2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlimage2",t.Fields.MLImage2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImageField=t.Fields.ImageField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlimage",t.Fields.MLImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextAreaField=t.Fields.TextAreaField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltextarea",t.Fields.MLTextAreaField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltext",t.Fields.MLTextField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrl2Field=t.Fields.Url2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlurl2",t.Fields.MLUrl2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrlField=t.Fields.DnnUrlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlurl",t.Fields.MLUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLwysihtmlField=t.Fields.wysihtmlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"ML wysihtml Field"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing MLHTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("mlwysihtml",t.Fields.MLwysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Accordion=t.Fields.ArrayField.extend({getFieldType:function(){return"accordion"},setup:function(){var n=this;this.base();n.options.titleField||n.schema.items&&n.schema.items.properties&&Object.keys(n.schema.items.properties).length&&(n.options.titleField=Object.keys(n.schema.items.properties)[0])},createItem:function(t,i,r,u,f){var e=this;this.base(t,i,r,u,function(t){var u="[no title]",r=t.childrenByPropertyId[e.options.titleField],i;if(r){i=r.getValue();i=i?i:u;t.getContainerEl().closest(".panel").find(".panel-title a").first().text(i);r.on("keyup",function(){var t=this.getValue();t=t?t:u;n(this.getControlEl()).closest(".panel").find(".panel-title a").first().text(t)})}f&&f(t)})},getType:function(){return"array"},getTitle:function(){return"accordion Field"},getDescription:function(){return"Renders array with title"}});t.registerFieldClass("accordion",t.Fields.Accordion)}(jQuery); \ No newline at end of file From 0a434eb192f7d09ee33974bd44bbf2e1e97937b0 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 25 Sep 2017 16:51:29 +0200 Subject: [PATCH 04/18] optionally save data in xml --- .../EditGlobalSettings.ascx.resx | 3 + .../Components/OpenContentController.cs | 19 ++- .../OpenContentGlobalSettingsController.cs | 18 ++- OpenContent/Components/OpenContentInfo.cs | 3 + OpenContent/EditGlobalSettings.ascx | 4 + OpenContent/EditGlobalSettings.ascx.cs | 2 + .../EditGlobalSettings.ascx.designer.cs | 142 ++++++++++-------- OpenContent/OpenContent.csproj | 1 + OpenContent/OpenContent.dnn | 9 +- .../SqlDataProvider/03.05.00.SqlDataProvider | 18 +++ 10 files changed, 151 insertions(+), 68 deletions(-) create mode 100644 OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider diff --git a/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx b/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx index 98d3b71e..b1b6205c 100644 --- a/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx +++ b/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx @@ -147,4 +147,7 @@ Fast Handlebars. Case sensitive variables ! (Beta) + + Save Xml + \ No newline at end of file diff --git a/OpenContent/Components/OpenContentController.cs b/OpenContent/Components/OpenContentController.cs index 6e030af1..e2bc1895 100644 --- a/OpenContent/Components/OpenContentController.cs +++ b/OpenContent/Components/OpenContentController.cs @@ -10,17 +10,15 @@ ' */ -using System; using System.Linq; using System.Collections.Generic; using DotNetNuke.Common.Utilities; using DotNetNuke.Data; using DotNetNuke.Entities.Modules; -using Satrabel.OpenContent.Components.Lucene; -using Satrabel.OpenContent.Components.Lucene.Config; using Satrabel.OpenContent.Components.Common; using DotNetNuke.Entities.Portals; + namespace Satrabel.OpenContent.Components { public class OpenContentController @@ -32,6 +30,7 @@ public class OpenContentController public void AddContent(OpenContentInfo content) { + SynchronizeXml(content); ClearDataCache(content); var json = content.JsonAsJToken; if (string.IsNullOrEmpty(content.Key)) @@ -77,6 +76,7 @@ public void UpdateContent(OpenContentInfo content) { ClearDataCache(content); var json = content.JsonAsJToken; + SynchronizeXml(content); OpenContentVersion ver = new OpenContentVersion() { Json = json, @@ -103,6 +103,19 @@ public void UpdateContent(OpenContentInfo content) } } + private static void SynchronizeXml(OpenContentInfo content) + { + if (OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(PortalSettings.Current.PortalId).IsSaveXml() + && !string.IsNullOrEmpty(content.Json)) + { + content.Xml = Newtonsoft.Json.JsonConvert.DeserializeXNode(content.Json, "root").ToString(); + } + else + { + content.Xml = null; + } + } + #endregion #region Queries diff --git a/OpenContent/Components/OpenContentGlobalSettingsController.cs b/OpenContent/Components/OpenContentGlobalSettingsController.cs index 4d6af7ce..462d0d59 100644 --- a/OpenContent/Components/OpenContentGlobalSettingsController.cs +++ b/OpenContent/Components/OpenContentGlobalSettingsController.cs @@ -1,4 +1,5 @@ -using DotNetNuke.Entities.Portals; +using System; +using DotNetNuke.Entities.Portals; using Satrabel.OpenContent.Components.Alpaca; namespace Satrabel.OpenContent.Components @@ -15,7 +16,9 @@ public class OpenContentGlobalSettingsController private const bool SettingsDefaultLoadBootstrap = true; private const string SettingsGoogleApiKey = "OpenContent_GoogleApiKey"; private const string SettingsFastHandlebars = "OpenContent_FastHandlebars"; + private const string SettingsSaveXml = "OpenContent_SaveXml"; private const bool SettingsDefaultFastHandlebars = false; + private const bool SettingsDefaultSaveXml = false; public OpenContentGlobalSettingsController(int portalId) { @@ -67,6 +70,19 @@ public string GetGoogleApiKey() { return PortalController.GetPortalSetting(SettingsGoogleApiKey, _portalId, string.Empty); } + + internal bool IsSaveXml() + { + var saveXmlSetting = PortalController.GetPortalSetting(SettingsSaveXml, _portalId, string.Empty); + bool saveXml; + if (!string.IsNullOrWhiteSpace(saveXmlSetting) && bool.TryParse(saveXmlSetting, out saveXml)) + return saveXml; + return SettingsDefaultSaveXml; + } + public void SetSaveXml(bool saveXml) + { + PortalController.UpdatePortalSetting(_portalId, SettingsSaveXml, saveXml.ToString(), true); + } public void SetGoogleApiKey(string googleMapsApiKey) { PortalController.UpdatePortalSetting(_portalId, SettingsGoogleApiKey, googleMapsApiKey, true); diff --git a/OpenContent/Components/OpenContentInfo.cs b/OpenContent/Components/OpenContentInfo.cs index 6092b88e..8a0b73e6 100644 --- a/OpenContent/Components/OpenContentInfo.cs +++ b/OpenContent/Components/OpenContentInfo.cs @@ -90,6 +90,9 @@ public JToken JsonAsJToken public DateTime CreatedOnDate { get; set; } public DateTime LastModifiedOnDate { get; set; } public string VersionsJson { get; set; } + + public string Xml { get; set; } + [IgnoreColumn] public List Versions { diff --git a/OpenContent/EditGlobalSettings.ascx b/OpenContent/EditGlobalSettings.ascx index 1a7f7cd5..92cd75a9 100644 --- a/OpenContent/EditGlobalSettings.ascx +++ b/OpenContent/EditGlobalSettings.ascx @@ -43,6 +43,10 @@
+
+ + +
  • diff --git a/OpenContent/EditGlobalSettings.ascx.cs b/OpenContent/EditGlobalSettings.ascx.cs index 27549391..edcf67e0 100644 --- a/OpenContent/EditGlobalSettings.ascx.cs +++ b/OpenContent/EditGlobalSettings.ascx.cs @@ -74,6 +74,7 @@ protected override void OnLoad(EventArgs e) cbLoadBootstrap.Visible = lLoadBootstrap.Visible = globalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN; tbGoogleApiKey.Text = globalSettingsController.GetGoogleApiKey(); cbFastHandlebars.Checked = globalSettingsController.GetFastHandlebars(); + cbSaveXml.Checked = globalSettingsController.IsSaveXml(); } } protected void cmdSave_Click(object sender, EventArgs e) @@ -99,6 +100,7 @@ protected void cmdSave_Click(object sender, EventArgs e) globalSettingsController.SetLoadBootstrap(cbLoadBootstrap.Checked); globalSettingsController.SetGoogleApiKey(tbGoogleApiKey.Text); globalSettingsController.SetFastHandlebars(cbFastHandlebars.Checked); + globalSettingsController.SetSaveXml(cbSaveXml.Checked); Response.Redirect(Globals.NavigateURL(), true); } diff --git a/OpenContent/EditGlobalSettings.ascx.designer.cs b/OpenContent/EditGlobalSettings.ascx.designer.cs index 7a3842ef..0916ef2b 100644 --- a/OpenContent/EditGlobalSettings.ascx.designer.cs +++ b/OpenContent/EditGlobalSettings.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Ce code a été généré par un outil. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// //------------------------------------------------------------------------------ namespace Satrabel.OpenContent { @@ -13,173 +13,191 @@ namespace Satrabel.OpenContent { public partial class EditGlobalSettings { /// - /// ScopeWrapper control. + /// Contrôle ScopeWrapper. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.Panel ScopeWrapper; /// - /// lRoles control. + /// Contrôle lRoles. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lRoles; /// - /// ddlRoles control. + /// Contrôle ddlRoles. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.DropDownList ddlRoles; /// - /// lMLContent control. + /// Contrôle lMLContent. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lMLContent; /// - /// cbMLContent control. + /// Contrôle cbMLContent. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.CheckBox cbMLContent; /// - /// lMaxVersions control. + /// Contrôle lMaxVersions. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lMaxVersions; /// - /// ddlMaxVersions control. + /// Contrôle ddlMaxVersions. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.DropDownList ddlMaxVersions; /// - /// lLogging control. + /// Contrôle lLogging. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lLogging; /// - /// ddlLogging control. + /// Contrôle ddlLogging. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.DropDownList ddlLogging; /// - /// lGoogleApiKey control. + /// Contrôle lGoogleApiKey. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lGoogleApiKey; /// - /// tbGoogleApiKey control. + /// Contrôle tbGoogleApiKey. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.TextBox tbGoogleApiKey; /// - /// lEditLayout control. + /// Contrôle lEditLayout. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lEditLayout; /// - /// ddlEditLayout control. + /// Contrôle ddlEditLayout. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.DropDownList ddlEditLayout; /// - /// lLoadBootstrap control. + /// Contrôle lLoadBootstrap. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lLoadBootstrap; /// - /// cbLoadBootstrap control. + /// Contrôle cbLoadBootstrap. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.CheckBox cbLoadBootstrap; /// - /// lFastHandlebars control. + /// Contrôle lFastHandlebars. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.UserControl lFastHandlebars; /// - /// cbFastHandlebars control. + /// Contrôle cbFastHandlebars. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.CheckBox cbFastHandlebars; /// - /// cmdSave control. + /// Contrôle lSaveXml. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. + /// + protected global::System.Web.UI.UserControl lSaveXml; + + /// + /// Contrôle cbSaveXml. + /// + /// + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. + /// + protected global::System.Web.UI.WebControls.CheckBox cbSaveXml; + + /// + /// Contrôle cmdSave. + /// + /// + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.LinkButton cmdSave; /// - /// hlCancel control. + /// Contrôle hlCancel. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.HyperLink hlCancel; } diff --git a/OpenContent/OpenContent.csproj b/OpenContent/OpenContent.csproj index ec9484fa..e53bac31 100644 --- a/OpenContent/OpenContent.csproj +++ b/OpenContent/OpenContent.csproj @@ -1121,6 +1121,7 @@ + diff --git a/OpenContent/OpenContent.dnn b/OpenContent/OpenContent.dnn index 62de4ac7..32a2d1fa 100644 --- a/OpenContent/OpenContent.dnn +++ b/OpenContent/OpenContent.dnn @@ -1,6 +1,6 @@ - + OpenContent OpenContent module by Satrabel.be ~/DesktopModules/OpenContent/Images/icon_extensions.png @@ -40,10 +40,15 @@ 03.02.00.SqlDataProvider 03.02.00 + diff --git a/OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider b/OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider new file mode 100644 index 00000000..bf5f89a0 --- /dev/null +++ b/OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider @@ -0,0 +1,18 @@ +/************************************************************/ +/***** SqlDataProvider *****/ +/***** *****/ +/***** *****/ +/***** Note: To manually execute this script you must *****/ +/***** perform a search and replace operation *****/ +/***** for {databaseOwner} and {objectQualifier} *****/ +/***** *****/ +/************************************************************/ + + +ALTER TABLE {databaseOwner}{objectQualifier}OpenContent_Items + ADD Xml nvarchar(max) NULL +GO + +/************************************************************/ +/***** SqlDataProvider *****/ +/************************************************************/ From 18132de6fb1174590f9df40be68f275cf998cce5 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Tue, 3 Oct 2017 15:52:16 +0200 Subject: [PATCH 05/18] change field type to xml + Generate Xml button in Global settings --- .../EditGlobalSettings.ascx.resx | 3 ++ .../Components/OpenContentController.cs | 24 ++++++++++++-- OpenContent/EditGlobalSettings.ascx | 3 ++ OpenContent/EditGlobalSettings.ascx.cs | 33 +++++++++++++++++++ .../EditGlobalSettings.ascx.designer.cs | 9 +++++ OpenContent/OpenContent.csproj | 2 +- .../SqlDataProvider/03.05.00.SqlDataProvider | 2 +- 7 files changed, 72 insertions(+), 4 deletions(-) diff --git a/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx b/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx index b1b6205c..b425877e 100644 --- a/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx +++ b/OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx @@ -150,4 +150,7 @@ Save Xml + + Generate Xml + \ No newline at end of file diff --git a/OpenContent/Components/OpenContentController.cs b/OpenContent/Components/OpenContentController.cs index e2bc1895..be47abd9 100644 --- a/OpenContent/Components/OpenContentController.cs +++ b/OpenContent/Components/OpenContentController.cs @@ -17,7 +17,7 @@ using DotNetNuke.Entities.Modules; using Satrabel.OpenContent.Components.Common; using DotNetNuke.Entities.Portals; - +using System; namespace Satrabel.OpenContent.Components { @@ -103,12 +103,32 @@ public void UpdateContent(OpenContentInfo content) } } + public void UpdateXmlContent(OpenContentInfo content) + { + ClearDataCache(content); + SynchronizeXml(content); + using (IDataContext ctx = DataContext.Instance()) + { + var rep = ctx.GetRepository(); + rep.Update(content); + ModuleController.SynchronizeModule(content.ModuleId); + } + } + private static void SynchronizeXml(OpenContentInfo content) { if (OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(PortalSettings.Current.PortalId).IsSaveXml() && !string.IsNullOrEmpty(content.Json)) { - content.Xml = Newtonsoft.Json.JsonConvert.DeserializeXNode(content.Json, "root").ToString(); + try + { + content.Xml = Newtonsoft.Json.JsonConvert.DeserializeXNode(content.Json, "root").ToString(); + } + catch (Exception ex) + { + Log.Logger.Error($"Error while Updating penContent Xml data for module {content.ModuleId}, ContentId {content.ContentId}", ex); + } + } else { diff --git a/OpenContent/EditGlobalSettings.ascx b/OpenContent/EditGlobalSettings.ascx index 92cd75a9..a4472a27 100644 --- a/OpenContent/EditGlobalSettings.ascx +++ b/OpenContent/EditGlobalSettings.ascx @@ -55,5 +55,8 @@
  • +
  • + +
diff --git a/OpenContent/EditGlobalSettings.ascx.cs b/OpenContent/EditGlobalSettings.ascx.cs index edcf67e0..65179ca1 100644 --- a/OpenContent/EditGlobalSettings.ascx.cs +++ b/OpenContent/EditGlobalSettings.ascx.cs @@ -30,6 +30,7 @@ protected override void OnInit(EventArgs e) base.OnInit(e); hlCancel.NavigateUrl = Globals.NavigateURL(); cmdSave.Click += cmdSave_Click; + cmdUpgradeXml.Click += cmdUpgradeXml_Click; //cmdCancel.Click += cmdCancel_Click; } protected override void OnLoad(EventArgs e) @@ -75,6 +76,7 @@ protected override void OnLoad(EventArgs e) tbGoogleApiKey.Text = globalSettingsController.GetGoogleApiKey(); cbFastHandlebars.Checked = globalSettingsController.GetFastHandlebars(); cbSaveXml.Checked = globalSettingsController.IsSaveXml(); + cmdUpgradeXml.Visible = cbSaveXml.Checked; } } protected void cmdSave_Click(object sender, EventArgs e) @@ -104,6 +106,37 @@ protected void cmdSave_Click(object sender, EventArgs e) Response.Redirect(Globals.NavigateURL(), true); } + + protected void cmdUpgradeXml_Click(object sender, EventArgs e) + { + var globalSettingsController = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(ModuleContext.PortalId); + if (globalSettingsController.IsSaveXml()) + { + Log.Logger.Info("Updating all OpenContent Xml data for portal " + ModuleContext.PortalId); + try + { + var ctrl = new OpenContentController(); + var modules = DnnUtils.GetDnnOpenContentModules(ModuleContext.PortalId); + foreach (var module in modules) + { + var contents = ctrl.GetContents(module.ModuleId); + foreach (var item in contents) + { + ctrl.UpdateXmlContent(item); + } + } + } + catch (Exception ex) + { + Log.Logger.Error("Error while Updating all OpenContent Xml data for portal " + ModuleContext.PortalId, ex); + } + finally + { + } + Log.Logger.Info("Finished Updating all OpenContent Xml data for portal " + ModuleContext.PortalId); + } + //Response.Redirect(Globals.NavigateURL(), true); + } protected void cmdCancel_Click(object sender, EventArgs e) { } diff --git a/OpenContent/EditGlobalSettings.ascx.designer.cs b/OpenContent/EditGlobalSettings.ascx.designer.cs index 0916ef2b..05fee3cd 100644 --- a/OpenContent/EditGlobalSettings.ascx.designer.cs +++ b/OpenContent/EditGlobalSettings.ascx.designer.cs @@ -200,5 +200,14 @@ public partial class EditGlobalSettings { /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. /// protected global::System.Web.UI.WebControls.HyperLink hlCancel; + + /// + /// Contrôle cmdUpgradeXml. + /// + /// + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdUpgradeXml; } } diff --git a/OpenContent/OpenContent.csproj b/OpenContent/OpenContent.csproj index e53bac31..22107311 100644 --- a/OpenContent/OpenContent.csproj +++ b/OpenContent/OpenContent.csproj @@ -1121,7 +1121,7 @@ - + diff --git a/OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider b/OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider index bf5f89a0..bb2939c2 100644 --- a/OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider +++ b/OpenContent/Providers/DataProviders/SqlDataProvider/03.05.00.SqlDataProvider @@ -10,7 +10,7 @@ ALTER TABLE {databaseOwner}{objectQualifier}OpenContent_Items - ADD Xml nvarchar(max) NULL + ADD Xml xml GO /************************************************************/ From 2bd9f5c9450248b3bb322d6ba083d75eeeb24739 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 9 Oct 2017 23:53:39 +0200 Subject: [PATCH 06/18] new field in filtersettings for date fields : concider time --- OpenContent/Components/Alpaca/FormBuilder.cs | 8 +++++++- OpenContent/Components/Alpaca/QueryBuilder.cs | 13 +++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/OpenContent/Components/Alpaca/FormBuilder.cs b/OpenContent/Components/Alpaca/FormBuilder.cs index 0b85a1b2..51465e38 100644 --- a/OpenContent/Components/Alpaca/FormBuilder.cs +++ b/OpenContent/Components/Alpaca/FormBuilder.cs @@ -203,6 +203,12 @@ private static void GetFields(SchemaConfig newSchemaFilter, OptionsConfig newOpt Title = propTitle + " : until x days in the future" }); fieldLst.Add(propKey); + newProp.Properties.Add("UseTime", new SchemaConfig() + { + Type = "boolean", + Title = propTitle + " Concider time" + }); + /* var newField = new OptionsConfig(); newOptionsFilter.Fields.Add(propKey, newField); @@ -271,7 +277,7 @@ private JObject Build(string key, string currentCultureCode, bool schema, bool o } public FieldConfig BuildIndex(string key) { - string prefix = (string.IsNullOrEmpty(key) || key == "Items") ? "" : key + "-"; + string prefix = (string.IsNullOrEmpty(key) || key == "Items") ? "" : key + "-"; string cacheKey = _templateUri.UrlFolder + prefix + "index.json"; FieldConfig newConfig = (FieldConfig)DataCache.GetCache(cacheKey); if (newConfig == null) diff --git a/OpenContent/Components/Alpaca/QueryBuilder.cs b/OpenContent/Components/Alpaca/QueryBuilder.cs index 9422ffd4..25e14e0c 100644 --- a/OpenContent/Components/Alpaca/QueryBuilder.cs +++ b/OpenContent/Components/Alpaca/QueryBuilder.cs @@ -172,16 +172,25 @@ private QueryBuilder BuildFilter(JObject query, bool addWorkflowFilter, int user { var startDate = DateTime.MinValue; var endDate = DateTime.MaxValue; + var useTime = false; try { - startDate = DateTime.Today.AddDays(-(long)startDays.Value); + useTime = (bool)(valObj["UseTime"] as JValue).Value; } catch (Exception) { } + DateTime currentDateTime = useTime ? DateTime.Now : DateTime.Today; try { - endDate = DateTime.Today.AddDays((long)endDays.Value); + startDate = currentDateTime.AddDays(-(long)startDays.Value); + } + catch (Exception) + { + } + try + { + endDate = currentDateTime.AddDays((long)endDays.Value); } catch (Exception) { From 70dccdcf7fcc16e5e367390ddc202e7f47c5e9f4 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 23 Oct 2017 12:19:46 +0200 Subject: [PATCH 07/18] finish recuring enhancing --- OpenContent/Components/Json/JsonUtils.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenContent/Components/Json/JsonUtils.cs b/OpenContent/Components/Json/JsonUtils.cs index a12f32b7..2d292b76 100644 --- a/OpenContent/Components/Json/JsonUtils.cs +++ b/OpenContent/Components/Json/JsonUtils.cs @@ -239,9 +239,9 @@ public static void LookupJson(JObject o, JObject additionalData, JObject schema, try { var genObj = GenerateObject(additionalData, dataKey, val.ToString(), dataMember, valueField, childrenField); - newArray.Add(genObj); var alpaca = alpacaForAddData(dataKey); LookupJson(genObj, additionalData, alpaca["schema"]?["items"] as JObject, alpaca["options"]?["items"] as JObject, includelabels, includes, objFromCollection, alpacaForAddData, field); + newArray.Add(genObj); } catch (System.Exception) { @@ -301,9 +301,9 @@ public static void LookupJson(JObject o, JObject additionalData, JObject schema, string val = childProperty.Value.ToString(); try { - var obj = GenerateObject(additionalData, dataKey, val, dataMember, valueField, childrenField); - o[childProperty.Name] = obj; + var obj = GenerateObject(additionalData, dataKey, val, dataMember, valueField, childrenField); LookupJson(obj, additionalData, sch, opt, includelabels, includes, objFromCollection, alpacaForAddData, field); + o[childProperty.Name] = obj; } catch (System.Exception) { From bb0e5d1b88c21760d323be5f766541e278875bc6 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 23 Oct 2017 18:50:50 +0200 Subject: [PATCH 08/18] fix for enhance --- OpenContent/Components/Json/JsonUtils.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenContent/Components/Json/JsonUtils.cs b/OpenContent/Components/Json/JsonUtils.cs index 2d292b76..537ba7c0 100644 --- a/OpenContent/Components/Json/JsonUtils.cs +++ b/OpenContent/Components/Json/JsonUtils.cs @@ -301,8 +301,11 @@ public static void LookupJson(JObject o, JObject additionalData, JObject schema, string val = childProperty.Value.ToString(); try { - var obj = GenerateObject(additionalData, dataKey, val, dataMember, valueField, childrenField); - LookupJson(obj, additionalData, sch, opt, includelabels, includes, objFromCollection, alpacaForAddData, field); + var obj = GenerateObject(additionalData, dataKey, val, dataMember, valueField, childrenField); + var alpaca = alpacaForAddData(dataKey); + LookupJson(obj, additionalData, alpaca["schema"]?["items"] as JObject, alpaca["options"]?["items"] as JObject, includelabels, includes, objFromCollection, alpacaForAddData, field); + + //LookupJson(obj, additionalData, sch, opt, includelabels, includes, objFromCollection, alpacaForAddData, field); o[childProperty.Name] = obj; } catch (System.Exception) From 2c21059f67c6c220d3042a68ca23636f0380ed84 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Fri, 27 Oct 2017 11:50:33 +0200 Subject: [PATCH 09/18] file indexer provier system --- OpenContent/Components/Alpaca/FormBuilder.cs | 15 ++++- .../Components/Datasource/IDataIndex.cs | 4 +- .../FileIndexer/FileIndexerManager.cs | 65 +++++++++++++++++++ .../Components/FileIndexer/IFileIndexer.cs | 17 +++++ .../Components/FileIndexer/TextFileIndexer.cs | 58 +++++++++++++++++ .../Lucene/Mapping/JsonObjectMapper.cs | 22 +++++++ .../Components/OpenContentRouteMapper.cs | 2 + OpenContent/OpenContent.csproj | 3 + 8 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 OpenContent/Components/FileIndexer/FileIndexerManager.cs create mode 100644 OpenContent/Components/FileIndexer/IFileIndexer.cs create mode 100644 OpenContent/Components/FileIndexer/TextFileIndexer.cs diff --git a/OpenContent/Components/Alpaca/FormBuilder.cs b/OpenContent/Components/Alpaca/FormBuilder.cs index 51465e38..8bc2f271 100644 --- a/OpenContent/Components/Alpaca/FormBuilder.cs +++ b/OpenContent/Components/Alpaca/FormBuilder.cs @@ -428,12 +428,21 @@ public FieldConfig BuildIndex(string key) Index = true, Sort = true }; - newConfig.Fields.Add(prop.Key, newField); + newConfig.Fields.Add(prop.Key, newField); } - + //else if (optType == "file" || optType == "file2") + //{ + // var newField = new FieldConfig() + // { + // IndexType = "file", + // Index = true, + // Sort = false + // }; + // newConfig.Fields.Add(prop.Key, newField); + //} } //var json = JObject.FromObject(newConfig); - //File.WriteAllText(templateUri.PhysicalFullDirectory + "\\test.json", json.ToString()); + //File.WriteAllText(_templateUri.PhysicalFullDirectory + "\\test.json", json.ToString()); var schemaFile = new FileUri(_templateUri.UrlFolder, prefix + "schema.json"); var optionsFile = new FileUri(_templateUri.UrlFolder, prefix + "options.json"); diff --git a/OpenContent/Components/Datasource/IDataIndex.cs b/OpenContent/Components/Datasource/IDataIndex.cs index 605f12a9..b79e3fa9 100644 --- a/OpenContent/Components/Datasource/IDataIndex.cs +++ b/OpenContent/Components/Datasource/IDataIndex.cs @@ -1,4 +1,5 @@ -using System; +using DotNetNuke.Services.FileSystem; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,5 +9,6 @@ namespace Satrabel.OpenContent.Components.Datasource public interface IDataIndex { void Reindex(DataSourceContext context); + } } diff --git a/OpenContent/Components/FileIndexer/FileIndexerManager.cs b/OpenContent/Components/FileIndexer/FileIndexerManager.cs new file mode 100644 index 00000000..7967082b --- /dev/null +++ b/OpenContent/Components/FileIndexer/FileIndexerManager.cs @@ -0,0 +1,65 @@ +using DotNetNuke.Collections.Internal; +using DotNetNuke.Framework.Reflections; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Satrabel.OpenContent.Components.FileIndexer +{ + public class FileIndexerManager + { + + private static readonly ILogAdapter Logger = AppConfig.Instance.LogAdapter.GetLogAdapter(typeof(FileIndexerManager)); + private static NaiveLockingList _fileIndexers; + + public static void RegisterFileIndexers() + { + _fileIndexers = new NaiveLockingList(); + + foreach (IFileIndexer fi in GetFileIndexers()) + { + _fileIndexers.Add(fi); + } + } + + private static IEnumerable GetFileIndexers() + { + var typeLocator = new TypeLocator(); + IEnumerable types = typeLocator.GetAllMatchingTypes(IsValidDataSourceProvider); + + foreach (Type filterType in types) + { + IFileIndexer filter; + try + { + filter = Activator.CreateInstance(filterType) as IFileIndexer; + } + catch (Exception e) + { + Logger.Error($"Unable to create {filterType.FullName} while GetFileIndexers. {e.Message}"); + filter = null; + } + + if (filter != null) + { + yield return filter; + } + } + } + + private static bool IsValidDataSourceProvider(Type t) + { + return t != null && t.IsClass && !t.IsAbstract && t.IsVisible && typeof(IFileIndexer).IsAssignableFrom(t); + } + + public static IFileIndexer GetFileIndexer(string file) + { + if (string.IsNullOrEmpty(file)) + return null; + + var fileIndexer = _fileIndexers.SingleOrDefault(ds => ds.CanIndex(file)); + return fileIndexer; + } + } + +} \ No newline at end of file diff --git a/OpenContent/Components/FileIndexer/IFileIndexer.cs b/OpenContent/Components/FileIndexer/IFileIndexer.cs new file mode 100644 index 00000000..7813bca9 --- /dev/null +++ b/OpenContent/Components/FileIndexer/IFileIndexer.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace Satrabel.OpenContent.Components.FileIndexer +{ + public interface IFileIndexer + { + // return true if this fileindexer can handle this kind of file (based on the file extension) + bool CanIndex(string file); + + //return a text representation of the content of the file for indexing + string GetContent(string file); + } +} diff --git a/OpenContent/Components/FileIndexer/TextFileIndexer.cs b/OpenContent/Components/FileIndexer/TextFileIndexer.cs new file mode 100644 index 00000000..328aa5f9 --- /dev/null +++ b/OpenContent/Components/FileIndexer/TextFileIndexer.cs @@ -0,0 +1,58 @@ +using DotNetNuke.Services.FileSystem; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; + +namespace Satrabel.OpenContent.Components.FileIndexer +{ + public class TextFileIndexer : IFileIndexer + { + public bool CanIndex(string file) + { + int fileId = 0; + if (int.TryParse(file, out fileId)) + { + var f = FileManager.Instance.GetFile(fileId); + return f.Extension == "txt"; + } + else + { + var f = FileUri.FromPath(file); + return f.Extension == ".txt"; + } + } + + public string GetContent(string file) + { + int fileId = 0; + if (int.TryParse(file, out fileId)) + { + var f = FileManager.Instance.GetFile(fileId); + if (f != null) + { + var fileContent = FileManager.Instance.GetFileContent(f); + if (fileContent != null) + { + using (var reader = new StreamReader(fileContent, Encoding.UTF8)) + { + return reader.ReadToEnd(); + } + } + } + return ""; + } + else + { + var f = FileUri.FromPath(file); + if (f.FileExists) + { + return File.ReadAllText(f.PhysicalFilePath); + } + return ""; + } + } + } +} \ No newline at end of file diff --git a/OpenContent/Components/Lucene/Mapping/JsonObjectMapper.cs b/OpenContent/Components/Lucene/Mapping/JsonObjectMapper.cs index f80ac524..51e16abc 100644 --- a/OpenContent/Components/Lucene/Mapping/JsonObjectMapper.cs +++ b/OpenContent/Components/Lucene/Mapping/JsonObjectMapper.cs @@ -8,6 +8,8 @@ using Satrabel.OpenContent.Components.Json; using Satrabel.OpenContent.Components.Lucene.Config; using Lucene.Net.QueryParsers; +using Satrabel.OpenContent.Components.FileIndexer; +using System.IO; namespace Satrabel.OpenContent.Components.Lucene.Mapping { @@ -177,6 +179,26 @@ private static void Add(Document doc, string prefix, JToken token, FieldConfig f doc.Add(new Field("@" + prefix, HtmlUtils.Clean(Truncate(value.Value.ToString(), 100), true), Field.Store.NO, Field.Index.NOT_ANALYZED)); } } + else if (fieldconfig != null && fieldconfig.IndexType == "file") + { + var val = value.Value.ToString(); + if (!string.IsNullOrEmpty(val)) + { + var fileIndexer = FileIndexerManager.GetFileIndexer(val); + if (fileIndexer != null) + { + var content = fileIndexer.GetContent(val); + if (index) + { + doc.Add(new Field(prefix, content, Field.Store.NO, Field.Index.ANALYZED)); + } + if (sort) + { + doc.Add(new Field("@" + prefix, Truncate(content, 100), Field.Store.NO, Field.Index.NOT_ANALYZED)); + } + } + } + } else { if (index) diff --git a/OpenContent/Components/OpenContentRouteMapper.cs b/OpenContent/Components/OpenContentRouteMapper.cs index 34081b07..890d5933 100644 --- a/OpenContent/Components/OpenContentRouteMapper.cs +++ b/OpenContent/Components/OpenContentRouteMapper.cs @@ -11,6 +11,7 @@ using DotNetNuke.Web.Api; using Satrabel.OpenContent.Components.Datasource; +using Satrabel.OpenContent.Components.FileIndexer; using System.Web.Http; #endregion @@ -53,6 +54,7 @@ public void RegisterRoutes(IMapRoute mapRouteManager) ); DataSourceManager.RegisterDataSources(); + FileIndexerManager.RegisterFileIndexers(); } } } diff --git a/OpenContent/OpenContent.csproj b/OpenContent/OpenContent.csproj index 22107311..e59e029b 100644 --- a/OpenContent/OpenContent.csproj +++ b/OpenContent/OpenContent.csproj @@ -179,12 +179,15 @@ + + + From 58ce531cfa6ccd01e5b241504caeaee7fff494b7 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Wed, 1 Nov 2017 11:51:43 +0100 Subject: [PATCH 10/18] email notifications on add/update and delete --- OpenContent/App_LocalResources/View.ascx.resx | 3 + OpenContent/BuildScripts/ModuleDeploy.targets | 3 +- .../BuildScripts/ModulePackage.targets | 3 +- .../Datasource/OpenContentDataSource.cs | 19 ++- OpenContent/EditNotifications.ascx | 26 +++++ OpenContent/EditNotifications.ascx.cs | 43 +++++++ .../EditNotifications.ascx.designer.cs | 42 +++++++ OpenContent/OpenContent.csproj | 10 ++ OpenContent/OpenContent.dnn | 11 ++ OpenContent/View.ascx.cs | 15 ++- OpenContent/notifications-options.json | 104 +++++++++++++++++ OpenContent/notifications-schema.json | 110 ++++++++++++++++++ 12 files changed, 385 insertions(+), 4 deletions(-) create mode 100644 OpenContent/EditNotifications.ascx create mode 100644 OpenContent/EditNotifications.ascx.cs create mode 100644 OpenContent/EditNotifications.ascx.designer.cs create mode 100644 OpenContent/notifications-options.json create mode 100644 OpenContent/notifications-schema.json diff --git a/OpenContent/App_LocalResources/View.ascx.resx b/OpenContent/App_LocalResources/View.ascx.resx index f29c84d8..8ea5fb49 100644 --- a/OpenContent/App_LocalResources/View.ascx.resx +++ b/OpenContent/App_LocalResources/View.ascx.resx @@ -214,4 +214,7 @@ <br> </p> + + Notifications + \ No newline at end of file diff --git a/OpenContent/BuildScripts/ModuleDeploy.targets b/OpenContent/BuildScripts/ModuleDeploy.targets index 134ce60c..eac08236 100644 --- a/OpenContent/BuildScripts/ModuleDeploy.targets +++ b/OpenContent/BuildScripts/ModuleDeploy.targets @@ -28,7 +28,8 @@ - + + diff --git a/OpenContent/BuildScripts/ModulePackage.targets b/OpenContent/BuildScripts/ModulePackage.targets index 562c7887..0476a937 100644 --- a/OpenContent/BuildScripts/ModulePackage.targets +++ b/OpenContent/BuildScripts/ModulePackage.targets @@ -25,7 +25,8 @@ - + + diff --git a/OpenContent/Components/Datasource/OpenContentDataSource.cs b/OpenContent/Components/Datasource/OpenContentDataSource.cs index eeebee84..12beef41 100644 --- a/OpenContent/Components/Datasource/OpenContentDataSource.cs +++ b/OpenContent/Components/Datasource/OpenContentDataSource.cs @@ -304,10 +304,11 @@ public virtual void Add(DataSourceContext context, JToken data) LuceneController.Instance.Add(content, indexConfig); LuceneController.Instance.Store.Commit(); } + Notify(context, data, "add"); } public virtual void Update(DataSourceContext context, IDataItem item, JToken data) { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(); var content = (OpenContentInfo)item.Item; content.Title = data["Title"]?.ToString() ?? ""; content.Json = data.ToString(); @@ -322,7 +323,22 @@ public virtual void Update(DataSourceContext context, IDataItem item, JToken dat LuceneController.Instance.Store.Commit(); } ClearUrlRewriterCache(context); + Notify(context, data, "update"); } + + private static void Notify(DataSourceContext context, JToken data, string action) + { + if (context.Options?["Notifications"] is JArray) + { + var notifData = new JObject(); + notifData["form"] = data.DeepClone(); + notifData["form"]["action"] = action; + notifData["formSettings"] = new JObject(); + notifData["formSettings"] = context.Options; + FormUtils.FormSubmit(notifData); + } + } + public virtual void Delete(DataSourceContext context, IDataItem item) { OpenContentController ctrl = new OpenContentController(); @@ -334,6 +350,7 @@ public virtual void Delete(DataSourceContext context, IDataItem item) LuceneController.Instance.Store.Commit(); } ClearUrlRewriterCache(context); + Notify(context, content.JsonAsJToken, "delete"); } ///
diff --git a/OpenContent/EditNotifications.ascx b/OpenContent/EditNotifications.ascx new file mode 100644 index 00000000..1217127a --- /dev/null +++ b/OpenContent/EditNotifications.ascx @@ -0,0 +1,26 @@ +<%@ Control Language="C#" AutoEventWireup="false" Inherits="Satrabel.OpenContent.EditNotifications" CodeBehind="EditNotifications.ascx.cs" %> +<%@ Import Namespace="Newtonsoft.Json" %> + + +
+
    +
  • + +
  • +
  • + +
  • + +
+
+ + diff --git a/OpenContent/EditNotifications.ascx.cs b/OpenContent/EditNotifications.ascx.cs new file mode 100644 index 00000000..d6511619 --- /dev/null +++ b/OpenContent/EditNotifications.ascx.cs @@ -0,0 +1,43 @@ +#region Copyright + +// +// Copyright (c) 2015 +// by Satrabel +// + +#endregion + +#region Using Statements + +using System; +using DotNetNuke.Entities.Modules; +using DotNetNuke.Common; +using Satrabel.OpenContent.Components; +using Satrabel.OpenContent.Components.Alpaca; +using Satrabel.OpenContent.Components.Lucene; + +#endregion + +namespace Satrabel.OpenContent +{ + public partial class EditNotifications : PortalModuleBase + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + hlCancel.NavigateUrl = Globals.NavigateURL(); + cmdSave.NavigateUrl = Globals.NavigateURL(); + OpenContentSettings settings = this.OpenContentSettings(); + AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, "DeskTopModules/OpenContent", "notifications"); + //AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext, "", ""); + alpaca.RegisterAll(true, true); + string itemId = null; + AlpacaContext = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null); + AlpacaContext.Bootstrap = true; + AlpacaContext.Horizontal = true; + } + + public AlpacaContext AlpacaContext { get; private set; } + } +} + diff --git a/OpenContent/EditNotifications.ascx.designer.cs b/OpenContent/EditNotifications.ascx.designer.cs new file mode 100644 index 00000000..3f50fbf9 --- /dev/null +++ b/OpenContent/EditNotifications.ascx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// Ce code a été généré par un outil. +// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// +//------------------------------------------------------------------------------ + +namespace Satrabel.OpenContent { + + + public partial class EditNotifications { + + /// + /// Contrôle ScopeWrapper. + /// + /// + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. + /// + protected global::System.Web.UI.WebControls.Panel ScopeWrapper; + + /// + /// Contrôle cmdSave. + /// + /// + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. + /// + protected global::System.Web.UI.WebControls.HyperLink cmdSave; + + /// + /// Contrôle hlCancel. + /// + /// + /// Champ généré automatiquement. + /// Pour modifier, déplacez la déclaration de champ du fichier de concepteur dans le fichier code-behind. + /// + protected global::System.Web.UI.WebControls.HyperLink hlCancel; + } +} diff --git a/OpenContent/OpenContent.csproj b/OpenContent/OpenContent.csproj index e59e029b..d3303e0c 100644 --- a/OpenContent/OpenContent.csproj +++ b/OpenContent/OpenContent.csproj @@ -370,6 +370,13 @@ + + EditNotifications.ascx + ASPXCodeBehind + + + EditNotifications.ascx + EditFormSettings.ascx @@ -566,6 +573,7 @@ + @@ -1125,6 +1133,8 @@ + + diff --git a/OpenContent/OpenContent.dnn b/OpenContent/OpenContent.dnn index 32a2d1fa..037f1d9c 100644 --- a/OpenContent/OpenContent.dnn +++ b/OpenContent/OpenContent.dnn @@ -180,6 +180,17 @@ 0 True + + Notifications + DesktopModules/OpenContent/EditNotifications.ascx + False + Notifications + Admin + + + 0 + True + EditGlobalSettings DesktopModules/OpenContent/EditGlobalSettings.ascx diff --git a/OpenContent/View.ascx.cs b/OpenContent/View.ascx.cs index ea2ec004..6ecd0efc 100644 --- a/OpenContent/View.ascx.cs +++ b/OpenContent/View.ascx.cs @@ -470,7 +470,20 @@ public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions true, false); } - + //Edit Form Settings + if (templateDefined) + { + actions.Add(ModuleContext.GetNextActionID(), + Localization.GetString("Notifications.Action", LocalResourceFile), + ModuleActionType.ContentOptions, + "", + "~/DesktopModules/OpenContent/images/editsettings2.png", + ModuleContext.EditUrl("notifications"), + false, + SecurityAccessLevel.Admin, + true, + false); + } //Switch Template actions.Add(ModuleContext.GetNextActionID(), Localization.GetString("EditInit.Action", LocalResourceFile), diff --git a/OpenContent/notifications-options.json b/OpenContent/notifications-options.json new file mode 100644 index 00000000..6c16f796 --- /dev/null +++ b/OpenContent/notifications-options.json @@ -0,0 +1,104 @@ +{ + "fields": { + "Notifications": { + "type": "accordion", + "titleField": "EmailSubject", + "items": { + "fields": { + "From": { + "title": "From", + "type": "select", + "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ], + "removeDefaultNone": true + }, + "FromName": { + "dependencies": { + "From": "custom" + }, + "helper": "Name part of the email address" + }, + "FromEmail": { + "type": "email", + "dependencies": { + "From": "custom" + } + }, + "FromNameField": { + "dependencies": { + "From": "form" + }, + "helper": "Form field where the name is extracted" + }, + "FromEmailField": { + "dependencies": { + "From": "form" + }, + "helper": "Form field where the email is extracted" + }, + "To": { + "type": "select", + "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ], + "removeDefaultNone": true + }, + "ToName": { + "dependencies": { + "To": "custom" + }, + "helper": "Name part of the email address" + }, + "ToEmail": { + "type": "email", + "dependencies": { + "To": "custom" + } + }, + "ToNameField": { + "dependencies": { + "To": "form" + }, + "helper": "Form field where the name is extracted" + }, + "ToEmailField": { + "dependencies": { + "To": "form" + }, + "helper": "Form field where the email is extracted" + }, + "ReplyTo": { + "type": "select", + "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ] + }, + "ReplyToName": { + "dependencies": { + "ReplyTo": "custom" + }, + "helper": "Name part of the email address" + }, + "ReplyToEmail": { + "type": "email", + "dependencies": { + "ReplyTo": "custom" + } + }, + "ReplyToNameField": { + "dependencies": { + "ReplyTo": "form" + }, + "helper": "Form field where the name is extracted" + }, + "ReplyToEmailField": { + "dependencies": { + "ReplyTo": "form" + }, + "helper": "Form field where the email is extracted" + }, + "EmailSubject": { + }, + "EmailBody": { + "type": "summernote" + } + } + } + } + } +} diff --git a/OpenContent/notifications-schema.json b/OpenContent/notifications-schema.json new file mode 100644 index 00000000..5a2c05ad --- /dev/null +++ b/OpenContent/notifications-schema.json @@ -0,0 +1,110 @@ +{ + "type": "object", + "properties": { + "Notifications": { + "title": "Email Notifications on add, update and delete", + "type": "array", + "items": { + "type": "object", + "default": { + "FromNameField": "Name", + "FromEmailField": "Email", + "ToNameField": "Name", + "ToEmailField": "Email", + "ReplyToNameField": "Name", + "ReplyToEmailField": "Email" + }, + "properties": { + "From": { + "title": "From", + "type": "string", + "enum": [ "host", "admin", "form", "custom", "current" ] + }, + "FromName": { + "title": "From Name", + "type": "string", + "dependencies": "From" + }, + "FromEmail": { + "title": "From Email", + "type": "string", + "dependencies": "From" + }, + "FromNameField": { + "title": "From Name Field", + "type": "string", + "dependencies": "From" + }, + "FromEmailField": { + "title": "From Email Field", + "type": "string", + "dependencies": "From" + }, + "To": { + "title": "To", + "type": "string", + "enum": [ "host", "admin", "form", "custom", "current" ] + }, + "ToName": { + "title": "To Name", + "type": "string", + "dependencies": "To" + }, + "ToEmail": { + "title": "To Email", + "type": "string", + "required": true, + "dependencies": "To" + }, + "ToNameField": { + "title": "To Name Field", + "type": "string", + "dependencies": "To", + "default": "Name" + }, + "ToEmailField": { + "title": "To Email Field", + "type": "string", + "dependencies": "To", + "default": "Email" + }, + "ReplyTo": { + "title": "ReplyTo", + "type": "string", + "enum": [ "host", "admin", "form", "custom", "current" ] + }, + "ReplyToName": { + "title": "ReplyTo Name", + "type": "string", + "dependencies": "ReplyTo" + }, + "ReplyToEmail": { + "title": "ReplyTo Email", + "type": "string", + "dependencies": "ReplyTo" + }, + "ReplyToNameField": { + "title": "ReplyTo Name Field", + "type": "string", + "dependencies": "ReplyTo" + }, + "ReplyToEmailField": { + "title": "ReplyTo Email Field", + "type": "string", + "dependencies": "ReplyTo", + "default": "Email" + }, + "EmailSubject": { + "title": "Email subject", + "type": "string" + }, + "EmailBody": { + "title": "Email body", + "type": "string" + } + } + } + } + + } +} \ No newline at end of file From 57f6fb97b7f0cde223a537a7a5ea4d56df214b69 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Wed, 1 Nov 2017 11:52:35 +0100 Subject: [PATCH 11/18] indexable fields selection in formbuilder --- OpenContent/AlpacaFormBuilder.ascx | 7 +- .../Components/OpenContentAPIController.cs | 28 +- OpenContent/js/builder/formbuilder.js | 951 +++++++++++------- 3 files changed, 594 insertions(+), 392 deletions(-) diff --git a/OpenContent/AlpacaFormBuilder.ascx b/OpenContent/AlpacaFormBuilder.ascx index e06f5fa4..5da42430 100644 --- a/OpenContent/AlpacaFormBuilder.ascx +++ b/OpenContent/AlpacaFormBuilder.ascx @@ -84,6 +84,10 @@ ContactForm = true; } + if (getData.key == "") { + Indexable = true; + } + BootstrapForm = <%= AlpacaContext.Bootstrap ? "true" : "false"%>; BootstrapHorizontal = <%= AlpacaContext.Horizontal ? "true" : "false"%>; @@ -113,7 +117,8 @@ var schema = getSchema(data); var options = getOptions(data); var view = getView(data); - var postData = JSON.stringify({ 'data': data, 'schema': schema, 'options': options, 'view': view, 'key': $("#<%=ddlForms.ClientID %>").val() }); + var index = getIndex(data); + var postData = JSON.stringify({ 'data': data, 'schema': schema, 'options': options, 'view': view, 'index': index, 'key': $("#<%=ddlForms.ClientID %>").val() }); var action = "UpdateBuilder"; $.ajax({ type: "POST", diff --git a/OpenContent/Components/OpenContentAPIController.cs b/OpenContent/Components/OpenContentAPIController.cs index 74d89a91..ba49cfac 100644 --- a/OpenContent/Components/OpenContentAPIController.cs +++ b/OpenContent/Components/OpenContentAPIController.cs @@ -587,6 +587,8 @@ public HttpResponseMessage Update(JObject json) { return Request.CreateResponse(HttpStatusCode.Unauthorized); } + + AddNotifyInfo(dsContext); try { if (dsItem == null) @@ -632,6 +634,15 @@ public HttpResponseMessage Update(JObject json) } } + private void AddNotifyInfo(DataSourceContext dsContext) + { + string jsonSettings = ActiveModule.ModuleSettings["notifications"] as string; + if (!string.IsNullOrEmpty(jsonSettings)) + { + dsContext.Options = new JObject(); + dsContext.Options = JObject.Parse(jsonSettings); + } + } [HttpPost] [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] @@ -733,7 +744,7 @@ public HttpResponseMessage Delete(JObject json) { return Request.CreateResponse(HttpStatusCode.Unauthorized); } - + AddNotifyInfo(dsContext); if (content != null) { ds.Delete(dsContext, content); @@ -824,17 +835,30 @@ public HttpResponseMessage UpdateBuilder(JObject json) var schema = json["schema"].ToString(); var options = json["options"].ToString(); var view = json["view"].ToString(); + var index = json["index"].ToString(); var data = json["data"].ToString(); var datafile = new FileUri(settings.TemplateDir.UrlFolder + prefix + "builder.json"); var schemafile = new FileUri(settings.TemplateDir.UrlFolder + prefix + "schema.json"); var optionsfile = new FileUri(settings.TemplateDir.UrlFolder + prefix + "options.json"); var viewfile = new FileUri(settings.TemplateDir.UrlFolder + prefix + "view.json"); + var indexfile = new FileUri(settings.TemplateDir.UrlFolder + prefix + "index.json"); try { File.WriteAllText(datafile.PhysicalFilePath, data); File.WriteAllText(schemafile.PhysicalFilePath, schema); File.WriteAllText(optionsfile.PhysicalFilePath, options); File.WriteAllText(viewfile.PhysicalFilePath, view); + if (string.IsNullOrEmpty(index)) + { + if (indexfile.FileExists) + { + File.Delete(indexfile.PhysicalFilePath); + } + } + else + { + File.WriteAllText(indexfile.PhysicalFilePath, index); + } } catch (Exception ex) { @@ -845,7 +869,7 @@ public HttpResponseMessage UpdateBuilder(JObject json) } return Request.CreateResponse(HttpStatusCode.OK, new { - isValid = true + isValid = true }); } catch (Exception exc) diff --git a/OpenContent/js/builder/formbuilder.js b/OpenContent/js/builder/formbuilder.js index f95064ac..2a5cfc86 100644 --- a/OpenContent/js/builder/formbuilder.js +++ b/OpenContent/js/builder/formbuilder.js @@ -65,7 +65,7 @@ function getBuilder(schema, options) { } */ function getSchema(formdef) { - var sch = null; + var sch = null; var schema = { //"title": "Form preview", "type": "object", @@ -110,7 +110,7 @@ function getSchema(formdef) { "documents": "array", "object": "object", "folder2": "string", - "file2": "string", + "file2": "string", "url2": "string", "role2": "string", "image2": "string", @@ -132,7 +132,7 @@ function getSchema(formdef) { prop.required = true; prop.default = "2099-12-31"; } - if (value.title ) { + if (value.title) { prop.title = value.title; } if (value.fieldtype == "relation" && value.relationoptions && value.relationoptions.many) { @@ -153,7 +153,7 @@ function getSchema(formdef) { } if (value.required) { prop.required = value.required; - } + } if (value.default) { prop.default = value.default; } @@ -168,17 +168,17 @@ function getSchema(formdef) { if (!value.subfields) { prop.items = {}; - /* - } else if (value.fieldtype == "array" && value.subfields.length == 1) { - var listOldSchema = oldSchema && oldSchema.items ? oldSchema.items : null; - var listindex = 0; - var listvalue = value.subfields[0]; - var listprop = baseProps(listindex, listvalue, listOldSchema); - if (!listvalue.fieldname) { - listvalue.fieldname = 'field_' + listindex; - } - prop.items = listprop; - */ + /* + } else if (value.fieldtype == "array" && value.subfields.length == 1) { + var listOldSchema = oldSchema && oldSchema.items ? oldSchema.items : null; + var listindex = 0; + var listvalue = value.subfields[0]; + var listprop = baseProps(listindex, listvalue, listOldSchema); + if (!listvalue.fieldname) { + listvalue.fieldname = 'field_' + listindex; + } + prop.items = listprop; + */ } else { prop.items = { //"title": "Field", @@ -238,7 +238,7 @@ var baseFields = function (index, value, oldOptions) { var field = { "type": value.fieldtype }; - + if (value.multilanguage) { field.type = "ml" + field.type; @@ -305,7 +305,7 @@ var baseFields = function (index, value, oldOptions) { return v.text; }); } - + if (value.fieldtype == "radio") { field.vertical = value.vertical; } @@ -333,17 +333,17 @@ var baseFields = function (index, value, oldOptions) { //field.toolbarSticky = true; if (!value.subfields) { field.items = {}; - /* - } else if (value.fieldtype == "array" && value.subfields.length == 1) { - var listOldOptions = oldOptions && oldOptions.items ? oldOptions.items : null; - var listindex = 0; - var listvalue = value.subfields[0]; - var listfield = baseFields(listindex, listvalue, listOldOptions); - if (!listvalue.fieldname) { - listvalue.fieldname = 'field_' + listindex; - } - field.items = listfield; - */ + /* + } else if (value.fieldtype == "array" && value.subfields.length == 1) { + var listOldOptions = oldOptions && oldOptions.items ? oldOptions.items : null; + var listindex = 0; + var listvalue = value.subfields[0]; + var listfield = baseFields(listindex, listvalue, listOldOptions); + if (!listvalue.fieldname) { + listvalue.fieldname = 'field_' + listindex; + } + field.items = listfield; + */ } else { field.items = { @@ -394,7 +394,7 @@ function getOptions(formdef) { var fields = options.fields; if (formdef.formtype == "array") { options = { - "type":"accordion", + "type": "accordion", "items": { "type": "object", "fields": {} @@ -408,11 +408,163 @@ function getOptions(formdef) { var field = baseFields(index, value, oldOptions); fields[value.fieldname] = field; - }); - } + }); + } return options; } +var baseIndexFields = function (index, value, oldOptions) { + + var indextypes = { + "text": "text", + "number": "float", + "select": "key", + "radio": "key", + "checkbox": "boolean", + "email": "text", + "textarea": "text", + "array": "array", + "table": "array", + "accordion": "array", + "multicheckbox": "key", + "file": "file", + "url": "text", + "image": "text", + "icon": "text", + "guid": "text", + "wysihtml": "html", + "summernote": "html", + "ckeditor": "html", + "address": "object", + "relation": "key", + "gallery": "array", + "documents": "array", + "object": "object", + "folder2": "string", + "file2": "file", + "url2": "text", + "role2": "key", + "image2": "key", + "imagecrop": "text", + "date": "datetime" + }; + + var field = { + "indexType": indextypes[value.fieldtype] + }; + if (value.index) { + field.index = true; + field.sort = true; + } + if (value.multilanguage) { + field.multilanguage = true; + } + if (value.fieldtype == "relation" && value.relationoptions && value.relationoptions.many) { + if (value.index) { + field.type = "array"; + field.items = { + "indexType": "key", + "index": true, + "sort": true + }; + } + } + else if (value.fieldtype == "role2" && value.many) { + if (value.index) { + field.type = "array"; + field.items = { + "indexType": "key", + "index": true, + "sort": true + }; + } + } + else if (value.fieldtype == "documents") { + if (value.index) { + field.type = "array"; + field.items = { + fields : { + "Title": { + "index": true, + "sort": true, + "indexType": "text" + }, + "File": { + "indexType": "file", + "index": true, + "sort": true + }, + } + }; + } + } + else if (field.indexType == "array") { + if (!value.subfields) { + field.items = {}; + } else { + field.items = { + "fields": {} + }; + $.each(value.subfields, function (listindex, listvalue) { + var listOldOptions = oldOptions && oldOptions.items && oldOptions.items.fields ? oldOptions.items.fields[listvalue.fieldname] : null; + var listfield = baseIndexFields(listindex, listvalue, listOldOptions); + if (!listvalue.fieldname) { + listvalue.fieldname = 'field_' + listindex; + } + field.items.fields[listvalue.fieldname] = listfield; + if (listfield.index) field.index = true; + }); + } + } + else if (value.fieldtype == "object") { + //field.toolbarSticky = true; + if (!value.subfields) { + field.fields = {}; + } else { + field.fields = { + }; + $.each(value.subfields, function (objectindex, objectvalue) { + var objectOldOptions = oldOptions && oldOptions.fields ? oldOptions.fields[objectvalue.fieldname] : null; + var objectfield = baseIndexFields(objectindex, objectvalue, objectOldOptions); + if (!objectvalue.fieldname) { + objectvalue.fieldname = 'field_' + objectindex; + } + field.fields[objectvalue.fieldname] = objectfield; + if (objectvalue.index) field.index = true; + }); + } + } + if (oldOptions) { + return $.extend(false, {}, oldOptions, field); + } + else { + return field; + } +}; + +function getIndex(formdef) { + if (!Indexable) return ""; + + var opts = null; + var options = { + "fields": {} + }; + var fields = options.fields; + + if (formdef.formfields) { + $.each(formdef.formfields, function (index, value) { + var oldOptions = opts && opts.fields ? opts.fields[value.fieldname] : null; + + var field = baseIndexFields(index, value, oldOptions); + if (field.index) options.index = true; + fields[value.fieldname] = field; + }); + } + if (options.index) + return options; + else + return ""; +} function getViewTemplate(row, cols) { var t = '
'; @@ -421,10 +573,10 @@ function getViewTemplate(row, cols) { } t += '
'; return t; -} +} function getView(formdef) { - + var view = { "parent": BootstrapForm ? (BootstrapHorizontal ? "dnnbootstrap-edit-horizontal" : "dnnbootstrap-edit") : "dnn-edit", "layout": { @@ -433,11 +585,11 @@ function getView(formdef) { } } }; - + if (formdef.formtype == "array") { return { parent: view.parent }; } - + if (formdef.formfields) { var row = 0; var lastCols = 0; @@ -448,7 +600,7 @@ function getView(formdef) { row++; template += getViewTemplate(row, cols); lastCols = cols; - + } var col = value.position ? value.position[4] : 1; view.layout.bindings[value.fieldname] = "#pos_" + row + "_" + col; @@ -460,6 +612,7 @@ function getView(formdef) { } var ContactForm = false; +var Indexable = false; var BootstrapForm = false; var BootstrapHorizontal = false; @@ -467,7 +620,12 @@ function showForm(value) { if (ContactForm) { fieldSchema.properties.fieldtype.enum.splice(9); fieldOptions.fieldtype.optionLabels.splice(9); - } + } + + if (!Indexable) { + delete fieldSchema.properties.index; + } + if (BootstrapForm && $.fn.select2) { $.fn.select2.defaults.set("theme", "bootstrap"); } @@ -483,6 +641,8 @@ function showForm(value) { var schema = getSchema(value); var options = getOptions(value); + var index = getIndex(value); + console.log(index); var view = getView(value); var config = { "schema": schema, @@ -508,407 +668,420 @@ function showForm(value) { } var fieldSchema = -{ - //"title": "Field", - "type": "object", - "properties": { - "fieldname": { - "type": "string", - "title": "Field name", - "pattern": "^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$" - }, - "title": { - "type": "string", - "title": "Label" - }, - "fieldtype": { - "type": "string", - "default": "text", - "required": true, - "title": "Type", - "enum": ["text", "checkbox", "multicheckbox", "select", "radio", "textarea", "email", "date", "number", - "image", "file", "url", "icon", "guid", "address", - "array", "table", "accordion", "relation", - "folder2", "file2", "url2","role2", "image2", - "imagecrop", - "wysihtml", "summernote", "ckeditor", "gallery", "documents", "object" /*, + { + //"title": "Field", + "type": "object", + "properties": { + "fieldname": { + "type": "string", + "title": "Field name", + "pattern": "^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$" + }, + "title": { + "type": "string", + "title": "Label" + }, + "fieldtype": { + "type": "string", + "default": "text", + "required": true, + "title": "Type", + "enum": ["text", "checkbox", "multicheckbox", "select", "radio", "textarea", "email", "date", "number", + "image", "file", "url", "icon", "guid", "address", + "array", "table", "accordion", "relation", + "folder2", "file2", "url2", "role2", "image2", + "imagecrop", + "wysihtml", "summernote", "ckeditor", "gallery", "documents", "object" /*, "publishstatus", "publishstartdate", "publishenddate"*/] - }, - "vertical": { - "type": "boolean", - "dependencies": "fieldtype" - }, - "fieldoptions": { - "type": "array", - "title": "Options", - "items": { + }, + "vertical": { + "type": "boolean", + "dependencies": "fieldtype" + }, + "fieldoptions": { + "type": "array", + "title": "Options", + "items": { + "type": "object", + "properties": { + "value": { + "title": "Value", + "type": "string" + }, + "text": { + "title": "Text", + "type": "string" + } + } + }, + "dependencies": "fieldtype" + }, + "subfields": { + "type": "array", + "title": "Fields", + "dependencies": "fieldtype" + }, + "relationoptions": { + "type": "object", + "title": "Relation Options", + "dependencies": "fieldtype", + "properties": { + "many": { + "type": "boolean", + "title": "Many" + }, + "datakey": { + "type": "string", + "title": "Additional Data Key" + }, + "valuefield": { + "type": "string", + "title": "Value Field" + }, + "textfield": { + "type": "string", + "title": "Text Field" + }, + } + }, + "dateoptions": { + "type": "object", + "title": "Date Options", + "dependencies": "fieldtype", + "properties": { + "format": { + "type": "string", + "title": "Format (momentjs)" + }, + "minDate": { + "type": "string", + "title": "Min date (iso)" + }, + "maxDate": { + "type": "string", + "title": "Max date (iso)" + } + } + }, + "fileoptions": { + "type": "object", + "title": "File Options", + "dependencies": "fieldtype", + "properties": { + "folder": { + "type": "string", + "title": "Folder" + } + } + }, + "file2options": { + "type": "object", + "title": "File Options", + "dependencies": "fieldtype", + "properties": { + "folder": { + "type": "string", + "title": "Folder" + }, + "filter": { + "type": "string", + "title": "Filter pattern" + } + } + }, + "folder2options": { "type": "object", + "title": "Folder Options", + "dependencies": "fieldtype", "properties": { - "value": { - "title": "Value", - "type": "string" + "folder": { + "type": "string", + "title": "Folder" }, - "text": { - "title": "Text", - "type": "string" + "filter": { + "type": "string", + "title": "Filter pattern" } } }, - "dependencies": "fieldtype" + "imageoptions": { + "type": "object", + "title": "Image Options", + "dependencies": "fieldtype", + "properties": { + "folder": { + "type": "string", + "title": "Folder" + } + } + }, + "image2options": { + "type": "object", + "title": "Image Options", + "dependencies": "fieldtype", + "properties": { + "folder": { + "type": "string", + "title": "Folder" + } + } + }, + "imagecropoptions": { + "type": "object", + "title": "Crop Options", + "dependencies": "fieldtype", + "properties": { + "ratio": { + "type": "number", + "title": "Ratio" + } + } + }, + "iconoptions": { + "type": "object", + "title": "Icon Options", + "dependencies": "fieldtype", + "properties": { + "glyphicons": { + "type": "boolean", + "title": "Glyphicons" + }, + "bootstrap": { + "type": "boolean", + "title": "Bootstrap" + }, + "fontawesome": { + "type": "boolean", + "title": "Fontawesome", + "default": true + } + } + }, + "many": { + "type": "boolean", + "title": "Many", + "dependencies": "fieldtype" + }, + "advanced": { + "type": "boolean", + "title": "Advanced" + }, + "required": { + "type": "boolean", + "dependencies": "advanced" + }, + "hidden": { + "type": "boolean", + "dependencies": "advanced" + }, + "default": { + "title": "Default", + "type": "string", + "dependencies": "advanced" + }, + "helper": { + "type": "string", + "title": "Helper", + "dependencies": "advanced" + }, + "placeholder": { + "type": "string", + "title": "Placeholder", + "dependencies": ["fieldtype", "advanced"] + }, + "multilanguage": { + "type": "boolean", + "dependencies": ["fieldtype", "advanced"] + }, + "index": { + "type": "boolean", + "dependencies": ["fieldtype", "advanced"] + }, + "position": { + "type": "string", + "title": "Position", + "dependencies": ["advanced"], + "enum": ["1col1", "2col1", "2col2", "3col1", "3col2", "3col3"] + }, + "dependencies": { + "type": "array", + "title": "Dependencies", + "items": { + "type": "object", + "properties": { + "fieldname": { + "title": "Field", + "type": "string" + }, + "values": { + "title": "Values (value1, value2, ...)", + "type": "string" + } + } + }, + "dependencies": ["advanced"] + } + } + }; + +fieldSchema.properties.subfields.items = fieldSchema; + +var fieldOptions = + { + "multilanguage": { + "label": "Multi language", + "dependencies": { + "advanced": [true], + "fieldtype": ["text", "textarea", "ckeditor", "file", "image", "url", "wysihtml", "summernote", "file2", "url2", "role2", "image2"] + } + }, + "index": { + "label": "Index", + "dependencies": { + "advanced": [true], + "fieldtype": ["text", "checkbox", "multicheckbox", "select", "radio", "textarea", "email", "date", "number", + "file", "url", "icon", "guid", "address", "relation", "file2", "url2", "role2", + "wysihtml", "summernote", "ckeditor", "documents"] + } + }, + "placeholder": { + "dependencies": { + "advanced": [true], + "fieldtype": ["email", "text", "textarea"] + } + }, + "fieldname": { + "showMessages": false + //"fieldClass":"fieldname" + }, + "fieldtype": { + "optionLabels": ["Text", "Checkbox", "Multi checkbox", "Dropdown list (select)", "Radio buttons", "Text area", "Email address", "Date", "Number", + "Image (upload & autocomplete)", "File (upload & autocomplete)", "Url (autocomplete for pages)", "Font Awesome Icons", "Guid (auto id)", "Address (autocomplete & geocode)", + "List (Panels)", "List (Table)", "List (Accordion)", "Relation (Additional Data)", + "Folder2 (folderID)", "File2 (fileID)", "Url2 (tabID)", "Role2 (roleID)", "Image2 (fileID)", + "Image (with croppper)", + "Html (Wysihtml)", "Html (Summernote)", "Html (CK Editor)", "Image Gallery", "Documents", "Group (object)" /*, + "Publish status", "Publish start date", "Publish end date"*/] + }, + "fieldoptions": { + "type": "table", + "dependencies": { + "fieldtype": ["select", "radio", "multicheckbox"] + } + }, + "many": { + "dependencies": { + "fieldtype": ["role2"] + } + }, + "position": { + "optionLabels": ["1 column", "2 columns - left", "2 columns - right", "3 columns - left", "3 columns - middle", "3 columns - right"], + "vertical": false, + "removeDefaultNone": true + }, + "required": { + "label": "Required" + }, + "hidden": { + "label": "Hidden" + }, + "vertical": { + "label": "Vertical", + "dependencies": { + "fieldtype": "radio" + } }, "subfields": { - "type": "array", - "title": "Fields", - "dependencies": "fieldtype" + "collapsible": true, + "type": "accordion", + "items": { + "fieldClass": "listfielddiv", + "titleField": "fieldname" + }, + "dependencies": { + "fieldtype": ["array", "table", "accordion", "object"] + } }, "relationoptions": { - "type": "object", - "title": "Relation Options", - "dependencies": "fieldtype", - "properties": { - "many": { - "type": "boolean", - "title": "Many" - }, + "collapsible": true, + "dependencies": { + "fieldtype": ["relation"] + }, + "fields": { "datakey": { - "type": "string", - "title": "Additional Data Key" + }, "valuefield": { - "type": "string", - "title": "Value Field" + }, "textfield": { - "type": "string", - "title": "Text Field" - }, + + } } }, "dateoptions": { - "type": "object", - "title": "Date Options", - "dependencies": "fieldtype", - "properties": { + "collapsible": true, + "dependencies": { + "fieldtype": ["date"] + }, + "fields": { "format": { - "type": "string", - "title": "Format (momentjs)" + }, "minDate": { - "type": "string", - "title": "Min date (iso)" + }, "maxDate": { - "type": "string", - "title": "Max date (iso)" + } } }, "fileoptions": { - "type": "object", - "title": "File Options", - "dependencies": "fieldtype", - "properties": { - "folder": { - "type": "string", - "title": "Folder" - } + "collapsible": true, + "dependencies": { + "fieldtype": ["file"] } }, "file2options": { - "type": "object", - "title": "File Options", - "dependencies": "fieldtype", - "properties": { - "folder": { - "type": "string", - "title": "Folder" - }, - "filter": { - "type": "string", - "title": "Filter pattern" - } + "collapsible": true, + "dependencies": { + "fieldtype": ["file2"] } }, "folder2options": { - "type": "object", - "title": "Folder Options", - "dependencies": "fieldtype", - "properties": { - "folder": { - "type": "string", - "title": "Folder" - }, - "filter": { - "type": "string", - "title": "Filter pattern" - } + "collapsible": true, + "dependencies": { + "fieldtype": ["folder2"] } }, "imageoptions": { - "type": "object", - "title": "Image Options", - "dependencies": "fieldtype", - "properties": { - "folder": { - "type": "string", - "title": "Folder" - } + "collapsible": true, + "dependencies": { + "fieldtype": ["image"] } }, "image2options": { - "type": "object", - "title": "Image Options", - "dependencies": "fieldtype", - "properties": { - "folder": { - "type": "string", - "title": "Folder" - } + "collapsible": true, + "dependencies": { + "fieldtype": ["image2"] } }, "imagecropoptions": { - "type": "object", - "title": "Crop Options", - "dependencies": "fieldtype", - "properties": { - "ratio": { - "type": "number", - "title": "Ratio" - } + "collapsible": true, + "dependencies": { + "fieldtype": ["imagecrop"] } }, "iconoptions": { - "type": "object", - "title": "Icon Options", - "dependencies": "fieldtype", - "properties": { - "glyphicons": { - "type": "boolean", - "title": "Glyphicons" - }, - "bootstrap": { - "type": "boolean", - "title": "Bootstrap" - }, - "fontawesome": { - "type": "boolean", - "title": "Fontawesome", - "default": true - } - } - }, - "many": { - "type": "boolean", - "title": "Many", - "dependencies": "fieldtype" - }, - "advanced": { - "type": "boolean", - "title": "Advanced" - }, - "required": { - "type": "boolean", - "dependencies": "advanced" - }, - "hidden": { - "type": "boolean", - "dependencies": "advanced" - }, - "default": { - "title": "Default", - "type": "string", - "dependencies": "advanced" - }, - "helper": { - "type": "string", - "title": "Helper", - "dependencies": "advanced" - }, - "placeholder": { - "type": "string", - "title": "Placeholder", - "dependencies": ["fieldtype", "advanced"] - }, - "multilanguage": { - "type": "boolean", - "dependencies": ["fieldtype", "advanced"] - }, - "position": { - "type": "string", - "title": "Position", - "dependencies": ["advanced"], - "enum": ["1col1", "2col1", "2col2", "3col1", "3col2", "3col3"] - }, - "dependencies": { - "type": "array", - "title": "Dependencies", - "items": { - "type": "object", - "properties": { - "fieldname": { - "title": "Field", - "type": "string" - }, - "values": { - "title": "Values (value1, value2, ...)", - "type": "string" - } - } - }, - "dependencies": ["advanced"] - } - } -}; - -fieldSchema.properties.subfields.items = fieldSchema; - -var fieldOptions = -{ - "multilanguage": { - "label": "Multi language", - "dependencies": { - "advanced": [true], - "fieldtype": ["text", "textarea", "ckeditor", "file", "image", "url", "wysihtml", "summernote", "file2", "url2", "role2", "image2"] - } - }, - "placeholder": { - "dependencies": { - "advanced": [true], - "fieldtype": ["email", "text", "textarea"] - } - }, - "fieldname": { - "showMessages": false - //"fieldClass":"fieldname" - }, - "fieldtype": { - "optionLabels": ["Text", "Checkbox", "Multi checkbox", "Dropdown list (select)", "Radio buttons", "Text area", "Email address", "Date", "Number", - "Image (upload & autocomplete)", "File (upload & autocomplete)", "Url (autocomplete for pages)", "Font Awesome Icons", "Guid (auto id)", "Address (autocomplete & geocode)", - "List (Panels)", "List (Table)", "List (Accordion)", "Relation (Additional Data)", - "Folder2 (folderID)", "File2 (fileID)", "Url2 (tabID)", "Role2 (roleID)", "Image2 (fileID)", - "Image (with croppper)", - "Html (Wysihtml)", "Html (Summernote)", "Html (CK Editor)", "Image Gallery", "Documents", "Group (object)" /*, - "Publish status", "Publish start date", "Publish end date"*/] - }, - "fieldoptions": { - "type": "table", - "dependencies": { - "fieldtype": ["select", "radio", "multicheckbox"] - } - }, - "many": { - "dependencies": { - "fieldtype": ["role2"] - } - }, - "position": { - "optionLabels": ["1 column", "2 columns - left", "2 columns - right", "3 columns - left", "3 columns - middle", "3 columns - right"], - "vertical": false, - "removeDefaultNone": true - }, - "required": { - "label": "Required" - }, - "hidden": { - "label": "Hidden" - }, - "vertical": { - "label": "Vertical", - "dependencies": { - "fieldtype": "radio" - } - }, - "subfields": { - "collapsible": true, - "type": "accordion", - "items": { - "fieldClass": "listfielddiv", - "titleField": "fieldname" - }, - "dependencies": { - "fieldtype": ["array", "table", "accordion", "object"] - } - }, - "relationoptions": { - "collapsible": true, - "dependencies": { - "fieldtype": ["relation"] - }, - "fields": { - "datakey": { - - }, - "valuefield": { - - }, - "textfield": { - + "collapsible": true, + "dependencies": { + "fieldtype": ["icon"] } - } - }, - "dateoptions": { - "collapsible": true, - "dependencies": { - "fieldtype": ["date"] }, - "fields": { - "format": { - - }, - "minDate": { - - }, - "maxDate": { - - } - } - }, - "fileoptions": { - "collapsible": true, - "dependencies": { - "fieldtype": ["file"] - } - }, - "file2options": { - "collapsible": true, - "dependencies": { - "fieldtype": ["file2"] - } - }, - "folder2options": { - "collapsible": true, - "dependencies": { - "fieldtype": ["folder2"] - } - }, - "imageoptions": { - "collapsible": true, "dependencies": { - "fieldtype": ["image"] + "type": "table" } - }, - "image2options": { - "collapsible": true, - "dependencies": { - "fieldtype": ["image2"] - } - }, - "imagecropoptions": { - "collapsible": true, - "dependencies": { - "fieldtype": ["imagecrop"] - } - }, - "iconoptions": { - "collapsible": true, - "dependencies": { - "fieldtype": ["icon"] - } - }, - "dependencies": { - "type": "table" - } -}; + }; fieldOptions.subfields.items.fields = fieldOptions; @@ -940,7 +1113,7 @@ var formbuilderConfig = { //"collapsible": true, "fieldClass": "fielddiv", "fields": fieldOptions, - "titleField":"fieldname" + "titleField": "fieldname" } }, "formtype": { From b534cb52cd5f4eb1e22f4fca359d42477bc72075 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Wed, 1 Nov 2017 18:01:36 +0100 Subject: [PATCH 12/18] multi language summernote field --- OpenContent/Components/Alpaca/AlpacaEngine.cs | 2 +- OpenContent/OpenContent.csproj | 3 +- .../alpaca/js/fields/dnn/MLSummernoteField.js | 152 +++++++++++++++++ .../alpaca/js/fields/dnn/SummernoteField.js | 3 + OpenContent/alpaca/js/fields/dnn/dnnfields.js | 155 ++++++++++++++++++ .../alpaca/js/fields/dnn/dnnfields.min.js | 2 +- OpenContent/bundleconfig.json | 1 + 7 files changed, 315 insertions(+), 3 deletions(-) create mode 100644 OpenContent/alpaca/js/fields/dnn/MLSummernoteField.js diff --git a/OpenContent/Components/Alpaca/AlpacaEngine.cs b/OpenContent/Components/Alpaca/AlpacaEngine.cs index 82cc65ba..6f5a0f58 100644 --- a/OpenContent/Components/Alpaca/AlpacaEngine.cs +++ b/OpenContent/Components/Alpaca/AlpacaEngine.cs @@ -227,7 +227,7 @@ private void RegisterFields(bool bootstrap) ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/themes/grey-theme/jquery.fonticonpicker.grey.min.css", FileOrder.Css.DefaultPriority); ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/css/glyphicons/glyphicons.css", FileOrder.Css.DefaultPriority + 1); } - if (allFields || fieldTypes.Contains("summernote")) + if (allFields || fieldTypes.Contains("summernote") || fieldTypes.Contains("mlsummernote")) { ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/summernote/summernote.min.js", FileOrder.Js.DefaultPriority, "DnnPageHeaderProvider"); ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/summernote/summernote.css", FileOrder.Css.DefaultPriority); diff --git a/OpenContent/OpenContent.csproj b/OpenContent/OpenContent.csproj index d3303e0c..8ff6d1dd 100644 --- a/OpenContent/OpenContent.csproj +++ b/OpenContent/OpenContent.csproj @@ -506,11 +506,12 @@ + dnnfields.js - + diff --git a/OpenContent/alpaca/js/fields/dnn/MLSummernoteField.js b/OpenContent/alpaca/js/fields/dnn/MLSummernoteField.js new file mode 100644 index 00000000..a5379956 --- /dev/null +++ b/OpenContent/alpaca/js/fields/dnn/MLSummernoteField.js @@ -0,0 +1,152 @@ +(function ($) { + + var Alpaca = $.alpaca; + + Alpaca.Fields.MLSummernote = Alpaca.Fields.SummernoteField.extend( + /** + * @lends Alpaca.Fields.MLSummernote.prototype + */ + { + + constructor: function (container, data, options, schema, view, connector) { + var self = this; + this.base(container, data, options, schema, view, connector); + this.culture = connector.culture; + this.defaultCulture = connector.defaultCulture; + this.rootUrl = connector.rootUrl; + }, + + /** + * @see Alpaca.Fields.MLSummernote#setup + */ + setup: function () { + if (this.data && Alpaca.isObject(this.data)) { + this.olddata = this.data; + } else if (this.data) { + this.olddata = {}; + this.olddata[this.defaultCulture] = this.data; + } + + if (this.culture != this.defaultCulture && this.olddata && this.olddata[this.defaultCulture]) { + this.options.placeholder = this.olddata[this.defaultCulture]; + } else { + this.options.placeholder = ""; + } + + this.base(); + }, + + /** + * @see Alpaca.Fields.MLSummernote#getValue + */ + getValue: function () { + var val = this.base(); + var self = this; + var o = {}; + if (this.olddata && Alpaca.isObject(this.olddata)) { + $.each(this.olddata, function (key, value) { + var v = Alpaca.copyOf(value); + if (key != self.culture) { + o[key] = v; + } + }); + } + if (val != "") { + o[self.culture] = val; + } + if ($.isEmptyObject(o)) { + return ""; + } + return o; + }, + + /** + * @see Alpaca.Fields.MLSummernote#setValue + */ + setValue: function (val) { + if (val === "") { + return; + } + if (!val) { + this.base(""); + return; + } + if (Alpaca.isObject(val)) { + var v = val[this.culture]; + if (!v) { + this.base(""); + return; + } + this.base(v); + } + else + { + this.base(val); + } + }, + afterRenderControl: function (model, callback) { + var self = this; + this.base(model, function () { + self.handlePostRender(function () { + callback(); + }); + }); + }, + handlePostRender: function (callback) { + var self = this; + var el = this.getControlEl(); + $(this.control.get(0)).after(''); + callback(); + }, + + /** + * @see Alpaca.Fields.MLSummernote#getTitle + */ + getTitle: function () { + return "Multi Language CKEditor Field"; + }, + + /** + * @see Alpaca.Fields.MLSummernote#getDescription + */ + getDescription: function () { + return "Multi Language CKEditor field ."; + }, + + /** + * @private + * @see Alpaca.Fields.MLSummernote#getSchemaOfOptions + */ + getSchemaOfOptions: function () { + return Alpaca.merge(this.base(), { + "properties": { + "separator": { + "title": "Separator", + "description": "Separator used to split tags.", + "type": "string", + "default": "," + } + } + }); + }, + + /** + * @private + * @see Alpaca.Fields.MLSummernote#getOptionsForOptions + */ + getOptionsForOptions: function () { + return Alpaca.merge(this.base(), { + "fields": { + "separator": { + "type": "text" + } + } + }); + } + + /* end_builder_helpers */ + }); + + Alpaca.registerFieldClass("mlsummernote", Alpaca.Fields.MLSummernote); + +})(jQuery); \ No newline at end of file diff --git a/OpenContent/alpaca/js/fields/dnn/SummernoteField.js b/OpenContent/alpaca/js/fields/dnn/SummernoteField.js index 5387a233..0c20b11e 100644 --- a/OpenContent/alpaca/js/fields/dnn/SummernoteField.js +++ b/OpenContent/alpaca/js/fields/dnn/SummernoteField.js @@ -32,6 +32,9 @@ focus: true }; } + if ( this.options.placeholder) { + this.options.summernote = this.options.placeholder; + } }, afterRenderControl: function (model, callback) { diff --git a/OpenContent/alpaca/js/fields/dnn/dnnfields.js b/OpenContent/alpaca/js/fields/dnn/dnnfields.js index df3ff79f..0a4e7e18 100644 --- a/OpenContent/alpaca/js/fields/dnn/dnnfields.js +++ b/OpenContent/alpaca/js/fields/dnn/dnnfields.js @@ -11754,6 +11754,9 @@ focus: true }; } + if ( this.options.placeholder) { + this.options.summernote = this.options.placeholder; + } }, afterRenderControl: function (model, callback) { @@ -11830,6 +11833,158 @@ Alpaca.registerFieldClass("summernote", Alpaca.Fields.SummernoteField); +})(jQuery); +(function ($) { + + var Alpaca = $.alpaca; + + Alpaca.Fields.MLSummernote = Alpaca.Fields.SummernoteField.extend( + /** + * @lends Alpaca.Fields.MLSummernote.prototype + */ + { + + constructor: function (container, data, options, schema, view, connector) { + var self = this; + this.base(container, data, options, schema, view, connector); + this.culture = connector.culture; + this.defaultCulture = connector.defaultCulture; + this.rootUrl = connector.rootUrl; + }, + + /** + * @see Alpaca.Fields.MLSummernote#setup + */ + setup: function () { + if (this.data && Alpaca.isObject(this.data)) { + this.olddata = this.data; + } else if (this.data) { + this.olddata = {}; + this.olddata[this.defaultCulture] = this.data; + } + + if (this.culture != this.defaultCulture && this.olddata && this.olddata[this.defaultCulture]) { + this.options.placeholder = this.olddata[this.defaultCulture]; + } else { + this.options.placeholder = ""; + } + + this.base(); + }, + + /** + * @see Alpaca.Fields.MLSummernote#getValue + */ + getValue: function () { + var val = this.base(); + var self = this; + var o = {}; + if (this.olddata && Alpaca.isObject(this.olddata)) { + $.each(this.olddata, function (key, value) { + var v = Alpaca.copyOf(value); + if (key != self.culture) { + o[key] = v; + } + }); + } + if (val != "") { + o[self.culture] = val; + } + if ($.isEmptyObject(o)) { + return ""; + } + return o; + }, + + /** + * @see Alpaca.Fields.MLSummernote#setValue + */ + setValue: function (val) { + if (val === "") { + return; + } + if (!val) { + this.base(""); + return; + } + if (Alpaca.isObject(val)) { + var v = val[this.culture]; + if (!v) { + this.base(""); + return; + } + this.base(v); + } + else + { + this.base(val); + } + }, + afterRenderControl: function (model, callback) { + var self = this; + this.base(model, function () { + self.handlePostRender(function () { + callback(); + }); + }); + }, + handlePostRender: function (callback) { + var self = this; + var el = this.getControlEl(); + $(this.control.get(0)).after(''); + callback(); + }, + + /** + * @see Alpaca.Fields.MLSummernote#getTitle + */ + getTitle: function () { + return "Multi Language CKEditor Field"; + }, + + /** + * @see Alpaca.Fields.MLSummernote#getDescription + */ + getDescription: function () { + return "Multi Language CKEditor field ."; + }, + + /** + * @private + * @see Alpaca.Fields.MLSummernote#getSchemaOfOptions + */ + getSchemaOfOptions: function () { + return Alpaca.merge(this.base(), { + "properties": { + "separator": { + "title": "Separator", + "description": "Separator used to split tags.", + "type": "string", + "default": "," + } + } + }); + }, + + /** + * @private + * @see Alpaca.Fields.MLSummernote#getOptionsForOptions + */ + getOptionsForOptions: function () { + return Alpaca.merge(this.base(), { + "fields": { + "separator": { + "type": "text" + } + } + }); + } + + /* end_builder_helpers */ + }); + + Alpaca.registerFieldClass("mlsummernote", Alpaca.Fields.MLSummernote); + })(jQuery); (function ($) { diff --git a/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js b/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js index 65468f9d..a2ad61aa 100644 --- a/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js +++ b/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js @@ -1 +1 @@ -(function(n){function r(t,i){var r="";return t&&t.address_components&&n.each(t.address_components,function(t,u){n.each(u.types,function(n,t){if(t==i){r=u.long_name;return}});r!=""}),r}function u(t){var i="";return t&&t.address_components&&n.each(t.address_components,function(t,r){n.each(r.types,function(n,t){if(t=="country"){i=r.short_name;return}});i!=""}),i}function f(n){for(n=n.toUpperCase(),index=0;index<\/div>').appendTo(t),o=n('
Geocode Address<\/a>').appendTo(t),o.button&&o.button({text:!0}),o.click(function(){if(google&&google.maps){var i=new google.maps.Geocoder,r=e.getAddress();i&&i.geocode({address:r},function(i,r){r===google.maps.GeocoderStatus.OK?(n(".alpaca-field.lng input.alpaca-control",t).val(i[0].geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i[0].geometry.location.lat())):e.displayMessage("Geocoding failed: "+r)})}else e.displayMessage("Google Map API is not installed.");return!1}).wrap(""),s=n(".alpaca-field.googlesearch input.alpaca-control",t)[0],s&&typeof google!="undefined"&&google&&google.maps&&(h=new google.maps.places.SearchBox(s),google.maps.event.addListener(h,"places_changed",function(){var e=h.getPlaces(),i;e.length!=0&&(i=e[0],n(".alpaca-field.postalcode input.alpaca-control",t).val(r(i,"postal_code")),n(".alpaca-field.city input.alpaca-control",t).val(r(i,"locality")),n(".alpaca-field.street input.alpaca-control",t).val(r(i,"route")),n(".alpaca-field.number input.alpaca-control",t).val(r(i,"street_number")),n(".alpaca-field.country select.alpaca-control",t).val(f(u(i,"country"))),n(".alpaca-field.lng input.alpaca-control",t).val(i.geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i.geometry.location.lat()),s.value="")}),google.maps.event.addDomListener(s,"keydown",function(n){n.keyCode==13&&n.preventDefault()})),e.options.showMapOnLoad&&o.click());i()})},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Address with Street, City, State, Postal code and Country. Also comes with support for Google map."},getSchemaOfOptions:function(){return i.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return i.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t=[{countryName:"Afghanistan",iso2:"AF",iso3:"AFG",phoneCode:"93"},{countryName:"Albania",iso2:"AL",iso3:"ALB",phoneCode:"355"},{countryName:"Algeria",iso2:"DZ",iso3:"DZA",phoneCode:"213"},{countryName:"American Samoa",iso2:"AS",iso3:"ASM",phoneCode:"1 684"},{countryName:"Andorra",iso2:"AD",iso3:"AND",phoneCode:"376"},{countryName:"Angola",iso2:"AO",iso3:"AGO",phoneCode:"244"},{countryName:"Anguilla",iso2:"AI",iso3:"AIA",phoneCode:"1 264"},{countryName:"Antarctica",iso2:"AQ",iso3:"ATA",phoneCode:"672"},{countryName:"Antigua and Barbuda",iso2:"AG",iso3:"ATG",phoneCode:"1 268"},{countryName:"Argentina",iso2:"AR",iso3:"ARG",phoneCode:"54"},{countryName:"Armenia",iso2:"AM",iso3:"ARM",phoneCode:"374"},{countryName:"Aruba",iso2:"AW",iso3:"ABW",phoneCode:"297"},{countryName:"Australia",iso2:"AU",iso3:"AUS",phoneCode:"61"},{countryName:"Austria",iso2:"AT",iso3:"AUT",phoneCode:"43"},{countryName:"Azerbaijan",iso2:"AZ",iso3:"AZE",phoneCode:"994"},{countryName:"Bahamas",iso2:"BS",iso3:"BHS",phoneCode:"1 242"},{countryName:"Bahrain",iso2:"BH",iso3:"BHR",phoneCode:"973"},{countryName:"Bangladesh",iso2:"BD",iso3:"BGD",phoneCode:"880"},{countryName:"Barbados",iso2:"BB",iso3:"BRB",phoneCode:"1 246"},{countryName:"Belarus",iso2:"BY",iso3:"BLR",phoneCode:"375"},{countryName:"Belgium",iso2:"BE",iso3:"BEL",phoneCode:"32"},{countryName:"Belize",iso2:"BZ",iso3:"BLZ",phoneCode:"501"},{countryName:"Benin",iso2:"BJ",iso3:"BEN",phoneCode:"229"},{countryName:"Bermuda",iso2:"BM",iso3:"BMU",phoneCode:"1 441"},{countryName:"Bhutan",iso2:"BT",iso3:"BTN",phoneCode:"975"},{countryName:"Bolivia",iso2:"BO",iso3:"BOL",phoneCode:"591"},{countryName:"Bosnia and Herzegovina",iso2:"BA",iso3:"BIH",phoneCode:"387"},{countryName:"Botswana",iso2:"BW",iso3:"BWA",phoneCode:"267"},{countryName:"Brazil",iso2:"BR",iso3:"BRA",phoneCode:"55"},{countryName:"British Indian Ocean Territory",iso2:"IO",iso3:"IOT",phoneCode:""},{countryName:"British Virgin Islands",iso2:"VG",iso3:"VGB",phoneCode:"1 284"},{countryName:"Brunei",iso2:"BN",iso3:"BRN",phoneCode:"673"},{countryName:"Bulgaria",iso2:"BG",iso3:"BGR",phoneCode:"359"},{countryName:"Burkina Faso",iso2:"BF",iso3:"BFA",phoneCode:"226"},{countryName:"Burma (Myanmar)",iso2:"MM",iso3:"MMR",phoneCode:"95"},{countryName:"Burundi",iso2:"BI",iso3:"BDI",phoneCode:"257"},{countryName:"Cambodia",iso2:"KH",iso3:"KHM",phoneCode:"855"},{countryName:"Cameroon",iso2:"CM",iso3:"CMR",phoneCode:"237"},{countryName:"Canada",iso2:"CA",iso3:"CAN",phoneCode:"1"},{countryName:"Cape Verde",iso2:"CV",iso3:"CPV",phoneCode:"238"},{countryName:"Cayman Islands",iso2:"KY",iso3:"CYM",phoneCode:"1 345"},{countryName:"Central African Republic",iso2:"CF",iso3:"CAF",phoneCode:"236"},{countryName:"Chad",iso2:"TD",iso3:"TCD",phoneCode:"235"},{countryName:"Chile",iso2:"CL",iso3:"CHL",phoneCode:"56"},{countryName:"China",iso2:"CN",iso3:"CHN",phoneCode:"86"},{countryName:"Christmas Island",iso2:"CX",iso3:"CXR",phoneCode:"61"},{countryName:"Cocos (Keeling) Islands",iso2:"CC",iso3:"CCK",phoneCode:"61"},{countryName:"Colombia",iso2:"CO",iso3:"COL",phoneCode:"57"},{countryName:"Comoros",iso2:"KM",iso3:"COM",phoneCode:"269"},{countryName:"Cook Islands",iso2:"CK",iso3:"COK",phoneCode:"682"},{countryName:"Costa Rica",iso2:"CR",iso3:"CRC",phoneCode:"506"},{countryName:"Croatia",iso2:"HR",iso3:"HRV",phoneCode:"385"},{countryName:"Cuba",iso2:"CU",iso3:"CUB",phoneCode:"53"},{countryName:"Cyprus",iso2:"CY",iso3:"CYP",phoneCode:"357"},{countryName:"Czech Republic",iso2:"CZ",iso3:"CZE",phoneCode:"420"},{countryName:"Democratic Republic of the Congo",iso2:"CD",iso3:"COD",phoneCode:"243"},{countryName:"Denmark",iso2:"DK",iso3:"DNK",phoneCode:"45"},{countryName:"Djibouti",iso2:"DJ",iso3:"DJI",phoneCode:"253"},{countryName:"Dominica",iso2:"DM",iso3:"DMA",phoneCode:"1 767"},{countryName:"Dominican Republic",iso2:"DO",iso3:"DOM",phoneCode:"1 809"},{countryName:"Ecuador",iso2:"EC",iso3:"ECU",phoneCode:"593"},{countryName:"Egypt",iso2:"EG",iso3:"EGY",phoneCode:"20"},{countryName:"El Salvador",iso2:"SV",iso3:"SLV",phoneCode:"503"},{countryName:"Equatorial Guinea",iso2:"GQ",iso3:"GNQ",phoneCode:"240"},{countryName:"Eritrea",iso2:"ER",iso3:"ERI",phoneCode:"291"},{countryName:"Estonia",iso2:"EE",iso3:"EST",phoneCode:"372"},{countryName:"Ethiopia",iso2:"ET",iso3:"ETH",phoneCode:"251"},{countryName:"Falkland Islands",iso2:"FK",iso3:"FLK",phoneCode:"500"},{countryName:"Faroe Islands",iso2:"FO",iso3:"FRO",phoneCode:"298"},{countryName:"Fiji",iso2:"FJ",iso3:"FJI",phoneCode:"679"},{countryName:"Finland",iso2:"FI",iso3:"FIN",phoneCode:"358"},{countryName:"France",iso2:"FR",iso3:"FRA",phoneCode:"33"},{countryName:"French Polynesia",iso2:"PF",iso3:"PYF",phoneCode:"689"},{countryName:"Gabon",iso2:"GA",iso3:"GAB",phoneCode:"241"},{countryName:"Gambia",iso2:"GM",iso3:"GMB",phoneCode:"220"},{countryName:"Gaza Strip",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Georgia",iso2:"GE",iso3:"GEO",phoneCode:"995"},{countryName:"Germany",iso2:"DE",iso3:"DEU",phoneCode:"49"},{countryName:"Ghana",iso2:"GH",iso3:"GHA",phoneCode:"233"},{countryName:"Gibraltar",iso2:"GI",iso3:"GIB",phoneCode:"350"},{countryName:"Greece",iso2:"GR",iso3:"GRC",phoneCode:"30"},{countryName:"Greenland",iso2:"GL",iso3:"GRL",phoneCode:"299"},{countryName:"Grenada",iso2:"GD",iso3:"GRD",phoneCode:"1 473"},{countryName:"Guam",iso2:"GU",iso3:"GUM",phoneCode:"1 671"},{countryName:"Guatemala",iso2:"GT",iso3:"GTM",phoneCode:"502"},{countryName:"Guinea",iso2:"GN",iso3:"GIN",phoneCode:"224"},{countryName:"Guinea-Bissau",iso2:"GW",iso3:"GNB",phoneCode:"245"},{countryName:"Guyana",iso2:"GY",iso3:"GUY",phoneCode:"592"},{countryName:"Haiti",iso2:"HT",iso3:"HTI",phoneCode:"509"},{countryName:"Holy See (Vatican City)",iso2:"VA",iso3:"VAT",phoneCode:"39"},{countryName:"Honduras",iso2:"HN",iso3:"HND",phoneCode:"504"},{countryName:"Hong Kong",iso2:"HK",iso3:"HKG",phoneCode:"852"},{countryName:"Hungary",iso2:"HU",iso3:"HUN",phoneCode:"36"},{countryName:"Iceland",iso2:"IS",iso3:"IS",phoneCode:"354"},{countryName:"India",iso2:"IN",iso3:"IND",phoneCode:"91"},{countryName:"Indonesia",iso2:"ID",iso3:"IDN",phoneCode:"62"},{countryName:"Iran",iso2:"IR",iso3:"IRN",phoneCode:"98"},{countryName:"Iraq",iso2:"IQ",iso3:"IRQ",phoneCode:"964"},{countryName:"Ireland",iso2:"IE",iso3:"IRL",phoneCode:"353"},{countryName:"Isle of Man",iso2:"IM",iso3:"IMN",phoneCode:"44"},{countryName:"Israel",iso2:"IL",iso3:"ISR",phoneCode:"972"},{countryName:"Italy",iso2:"IT",iso3:"ITA",phoneCode:"39"},{countryName:"Ivory Coast",iso2:"CI",iso3:"CIV",phoneCode:"225"},{countryName:"Jamaica",iso2:"JM",iso3:"JAM",phoneCode:"1 876"},{countryName:"Japan",iso2:"JP",iso3:"JPN",phoneCode:"81"},{countryName:"Jersey",iso2:"JE",iso3:"JEY",phoneCode:""},{countryName:"Jordan",iso2:"JO",iso3:"JOR",phoneCode:"962"},{countryName:"Kazakhstan",iso2:"KZ",iso3:"KAZ",phoneCode:"7"},{countryName:"Kenya",iso2:"KE",iso3:"KEN",phoneCode:"254"},{countryName:"Kiribati",iso2:"KI",iso3:"KIR",phoneCode:"686"},{countryName:"Kosovo",iso2:"",iso3:"",phoneCode:"381"},{countryName:"Kuwait",iso2:"KW",iso3:"KWT",phoneCode:"965"},{countryName:"Kyrgyzstan",iso2:"KG",iso3:"KGZ",phoneCode:"996"},{countryName:"Laos",iso2:"LA",iso3:"LAO",phoneCode:"856"},{countryName:"Latvia",iso2:"LV",iso3:"LVA",phoneCode:"371"},{countryName:"Lebanon",iso2:"LB",iso3:"LBN",phoneCode:"961"},{countryName:"Lesotho",iso2:"LS",iso3:"LSO",phoneCode:"266"},{countryName:"Liberia",iso2:"LR",iso3:"LBR",phoneCode:"231"},{countryName:"Libya",iso2:"LY",iso3:"LBY",phoneCode:"218"},{countryName:"Liechtenstein",iso2:"LI",iso3:"LIE",phoneCode:"423"},{countryName:"Lithuania",iso2:"LT",iso3:"LTU",phoneCode:"370"},{countryName:"Luxembourg",iso2:"LU",iso3:"LUX",phoneCode:"352"},{countryName:"Macau",iso2:"MO",iso3:"MAC",phoneCode:"853"},{countryName:"Macedonia",iso2:"MK",iso3:"MKD",phoneCode:"389"},{countryName:"Madagascar",iso2:"MG",iso3:"MDG",phoneCode:"261"},{countryName:"Malawi",iso2:"MW",iso3:"MWI",phoneCode:"265"},{countryName:"Malaysia",iso2:"MY",iso3:"MYS",phoneCode:"60"},{countryName:"Maldives",iso2:"MV",iso3:"MDV",phoneCode:"960"},{countryName:"Mali",iso2:"ML",iso3:"MLI",phoneCode:"223"},{countryName:"Malta",iso2:"MT",iso3:"MLT",phoneCode:"356"},{countryName:"Marshall Islands",iso2:"MH",iso3:"MHL",phoneCode:"692"},{countryName:"Mauritania",iso2:"MR",iso3:"MRT",phoneCode:"222"},{countryName:"Mauritius",iso2:"MU",iso3:"MUS",phoneCode:"230"},{countryName:"Mayotte",iso2:"YT",iso3:"MYT",phoneCode:"262"},{countryName:"Mexico",iso2:"MX",iso3:"MEX",phoneCode:"52"},{countryName:"Micronesia",iso2:"FM",iso3:"FSM",phoneCode:"691"},{countryName:"Moldova",iso2:"MD",iso3:"MDA",phoneCode:"373"},{countryName:"Monaco",iso2:"MC",iso3:"MCO",phoneCode:"377"},{countryName:"Mongolia",iso2:"MN",iso3:"MNG",phoneCode:"976"},{countryName:"Montenegro",iso2:"ME",iso3:"MNE",phoneCode:"382"},{countryName:"Montserrat",iso2:"MS",iso3:"MSR",phoneCode:"1 664"},{countryName:"Morocco",iso2:"MA",iso3:"MAR",phoneCode:"212"},{countryName:"Mozambique",iso2:"MZ",iso3:"MOZ",phoneCode:"258"},{countryName:"Namibia",iso2:"NA",iso3:"NAM",phoneCode:"264"},{countryName:"Nauru",iso2:"NR",iso3:"NRU",phoneCode:"674"},{countryName:"Nepal",iso2:"NP",iso3:"NPL",phoneCode:"977"},{countryName:"Netherlands",iso2:"NL",iso3:"NLD",phoneCode:"31"},{countryName:"Netherlands Antilles",iso2:"AN",iso3:"ANT",phoneCode:"599"},{countryName:"New Caledonia",iso2:"NC",iso3:"NCL",phoneCode:"687"},{countryName:"New Zealand",iso2:"NZ",iso3:"NZL",phoneCode:"64"},{countryName:"Nicaragua",iso2:"NI",iso3:"NIC",phoneCode:"505"},{countryName:"Niger",iso2:"NE",iso3:"NER",phoneCode:"227"},{countryName:"Nigeria",iso2:"NG",iso3:"NGA",phoneCode:"234"},{countryName:"Niue",iso2:"NU",iso3:"NIU",phoneCode:"683"},{countryName:"Norfolk Island",iso2:"",iso3:"NFK",phoneCode:"672"},{countryName:"North Korea",iso2:"KP",iso3:"PRK",phoneCode:"850"},{countryName:"Northern Mariana Islands",iso2:"MP",iso3:"MNP",phoneCode:"1 670"},{countryName:"Norway",iso2:"NO",iso3:"NOR",phoneCode:"47"},{countryName:"Oman",iso2:"OM",iso3:"OMN",phoneCode:"968"},{countryName:"Pakistan",iso2:"PK",iso3:"PAK",phoneCode:"92"},{countryName:"Palau",iso2:"PW",iso3:"PLW",phoneCode:"680"},{countryName:"Panama",iso2:"PA",iso3:"PAN",phoneCode:"507"},{countryName:"Papua New Guinea",iso2:"PG",iso3:"PNG",phoneCode:"675"},{countryName:"Paraguay",iso2:"PY",iso3:"PRY",phoneCode:"595"},{countryName:"Peru",iso2:"PE",iso3:"PER",phoneCode:"51"},{countryName:"Philippines",iso2:"PH",iso3:"PHL",phoneCode:"63"},{countryName:"Pitcairn Islands",iso2:"PN",iso3:"PCN",phoneCode:"870"},{countryName:"Poland",iso2:"PL",iso3:"POL",phoneCode:"48"},{countryName:"Portugal",iso2:"PT",iso3:"PRT",phoneCode:"351"},{countryName:"Puerto Rico",iso2:"PR",iso3:"PRI",phoneCode:"1"},{countryName:"Qatar",iso2:"QA",iso3:"QAT",phoneCode:"974"},{countryName:"Republic of the Congo",iso2:"CG",iso3:"COG",phoneCode:"242"},{countryName:"Romania",iso2:"RO",iso3:"ROU",phoneCode:"40"},{countryName:"Russia",iso2:"RU",iso3:"RUS",phoneCode:"7"},{countryName:"Rwanda",iso2:"RW",iso3:"RWA",phoneCode:"250"},{countryName:"Saint Barthelemy",iso2:"BL",iso3:"BLM",phoneCode:"590"},{countryName:"Saint Helena",iso2:"SH",iso3:"SHN",phoneCode:"290"},{countryName:"Saint Kitts and Nevis",iso2:"KN",iso3:"KNA",phoneCode:"1 869"},{countryName:"Saint Lucia",iso2:"LC",iso3:"LCA",phoneCode:"1 758"},{countryName:"Saint Martin",iso2:"MF",iso3:"MAF",phoneCode:"1 599"},{countryName:"Saint Pierre and Miquelon",iso2:"PM",iso3:"SPM",phoneCode:"508"},{countryName:"Saint Vincent and the Grenadines",iso2:"VC",iso3:"VCT",phoneCode:"1 784"},{countryName:"Samoa",iso2:"WS",iso3:"WSM",phoneCode:"685"},{countryName:"San Marino",iso2:"SM",iso3:"SMR",phoneCode:"378"},{countryName:"Sao Tome and Principe",iso2:"ST",iso3:"STP",phoneCode:"239"},{countryName:"Saudi Arabia",iso2:"SA",iso3:"SAU",phoneCode:"966"},{countryName:"Senegal",iso2:"SN",iso3:"SEN",phoneCode:"221"},{countryName:"Serbia",iso2:"RS",iso3:"SRB",phoneCode:"381"},{countryName:"Seychelles",iso2:"SC",iso3:"SYC",phoneCode:"248"},{countryName:"Sierra Leone",iso2:"SL",iso3:"SLE",phoneCode:"232"},{countryName:"Singapore",iso2:"SG",iso3:"SGP",phoneCode:"65"},{countryName:"Slovakia",iso2:"SK",iso3:"SVK",phoneCode:"421"},{countryName:"Slovenia",iso2:"SI",iso3:"SVN",phoneCode:"386"},{countryName:"Solomon Islands",iso2:"SB",iso3:"SLB",phoneCode:"677"},{countryName:"Somalia",iso2:"SO",iso3:"SOM",phoneCode:"252"},{countryName:"South Africa",iso2:"ZA",iso3:"ZAF",phoneCode:"27"},{countryName:"South Korea",iso2:"KR",iso3:"KOR",phoneCode:"82"},{countryName:"Spain",iso2:"ES",iso3:"ESP",phoneCode:"34"},{countryName:"Sri Lanka",iso2:"LK",iso3:"LKA",phoneCode:"94"},{countryName:"Sudan",iso2:"SD",iso3:"SDN",phoneCode:"249"},{countryName:"Suriname",iso2:"SR",iso3:"SUR",phoneCode:"597"},{countryName:"Svalbard",iso2:"SJ",iso3:"SJM",phoneCode:""},{countryName:"Swaziland",iso2:"SZ",iso3:"SWZ",phoneCode:"268"},{countryName:"Sweden",iso2:"SE",iso3:"SWE",phoneCode:"46"},{countryName:"Switzerland",iso2:"CH",iso3:"CHE",phoneCode:"41"},{countryName:"Syria",iso2:"SY",iso3:"SYR",phoneCode:"963"},{countryName:"Taiwan",iso2:"TW",iso3:"TWN",phoneCode:"886"},{countryName:"Tajikistan",iso2:"TJ",iso3:"TJK",phoneCode:"992"},{countryName:"Tanzania",iso2:"TZ",iso3:"TZA",phoneCode:"255"},{countryName:"Thailand",iso2:"TH",iso3:"THA",phoneCode:"66"},{countryName:"Timor-Leste",iso2:"TL",iso3:"TLS",phoneCode:"670"},{countryName:"Togo",iso2:"TG",iso3:"TGO",phoneCode:"228"},{countryName:"Tokelau",iso2:"TK",iso3:"TKL",phoneCode:"690"},{countryName:"Tonga",iso2:"TO",iso3:"TON",phoneCode:"676"},{countryName:"Trinidad and Tobago",iso2:"TT",iso3:"TTO",phoneCode:"1 868"},{countryName:"Tunisia",iso2:"TN",iso3:"TUN",phoneCode:"216"},{countryName:"Turkey",iso2:"TR",iso3:"TUR",phoneCode:"90"},{countryName:"Turkmenistan",iso2:"TM",iso3:"TKM",phoneCode:"993"},{countryName:"Turks and Caicos Islands",iso2:"TC",iso3:"TCA",phoneCode:"1 649"},{countryName:"Tuvalu",iso2:"TV",iso3:"TUV",phoneCode:"688"},{countryName:"Uganda",iso2:"UG",iso3:"UGA",phoneCode:"256"},{countryName:"Ukraine",iso2:"UA",iso3:"UKR",phoneCode:"380"},{countryName:"United Arab Emirates",iso2:"AE",iso3:"ARE",phoneCode:"971"},{countryName:"United Kingdom",iso2:"GB",iso3:"GBR",phoneCode:"44"},{countryName:"United States",iso2:"US",iso3:"USA",phoneCode:"1"},{countryName:"Uruguay",iso2:"UY",iso3:"URY",phoneCode:"598"},{countryName:"US Virgin Islands",iso2:"VI",iso3:"VIR",phoneCode:"1 340"},{countryName:"Uzbekistan",iso2:"UZ",iso3:"UZB",phoneCode:"998"},{countryName:"Vanuatu",iso2:"VU",iso3:"VUT",phoneCode:"678"},{countryName:"Venezuela",iso2:"VE",iso3:"VEN",phoneCode:"58"},{countryName:"Vietnam",iso2:"VN",iso3:"VNM",phoneCode:"84"},{countryName:"Wallis and Futuna",iso2:"WF",iso3:"WLF",phoneCode:"681"},{countryName:"West Bank",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Western Sahara",iso2:"EH",iso3:"ESH",phoneCode:""},{countryName:"Yemen",iso2:"YE",iso3:"YEM",phoneCode:"967"},{countryName:"Zambia",iso2:"ZM",iso3:"ZMB",phoneCode:"260"},{countryName:"Zimbabwe",iso2:"ZW",iso3:"ZWE",phoneCode:"263"}];i.registerFieldClass("address",i.Fields.AddressField)})(jQuery),function(n){var t=n.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data="");this.base();typeof this.options.ckeditor=="undefined"&&(this.options.ckeditor={});typeof this.options.configset=="undefined"&&(this.options.configset="")},afterRenderControl:function(t,i){var r=this;this.base(t,function(){var t,u;if(!r.isDisplayOnly()&&r.control&&typeof CKEDITOR!="undefined"){t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]};r.options.configset=="basic"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="standard"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Table","Smiley","SpecialChar","Iframe"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","ShowBlocks","Source"]}],format_tags:"p;h1;h2;h3;pre;div",extraAllowedContent:"table tr th td caption[*](*);div span(*);",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="full"&&(t={toolbar:[{name:"document",items:["Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About","-","Source"]}],format_tags:"p;h1;h2;h3;pre;div",allowedContentRules:!0,removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]});u=n.extend({},t,r.options.ckeditor);r.on("ready",function(){r.editor||(r.editor=CKEDITOR.replace(n(r.control)[0],u),r.initCKEditorEvents())})}n(r.control).bind("destroyed",function(){if(r.editor){r.editor.removeAllListeners();try{r.editor.destroy(!1)}catch(n){}r.editor=null}});i()})},initCKEditorEvents:function(){var n=this;if(n.editor){n.editor.on("click",function(t){n.onClick.call(n,t);n.trigger("click",t)});n.editor.on("change",function(t){n.onChange();n.triggerWithPropagation("change",t)});n.editor.on("blur",function(t){n.onBlur();n.trigger("blur",t)});n.editor.on("focus",function(t){n.onFocus.call(n,t);n.trigger("focus",t)});n.editor.on("key",function(t){n.onKeyPress.call(n,t);n.trigger("keypress",t)})}},setValue:function(n){var t=this;this.base(n);t.editor&&t.editor.setData(n)},getControlValue:function(){var n=this,t=null;return n.editor&&(t=n.editor.getData()),t},destroy:function(){var n=this;n.editor&&(n.editor.destroy(),n.editor=null);this.base()},getTitle:function(){return"CK Editor"},getDescription:function(){return"Provides an instance of a CK Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{ckeditor:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{ckeditor:{type:"any"}}})}});t.registerFieldClass("ckeditor",t.Fields.CKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return"MM/DD/YYYY"},getDefaultExtraFormats:function(){return[]},setup:function(){var n=this,t;this.base();n.options.picker||(n.options.picker={});typeof n.options.picker.useCurrent=="undefined"&&(n.options.picker.useCurrent=!1);!n.options.dateFormat;n.options.picker.format||(n.options.picker.format=n.options.dateFormat);n.options.picker.extraFormats||(t=n.getDefaultExtraFormats(),t&&(n.options.picker.extraFormats=t));typeof n.options.manualEntry=="undefined"&&(n.options.manualEntry=!1);typeof n.options.icon=="undefined"&&(n.options.icon=!1)},onKeyPress:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},onKeyDown:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},beforeRenderControl:function(n,t){this.field.css("position","relative");t()},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(r.view.type!=="display"){if(t=r.getControlEl(),r.options.icon){r.getControlEl().wrap('
<\/div>');r.getControlEl().after('<\/span><\/span>');var t=r.getControlEl().parent()}if(n.fn.datetimepicker){t.datetimepicker(r.options.picker);r.picker=t.data("DateTimePicker");t.on("dp.change",function(n){setTimeout(function(){r.onChange.call(r,n);r.triggerWithPropagation("change",n)},250)});r.data&&r.picker.date(r.data)}}i()})},getDate:function(){var n=this,t=null;try{t=n.picker?n.picker.date()?n.picker.date()._d:null:new Date(this.getValue())}catch(i){console.error(i)}return t},date:function(){return this.getDate()},onChange:function(){this.base();this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var r=this.base(),n=this.validation,i=this._validateDateFormat();return n.invalidDate={message:i?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:i},r&&n.invalidDate.status},_validateDateFormat:function(){var n=this,r=!0,u,i,t;if(n.options.dateFormat&&(u=n.getValue(),u||n.isRequired())){if(i=[],i.push(n.options.dateFormat),n.options.picker&&n.options.picker.extraFormats)for(t=0;tBootstrap DateTime Picker<\/a>.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dateFormat:{type:"text"},picker:{type:"any"}}})}});t.registerMessages({invalidDate:"Invalid date for format {0}"});t.registerFieldClass("date",t.Fields.DateField);t.registerDefaultFormatFieldMapping("date","date")}(jQuery),function(n){var t=n.alpaca;t.Fields.MultiUploadField=t.Fields.ArrayField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.itemsCount=0},setup:function(){var t,n;if(this.base(),this.options.uploadfolder||(this.options.uploadfolder=""),this.urlfield="",this.options&&this.options.items&&(this.options.items.fields||this.options.items.type)&&this.options.items.type!="image"&&this.options.items.fields)for(t in this.options.items.fields)if(n=this.options.items.fields[t],n.type=="image"||n.type=="mlimage"||n.type=="imagecrop"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="file"||n.type=="mlfile"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="image2"||n.type=="mlimage2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}else if(n.type=="file2"||n.type=="mlfile2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}},afterRenderContainer:function(t,i){var r=this;this.base(t,function(){var t=r.getContainerEl(),f,u;r.isDisplayOnly()||(n('
<\/div>').prependTo(t),f=n('
<\/div><\/div>').prependTo(t),u=n('').prependTo(t),this.wrapper=n("<\/span>"),this.wrapper.text("Upload muliple files"),u.wrap(this.wrapper),r.sf&&u.fileupload({dataType:"json",url:r.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:r.options.uploadfolder},beforeSend:r.sf.setModuleHeaders,change:function(){r.itemsCount=r.children.length},add:function(n,t){t.submit()},progressall:function(t,i){var r=parseInt(i.loaded/i.total*100,10);n(".bar",f).css("width",r+"%").find("span").html(r+"%")},done:function(t,i){i.result&&n.each(i.result,function(n,t){r.handleActionBarAddItemClick(r.itemsCount-1,function(n){var i=n.getValue();r.urlfield==""?i=t.url:i[r.urlfield]=t.url;n.setValue(i)});r.itemsCount++})}}).data("loaded",!0));i()})},getTitle:function(){return"Multi Upload"},getDescription:function(){return"Multi Upload for images and files"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("multiupload",t.Fields.MultiUploadField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DocumentsField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Title:{title:"Title",type:"string"},File:{title:"File",type:"string"}}};t.merge(this.options.items,{fields:{File:{type:"file"}}});this.urlfield="File"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("documents",t.Fields.DocumentsField)}(jQuery),function(n){var t=n.alpaca;t.Fields.File2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"file2"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.options.showUrlUpload||(this.options.showUrlUpload=!1);this.options.showFileUpload||(this.options.showFileUpload=!1);this.options.showUrlUpload&&(this.options.buttons={downloadButton:{value:"Upload External File",click:function(){this.DownLoadFile()}}});n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FilesLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"*",d:n.options.folder,filter:n.options.filter,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(i=n(this.control).find("select").val(),typeof i=="undefined")i=this.data;else if(t.isArray(i))for(r=0;r0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n("select",u.getControlEl()).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.folder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){if(t&&t.files&&t.files.length>0)if(u.isFilter(t.files[0].name))t.submit();else{alert("file not in filter");return}},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){$select=n(u.control).find("select");u.options.lazyLoading?u.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):u.refresh(function(){$select=n(u.control).find("select");$select.val(i.id).change()})})}}).data("loaded",!0);r()})},getFileUrl:function(t,i){var r=this,u;r.sf&&(u={fileid:t,folder:r.options.folder},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error getFileUrl "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=u.val(),r;if(!i||!t.isURL(i)){alert("url not valid");return}if(!t.isFilter(i)){alert("url not in filter");return}r={url:i,uploadfolder:t.options.folder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):($select=n(t.control).find("select"),t.options.lazyLoading?t.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):t.refresh(function(){$select=n(t.control).find("select");$select.val(i.id).change()}));setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)},isFilter:function(n){if(this.options.filter){var t=new RegExp(this.options.filter,"i");return n.length<2083&&t.test(n)}return!0},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("file2",t.Fields.File2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.FileField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"file"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.downloadButton||(this.options.downloadButton=!1);this.options.downloadButton&&(this.options.buttons={downloadButton:{value:"Download",click:function(){this.DownLoadFile()}}});this.base()},getTitle:function(){return"File Field"},getDescription:function(){return"File Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):i.val(n));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl();i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Files?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=t.getValue(),f=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|(www‌​.)?){1}([0-9A-Za-z-‌​\\.@:%_+~#=]+)+((\\‌​.[a-zA-Z]{2,3})+)(/(‌​.)*)?(\\?(.)*)?"),r;if(!i||!t.isURL(i)){alert("url not valid");return}r={url:i,uploadfolder:t.options.uploadfolder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):(t.setValue(i.url),n(u).change());setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)}});t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Folder2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("folder2",t.Fields.Folder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.GalleryField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Image:{title:"Image",type:"string"}}};t.merge(this.options.items,{fields:{Image:{type:"image"}}});this.urlfield="Image"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("gallery",t.Fields.GalleryField)}(jQuery),function(n){var t=n.alpaca;t.Fields.GuidField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f)},setup:function(){var n=this;this.base()},setValue:function(n){t.isEmpty(n)&&(n=this.createGuid());this.base(n)},getValue:function(){var n=this.base();return(t.isEmpty(n)||n=="")&&(n=this.createGuid()),n},createGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})},getTitle:function(){return"Guid Field"},getDescription:function(){return"Guid field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("guid",t.Fields.GuidField)}(jQuery),function(n){var t=n.alpaca;t.Fields.IconField=t.Fields.TextField.extend({setup:function(){this.options.glyphicons===undefined&&(this.options.glyphicons=!1);this.options.bootstrap===undefined&&(this.options.bootstrap=!1);this.options.fontawesome===undefined&&(this.options.fontawesome=!0);this.base()},setValue:function(n){this.base(n);this.loadIcons()},getTitle:function(){return"Icon Field"},getDescription:function(){return"Font Icon Field."},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(n){var t=this,i=this.control;this.control.fontIconPicker({emptyIcon:!0,hasSearch:!0});this.loadIcons();n()},loadIcons:function(){var o=this,t=[],e;if(this.options.bootstrap&&n.each(i,function(n,i){t.push("glyphicon "+i)}),this.options.fontawesome)for(e in r)t.push("fa "+e);this.options.glyphicons&&(n.each(u,function(n,i){t.push("glyphicons "+i)}),n.each(f,function(n,i){t.push("social "+i)}));this.control.fontIconPicker().setIcons(t)}});t.registerFieldClass("icon",t.Fields.IconField);var i=["glyphicon-glass","glyphicon-music","glyphicon-search","glyphicon-envelope","glyphicon-heart","glyphicon-star","glyphicon-star-empty","glyphicon-user","glyphicon-film","glyphicon-th-large","glyphicon-th","glyphicon-th-list","glyphicon-ok","glyphicon-remove","glyphicon-zoom-in","glyphicon-zoom-out","glyphicon-off","glyphicon-signal","glyphicon-cog","glyphicon-trash","glyphicon-home","glyphicon-file","glyphicon-time","glyphicon-road","glyphicon-download-alt","glyphicon-download","glyphicon-upload","glyphicon-inbox","glyphicon-play-circle","glyphicon-repeat","glyphicon-refresh","glyphicon-list-alt","glyphicon-lock","glyphicon-flag","glyphicon-headphones","glyphicon-volume-off","glyphicon-volume-down","glyphicon-volume-up","glyphicon-qrcode","glyphicon-barcode","glyphicon-tag","glyphicon-tags","glyphicon-book","glyphicon-bookmark","glyphicon-print","glyphicon-camera","glyphicon-font","glyphicon-bold","glyphicon-italic","glyphicon-text-height","glyphicon-text-width","glyphicon-align-left","glyphicon-align-center","glyphicon-align-right","glyphicon-align-justify","glyphicon-list","glyphicon-indent-left","glyphicon-indent-right","glyphicon-facetime-video","glyphicon-picture","glyphicon-pencil","glyphicon-map-marker","glyphicon-adjust","glyphicon-tint","glyphicon-edit","glyphicon-share","glyphicon-check","glyphicon-move","glyphicon-step-backward","glyphicon-fast-backward","glyphicon-backward","glyphicon-play","glyphicon-pause","glyphicon-stop","glyphicon-forward","glyphicon-fast-forward","glyphicon-step-forward","glyphicon-eject","glyphicon-chevron-left","glyphicon-chevron-right","glyphicon-plus-sign","glyphicon-minus-sign","glyphicon-remove-sign","glyphicon-ok-sign","glyphicon-question-sign","glyphicon-info-sign","glyphicon-screenshot","glyphicon-remove-circle","glyphicon-ok-circle","glyphicon-ban-circle","glyphicon-arrow-left","glyphicon-arrow-right","glyphicon-arrow-up","glyphicon-arrow-down","glyphicon-share-alt","glyphicon-resize-full","glyphicon-resize-small","glyphicon-plus","glyphicon-minus","glyphicon-asterisk","glyphicon-exclamation-sign","glyphicon-gift","glyphicon-leaf","glyphicon-fire","glyphicon-eye-open","glyphicon-eye-close","glyphicon-warning-sign","glyphicon-plane","glyphicon-calendar","glyphicon-random","glyphicon-comment","glyphicon-magnet","glyphicon-chevron-up","glyphicon-chevron-down","glyphicon-retweet","glyphicon-shopping-cart","glyphicon-folder-close","glyphicon-folder-open","glyphicon-resize-vertical","glyphicon-resize-horizontal","glyphicon-hdd","glyphicon-bullhorn","glyphicon-bell","glyphicon-certificate","glyphicon-thumbs-up","glyphicon-thumbs-down","glyphicon-hand-right","glyphicon-hand-left","glyphicon-hand-up","glyphicon-hand-down","glyphicon-circle-arrow-right","glyphicon-circle-arrow-left","glyphicon-circle-arrow-up","glyphicon-circle-arrow-down","glyphicon-globe","glyphicon-wrench","glyphicon-tasks","glyphicon-filter","glyphicon-briefcase","glyphicon-fullscreen","glyphicon-dashboard","glyphicon-paperclip","glyphicon-heart-empty","glyphicon-link","glyphicon-phone","glyphicon-pushpin","glyphicon-euro","glyphicon-usd","glyphicon-gbp","glyphicon-sort","glyphicon-sort-by-alphabet","glyphicon-sort-by-alphabet-alt","glyphicon-sort-by-order","glyphicon-sort-by-order-alt","glyphicon-sort-by-attributes","glyphicon-sort-by-attributes-alt","glyphicon-unchecked","glyphicon-expand","glyphicon-collapse","glyphicon-collapse-top"],r={"fa-500px":{unicode:"\\f26e",name:"500px"},"fa-address-book":{unicode:"\\f2b9",name:"Address book"},"fa-address-book-o":{unicode:"\\f2ba",name:"Address book o"},"fa-address-card":{unicode:"\\f2bb",name:"Address card"},"fa-address-card-o":{unicode:"\\f2bc",name:"Address card o"},"fa-adjust":{unicode:"\\f042",name:"Adjust"},"fa-adn":{unicode:"\\f170",name:"Adn"},"fa-align-center":{unicode:"\\f037",name:"Align center"},"fa-align-justify":{unicode:"\\f039",name:"Align justify"},"fa-align-left":{unicode:"\\f036",name:"Align left"},"fa-align-right":{unicode:"\\f038",name:"Align right"},"fa-amazon":{unicode:"\\f270",name:"Amazon"},"fa-ambulance":{unicode:"\\f0f9",name:"Ambulance"},"fa-american-sign-language-interpreting":{unicode:"\\f2a3",name:"American sign language interpreting"},"fa-anchor":{unicode:"\\f13d",name:"Anchor"},"fa-android":{unicode:"\\f17b",name:"Android"},"fa-angellist":{unicode:"\\f209",name:"Angellist"},"fa-angle-double-down":{unicode:"\\f103",name:"Angle double down"},"fa-angle-double-left":{unicode:"\\f100",name:"Angle double left"},"fa-angle-double-right":{unicode:"\\f101",name:"Angle double right"},"fa-angle-double-up":{unicode:"\\f102",name:"Angle double up"},"fa-angle-down":{unicode:"\\f107",name:"Angle down"},"fa-angle-left":{unicode:"\\f104",name:"Angle left"},"fa-angle-right":{unicode:"\\f105",name:"Angle right"},"fa-angle-up":{unicode:"\\f106",name:"Angle up"},"fa-apple":{unicode:"\\f179",name:"Apple"},"fa-archive":{unicode:"\\f187",name:"Archive"},"fa-area-chart":{unicode:"\\f1fe",name:"Area chart"},"fa-arrow-circle-down":{unicode:"\\f0ab",name:"Arrow circle down"},"fa-arrow-circle-left":{unicode:"\\f0a8",name:"Arrow circle left"},"fa-arrow-circle-o-down":{unicode:"\\f01a",name:"Arrow circle o down"},"fa-arrow-circle-o-left":{unicode:"\\f190",name:"Arrow circle o left"},"fa-arrow-circle-o-right":{unicode:"\\f18e",name:"Arrow circle o right"},"fa-arrow-circle-o-up":{unicode:"\\f01b",name:"Arrow circle o up"},"fa-arrow-circle-right":{unicode:"\\f0a9",name:"Arrow circle right"},"fa-arrow-circle-up":{unicode:"\\f0aa",name:"Arrow circle up"},"fa-arrow-down":{unicode:"\\f063",name:"Arrow down"},"fa-arrow-left":{unicode:"\\f060",name:"Arrow left"},"fa-arrow-right":{unicode:"\\f061",name:"Arrow right"},"fa-arrow-up":{unicode:"\\f062",name:"Arrow up"},"fa-arrows":{unicode:"\\f047",name:"Arrows"},"fa-arrows-alt":{unicode:"\\f0b2",name:"Arrows alt"},"fa-arrows-h":{unicode:"\\f07e",name:"Arrows h"},"fa-arrows-v":{unicode:"\\f07d",name:"Arrows v"},"fa-assistive-listening-systems":{unicode:"\\f2a2",name:"Assistive listening systems"},"fa-asterisk":{unicode:"\\f069",name:"Asterisk"},"fa-at":{unicode:"\\f1fa",name:"At"},"fa-audio-description":{unicode:"\\f29e",name:"Audio description"},"fa-backward":{unicode:"\\f04a",name:"Backward"},"fa-balance-scale":{unicode:"\\f24e",name:"Balance scale"},"fa-ban":{unicode:"\\f05e",name:"Ban"},"fa-bandcamp":{unicode:"\\f2d5",name:"Bandcamp"},"fa-bar-chart":{unicode:"\\f080",name:"Bar chart"},"fa-barcode":{unicode:"\\f02a",name:"Barcode"},"fa-bars":{unicode:"\\f0c9",name:"Bars"},"fa-bath":{unicode:"\\f2cd",name:"Bath"},"fa-battery-empty":{unicode:"\\f244",name:"Battery empty"},"fa-battery-full":{unicode:"\\f240",name:"Battery full"},"fa-battery-half":{unicode:"\\f242",name:"Battery half"},"fa-battery-quarter":{unicode:"\\f243",name:"Battery quarter"},"fa-battery-three-quarters":{unicode:"\\f241",name:"Battery three quarters"},"fa-bed":{unicode:"\\f236",name:"Bed"},"fa-beer":{unicode:"\\f0fc",name:"Beer"},"fa-behance":{unicode:"\\f1b4",name:"Behance"},"fa-behance-square":{unicode:"\\f1b5",name:"Behance square"},"fa-bell":{unicode:"\\f0f3",name:"Bell"},"fa-bell-o":{unicode:"\\f0a2",name:"Bell o"},"fa-bell-slash":{unicode:"\\f1f6",name:"Bell slash"},"fa-bell-slash-o":{unicode:"\\f1f7",name:"Bell slash o"},"fa-bicycle":{unicode:"\\f206",name:"Bicycle"},"fa-binoculars":{unicode:"\\f1e5",name:"Binoculars"},"fa-birthday-cake":{unicode:"\\f1fd",name:"Birthday cake"},"fa-bitbucket":{unicode:"\\f171",name:"Bitbucket"},"fa-bitbucket-square":{unicode:"\\f172",name:"Bitbucket square"},"fa-black-tie":{unicode:"\\f27e",name:"Black tie"},"fa-blind":{unicode:"\\f29d",name:"Blind"},"fa-bluetooth":{unicode:"\\f293",name:"Bluetooth"},"fa-bluetooth-b":{unicode:"\\f294",name:"Bluetooth b"},"fa-bold":{unicode:"\\f032",name:"Bold"},"fa-bolt":{unicode:"\\f0e7",name:"Bolt"},"fa-bomb":{unicode:"\\f1e2",name:"Bomb"},"fa-book":{unicode:"\\f02d",name:"Book"},"fa-bookmark":{unicode:"\\f02e",name:"Bookmark"},"fa-bookmark-o":{unicode:"\\f097",name:"Bookmark o"},"fa-braille":{unicode:"\\f2a1",name:"Braille"},"fa-briefcase":{unicode:"\\f0b1",name:"Briefcase"},"fa-btc":{unicode:"\\f15a",name:"Btc"},"fa-bug":{unicode:"\\f188",name:"Bug"},"fa-building":{unicode:"\\f1ad",name:"Building"},"fa-building-o":{unicode:"\\f0f7",name:"Building o"},"fa-bullhorn":{unicode:"\\f0a1",name:"Bullhorn"},"fa-bullseye":{unicode:"\\f140",name:"Bullseye"},"fa-bus":{unicode:"\\f207",name:"Bus"},"fa-buysellads":{unicode:"\\f20d",name:"Buysellads"},"fa-calculator":{unicode:"\\f1ec",name:"Calculator"},"fa-calendar":{unicode:"\\f073",name:"Calendar"},"fa-calendar-check-o":{unicode:"\\f274",name:"Calendar check o"},"fa-calendar-minus-o":{unicode:"\\f272",name:"Calendar minus o"},"fa-calendar-o":{unicode:"\\f133",name:"Calendar o"},"fa-calendar-plus-o":{unicode:"\\f271",name:"Calendar plus o"},"fa-calendar-times-o":{unicode:"\\f273",name:"Calendar times o"},"fa-camera":{unicode:"\\f030",name:"Camera"},"fa-camera-retro":{unicode:"\\f083",name:"Camera retro"},"fa-car":{unicode:"\\f1b9",name:"Car"},"fa-caret-down":{unicode:"\\f0d7",name:"Caret down"},"fa-caret-left":{unicode:"\\f0d9",name:"Caret left"},"fa-caret-right":{unicode:"\\f0da",name:"Caret right"},"fa-caret-square-o-down":{unicode:"\\f150",name:"Caret square o down"},"fa-caret-square-o-left":{unicode:"\\f191",name:"Caret square o left"},"fa-caret-square-o-right":{unicode:"\\f152",name:"Caret square o right"},"fa-caret-square-o-up":{unicode:"\\f151",name:"Caret square o up"},"fa-caret-up":{unicode:"\\f0d8",name:"Caret up"},"fa-cart-arrow-down":{unicode:"\\f218",name:"Cart arrow down"},"fa-cart-plus":{unicode:"\\f217",name:"Cart plus"},"fa-cc":{unicode:"\\f20a",name:"Cc"},"fa-cc-amex":{unicode:"\\f1f3",name:"Cc amex"},"fa-cc-diners-club":{unicode:"\\f24c",name:"Cc diners club"},"fa-cc-discover":{unicode:"\\f1f2",name:"Cc discover"},"fa-cc-jcb":{unicode:"\\f24b",name:"Cc jcb"},"fa-cc-mastercard":{unicode:"\\f1f1",name:"Cc mastercard"},"fa-cc-paypal":{unicode:"\\f1f4",name:"Cc paypal"},"fa-cc-stripe":{unicode:"\\f1f5",name:"Cc stripe"},"fa-cc-visa":{unicode:"\\f1f0",name:"Cc visa"},"fa-certificate":{unicode:"\\f0a3",name:"Certificate"},"fa-chain-broken":{unicode:"\\f127",name:"Chain broken"},"fa-check":{unicode:"\\f00c",name:"Check"},"fa-check-circle":{unicode:"\\f058",name:"Check circle"},"fa-check-circle-o":{unicode:"\\f05d",name:"Check circle o"},"fa-check-square":{unicode:"\\f14a",name:"Check square"},"fa-check-square-o":{unicode:"\\f046",name:"Check square o"},"fa-chevron-circle-down":{unicode:"\\f13a",name:"Chevron circle down"},"fa-chevron-circle-left":{unicode:"\\f137",name:"Chevron circle left"},"fa-chevron-circle-right":{unicode:"\\f138",name:"Chevron circle right"},"fa-chevron-circle-up":{unicode:"\\f139",name:"Chevron circle up"},"fa-chevron-down":{unicode:"\\f078",name:"Chevron down"},"fa-chevron-left":{unicode:"\\f053",name:"Chevron left"},"fa-chevron-right":{unicode:"\\f054",name:"Chevron right"},"fa-chevron-up":{unicode:"\\f077",name:"Chevron up"},"fa-child":{unicode:"\\f1ae",name:"Child"},"fa-chrome":{unicode:"\\f268",name:"Chrome"},"fa-circle":{unicode:"\\f111",name:"Circle"},"fa-circle-o":{unicode:"\\f10c",name:"Circle o"},"fa-circle-o-notch":{unicode:"\\f1ce",name:"Circle o notch"},"fa-circle-thin":{unicode:"\\f1db",name:"Circle thin"},"fa-clipboard":{unicode:"\\f0ea",name:"Clipboard"},"fa-clock-o":{unicode:"\\f017",name:"Clock o"},"fa-clone":{unicode:"\\f24d",name:"Clone"},"fa-cloud":{unicode:"\\f0c2",name:"Cloud"},"fa-cloud-download":{unicode:"\\f0ed",name:"Cloud download"},"fa-cloud-upload":{unicode:"\\f0ee",name:"Cloud upload"},"fa-code":{unicode:"\\f121",name:"Code"},"fa-code-fork":{unicode:"\\f126",name:"Code fork"},"fa-codepen":{unicode:"\\f1cb",name:"Codepen"},"fa-codiepie":{unicode:"\\f284",name:"Codiepie"},"fa-coffee":{unicode:"\\f0f4",name:"Coffee"},"fa-cog":{unicode:"\\f013",name:"Cog"},"fa-cogs":{unicode:"\\f085",name:"Cogs"},"fa-columns":{unicode:"\\f0db",name:"Columns"},"fa-comment":{unicode:"\\f075",name:"Comment"},"fa-comment-o":{unicode:"\\f0e5",name:"Comment o"},"fa-commenting":{unicode:"\\f27a",name:"Commenting"},"fa-commenting-o":{unicode:"\\f27b",name:"Commenting o"},"fa-comments":{unicode:"\\f086",name:"Comments"},"fa-comments-o":{unicode:"\\f0e6",name:"Comments o"},"fa-compass":{unicode:"\\f14e",name:"Compass"},"fa-compress":{unicode:"\\f066",name:"Compress"},"fa-connectdevelop":{unicode:"\\f20e",name:"Connectdevelop"},"fa-contao":{unicode:"\\f26d",name:"Contao"},"fa-copyright":{unicode:"\\f1f9",name:"Copyright"},"fa-creative-commons":{unicode:"\\f25e",name:"Creative commons"},"fa-credit-card":{unicode:"\\f09d",name:"Credit card"},"fa-credit-card-alt":{unicode:"\\f283",name:"Credit card alt"},"fa-crop":{unicode:"\\f125",name:"Crop"},"fa-crosshairs":{unicode:"\\f05b",name:"Crosshairs"},"fa-css3":{unicode:"\\f13c",name:"Css3"},"fa-cube":{unicode:"\\f1b2",name:"Cube"},"fa-cubes":{unicode:"\\f1b3",name:"Cubes"},"fa-cutlery":{unicode:"\\f0f5",name:"Cutlery"},"fa-dashcube":{unicode:"\\f210",name:"Dashcube"},"fa-database":{unicode:"\\f1c0",name:"Database"},"fa-deaf":{unicode:"\\f2a4",name:"Deaf"},"fa-delicious":{unicode:"\\f1a5",name:"Delicious"},"fa-desktop":{unicode:"\\f108",name:"Desktop"},"fa-deviantart":{unicode:"\\f1bd",name:"Deviantart"},"fa-diamond":{unicode:"\\f219",name:"Diamond"},"fa-digg":{unicode:"\\f1a6",name:"Digg"},"fa-dot-circle-o":{unicode:"\\f192",name:"Dot circle o"},"fa-download":{unicode:"\\f019",name:"Download"},"fa-dribbble":{unicode:"\\f17d",name:"Dribbble"},"fa-dropbox":{unicode:"\\f16b",name:"Dropbox"},"fa-drupal":{unicode:"\\f1a9",name:"Drupal"},"fa-edge":{unicode:"\\f282",name:"Edge"},"fa-eercast":{unicode:"\\f2da",name:"Eercast"},"fa-eject":{unicode:"\\f052",name:"Eject"},"fa-ellipsis-h":{unicode:"\\f141",name:"Ellipsis h"},"fa-ellipsis-v":{unicode:"\\f142",name:"Ellipsis v"},"fa-empire":{unicode:"\\f1d1",name:"Empire"},"fa-envelope":{unicode:"\\f0e0",name:"Envelope"},"fa-envelope-o":{unicode:"\\f003",name:"Envelope o"},"fa-envelope-open":{unicode:"\\f2b6",name:"Envelope open"},"fa-envelope-open-o":{unicode:"\\f2b7",name:"Envelope open o"},"fa-envelope-square":{unicode:"\\f199",name:"Envelope square"},"fa-envira":{unicode:"\\f299",name:"Envira"},"fa-eraser":{unicode:"\\f12d",name:"Eraser"},"fa-etsy":{unicode:"\\f2d7",name:"Etsy"},"fa-eur":{unicode:"\\f153",name:"Eur"},"fa-exchange":{unicode:"\\f0ec",name:"Exchange"},"fa-exclamation":{unicode:"\\f12a",name:"Exclamation"},"fa-exclamation-circle":{unicode:"\\f06a",name:"Exclamation circle"},"fa-exclamation-triangle":{unicode:"\\f071",name:"Exclamation triangle"},"fa-expand":{unicode:"\\f065",name:"Expand"},"fa-expeditedssl":{unicode:"\\f23e",name:"Expeditedssl"},"fa-external-link":{unicode:"\\f08e",name:"External link"},"fa-external-link-square":{unicode:"\\f14c",name:"External link square"},"fa-eye":{unicode:"\\f06e",name:"Eye"},"fa-eye-slash":{unicode:"\\f070",name:"Eye slash"},"fa-eyedropper":{unicode:"\\f1fb",name:"Eyedropper"},"fa-facebook":{unicode:"\\f09a",name:"Facebook"},"fa-facebook-official":{unicode:"\\f230",name:"Facebook official"},"fa-facebook-square":{unicode:"\\f082",name:"Facebook square"},"fa-fast-backward":{unicode:"\\f049",name:"Fast backward"},"fa-fast-forward":{unicode:"\\f050",name:"Fast forward"},"fa-fax":{unicode:"\\f1ac",name:"Fax"},"fa-female":{unicode:"\\f182",name:"Female"},"fa-fighter-jet":{unicode:"\\f0fb",name:"Fighter jet"},"fa-file":{unicode:"\\f15b",name:"File"},"fa-file-archive-o":{unicode:"\\f1c6",name:"File archive o"},"fa-file-audio-o":{unicode:"\\f1c7",name:"File audio o"},"fa-file-code-o":{unicode:"\\f1c9",name:"File code o"},"fa-file-excel-o":{unicode:"\\f1c3",name:"File excel o"},"fa-file-image-o":{unicode:"\\f1c5",name:"File image o"},"fa-file-o":{unicode:"\\f016",name:"File o"},"fa-file-pdf-o":{unicode:"\\f1c1",name:"File pdf o"},"fa-file-powerpoint-o":{unicode:"\\f1c4",name:"File powerpoint o"},"fa-file-text":{unicode:"\\f15c",name:"File text"},"fa-file-text-o":{unicode:"\\f0f6",name:"File text o"},"fa-file-video-o":{unicode:"\\f1c8",name:"File video o"},"fa-file-word-o":{unicode:"\\f1c2",name:"File word o"},"fa-files-o":{unicode:"\\f0c5",name:"Files o"},"fa-film":{unicode:"\\f008",name:"Film"},"fa-filter":{unicode:"\\f0b0",name:"Filter"},"fa-fire":{unicode:"\\f06d",name:"Fire"},"fa-fire-extinguisher":{unicode:"\\f134",name:"Fire extinguisher"},"fa-firefox":{unicode:"\\f269",name:"Firefox"},"fa-first-order":{unicode:"\\f2b0",name:"First order"},"fa-flag":{unicode:"\\f024",name:"Flag"},"fa-flag-checkered":{unicode:"\\f11e",name:"Flag checkered"},"fa-flag-o":{unicode:"\\f11d",name:"Flag o"},"fa-flask":{unicode:"\\f0c3",name:"Flask"},"fa-flickr":{unicode:"\\f16e",name:"Flickr"},"fa-floppy-o":{unicode:"\\f0c7",name:"Floppy o"},"fa-folder":{unicode:"\\f07b",name:"Folder"},"fa-folder-o":{unicode:"\\f114",name:"Folder o"},"fa-folder-open":{unicode:"\\f07c",name:"Folder open"},"fa-folder-open-o":{unicode:"\\f115",name:"Folder open o"},"fa-font":{unicode:"\\f031",name:"Font"},"fa-font-awesome":{unicode:"\\f2b4",name:"Font awesome"},"fa-fonticons":{unicode:"\\f280",name:"Fonticons"},"fa-fort-awesome":{unicode:"\\f286",name:"Fort awesome"},"fa-forumbee":{unicode:"\\f211",name:"Forumbee"},"fa-forward":{unicode:"\\f04e",name:"Forward"},"fa-foursquare":{unicode:"\\f180",name:"Foursquare"},"fa-free-code-camp":{unicode:"\\f2c5",name:"Free code camp"},"fa-frown-o":{unicode:"\\f119",name:"Frown o"},"fa-futbol-o":{unicode:"\\f1e3",name:"Futbol o"},"fa-gamepad":{unicode:"\\f11b",name:"Gamepad"},"fa-gavel":{unicode:"\\f0e3",name:"Gavel"},"fa-gbp":{unicode:"\\f154",name:"Gbp"},"fa-genderless":{unicode:"\\f22d",name:"Genderless"},"fa-get-pocket":{unicode:"\\f265",name:"Get pocket"},"fa-gg":{unicode:"\\f260",name:"Gg"},"fa-gg-circle":{unicode:"\\f261",name:"Gg circle"},"fa-gift":{unicode:"\\f06b",name:"Gift"},"fa-git":{unicode:"\\f1d3",name:"Git"},"fa-git-square":{unicode:"\\f1d2",name:"Git square"},"fa-github":{unicode:"\\f09b",name:"Github"},"fa-github-alt":{unicode:"\\f113",name:"Github alt"},"fa-github-square":{unicode:"\\f092",name:"Github square"},"fa-gitlab":{unicode:"\\f296",name:"Gitlab"},"fa-glass":{unicode:"\\f000",name:"Glass"},"fa-glide":{unicode:"\\f2a5",name:"Glide"},"fa-glide-g":{unicode:"\\f2a6",name:"Glide g"},"fa-globe":{unicode:"\\f0ac",name:"Globe"},"fa-google":{unicode:"\\f1a0",name:"Google"},"fa-google-plus":{unicode:"\\f0d5",name:"Google plus"},"fa-google-plus-official":{unicode:"\\f2b3",name:"Google plus official"},"fa-google-plus-square":{unicode:"\\f0d4",name:"Google plus square"},"fa-google-wallet":{unicode:"\\f1ee",name:"Google wallet"},"fa-graduation-cap":{unicode:"\\f19d",name:"Graduation cap"},"fa-gratipay":{unicode:"\\f184",name:"Gratipay"},"fa-grav":{unicode:"\\f2d6",name:"Grav"},"fa-h-square":{unicode:"\\f0fd",name:"H square"},"fa-hacker-news":{unicode:"\\f1d4",name:"Hacker news"},"fa-hand-lizard-o":{unicode:"\\f258",name:"Hand lizard o"},"fa-hand-o-down":{unicode:"\\f0a7",name:"Hand o down"},"fa-hand-o-left":{unicode:"\\f0a5",name:"Hand o left"},"fa-hand-o-right":{unicode:"\\f0a4",name:"Hand o right"},"fa-hand-o-up":{unicode:"\\f0a6",name:"Hand o up"},"fa-hand-paper-o":{unicode:"\\f256",name:"Hand paper o"},"fa-hand-peace-o":{unicode:"\\f25b",name:"Hand peace o"},"fa-hand-pointer-o":{unicode:"\\f25a",name:"Hand pointer o"},"fa-hand-rock-o":{unicode:"\\f255",name:"Hand rock o"},"fa-hand-scissors-o":{unicode:"\\f257",name:"Hand scissors o"},"fa-hand-spock-o":{unicode:"\\f259",name:"Hand spock o"},"fa-handshake-o":{unicode:"\\f2b5",name:"Handshake o"},"fa-hashtag":{unicode:"\\f292",name:"Hashtag"},"fa-hdd-o":{unicode:"\\f0a0",name:"Hdd o"},"fa-header":{unicode:"\\f1dc",name:"Header"},"fa-headphones":{unicode:"\\f025",name:"Headphones"},"fa-heart":{unicode:"\\f004",name:"Heart"},"fa-heart-o":{unicode:"\\f08a",name:"Heart o"},"fa-heartbeat":{unicode:"\\f21e",name:"Heartbeat"},"fa-history":{unicode:"\\f1da",name:"History"},"fa-home":{unicode:"\\f015",name:"Home"},"fa-hospital-o":{unicode:"\\f0f8",name:"Hospital o"},"fa-hourglass":{unicode:"\\f254",name:"Hourglass"},"fa-hourglass-end":{unicode:"\\f253",name:"Hourglass end"},"fa-hourglass-half":{unicode:"\\f252",name:"Hourglass half"},"fa-hourglass-o":{unicode:"\\f250",name:"Hourglass o"},"fa-hourglass-start":{unicode:"\\f251",name:"Hourglass start"},"fa-houzz":{unicode:"\\f27c",name:"Houzz"},"fa-html5":{unicode:"\\f13b",name:"Html5"},"fa-i-cursor":{unicode:"\\f246",name:"I cursor"},"fa-id-badge":{unicode:"\\f2c1",name:"Id badge"},"fa-id-card":{unicode:"\\f2c2",name:"Id card"},"fa-id-card-o":{unicode:"\\f2c3",name:"Id card o"},"fa-ils":{unicode:"\\f20b",name:"Ils"},"fa-imdb":{unicode:"\\f2d8",name:"Imdb"},"fa-inbox":{unicode:"\\f01c",name:"Inbox"},"fa-indent":{unicode:"\\f03c",name:"Indent"},"fa-industry":{unicode:"\\f275",name:"Industry"},"fa-info":{unicode:"\\f129",name:"Info"},"fa-info-circle":{unicode:"\\f05a",name:"Info circle"},"fa-inr":{unicode:"\\f156",name:"Inr"},"fa-instagram":{unicode:"\\f16d",name:"Instagram"},"fa-internet-explorer":{unicode:"\\f26b",name:"Internet explorer"},"fa-ioxhost":{unicode:"\\f208",name:"Ioxhost"},"fa-italic":{unicode:"\\f033",name:"Italic"},"fa-joomla":{unicode:"\\f1aa",name:"Joomla"},"fa-jpy":{unicode:"\\f157",name:"Jpy"},"fa-jsfiddle":{unicode:"\\f1cc",name:"Jsfiddle"},"fa-key":{unicode:"\\f084",name:"Key"},"fa-keyboard-o":{unicode:"\\f11c",name:"Keyboard o"},"fa-krw":{unicode:"\\f159",name:"Krw"},"fa-language":{unicode:"\\f1ab",name:"Language"},"fa-laptop":{unicode:"\\f109",name:"Laptop"},"fa-lastfm":{unicode:"\\f202",name:"Lastfm"},"fa-lastfm-square":{unicode:"\\f203",name:"Lastfm square"},"fa-leaf":{unicode:"\\f06c",name:"Leaf"},"fa-leanpub":{unicode:"\\f212",name:"Leanpub"},"fa-lemon-o":{unicode:"\\f094",name:"Lemon o"},"fa-level-down":{unicode:"\\f149",name:"Level down"},"fa-level-up":{unicode:"\\f148",name:"Level up"},"fa-life-ring":{unicode:"\\f1cd",name:"Life ring"},"fa-lightbulb-o":{unicode:"\\f0eb",name:"Lightbulb o"},"fa-line-chart":{unicode:"\\f201",name:"Line chart"},"fa-link":{unicode:"\\f0c1",name:"Link"},"fa-linkedin":{unicode:"\\f0e1",name:"Linkedin"},"fa-linkedin-square":{unicode:"\\f08c",name:"Linkedin square"},"fa-linode":{unicode:"\\f2b8",name:"Linode"},"fa-linux":{unicode:"\\f17c",name:"Linux"},"fa-list":{unicode:"\\f03a",name:"List"},"fa-list-alt":{unicode:"\\f022",name:"List alt"},"fa-list-ol":{unicode:"\\f0cb",name:"List ol"},"fa-list-ul":{unicode:"\\f0ca",name:"List ul"},"fa-location-arrow":{unicode:"\\f124",name:"Location arrow"},"fa-lock":{unicode:"\\f023",name:"Lock"},"fa-long-arrow-down":{unicode:"\\f175",name:"Long arrow down"},"fa-long-arrow-left":{unicode:"\\f177",name:"Long arrow left"},"fa-long-arrow-right":{unicode:"\\f178",name:"Long arrow right"},"fa-long-arrow-up":{unicode:"\\f176",name:"Long arrow up"},"fa-low-vision":{unicode:"\\f2a8",name:"Low vision"},"fa-magic":{unicode:"\\f0d0",name:"Magic"},"fa-magnet":{unicode:"\\f076",name:"Magnet"},"fa-male":{unicode:"\\f183",name:"Male"},"fa-map":{unicode:"\\f279",name:"Map"},"fa-map-marker":{unicode:"\\f041",name:"Map marker"},"fa-map-o":{unicode:"\\f278",name:"Map o"},"fa-map-pin":{unicode:"\\f276",name:"Map pin"},"fa-map-signs":{unicode:"\\f277",name:"Map signs"},"fa-mars":{unicode:"\\f222",name:"Mars"},"fa-mars-double":{unicode:"\\f227",name:"Mars double"},"fa-mars-stroke":{unicode:"\\f229",name:"Mars stroke"},"fa-mars-stroke-h":{unicode:"\\f22b",name:"Mars stroke h"},"fa-mars-stroke-v":{unicode:"\\f22a",name:"Mars stroke v"},"fa-maxcdn":{unicode:"\\f136",name:"Maxcdn"},"fa-meanpath":{unicode:"\\f20c",name:"Meanpath"},"fa-medium":{unicode:"\\f23a",name:"Medium"},"fa-medkit":{unicode:"\\f0fa",name:"Medkit"},"fa-meetup":{unicode:"\\f2e0",name:"Meetup"},"fa-meh-o":{unicode:"\\f11a",name:"Meh o"},"fa-mercury":{unicode:"\\f223",name:"Mercury"},"fa-microchip":{unicode:"\\f2db",name:"Microchip"},"fa-microphone":{unicode:"\\f130",name:"Microphone"},"fa-microphone-slash":{unicode:"\\f131",name:"Microphone slash"},"fa-minus":{unicode:"\\f068",name:"Minus"},"fa-minus-circle":{unicode:"\\f056",name:"Minus circle"},"fa-minus-square":{unicode:"\\f146",name:"Minus square"},"fa-minus-square-o":{unicode:"\\f147",name:"Minus square o"},"fa-mixcloud":{unicode:"\\f289",name:"Mixcloud"},"fa-mobile":{unicode:"\\f10b",name:"Mobile"},"fa-modx":{unicode:"\\f285",name:"Modx"},"fa-money":{unicode:"\\f0d6",name:"Money"},"fa-moon-o":{unicode:"\\f186",name:"Moon o"},"fa-motorcycle":{unicode:"\\f21c",name:"Motorcycle"},"fa-mouse-pointer":{unicode:"\\f245",name:"Mouse pointer"},"fa-music":{unicode:"\\f001",name:"Music"},"fa-neuter":{unicode:"\\f22c",name:"Neuter"},"fa-newspaper-o":{unicode:"\\f1ea",name:"Newspaper o"},"fa-object-group":{unicode:"\\f247",name:"Object group"},"fa-object-ungroup":{unicode:"\\f248",name:"Object ungroup"},"fa-odnoklassniki":{unicode:"\\f263",name:"Odnoklassniki"},"fa-odnoklassniki-square":{unicode:"\\f264",name:"Odnoklassniki square"},"fa-opencart":{unicode:"\\f23d",name:"Opencart"},"fa-openid":{unicode:"\\f19b",name:"Openid"},"fa-opera":{unicode:"\\f26a",name:"Opera"},"fa-optin-monster":{unicode:"\\f23c",name:"Optin monster"},"fa-outdent":{unicode:"\\f03b",name:"Outdent"},"fa-pagelines":{unicode:"\\f18c",name:"Pagelines"},"fa-paint-brush":{unicode:"\\f1fc",name:"Paint brush"},"fa-paper-plane":{unicode:"\\f1d8",name:"Paper plane"},"fa-paper-plane-o":{unicode:"\\f1d9",name:"Paper plane o"},"fa-paperclip":{unicode:"\\f0c6",name:"Paperclip"},"fa-paragraph":{unicode:"\\f1dd",name:"Paragraph"},"fa-pause":{unicode:"\\f04c",name:"Pause"},"fa-pause-circle":{unicode:"\\f28b",name:"Pause circle"},"fa-pause-circle-o":{unicode:"\\f28c",name:"Pause circle o"},"fa-paw":{unicode:"\\f1b0",name:"Paw"},"fa-paypal":{unicode:"\\f1ed",name:"Paypal"},"fa-pencil":{unicode:"\\f040",name:"Pencil"},"fa-pencil-square":{unicode:"\\f14b",name:"Pencil square"},"fa-pencil-square-o":{unicode:"\\f044",name:"Pencil square o"},"fa-percent":{unicode:"\\f295",name:"Percent"},"fa-phone":{unicode:"\\f095",name:"Phone"},"fa-phone-square":{unicode:"\\f098",name:"Phone square"},"fa-picture-o":{unicode:"\\f03e",name:"Picture o"},"fa-pie-chart":{unicode:"\\f200",name:"Pie chart"},"fa-pied-piper":{unicode:"\\f2ae",name:"Pied piper"},"fa-pied-piper-alt":{unicode:"\\f1a8",name:"Pied piper alt"},"fa-pied-piper-pp":{unicode:"\\f1a7",name:"Pied piper pp"},"fa-pinterest":{unicode:"\\f0d2",name:"Pinterest"},"fa-pinterest-p":{unicode:"\\f231",name:"Pinterest p"},"fa-pinterest-square":{unicode:"\\f0d3",name:"Pinterest square"},"fa-plane":{unicode:"\\f072",name:"Plane"},"fa-play":{unicode:"\\f04b",name:"Play"},"fa-play-circle":{unicode:"\\f144",name:"Play circle"},"fa-play-circle-o":{unicode:"\\f01d",name:"Play circle o"},"fa-plug":{unicode:"\\f1e6",name:"Plug"},"fa-plus":{unicode:"\\f067",name:"Plus"},"fa-plus-circle":{unicode:"\\f055",name:"Plus circle"},"fa-plus-square":{unicode:"\\f0fe",name:"Plus square"},"fa-plus-square-o":{unicode:"\\f196",name:"Plus square o"},"fa-podcast":{unicode:"\\f2ce",name:"Podcast"},"fa-power-off":{unicode:"\\f011",name:"Power off"},"fa-print":{unicode:"\\f02f",name:"Print"},"fa-product-hunt":{unicode:"\\f288",name:"Product hunt"},"fa-puzzle-piece":{unicode:"\\f12e",name:"Puzzle piece"},"fa-qq":{unicode:"\\f1d6",name:"Qq"},"fa-qrcode":{unicode:"\\f029",name:"Qrcode"},"fa-question":{unicode:"\\f128",name:"Question"},"fa-question-circle":{unicode:"\\f059",name:"Question circle"},"fa-question-circle-o":{unicode:"\\f29c",name:"Question circle o"},"fa-quora":{unicode:"\\f2c4",name:"Quora"},"fa-quote-left":{unicode:"\\f10d",name:"Quote left"},"fa-quote-right":{unicode:"\\f10e",name:"Quote right"},"fa-random":{unicode:"\\f074",name:"Random"},"fa-ravelry":{unicode:"\\f2d9",name:"Ravelry"},"fa-rebel":{unicode:"\\f1d0",name:"Rebel"},"fa-recycle":{unicode:"\\f1b8",name:"Recycle"},"fa-reddit":{unicode:"\\f1a1",name:"Reddit"},"fa-reddit-alien":{unicode:"\\f281",name:"Reddit alien"},"fa-reddit-square":{unicode:"\\f1a2",name:"Reddit square"},"fa-refresh":{unicode:"\\f021",name:"Refresh"},"fa-registered":{unicode:"\\f25d",name:"Registered"},"fa-renren":{unicode:"\\f18b",name:"Renren"},"fa-repeat":{unicode:"\\f01e",name:"Repeat"},"fa-reply":{unicode:"\\f112",name:"Reply"},"fa-reply-all":{unicode:"\\f122",name:"Reply all"},"fa-retweet":{unicode:"\\f079",name:"Retweet"},"fa-road":{unicode:"\\f018",name:"Road"},"fa-rocket":{unicode:"\\f135",name:"Rocket"},"fa-rss":{unicode:"\\f09e",name:"Rss"},"fa-rss-square":{unicode:"\\f143",name:"Rss square"},"fa-rub":{unicode:"\\f158",name:"Rub"},"fa-safari":{unicode:"\\f267",name:"Safari"},"fa-scissors":{unicode:"\\f0c4",name:"Scissors"},"fa-scribd":{unicode:"\\f28a",name:"Scribd"},"fa-search":{unicode:"\\f002",name:"Search"},"fa-search-minus":{unicode:"\\f010",name:"Search minus"},"fa-search-plus":{unicode:"\\f00e",name:"Search plus"},"fa-sellsy":{unicode:"\\f213",name:"Sellsy"},"fa-server":{unicode:"\\f233",name:"Server"},"fa-share":{unicode:"\\f064",name:"Share"},"fa-share-alt":{unicode:"\\f1e0",name:"Share alt"},"fa-share-alt-square":{unicode:"\\f1e1",name:"Share alt square"},"fa-share-square":{unicode:"\\f14d",name:"Share square"},"fa-share-square-o":{unicode:"\\f045",name:"Share square o"},"fa-shield":{unicode:"\\f132",name:"Shield"},"fa-ship":{unicode:"\\f21a",name:"Ship"},"fa-shirtsinbulk":{unicode:"\\f214",name:"Shirtsinbulk"},"fa-shopping-bag":{unicode:"\\f290",name:"Shopping bag"},"fa-shopping-basket":{unicode:"\\f291",name:"Shopping basket"},"fa-shopping-cart":{unicode:"\\f07a",name:"Shopping cart"},"fa-shower":{unicode:"\\f2cc",name:"Shower"},"fa-sign-in":{unicode:"\\f090",name:"Sign in"},"fa-sign-language":{unicode:"\\f2a7",name:"Sign language"},"fa-sign-out":{unicode:"\\f08b",name:"Sign out"},"fa-signal":{unicode:"\\f012",name:"Signal"},"fa-simplybuilt":{unicode:"\\f215",name:"Simplybuilt"},"fa-sitemap":{unicode:"\\f0e8",name:"Sitemap"},"fa-skyatlas":{unicode:"\\f216",name:"Skyatlas"},"fa-skype":{unicode:"\\f17e",name:"Skype"},"fa-slack":{unicode:"\\f198",name:"Slack"},"fa-sliders":{unicode:"\\f1de",name:"Sliders"},"fa-slideshare":{unicode:"\\f1e7",name:"Slideshare"},"fa-smile-o":{unicode:"\\f118",name:"Smile o"},"fa-snapchat":{unicode:"\\f2ab",name:"Snapchat"},"fa-snapchat-ghost":{unicode:"\\f2ac",name:"Snapchat ghost"},"fa-snapchat-square":{unicode:"\\f2ad",name:"Snapchat square"},"fa-snowflake-o":{unicode:"\\f2dc",name:"Snowflake o"},"fa-sort":{unicode:"\\f0dc",name:"Sort"},"fa-sort-alpha-asc":{unicode:"\\f15d",name:"Sort alpha asc"},"fa-sort-alpha-desc":{unicode:"\\f15e",name:"Sort alpha desc"},"fa-sort-amount-asc":{unicode:"\\f160",name:"Sort amount asc"},"fa-sort-amount-desc":{unicode:"\\f161",name:"Sort amount desc"},"fa-sort-asc":{unicode:"\\f0de",name:"Sort asc"},"fa-sort-desc":{unicode:"\\f0dd",name:"Sort desc"},"fa-sort-numeric-asc":{unicode:"\\f162",name:"Sort numeric asc"},"fa-sort-numeric-desc":{unicode:"\\f163",name:"Sort numeric desc"},"fa-soundcloud":{unicode:"\\f1be",name:"Soundcloud"},"fa-space-shuttle":{unicode:"\\f197",name:"Space shuttle"},"fa-spinner":{unicode:"\\f110",name:"Spinner"},"fa-spoon":{unicode:"\\f1b1",name:"Spoon"},"fa-spotify":{unicode:"\\f1bc",name:"Spotify"},"fa-square":{unicode:"\\f0c8",name:"Square"},"fa-square-o":{unicode:"\\f096",name:"Square o"},"fa-stack-exchange":{unicode:"\\f18d",name:"Stack exchange"},"fa-stack-overflow":{unicode:"\\f16c",name:"Stack overflow"},"fa-star":{unicode:"\\f005",name:"Star"},"fa-star-half":{unicode:"\\f089",name:"Star half"},"fa-star-half-o":{unicode:"\\f123",name:"Star half o"},"fa-star-o":{unicode:"\\f006",name:"Star o"},"fa-steam":{unicode:"\\f1b6",name:"Steam"},"fa-steam-square":{unicode:"\\f1b7",name:"Steam square"},"fa-step-backward":{unicode:"\\f048",name:"Step backward"},"fa-step-forward":{unicode:"\\f051",name:"Step forward"},"fa-stethoscope":{unicode:"\\f0f1",name:"Stethoscope"},"fa-sticky-note":{unicode:"\\f249",name:"Sticky note"},"fa-sticky-note-o":{unicode:"\\f24a",name:"Sticky note o"},"fa-stop":{unicode:"\\f04d",name:"Stop"},"fa-stop-circle":{unicode:"\\f28d",name:"Stop circle"},"fa-stop-circle-o":{unicode:"\\f28e",name:"Stop circle o"},"fa-street-view":{unicode:"\\f21d",name:"Street view"},"fa-strikethrough":{unicode:"\\f0cc",name:"Strikethrough"},"fa-stumbleupon":{unicode:"\\f1a4",name:"Stumbleupon"},"fa-stumbleupon-circle":{unicode:"\\f1a3",name:"Stumbleupon circle"},"fa-subscript":{unicode:"\\f12c",name:"Subscript"},"fa-subway":{unicode:"\\f239",name:"Subway"},"fa-suitcase":{unicode:"\\f0f2",name:"Suitcase"},"fa-sun-o":{unicode:"\\f185",name:"Sun o"},"fa-superpowers":{unicode:"\\f2dd",name:"Superpowers"},"fa-superscript":{unicode:"\\f12b",name:"Superscript"},"fa-table":{unicode:"\\f0ce",name:"Table"},"fa-tablet":{unicode:"\\f10a",name:"Tablet"},"fa-tachometer":{unicode:"\\f0e4",name:"Tachometer"},"fa-tag":{unicode:"\\f02b",name:"Tag"},"fa-tags":{unicode:"\\f02c",name:"Tags"},"fa-tasks":{unicode:"\\f0ae",name:"Tasks"},"fa-taxi":{unicode:"\\f1ba",name:"Taxi"},"fa-telegram":{unicode:"\\f2c6",name:"Telegram"},"fa-television":{unicode:"\\f26c",name:"Television"},"fa-tencent-weibo":{unicode:"\\f1d5",name:"Tencent weibo"},"fa-terminal":{unicode:"\\f120",name:"Terminal"},"fa-text-height":{unicode:"\\f034",name:"Text height"},"fa-text-width":{unicode:"\\f035",name:"Text width"},"fa-th":{unicode:"\\f00a",name:"Th"},"fa-th-large":{unicode:"\\f009",name:"Th large"},"fa-th-list":{unicode:"\\f00b",name:"Th list"},"fa-themeisle":{unicode:"\\f2b2",name:"Themeisle"},"fa-thermometer-empty":{unicode:"\\f2cb",name:"Thermometer empty"},"fa-thermometer-full":{unicode:"\\f2c7",name:"Thermometer full"},"fa-thermometer-half":{unicode:"\\f2c9",name:"Thermometer half"},"fa-thermometer-quarter":{unicode:"\\f2ca",name:"Thermometer quarter"},"fa-thermometer-three-quarters":{unicode:"\\f2c8",name:"Thermometer three quarters"},"fa-thumb-tack":{unicode:"\\f08d",name:"Thumb tack"},"fa-thumbs-down":{unicode:"\\f165",name:"Thumbs down"},"fa-thumbs-o-down":{unicode:"\\f088",name:"Thumbs o down"},"fa-thumbs-o-up":{unicode:"\\f087",name:"Thumbs o up"},"fa-thumbs-up":{unicode:"\\f164",name:"Thumbs up"},"fa-ticket":{unicode:"\\f145",name:"Ticket"},"fa-times":{unicode:"\\f00d",name:"Times"},"fa-times-circle":{unicode:"\\f057",name:"Times circle"},"fa-times-circle-o":{unicode:"\\f05c",name:"Times circle o"},"fa-tint":{unicode:"\\f043",name:"Tint"},"fa-toggle-off":{unicode:"\\f204",name:"Toggle off"},"fa-toggle-on":{unicode:"\\f205",name:"Toggle on"},"fa-trademark":{unicode:"\\f25c",name:"Trademark"},"fa-train":{unicode:"\\f238",name:"Train"},"fa-transgender":{unicode:"\\f224",name:"Transgender"},"fa-transgender-alt":{unicode:"\\f225",name:"Transgender alt"},"fa-trash":{unicode:"\\f1f8",name:"Trash"},"fa-trash-o":{unicode:"\\f014",name:"Trash o"},"fa-tree":{unicode:"\\f1bb",name:"Tree"},"fa-trello":{unicode:"\\f181",name:"Trello"},"fa-tripadvisor":{unicode:"\\f262",name:"Tripadvisor"},"fa-trophy":{unicode:"\\f091",name:"Trophy"},"fa-truck":{unicode:"\\f0d1",name:"Truck"},"fa-try":{unicode:"\\f195",name:"Try"},"fa-tty":{unicode:"\\f1e4",name:"Tty"},"fa-tumblr":{unicode:"\\f173",name:"Tumblr"},"fa-tumblr-square":{unicode:"\\f174",name:"Tumblr square"},"fa-twitch":{unicode:"\\f1e8",name:"Twitch"},"fa-twitter":{unicode:"\\f099",name:"Twitter"},"fa-twitter-square":{unicode:"\\f081",name:"Twitter square"},"fa-umbrella":{unicode:"\\f0e9",name:"Umbrella"},"fa-underline":{unicode:"\\f0cd",name:"Underline"},"fa-undo":{unicode:"\\f0e2",name:"Undo"},"fa-universal-access":{unicode:"\\f29a",name:"Universal access"},"fa-university":{unicode:"\\f19c",name:"University"},"fa-unlock":{unicode:"\\f09c",name:"Unlock"},"fa-unlock-alt":{unicode:"\\f13e",name:"Unlock alt"},"fa-upload":{unicode:"\\f093",name:"Upload"},"fa-usb":{unicode:"\\f287",name:"Usb"},"fa-usd":{unicode:"\\f155",name:"Usd"},"fa-user":{unicode:"\\f007",name:"User"},"fa-user-circle":{unicode:"\\f2bd",name:"User circle"},"fa-user-circle-o":{unicode:"\\f2be",name:"User circle o"},"fa-user-md":{unicode:"\\f0f0",name:"User md"},"fa-user-o":{unicode:"\\f2c0",name:"User o"},"fa-user-plus":{unicode:"\\f234",name:"User plus"},"fa-user-secret":{unicode:"\\f21b",name:"User secret"},"fa-user-times":{unicode:"\\f235",name:"User times"},"fa-users":{unicode:"\\f0c0",name:"Users"},"fa-venus":{unicode:"\\f221",name:"Venus"},"fa-venus-double":{unicode:"\\f226",name:"Venus double"},"fa-venus-mars":{unicode:"\\f228",name:"Venus mars"},"fa-viacoin":{unicode:"\\f237",name:"Viacoin"},"fa-viadeo":{unicode:"\\f2a9",name:"Viadeo"},"fa-viadeo-square":{unicode:"\\f2aa",name:"Viadeo square"},"fa-video-camera":{unicode:"\\f03d",name:"Video camera"},"fa-vimeo":{unicode:"\\f27d",name:"Vimeo"},"fa-vimeo-square":{unicode:"\\f194",name:"Vimeo square"},"fa-vine":{unicode:"\\f1ca",name:"Vine"},"fa-vk":{unicode:"\\f189",name:"Vk"},"fa-volume-control-phone":{unicode:"\\f2a0",name:"Volume control phone"},"fa-volume-down":{unicode:"\\f027",name:"Volume down"},"fa-volume-off":{unicode:"\\f026",name:"Volume off"},"fa-volume-up":{unicode:"\\f028",name:"Volume up"},"fa-weibo":{unicode:"\\f18a",name:"Weibo"},"fa-weixin":{unicode:"\\f1d7",name:"Weixin"},"fa-whatsapp":{unicode:"\\f232",name:"Whatsapp"},"fa-wheelchair":{unicode:"\\f193",name:"Wheelchair"},"fa-wheelchair-alt":{unicode:"\\f29b",name:"Wheelchair alt"},"fa-wifi":{unicode:"\\f1eb",name:"Wifi"},"fa-wikipedia-w":{unicode:"\\f266",name:"Wikipedia w"},"fa-window-close":{unicode:"\\f2d3",name:"Window close"},"fa-window-close-o":{unicode:"\\f2d4",name:"Window close o"},"fa-window-maximize":{unicode:"\\f2d0",name:"Window maximize"},"fa-window-minimize":{unicode:"\\f2d1",name:"Window minimize"},"fa-window-restore":{unicode:"\\f2d2",name:"Window restore"},"fa-windows":{unicode:"\\f17a",name:"Windows"},"fa-wordpress":{unicode:"\\f19a",name:"Wordpress"},"fa-wpbeginner":{unicode:"\\f297",name:"Wpbeginner"},"fa-wpexplorer":{unicode:"\\f2de",name:"Wpexplorer"},"fa-wpforms":{unicode:"\\f298",name:"Wpforms"},"fa-wrench":{unicode:"\\f0ad",name:"Wrench"},"fa-xing":{unicode:"\\f168",name:"Xing"},"fa-xing-square":{unicode:"\\f169",name:"Xing square"},"fa-y-combinator":{unicode:"\\f23b",name:"Y combinator"},"fa-yahoo":{unicode:"\\f19e",name:"Yahoo"},"fa-yelp":{unicode:"\\f1e9",name:"Yelp"},"fa-yoast":{unicode:"\\f2b1",name:"Yoast"},"fa-youtube":{unicode:"\\f167",name:"Youtube"},"fa-youtube-play":{unicode:"\\f16a",name:"Youtube play"},"fa-youtube-square":{unicode:"\\f166",name:"Youtube square"}},u=["glyph-glass","glyph-leaf","glyph-dog","glyph-user","glyph-girl","glyph-car","glyph-user-add","glyph-user-remove","glyph-film","glyph-magic","glyph-envelope","glyph-camera","glyph-heart","glyph-beach-umbrella","glyph-train","glyph-print","glyph-bin","glyph-music","glyph-note","glyph-heart-empty","glyph-home","glyph-snowflake","glyph-fire","glyph-magnet","glyph-parents","glyph-binoculars","glyph-road","glyph-search","glyph-cars","glyph-notes-2","glyph-pencil","glyph-bus","glyph-wifi-alt","glyph-luggage","glyph-old-man","glyph-woman","glyph-file","glyph-coins","glyph-airplane","glyph-notes","glyph-stats","glyph-charts","glyph-pie-chart","glyph-group","glyph-keys","glyph-calendar","glyph-router","glyph-camera-small","glyph-dislikes","glyph-star","glyph-link","glyph-eye-open","glyph-eye-close","glyph-alarm","glyph-clock","glyph-stopwatch","glyph-projector","glyph-history","glyph-truck","glyph-cargo","glyph-compass","glyph-keynote","glyph-paperclip","glyph-power","glyph-lightbulb","glyph-tag","glyph-tags","glyph-cleaning","glyph-ruller","glyph-gift","glyph-umbrella","glyph-book","glyph-bookmark","glyph-wifi","glyph-cup","glyph-stroller","glyph-headphones","glyph-headset","glyph-warning-sign","glyph-signal","glyph-retweet","glyph-refresh","glyph-roundabout","glyph-random","glyph-heat","glyph-repeat","glyph-display","glyph-log-book","glyph-address-book","glyph-building","glyph-eyedropper","glyph-adjust","glyph-tint","glyph-crop","glyph-vector-path-square","glyph-vector-path-circle","glyph-vector-path-polygon","glyph-vector-path-line","glyph-vector-path-curve","glyph-vector-path-all","glyph-font","glyph-italic","glyph-bold","glyph-text-underline","glyph-text-strike","glyph-text-height","glyph-text-width","glyph-text-resize","glyph-left-indent","glyph-right-indent","glyph-align-left","glyph-align-center","glyph-align-right","glyph-justify","glyph-list","glyph-text-smaller","glyph-text-bigger","glyph-embed","glyph-embed-close","glyph-table","glyph-message-full","glyph-message-empty","glyph-message-in","glyph-message-out","glyph-message-plus","glyph-message-minus","glyph-message-ban","glyph-message-flag","glyph-message-lock","glyph-message-new","glyph-inbox","glyph-inbox-plus","glyph-inbox-minus","glyph-inbox-lock","glyph-inbox-in","glyph-inbox-out","glyph-cogwheel","glyph-cogwheels","glyph-picture","glyph-adjust-alt","glyph-database-lock","glyph-database-plus","glyph-database-minus","glyph-database-ban","glyph-folder-open","glyph-folder-plus","glyph-folder-minus","glyph-folder-lock","glyph-folder-flag","glyph-folder-new","glyph-edit","glyph-new-window","glyph-check","glyph-unchecked","glyph-more-windows","glyph-show-big-thumbnails","glyph-show-thumbnails","glyph-show-thumbnails-with-lines","glyph-show-lines","glyph-playlist","glyph-imac","glyph-macbook","glyph-ipad","glyph-iphone","glyph-iphone-transfer","glyph-iphone-exchange","glyph-ipod","glyph-ipod-shuffle","glyph-ear-plugs","glyph-record","glyph-step-backward","glyph-fast-backward","glyph-rewind","glyph-play","glyph-pause","glyph-stop","glyph-forward","glyph-fast-forward","glyph-step-forward","glyph-eject","glyph-facetime-video","glyph-download-alt","glyph-mute","glyph-volume-down","glyph-volume-up","glyph-screenshot","glyph-move","glyph-more","glyph-brightness-reduce","glyph-brightness-increase","glyph-circle-plus","glyph-circle-minus","glyph-circle-remove","glyph-circle-ok","glyph-circle-question-mark","glyph-circle-info","glyph-circle-exclamation-mark","glyph-remove","glyph-ok","glyph-ban","glyph-download","glyph-upload","glyph-shopping-cart","glyph-lock","glyph-unlock","glyph-electricity","glyph-ok-2","glyph-remove-2","glyph-cart-out","glyph-cart-in","glyph-left-arrow","glyph-right-arrow","glyph-down-arrow","glyph-up-arrow","glyph-resize-small","glyph-resize-full","glyph-circle-arrow-left","glyph-circle-arrow-right","glyph-circle-arrow-top","glyph-circle-arrow-down","glyph-play-button","glyph-unshare","glyph-share","glyph-chevron-right","glyph-chevron-left","glyph-bluetooth","glyph-euro","glyph-usd","glyph-gbp","glyph-retweet-2","glyph-moon","glyph-sun","glyph-cloud","glyph-direction","glyph-brush","glyph-pen","glyph-zoom-in","glyph-zoom-out","glyph-pin","glyph-albums","glyph-rotation-lock","glyph-flash","glyph-google-maps","glyph-anchor","glyph-conversation","glyph-chat","glyph-male","glyph-female","glyph-asterisk","glyph-divide","glyph-snorkel-diving","glyph-scuba-diving","glyph-oxygen-bottle","glyph-fins","glyph-fishes","glyph-boat","glyph-delete","glyph-sheriffs-star","glyph-qrcode","glyph-barcode","glyph-pool","glyph-buoy","glyph-spade","glyph-bank","glyph-vcard","glyph-electrical-plug","glyph-flag","glyph-credit-card","glyph-keyboard-wireless","glyph-keyboard-wired","glyph-shield","glyph-ring","glyph-cake","glyph-drink","glyph-beer","glyph-fast-food","glyph-cutlery","glyph-pizza","glyph-birthday-cake","glyph-tablet","glyph-settings","glyph-bullets","glyph-cardio","glyph-t-shirt","glyph-pants","glyph-sweater","glyph-fabric","glyph-leather","glyph-scissors","glyph-bomb","glyph-skull","glyph-celebration","glyph-tea-kettle","glyph-french-press","glyph-coffe-cup","glyph-pot","glyph-grater","glyph-kettle","glyph-hospital","glyph-hospital-h","glyph-microphone","glyph-webcam","glyph-temple-christianity-church","glyph-temple-islam","glyph-temple-hindu","glyph-temple-buddhist","glyph-bicycle","glyph-life-preserver","glyph-share-alt","glyph-comments","glyph-flower","glyph-baseball","glyph-rugby","glyph-ax","glyph-table-tennis","glyph-bowling","glyph-tree-conifer","glyph-tree-deciduous","glyph-more-items","glyph-sort","glyph-filter","glyph-gamepad","glyph-playing-dices","glyph-calculator","glyph-tie","glyph-wallet","glyph-piano","glyph-sampler","glyph-podium","glyph-soccer-ball","glyph-blog","glyph-dashboard","glyph-certificate","glyph-bell","glyph-candle","glyph-pushpin","glyph-iphone-shake","glyph-pin-flag","glyph-turtle","glyph-rabbit","glyph-globe","glyph-briefcase","glyph-hdd","glyph-thumbs-up","glyph-thumbs-down","glyph-hand-right","glyph-hand-left","glyph-hand-up","glyph-hand-down","glyph-fullscreen","glyph-shopping-bag","glyph-book-open","glyph-nameplate","glyph-nameplate-alt","glyph-vases","glyph-bullhorn","glyph-dumbbell","glyph-suitcase","glyph-file-import","glyph-file-export","glyph-bug","glyph-crown","glyph-smoking","glyph-cloud-upload","glyph-cloud-download","glyph-restart","glyph-security-camera","glyph-expand","glyph-collapse","glyph-collapse-top","glyph-globe-af","glyph-global","glyph-spray","glyph-nails","glyph-claw-hammer","glyph-classic-hammer","glyph-hand-saw","glyph-riflescope","glyph-electrical-socket-eu","glyph-electrical-socket-us","glyph-message-forward","glyph-coat-hanger","glyph-dress","glyph-bathrobe","glyph-shirt","glyph-underwear","glyph-log-in","glyph-log-out","glyph-exit","glyph-new-window-alt","glyph-video-sd","glyph-video-hd","glyph-subtitles","glyph-sound-stereo","glyph-sound-dolby","glyph-sound-5-1","glyph-sound-6-1","glyph-sound-7-1","glyph-copyright-mark","glyph-registration-mark","glyph-radar","glyph-skateboard","glyph-golf-course","glyph-sorting","glyph-sort-by-alphabet","glyph-sort-by-alphabet-alt","glyph-sort-by-order","glyph-sort-by-order-alt","glyph-sort-by-attributes","glyph-sort-by-attributes-alt","glyph-compressed","glyph-package","glyph-cloud-plus","glyph-cloud-minus","glyph-disk-save","glyph-disk-open","glyph-disk-saved","glyph-disk-remove","glyph-disk-import","glyph-disk-export","glyph-tower","glyph-send","glyph-git-branch","glyph-git-create","glyph-git-private","glyph-git-delete","glyph-git-merge","glyph-git-pull-request","glyph-git-compare","glyph-git-commit","glyph-construction-cone","glyph-shoe-steps","glyph-plus","glyph-minus","glyph-redo","glyph-undo","glyph-golf","glyph-hockey","glyph-pipe","glyph-wrench","glyph-folder-closed","glyph-phone-alt","glyph-earphone","glyph-floppy-disk","glyph-floppy-saved","glyph-floppy-remove","glyph-floppy-save","glyph-floppy-open","glyph-translate","glyph-fax","glyph-factory","glyph-shop-window","glyph-shop","glyph-kiosk","glyph-kiosk-wheels","glyph-kiosk-light","glyph-kiosk-food","glyph-transfer","glyph-money","glyph-header","glyph-blacksmith","glyph-saw-blade","glyph-basketball","glyph-server","glyph-server-plus","glyph-server-minus","glyph-server-ban","glyph-server-flag","glyph-server-lock","glyph-server-new"],f=["social-pinterest","social-dropbox","social-google-plus","social-jolicloud","social-yahoo","social-blogger","social-picasa","social-amazon","social-tumblr","social-wordpress","social-instapaper","social-evernote","social-xing","social-zootool","social-dribbble","social-deviantart","social-read-it-later","social-linked-in","social-forrst","social-pinboard","social-behance","social-github","social-youtube","social-skitch","social-foursquare","social-quora","social-badoo","social-spotify","social-stumbleupon","social-readability","social-facebook","social-twitter","social-instagram","social-posterous-spaces","social-vimeo","social-flickr","social-last-fm","social-rss","social-skype","social-e-mail","social-vine","social-myspace","social-goodreads","social-apple","social-windows","social-yelp","social-playstation","social-xbox","social-android","social-ios"]}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"image"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.base()},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(i){var u=this,r=this.getTextControlEl();r&&r.length>0&&(t.isEmpty(i)?r.val(""):(r.val(i),n(u.control).parent().find(".alpaca-image-display img").attr("src",i)));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);n(r).change(function(){var t=n(this).val();n(i.control).parent().find(".alpaca-image-display img").attr("src",t)});i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()));t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=r.options.typeahead.datasets,i||(i={}),i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Image2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){if(self.sf){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})}},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("image2",t.Fields.Image2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCrop2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"imagecrop2"},setup:function(){var n=this;this.options.uploadfolder||(this.options.uploadfolder="");this.options.cropfolder||(this.options.cropfolder=this.options.uploadfolder);this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.width&&this.options.height&&(this.options.cropper.aspectRatio=this.options.width/this.options.height);this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.options.cropButtonHidden||(this.options.cropButtonHidden=!1);this.options.cropButtonHidden||(this.options.buttons={check:{value:"Crop",click:function(){this.cropImage()}}});this.base()},getValue:function(){var i=this,t;if(this.control&&this.control.length>0)return t=null,$image=i.getImage(),t=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},t.url=n(this.control).find("select").val(),t.url&&(this.dataSource&&this.dataSource[t.url]&&(t.id=this.dataSource[t.url].id),t.cropUrl=n(i.getControlEl()).attr("data-cropurl")),t},setValue:function(i){var r=this,u;i!==this.getValue()&&this.control&&typeof i!="undefined"&&i!=null&&(t.isEmpty(i)?(r.cropper(""),n(this.control).find("select").val(""),n(r.getControlEl()).attr("data-cropurl","")):t.isObject(i)?(i.url&&(i.url=i.url.split("?")[0]),i.cropUrl&&(i.cropUrl=i.cropUrl.split("?")[0]),i.cropdata&&Object.keys(i.cropdata).length>0?(u=i.cropdata[Object.keys(i.cropdata)[0]],r.cropper(i.url,u.cropper),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",u.url)):(r.cropper(i.url,i),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",i.cropUrl))):(r.cropper(i),n(this.control).find("select").val(i),n(r.getControlEl()).attr("data-cropurl","")),n(this.control).find("select").trigger("change.select2"))},getEnum:function(){if(this.schema){if(this.schema["enum"])return this.schema["enum"];if(this.schema.type&&this.schema.type==="array"&&this.schema.items&&this.schema.items["enum"])return this.schema.items["enum"]}},initControlEvents:function(){var n=this,t;if(n.base(),n.options.multiple){t=this.control.parent().find(".select2-search__field");t.focus(function(t){n.suspendBlurFocus||(n.onFocus.call(n,t),n.trigger("focus",t))});t.blur(function(t){n.suspendBlurFocus||(n.onBlur.call(n,t),n.trigger("blur",t))});this.control.on("change",function(t){n.onChange.call(n,t);n.trigger("change",t)})}},beforeRenderControl:function(i,r){var u=this;this.base(i,function(){if(u.selectOptions=[],u.sf){var f=function(){u.schema.enum=[];u.options.optionLabels=[];for(var n=0;n0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl().find("select")).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.uploadfolder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(n,t){u.refresh(function(){u.setValue(t.url)})})}}).data("loaded",!0);r()})},cropImage:function(){var t=this,i=t.getValue(),r={url:i.url,cropfolder:t.options.cropfolder,crop:i,id:"crop"};t.options.width&&t.options.height&&(r.resize={width:t.options.width,height:t.options.height});n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){n(t.getControlEl()).attr("data-cropurl",i.url);setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},getFileUrl:function(t){var i=this,r;i.sf&&(r={fileid:t},n.ajax({url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:i.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:r,success:function(n){return n},error:function(){return""}}))},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?((t!=r.originalUrl||r.url&&t!=r.url)&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data?this.data.url:"",!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).find("select");i.focus();t&&t(this)}},getTitle:function(){return"Image Crop 2 Field"},getDescription:function(){return"Image Crop 2 Field"}});t.registerFieldClass("imagecrop2",t.Fields.ImageCrop2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecrop"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Crop Field"},getDescription:function(){return"Image Crop Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var r=this,i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?(i.val(""),r.cropper("")):t.isObject(n)?(i.val(n.url),r.cropper(n.url,n)):(i.val(n),r.cropper(n)));this.updateMaxLengthIndicator()},getValue:function(){var i=this,n=null,t=this.getTextControlEl();return $image=i.getImage(),t&&t.length>0&&(n=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},n.url=t.val()),n},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;$image=n(i.control).parent().find(".alpaca-image-display img");i.sf?(i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){n(r).val(i.url);n(r).change()})}}).data("loaded",!0),n(r).change(function(){var t=n(this).val();i.cropper(t)}),i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()))):$image.hide();t()},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?(t!=r.originalUrl&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)&&u.sf){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){n(r).val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){n(r).val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecrop",t.Fields.ImageCropField)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropperField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecropper"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Cropper Field"},getDescription:function(){return"Image Cropper Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):t.isString(n)?i.val(n):(i.val(n.url),this.setCroppedData(n.cropdata)));this.updateMaxLengthIndicator()},getValue:function(){var n=null,t=this.getTextControlEl();return t&&t.length>0&&(n={url:t.val()},n.cropdata=this.getCroppedData()),n},getCroppedData:function(){var f=this.getTextControlEl(),i={};for(var t in this.options.croppers){var e=this.options.croppers[t],r=this.id+"-"+t,u=n("#"+r);i[t]=u.data("cropdata")}return i},cropAllImages:function(t){var i=this;for(var r in this.options.croppers){var f=this.id+"-"+r,s=n("#"+f),u=this.options.croppers[r],e={x:-1,y:-1,width:u.width,height:u.height,rotate:0},o=JSON.stringify({url:t,id:r,crop:e,resize:u,cropfolder:this.options.cropfolder});n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",async:!1,data:o,beforeSend:i.sf.setModuleHeaders}).done(function(n){var t={url:n.url,cropper:{}};i.setCroppedDataForId(f,t)}).fail(function(n,t,i){alert("Uh-oh, something broke: "+i)})}},setCroppedData:function(i){var e=this.getTextControlEl(),h=this.getFieldEl(),u,r,f,o;if(e&&e.length>0&&!t.isEmpty(i))for(r in this.options.croppers){var o=this.options.croppers[r],c=this.id+"-"+r,s=n("#"+c);cropdata=i[r];cropdata&&s.data("cropdata",cropdata);u||(u=s,n(u).addClass("active"),cropdata&&(f=n(h).find(".alpaca-image-display img.image"),o=f.data("cropper"),o&&f.cropper("setData",cropdata.cropper)))}},setCroppedDataForId:function(t,i){var u=this.getTextControlEl(),r;i&&(r=n("#"+t),r.data("cropdata",i))},getCurrentCropData:function(){var t=this.getFieldEl(),i=n(t).parent().find(".alpaca-form-tab.active");return n(i).data("cropdata")},setCurrentCropData:function(t){var i=this.getFieldEl(),r=n(i).parent().find(".alpaca-form-tab.active");n(r).data("cropdata",t)},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},cropChange:function(t){var u=t.data,f=u.getCurrentCropData(),e;if(f){var r=f.cropper,o=this,i=n(this).cropper("getData",{rounded:!0});(i.x!=r.x||i.y!=r.y||i.width!=r.width||i.height!=r.height||i.rotate!=r.rotate)&&(e={url:"",cropper:i},u.setCurrentCropData(e))}},getCropppersData:function(){var n,t,i;for(n in self.options.croppers)t=self.options.croppers[n],i=self.id+"-"+n},handlePostRender:function(t){var i=this,f=this.getTextControlEl(),s=this.getFieldEl(),r=n('Crop<\/a>'),e,o,u,a;r.click(function(){var u=i.getCroppedData(),e=JSON.stringify({url:f.val(),cropfolder:i.options.cropfolder,cropdata:u,croppers:i.options.croppers}),t;return n(r).css("cursor","wait"),t="CropImages",n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/"+t,contentType:"application/json; charset=utf-8",dataType:"json",data:e,beforeSend:i.sf.setModuleHeaders}).done(function(t){var u,f;for(u in i.options.croppers){var s=i.options.croppers[u],e=i.id+"-"+u,o=n("#"+e);t.cropdata[u]&&(f={url:t.cropdata[u].url,cropper:t.cropdata[u].crop},f&&o.data("cropdata",f))}setTimeout(function(){n(r).css("cursor","initial")},500)}).fail(function(t,i,r){alert("Uh-oh, something broke: "+r);n(s).css("cursor","initial")}),!1});for(o in i.options.croppers){var c=i.options.croppers[o],l=i.id+"-"+o,h=n(''+o+"<\/a>").appendTo(n(f).parent());h.data("cropopt",c);h.click(function(){u.off("crop.cropper");var t=n(this).data("cropdata"),f=n(this).data("cropopt");u.cropper("setAspectRatio",f.width/f.height);t?u.cropper("setData",t.cropper):u.cropper("reset");r.data("cropperButtonId",this.id);r.data("cropperId",n(this).attr("data-id"));n(this).parent().find(".alpaca-form-tab").removeClass("active");n(this).addClass("active");u.on("crop.cropper",i,i.cropChange);return!1});e||(e=h,n(e).addClass("active"),r.data("cropperButtonId",n(e).attr("id")),r.data("cropperId",n(e).attr("data-id")))}u=n(s).find(".alpaca-image-display img.image");u.cropper(i.options.cropper).on("built.cropper",function(){var t=n(e).data("cropopt"),r,u;t&&n(this).cropper("setAspectRatio",t.width/t.height);r=n(e).data("cropdata");r&&n(this).cropper("setData",r.cropper);u=n(s).find(".alpaca-image-display img.image");u.on("crop.cropper",i,i.cropChange)});i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){f.val(i.url);n(f).change()})}}).data("loaded",!0);n(f).change(function(){var t=n(this).val();n(s).find(".alpaca-image-display img.image").attr("src",t);u.cropper("replace",t);t&&i.cropAllImages(t)});r.appendTo(n(f).parent());i.options.manageurl&&(a=n('Manage files<\/a>').appendTo(n(f).parent()));t()},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){r.val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){r.val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecropper",t.Fields.ImageCropperField)}(jQuery),function(n){var t=n.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.numberDecimalSeparator=f.numberDecimalSeparator},setup:function(){this.base()},getFieldType:function(){return"number"},getValue:function(){var n=this._getControlVal(!1);return typeof n=="undefined"||""==n?n:(this.numberDecimalSeparator!="."&&(n=(""+n).replace(this.numberDecimalSeparator,".")),parseFloat(n))},setValue:function(n){var i=n;this.numberDecimalSeparator!="."&&(i=t.isEmpty(n)?"":(""+n).replace(".",this.numberDecimalSeparator));this.base(i)},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateNumber();return i.stringNotANumber={message:n?"":this.view.getMessage("stringNotANumber"),status:n},n=this._validateDivisibleBy(),i.stringDivisibleBy={message:n?"":t.substituteTokens(this.view.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:n},n=this._validateMaximum(),i.stringValueTooLarge={message:"",status:n},n||(i.stringValueTooLarge.message=this.schema.exclusiveMaximum?t.substituteTokens(this.view.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):t.substituteTokens(this.view.getMessage("stringValueTooLarge"),[this.schema.maximum])),n=this._validateMinimum(),i.stringValueTooSmall={message:"",status:n},n||(i.stringValueTooSmall.message=this.schema.exclusiveMinimum?t.substituteTokens(this.view.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):t.substituteTokens(this.view.getMessage("stringValueTooSmall"),[this.schema.minimum])),n=this._validateMultipleOf(),i.stringValueNotMultipleOf={message:"",status:n},n||(i.stringValueNotMultipleOf.message=t.substituteTokens(this.view.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),r&&i.stringNotANumber.status&&i.stringDivisibleBy.status&&i.stringValueTooLarge.status&&i.stringValueTooSmall.status&&i.stringValueNotMultipleOf.status},_validateNumber:function(){var n=this._getControlVal(),i,r;return(this.numberDecimalSeparator!="."&&(n=n.replace(this.numberDecimalSeparator,".")),typeof n=="number"&&(n=""+n),t.isValEmpty(n))?!0:(i=t.testRegex(t.regexps.number,n),!i)?!1:(r=this.getValue(),isNaN(r))?!1:!0},_validateDivisibleBy:function(){var n=this.getValue();return!t.isEmpty(this.schema.divisibleBy)&&n%this.schema.divisibleBy!=0?!1:!0},_validateMaximum:function(){var n=this.getValue();return!t.isEmpty(this.schema.maximum)&&(n>this.schema.maximum||!t.isEmpty(this.schema.exclusiveMaximum)&&n==this.schema.maximum&&this.schema.exclusiveMaximum)?!1:!0},_validateMinimum:function(){var n=this.getValue();return!t.isEmpty(this.schema.minimum)&&(n0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("role2",t.Fields.Role2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.User2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.role||(this.options.role="");n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/UsersLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"",d:n.options.folder,role:n.options.role,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getUserName:function(t,i){var r=this,u;r.sf&&(u={userid:t},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/GetUserInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error GetUserInfo "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},getTitle:function(){return"Select User Field"},getDescription:function(){return"Select User Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("user2",t.Fields.User2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.Select2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("select2",t.Fields.Select2Field)}(jQuery),function(n){var t=n.alpaca;n.alpaca.Fields.DnnUrlField=n.alpaca.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.sf=f.servicesFramework},setup:function(){this.base()},applyTypeAhead:function(){var t=this,f,i,r,u,e,o,s,h;if(t.sf){if(f=f={},i=i={},i.name||(i.name=t.getId()),r=r={},u={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},u.remote={url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Tabs?q=%QUERY&l="+t.culture,ajax:{beforeSend:t.sf.setModuleHeaders}},i.filter&&(u.remote.filter=i.filter),i.replace&&(u.remote.replace=i.replace),e=new Bloodhound(u),e.initialize(),i.source=e.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(o in i.templates)s=i.templates[o],typeof s=="string"&&(i.templates[o]=Handlebars.compile(s));n(t.control).typeahead(f,i);n(t.control).on("typeahead:autocompleted",function(i,r){t.setValue(r.value);n(t.control).change()});n(t.control).on("typeahead:selected",function(i,r){t.setValue(r.value);n(t.control).change()});if(r){if(r.autocompleted)n(t.control).on("typeahead:autocompleted",function(n,t){r.autocompleted(n,t)});if(r.selected)n(t.control).on("typeahead:selected",function(n,t){r.selected(n,t)})}h=n(t.control);n(t.control).change(function(){var i=n(this).val(),t=n(h).typeahead("val");t!==i&&n(h).typeahead("val",t)});n(t.field).find("span.twitter-typeahead").first().css("display","block");n(t.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("url",t.Fields.DnnUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Url2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.culture=f.culture;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("url2",t.Fields.Url2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.wysihtmlField=t.Fields.TextAreaField.extend({getFieldType:function(){return"wysihtml"},setup:function(){this.data||(this.data="");this.base();typeof this.options.wysihtml=="undefined"&&(this.options.wysihtml={})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control){var t=r.control,u=n(t).find("#"+r.id)[0];r.editor=new wysihtml5.Editor(u,{toolbar:n(t).find("#"+r.id+"-toolbar")[0],parserRules:wysihtml5ParserRules});wysihtml5.commands.custom_class={exec:function(n,t,i){return wysihtml5.commands.formatBlock.exec(n,t,"p",i,new RegExp(i,"g"))},state:function(n,t,i){return wysihtml5.commands.formatBlock.state(n,t,"p",i,new RegExp(i,"g"))}}}i()})},getEditor:function(){return this.editor},setValue:function(n){var t=this;this.editor&&this.editor.setValue(n);this.base(n)},getValue:function(){var n=null;return this.editor&&(n=this.editor.currentView=="source"?this.editor.sourceView.textarea.value:this.editor.getValue()),n},getTitle:function(){return"wysihtml"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("wysihtml",t.Fields.wysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.SummernoteField=t.Fields.TextAreaField.extend({getFieldType:function(){return"summernote"},setup:function(){this.data||(this.data="");this.base();typeof this.options.summernote=="undefined"&&(this.options.summernote={height:null,minHeight:null,maxHeight:null,focus:!0})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control&&n.fn.summernote)r.on("ready",function(){n(r.control).summernote(r.options.summernote)});n(r.control).bind("destroyed",function(){try{n(r.control).summernote("destroy")}catch(t){}});i()})},getTitle:function(){return"Summernote Editor"},getDescription:function(){return"Provides an instance of a Summernote Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{summernote:{title:"Summernote Editor options",description:"Use this entry to provide configuration options to the underlying Summernote plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{summernote:{type:"any"}}})}});t.registerFieldClass("summernote",t.Fields.SummernoteField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLCKEditorField=t.Fields.CKEditorField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base();this.options.ckeditor||(this.options.ckeditor={});CKEDITOR.config.enableConfigHelper&&!this.options.ckeditor.extraPlugins&&(this.options.ckeditor.extraPlugins="dnnpages,confighelper")},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlckeditor",t.Fields.MLCKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFile2Field=t.Fields.File2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).after('')}});t.registerFieldClass("mlfile2",t.Fields.MLFile2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFileField=t.Fields.FileField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlfile",t.Fields.MLFileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFolder2Field=t.Fields.Folder2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlfolder2",t.Fields.MLFolder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImage2Field=t.Fields.Image2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlimage2",t.Fields.MLImage2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImageField=t.Fields.ImageField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlimage",t.Fields.MLImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextAreaField=t.Fields.TextAreaField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltextarea",t.Fields.MLTextAreaField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltext",t.Fields.MLTextField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrl2Field=t.Fields.Url2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlurl2",t.Fields.MLUrl2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrlField=t.Fields.DnnUrlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlurl",t.Fields.MLUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLwysihtmlField=t.Fields.wysihtmlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"ML wysihtml Field"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing MLHTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("mlwysihtml",t.Fields.MLwysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Accordion=t.Fields.ArrayField.extend({getFieldType:function(){return"accordion"},setup:function(){var n=this;this.base();n.options.titleField||n.schema.items&&n.schema.items.properties&&Object.keys(n.schema.items.properties).length&&(n.options.titleField=Object.keys(n.schema.items.properties)[0])},createItem:function(t,i,r,u,f){var e=this;this.base(t,i,r,u,function(t){var u="[no title]",r=t.childrenByPropertyId[e.options.titleField],i;if(r){i=r.getValue();i=i?i:u;t.getContainerEl().closest(".panel").find(".panel-title a").first().text(i);r.on("keyup",function(){var t=this.getValue();t=t?t:u;n(this.getControlEl()).closest(".panel").find(".panel-title a").first().text(t)})}f&&f(t)})},getType:function(){return"array"},getTitle:function(){return"accordion Field"},getDescription:function(){return"Renders array with title"}});t.registerFieldClass("accordion",t.Fields.Accordion)}(jQuery); \ No newline at end of file +(function(n){function r(t,i){var r="";return t&&t.address_components&&n.each(t.address_components,function(t,u){n.each(u.types,function(n,t){if(t==i){r=u.long_name;return}});r!=""}),r}function u(t){var i="";return t&&t.address_components&&n.each(t.address_components,function(t,r){n.each(r.types,function(n,t){if(t=="country"){i=r.short_name;return}});i!=""}),i}function f(n){for(n=n.toUpperCase(),index=0;index<\/div>').appendTo(t),o=n('Geocode Address<\/a>').appendTo(t),o.button&&o.button({text:!0}),o.click(function(){if(google&&google.maps){var i=new google.maps.Geocoder,r=e.getAddress();i&&i.geocode({address:r},function(i,r){r===google.maps.GeocoderStatus.OK?(n(".alpaca-field.lng input.alpaca-control",t).val(i[0].geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i[0].geometry.location.lat())):e.displayMessage("Geocoding failed: "+r)})}else e.displayMessage("Google Map API is not installed.");return!1}).wrap(""),s=n(".alpaca-field.googlesearch input.alpaca-control",t)[0],s&&typeof google!="undefined"&&google&&google.maps&&(h=new google.maps.places.SearchBox(s),google.maps.event.addListener(h,"places_changed",function(){var e=h.getPlaces(),i;e.length!=0&&(i=e[0],n(".alpaca-field.postalcode input.alpaca-control",t).val(r(i,"postal_code")),n(".alpaca-field.city input.alpaca-control",t).val(r(i,"locality")),n(".alpaca-field.street input.alpaca-control",t).val(r(i,"route")),n(".alpaca-field.number input.alpaca-control",t).val(r(i,"street_number")),n(".alpaca-field.country select.alpaca-control",t).val(f(u(i,"country"))),n(".alpaca-field.lng input.alpaca-control",t).val(i.geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i.geometry.location.lat()),s.value="")}),google.maps.event.addDomListener(s,"keydown",function(n){n.keyCode==13&&n.preventDefault()})),e.options.showMapOnLoad&&o.click());i()})},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Address with Street, City, State, Postal code and Country. Also comes with support for Google map."},getSchemaOfOptions:function(){return i.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return i.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t=[{countryName:"Afghanistan",iso2:"AF",iso3:"AFG",phoneCode:"93"},{countryName:"Albania",iso2:"AL",iso3:"ALB",phoneCode:"355"},{countryName:"Algeria",iso2:"DZ",iso3:"DZA",phoneCode:"213"},{countryName:"American Samoa",iso2:"AS",iso3:"ASM",phoneCode:"1 684"},{countryName:"Andorra",iso2:"AD",iso3:"AND",phoneCode:"376"},{countryName:"Angola",iso2:"AO",iso3:"AGO",phoneCode:"244"},{countryName:"Anguilla",iso2:"AI",iso3:"AIA",phoneCode:"1 264"},{countryName:"Antarctica",iso2:"AQ",iso3:"ATA",phoneCode:"672"},{countryName:"Antigua and Barbuda",iso2:"AG",iso3:"ATG",phoneCode:"1 268"},{countryName:"Argentina",iso2:"AR",iso3:"ARG",phoneCode:"54"},{countryName:"Armenia",iso2:"AM",iso3:"ARM",phoneCode:"374"},{countryName:"Aruba",iso2:"AW",iso3:"ABW",phoneCode:"297"},{countryName:"Australia",iso2:"AU",iso3:"AUS",phoneCode:"61"},{countryName:"Austria",iso2:"AT",iso3:"AUT",phoneCode:"43"},{countryName:"Azerbaijan",iso2:"AZ",iso3:"AZE",phoneCode:"994"},{countryName:"Bahamas",iso2:"BS",iso3:"BHS",phoneCode:"1 242"},{countryName:"Bahrain",iso2:"BH",iso3:"BHR",phoneCode:"973"},{countryName:"Bangladesh",iso2:"BD",iso3:"BGD",phoneCode:"880"},{countryName:"Barbados",iso2:"BB",iso3:"BRB",phoneCode:"1 246"},{countryName:"Belarus",iso2:"BY",iso3:"BLR",phoneCode:"375"},{countryName:"Belgium",iso2:"BE",iso3:"BEL",phoneCode:"32"},{countryName:"Belize",iso2:"BZ",iso3:"BLZ",phoneCode:"501"},{countryName:"Benin",iso2:"BJ",iso3:"BEN",phoneCode:"229"},{countryName:"Bermuda",iso2:"BM",iso3:"BMU",phoneCode:"1 441"},{countryName:"Bhutan",iso2:"BT",iso3:"BTN",phoneCode:"975"},{countryName:"Bolivia",iso2:"BO",iso3:"BOL",phoneCode:"591"},{countryName:"Bosnia and Herzegovina",iso2:"BA",iso3:"BIH",phoneCode:"387"},{countryName:"Botswana",iso2:"BW",iso3:"BWA",phoneCode:"267"},{countryName:"Brazil",iso2:"BR",iso3:"BRA",phoneCode:"55"},{countryName:"British Indian Ocean Territory",iso2:"IO",iso3:"IOT",phoneCode:""},{countryName:"British Virgin Islands",iso2:"VG",iso3:"VGB",phoneCode:"1 284"},{countryName:"Brunei",iso2:"BN",iso3:"BRN",phoneCode:"673"},{countryName:"Bulgaria",iso2:"BG",iso3:"BGR",phoneCode:"359"},{countryName:"Burkina Faso",iso2:"BF",iso3:"BFA",phoneCode:"226"},{countryName:"Burma (Myanmar)",iso2:"MM",iso3:"MMR",phoneCode:"95"},{countryName:"Burundi",iso2:"BI",iso3:"BDI",phoneCode:"257"},{countryName:"Cambodia",iso2:"KH",iso3:"KHM",phoneCode:"855"},{countryName:"Cameroon",iso2:"CM",iso3:"CMR",phoneCode:"237"},{countryName:"Canada",iso2:"CA",iso3:"CAN",phoneCode:"1"},{countryName:"Cape Verde",iso2:"CV",iso3:"CPV",phoneCode:"238"},{countryName:"Cayman Islands",iso2:"KY",iso3:"CYM",phoneCode:"1 345"},{countryName:"Central African Republic",iso2:"CF",iso3:"CAF",phoneCode:"236"},{countryName:"Chad",iso2:"TD",iso3:"TCD",phoneCode:"235"},{countryName:"Chile",iso2:"CL",iso3:"CHL",phoneCode:"56"},{countryName:"China",iso2:"CN",iso3:"CHN",phoneCode:"86"},{countryName:"Christmas Island",iso2:"CX",iso3:"CXR",phoneCode:"61"},{countryName:"Cocos (Keeling) Islands",iso2:"CC",iso3:"CCK",phoneCode:"61"},{countryName:"Colombia",iso2:"CO",iso3:"COL",phoneCode:"57"},{countryName:"Comoros",iso2:"KM",iso3:"COM",phoneCode:"269"},{countryName:"Cook Islands",iso2:"CK",iso3:"COK",phoneCode:"682"},{countryName:"Costa Rica",iso2:"CR",iso3:"CRC",phoneCode:"506"},{countryName:"Croatia",iso2:"HR",iso3:"HRV",phoneCode:"385"},{countryName:"Cuba",iso2:"CU",iso3:"CUB",phoneCode:"53"},{countryName:"Cyprus",iso2:"CY",iso3:"CYP",phoneCode:"357"},{countryName:"Czech Republic",iso2:"CZ",iso3:"CZE",phoneCode:"420"},{countryName:"Democratic Republic of the Congo",iso2:"CD",iso3:"COD",phoneCode:"243"},{countryName:"Denmark",iso2:"DK",iso3:"DNK",phoneCode:"45"},{countryName:"Djibouti",iso2:"DJ",iso3:"DJI",phoneCode:"253"},{countryName:"Dominica",iso2:"DM",iso3:"DMA",phoneCode:"1 767"},{countryName:"Dominican Republic",iso2:"DO",iso3:"DOM",phoneCode:"1 809"},{countryName:"Ecuador",iso2:"EC",iso3:"ECU",phoneCode:"593"},{countryName:"Egypt",iso2:"EG",iso3:"EGY",phoneCode:"20"},{countryName:"El Salvador",iso2:"SV",iso3:"SLV",phoneCode:"503"},{countryName:"Equatorial Guinea",iso2:"GQ",iso3:"GNQ",phoneCode:"240"},{countryName:"Eritrea",iso2:"ER",iso3:"ERI",phoneCode:"291"},{countryName:"Estonia",iso2:"EE",iso3:"EST",phoneCode:"372"},{countryName:"Ethiopia",iso2:"ET",iso3:"ETH",phoneCode:"251"},{countryName:"Falkland Islands",iso2:"FK",iso3:"FLK",phoneCode:"500"},{countryName:"Faroe Islands",iso2:"FO",iso3:"FRO",phoneCode:"298"},{countryName:"Fiji",iso2:"FJ",iso3:"FJI",phoneCode:"679"},{countryName:"Finland",iso2:"FI",iso3:"FIN",phoneCode:"358"},{countryName:"France",iso2:"FR",iso3:"FRA",phoneCode:"33"},{countryName:"French Polynesia",iso2:"PF",iso3:"PYF",phoneCode:"689"},{countryName:"Gabon",iso2:"GA",iso3:"GAB",phoneCode:"241"},{countryName:"Gambia",iso2:"GM",iso3:"GMB",phoneCode:"220"},{countryName:"Gaza Strip",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Georgia",iso2:"GE",iso3:"GEO",phoneCode:"995"},{countryName:"Germany",iso2:"DE",iso3:"DEU",phoneCode:"49"},{countryName:"Ghana",iso2:"GH",iso3:"GHA",phoneCode:"233"},{countryName:"Gibraltar",iso2:"GI",iso3:"GIB",phoneCode:"350"},{countryName:"Greece",iso2:"GR",iso3:"GRC",phoneCode:"30"},{countryName:"Greenland",iso2:"GL",iso3:"GRL",phoneCode:"299"},{countryName:"Grenada",iso2:"GD",iso3:"GRD",phoneCode:"1 473"},{countryName:"Guam",iso2:"GU",iso3:"GUM",phoneCode:"1 671"},{countryName:"Guatemala",iso2:"GT",iso3:"GTM",phoneCode:"502"},{countryName:"Guinea",iso2:"GN",iso3:"GIN",phoneCode:"224"},{countryName:"Guinea-Bissau",iso2:"GW",iso3:"GNB",phoneCode:"245"},{countryName:"Guyana",iso2:"GY",iso3:"GUY",phoneCode:"592"},{countryName:"Haiti",iso2:"HT",iso3:"HTI",phoneCode:"509"},{countryName:"Holy See (Vatican City)",iso2:"VA",iso3:"VAT",phoneCode:"39"},{countryName:"Honduras",iso2:"HN",iso3:"HND",phoneCode:"504"},{countryName:"Hong Kong",iso2:"HK",iso3:"HKG",phoneCode:"852"},{countryName:"Hungary",iso2:"HU",iso3:"HUN",phoneCode:"36"},{countryName:"Iceland",iso2:"IS",iso3:"IS",phoneCode:"354"},{countryName:"India",iso2:"IN",iso3:"IND",phoneCode:"91"},{countryName:"Indonesia",iso2:"ID",iso3:"IDN",phoneCode:"62"},{countryName:"Iran",iso2:"IR",iso3:"IRN",phoneCode:"98"},{countryName:"Iraq",iso2:"IQ",iso3:"IRQ",phoneCode:"964"},{countryName:"Ireland",iso2:"IE",iso3:"IRL",phoneCode:"353"},{countryName:"Isle of Man",iso2:"IM",iso3:"IMN",phoneCode:"44"},{countryName:"Israel",iso2:"IL",iso3:"ISR",phoneCode:"972"},{countryName:"Italy",iso2:"IT",iso3:"ITA",phoneCode:"39"},{countryName:"Ivory Coast",iso2:"CI",iso3:"CIV",phoneCode:"225"},{countryName:"Jamaica",iso2:"JM",iso3:"JAM",phoneCode:"1 876"},{countryName:"Japan",iso2:"JP",iso3:"JPN",phoneCode:"81"},{countryName:"Jersey",iso2:"JE",iso3:"JEY",phoneCode:""},{countryName:"Jordan",iso2:"JO",iso3:"JOR",phoneCode:"962"},{countryName:"Kazakhstan",iso2:"KZ",iso3:"KAZ",phoneCode:"7"},{countryName:"Kenya",iso2:"KE",iso3:"KEN",phoneCode:"254"},{countryName:"Kiribati",iso2:"KI",iso3:"KIR",phoneCode:"686"},{countryName:"Kosovo",iso2:"",iso3:"",phoneCode:"381"},{countryName:"Kuwait",iso2:"KW",iso3:"KWT",phoneCode:"965"},{countryName:"Kyrgyzstan",iso2:"KG",iso3:"KGZ",phoneCode:"996"},{countryName:"Laos",iso2:"LA",iso3:"LAO",phoneCode:"856"},{countryName:"Latvia",iso2:"LV",iso3:"LVA",phoneCode:"371"},{countryName:"Lebanon",iso2:"LB",iso3:"LBN",phoneCode:"961"},{countryName:"Lesotho",iso2:"LS",iso3:"LSO",phoneCode:"266"},{countryName:"Liberia",iso2:"LR",iso3:"LBR",phoneCode:"231"},{countryName:"Libya",iso2:"LY",iso3:"LBY",phoneCode:"218"},{countryName:"Liechtenstein",iso2:"LI",iso3:"LIE",phoneCode:"423"},{countryName:"Lithuania",iso2:"LT",iso3:"LTU",phoneCode:"370"},{countryName:"Luxembourg",iso2:"LU",iso3:"LUX",phoneCode:"352"},{countryName:"Macau",iso2:"MO",iso3:"MAC",phoneCode:"853"},{countryName:"Macedonia",iso2:"MK",iso3:"MKD",phoneCode:"389"},{countryName:"Madagascar",iso2:"MG",iso3:"MDG",phoneCode:"261"},{countryName:"Malawi",iso2:"MW",iso3:"MWI",phoneCode:"265"},{countryName:"Malaysia",iso2:"MY",iso3:"MYS",phoneCode:"60"},{countryName:"Maldives",iso2:"MV",iso3:"MDV",phoneCode:"960"},{countryName:"Mali",iso2:"ML",iso3:"MLI",phoneCode:"223"},{countryName:"Malta",iso2:"MT",iso3:"MLT",phoneCode:"356"},{countryName:"Marshall Islands",iso2:"MH",iso3:"MHL",phoneCode:"692"},{countryName:"Mauritania",iso2:"MR",iso3:"MRT",phoneCode:"222"},{countryName:"Mauritius",iso2:"MU",iso3:"MUS",phoneCode:"230"},{countryName:"Mayotte",iso2:"YT",iso3:"MYT",phoneCode:"262"},{countryName:"Mexico",iso2:"MX",iso3:"MEX",phoneCode:"52"},{countryName:"Micronesia",iso2:"FM",iso3:"FSM",phoneCode:"691"},{countryName:"Moldova",iso2:"MD",iso3:"MDA",phoneCode:"373"},{countryName:"Monaco",iso2:"MC",iso3:"MCO",phoneCode:"377"},{countryName:"Mongolia",iso2:"MN",iso3:"MNG",phoneCode:"976"},{countryName:"Montenegro",iso2:"ME",iso3:"MNE",phoneCode:"382"},{countryName:"Montserrat",iso2:"MS",iso3:"MSR",phoneCode:"1 664"},{countryName:"Morocco",iso2:"MA",iso3:"MAR",phoneCode:"212"},{countryName:"Mozambique",iso2:"MZ",iso3:"MOZ",phoneCode:"258"},{countryName:"Namibia",iso2:"NA",iso3:"NAM",phoneCode:"264"},{countryName:"Nauru",iso2:"NR",iso3:"NRU",phoneCode:"674"},{countryName:"Nepal",iso2:"NP",iso3:"NPL",phoneCode:"977"},{countryName:"Netherlands",iso2:"NL",iso3:"NLD",phoneCode:"31"},{countryName:"Netherlands Antilles",iso2:"AN",iso3:"ANT",phoneCode:"599"},{countryName:"New Caledonia",iso2:"NC",iso3:"NCL",phoneCode:"687"},{countryName:"New Zealand",iso2:"NZ",iso3:"NZL",phoneCode:"64"},{countryName:"Nicaragua",iso2:"NI",iso3:"NIC",phoneCode:"505"},{countryName:"Niger",iso2:"NE",iso3:"NER",phoneCode:"227"},{countryName:"Nigeria",iso2:"NG",iso3:"NGA",phoneCode:"234"},{countryName:"Niue",iso2:"NU",iso3:"NIU",phoneCode:"683"},{countryName:"Norfolk Island",iso2:"",iso3:"NFK",phoneCode:"672"},{countryName:"North Korea",iso2:"KP",iso3:"PRK",phoneCode:"850"},{countryName:"Northern Mariana Islands",iso2:"MP",iso3:"MNP",phoneCode:"1 670"},{countryName:"Norway",iso2:"NO",iso3:"NOR",phoneCode:"47"},{countryName:"Oman",iso2:"OM",iso3:"OMN",phoneCode:"968"},{countryName:"Pakistan",iso2:"PK",iso3:"PAK",phoneCode:"92"},{countryName:"Palau",iso2:"PW",iso3:"PLW",phoneCode:"680"},{countryName:"Panama",iso2:"PA",iso3:"PAN",phoneCode:"507"},{countryName:"Papua New Guinea",iso2:"PG",iso3:"PNG",phoneCode:"675"},{countryName:"Paraguay",iso2:"PY",iso3:"PRY",phoneCode:"595"},{countryName:"Peru",iso2:"PE",iso3:"PER",phoneCode:"51"},{countryName:"Philippines",iso2:"PH",iso3:"PHL",phoneCode:"63"},{countryName:"Pitcairn Islands",iso2:"PN",iso3:"PCN",phoneCode:"870"},{countryName:"Poland",iso2:"PL",iso3:"POL",phoneCode:"48"},{countryName:"Portugal",iso2:"PT",iso3:"PRT",phoneCode:"351"},{countryName:"Puerto Rico",iso2:"PR",iso3:"PRI",phoneCode:"1"},{countryName:"Qatar",iso2:"QA",iso3:"QAT",phoneCode:"974"},{countryName:"Republic of the Congo",iso2:"CG",iso3:"COG",phoneCode:"242"},{countryName:"Romania",iso2:"RO",iso3:"ROU",phoneCode:"40"},{countryName:"Russia",iso2:"RU",iso3:"RUS",phoneCode:"7"},{countryName:"Rwanda",iso2:"RW",iso3:"RWA",phoneCode:"250"},{countryName:"Saint Barthelemy",iso2:"BL",iso3:"BLM",phoneCode:"590"},{countryName:"Saint Helena",iso2:"SH",iso3:"SHN",phoneCode:"290"},{countryName:"Saint Kitts and Nevis",iso2:"KN",iso3:"KNA",phoneCode:"1 869"},{countryName:"Saint Lucia",iso2:"LC",iso3:"LCA",phoneCode:"1 758"},{countryName:"Saint Martin",iso2:"MF",iso3:"MAF",phoneCode:"1 599"},{countryName:"Saint Pierre and Miquelon",iso2:"PM",iso3:"SPM",phoneCode:"508"},{countryName:"Saint Vincent and the Grenadines",iso2:"VC",iso3:"VCT",phoneCode:"1 784"},{countryName:"Samoa",iso2:"WS",iso3:"WSM",phoneCode:"685"},{countryName:"San Marino",iso2:"SM",iso3:"SMR",phoneCode:"378"},{countryName:"Sao Tome and Principe",iso2:"ST",iso3:"STP",phoneCode:"239"},{countryName:"Saudi Arabia",iso2:"SA",iso3:"SAU",phoneCode:"966"},{countryName:"Senegal",iso2:"SN",iso3:"SEN",phoneCode:"221"},{countryName:"Serbia",iso2:"RS",iso3:"SRB",phoneCode:"381"},{countryName:"Seychelles",iso2:"SC",iso3:"SYC",phoneCode:"248"},{countryName:"Sierra Leone",iso2:"SL",iso3:"SLE",phoneCode:"232"},{countryName:"Singapore",iso2:"SG",iso3:"SGP",phoneCode:"65"},{countryName:"Slovakia",iso2:"SK",iso3:"SVK",phoneCode:"421"},{countryName:"Slovenia",iso2:"SI",iso3:"SVN",phoneCode:"386"},{countryName:"Solomon Islands",iso2:"SB",iso3:"SLB",phoneCode:"677"},{countryName:"Somalia",iso2:"SO",iso3:"SOM",phoneCode:"252"},{countryName:"South Africa",iso2:"ZA",iso3:"ZAF",phoneCode:"27"},{countryName:"South Korea",iso2:"KR",iso3:"KOR",phoneCode:"82"},{countryName:"Spain",iso2:"ES",iso3:"ESP",phoneCode:"34"},{countryName:"Sri Lanka",iso2:"LK",iso3:"LKA",phoneCode:"94"},{countryName:"Sudan",iso2:"SD",iso3:"SDN",phoneCode:"249"},{countryName:"Suriname",iso2:"SR",iso3:"SUR",phoneCode:"597"},{countryName:"Svalbard",iso2:"SJ",iso3:"SJM",phoneCode:""},{countryName:"Swaziland",iso2:"SZ",iso3:"SWZ",phoneCode:"268"},{countryName:"Sweden",iso2:"SE",iso3:"SWE",phoneCode:"46"},{countryName:"Switzerland",iso2:"CH",iso3:"CHE",phoneCode:"41"},{countryName:"Syria",iso2:"SY",iso3:"SYR",phoneCode:"963"},{countryName:"Taiwan",iso2:"TW",iso3:"TWN",phoneCode:"886"},{countryName:"Tajikistan",iso2:"TJ",iso3:"TJK",phoneCode:"992"},{countryName:"Tanzania",iso2:"TZ",iso3:"TZA",phoneCode:"255"},{countryName:"Thailand",iso2:"TH",iso3:"THA",phoneCode:"66"},{countryName:"Timor-Leste",iso2:"TL",iso3:"TLS",phoneCode:"670"},{countryName:"Togo",iso2:"TG",iso3:"TGO",phoneCode:"228"},{countryName:"Tokelau",iso2:"TK",iso3:"TKL",phoneCode:"690"},{countryName:"Tonga",iso2:"TO",iso3:"TON",phoneCode:"676"},{countryName:"Trinidad and Tobago",iso2:"TT",iso3:"TTO",phoneCode:"1 868"},{countryName:"Tunisia",iso2:"TN",iso3:"TUN",phoneCode:"216"},{countryName:"Turkey",iso2:"TR",iso3:"TUR",phoneCode:"90"},{countryName:"Turkmenistan",iso2:"TM",iso3:"TKM",phoneCode:"993"},{countryName:"Turks and Caicos Islands",iso2:"TC",iso3:"TCA",phoneCode:"1 649"},{countryName:"Tuvalu",iso2:"TV",iso3:"TUV",phoneCode:"688"},{countryName:"Uganda",iso2:"UG",iso3:"UGA",phoneCode:"256"},{countryName:"Ukraine",iso2:"UA",iso3:"UKR",phoneCode:"380"},{countryName:"United Arab Emirates",iso2:"AE",iso3:"ARE",phoneCode:"971"},{countryName:"United Kingdom",iso2:"GB",iso3:"GBR",phoneCode:"44"},{countryName:"United States",iso2:"US",iso3:"USA",phoneCode:"1"},{countryName:"Uruguay",iso2:"UY",iso3:"URY",phoneCode:"598"},{countryName:"US Virgin Islands",iso2:"VI",iso3:"VIR",phoneCode:"1 340"},{countryName:"Uzbekistan",iso2:"UZ",iso3:"UZB",phoneCode:"998"},{countryName:"Vanuatu",iso2:"VU",iso3:"VUT",phoneCode:"678"},{countryName:"Venezuela",iso2:"VE",iso3:"VEN",phoneCode:"58"},{countryName:"Vietnam",iso2:"VN",iso3:"VNM",phoneCode:"84"},{countryName:"Wallis and Futuna",iso2:"WF",iso3:"WLF",phoneCode:"681"},{countryName:"West Bank",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Western Sahara",iso2:"EH",iso3:"ESH",phoneCode:""},{countryName:"Yemen",iso2:"YE",iso3:"YEM",phoneCode:"967"},{countryName:"Zambia",iso2:"ZM",iso3:"ZMB",phoneCode:"260"},{countryName:"Zimbabwe",iso2:"ZW",iso3:"ZWE",phoneCode:"263"}];i.registerFieldClass("address",i.Fields.AddressField)})(jQuery),function(n){var t=n.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data="");this.base();typeof this.options.ckeditor=="undefined"&&(this.options.ckeditor={});typeof this.options.configset=="undefined"&&(this.options.configset="")},afterRenderControl:function(t,i){var r=this;this.base(t,function(){var t,u;if(!r.isDisplayOnly()&&r.control&&typeof CKEDITOR!="undefined"){t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]};r.options.configset=="basic"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="standard"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Table","Smiley","SpecialChar","Iframe"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","ShowBlocks","Source"]}],format_tags:"p;h1;h2;h3;pre;div",extraAllowedContent:"table tr th td caption[*](*);div span(*);",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="full"&&(t={toolbar:[{name:"document",items:["Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About","-","Source"]}],format_tags:"p;h1;h2;h3;pre;div",allowedContentRules:!0,removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]});u=n.extend({},t,r.options.ckeditor);r.on("ready",function(){r.editor||(r.editor=CKEDITOR.replace(n(r.control)[0],u),r.initCKEditorEvents())})}n(r.control).bind("destroyed",function(){if(r.editor){r.editor.removeAllListeners();try{r.editor.destroy(!1)}catch(n){}r.editor=null}});i()})},initCKEditorEvents:function(){var n=this;if(n.editor){n.editor.on("click",function(t){n.onClick.call(n,t);n.trigger("click",t)});n.editor.on("change",function(t){n.onChange();n.triggerWithPropagation("change",t)});n.editor.on("blur",function(t){n.onBlur();n.trigger("blur",t)});n.editor.on("focus",function(t){n.onFocus.call(n,t);n.trigger("focus",t)});n.editor.on("key",function(t){n.onKeyPress.call(n,t);n.trigger("keypress",t)})}},setValue:function(n){var t=this;this.base(n);t.editor&&t.editor.setData(n)},getControlValue:function(){var n=this,t=null;return n.editor&&(t=n.editor.getData()),t},destroy:function(){var n=this;n.editor&&(n.editor.destroy(),n.editor=null);this.base()},getTitle:function(){return"CK Editor"},getDescription:function(){return"Provides an instance of a CK Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{ckeditor:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{ckeditor:{type:"any"}}})}});t.registerFieldClass("ckeditor",t.Fields.CKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return"MM/DD/YYYY"},getDefaultExtraFormats:function(){return[]},setup:function(){var n=this,t;this.base();n.options.picker||(n.options.picker={});typeof n.options.picker.useCurrent=="undefined"&&(n.options.picker.useCurrent=!1);!n.options.dateFormat;n.options.picker.format||(n.options.picker.format=n.options.dateFormat);n.options.picker.extraFormats||(t=n.getDefaultExtraFormats(),t&&(n.options.picker.extraFormats=t));typeof n.options.manualEntry=="undefined"&&(n.options.manualEntry=!1);typeof n.options.icon=="undefined"&&(n.options.icon=!1)},onKeyPress:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},onKeyDown:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},beforeRenderControl:function(n,t){this.field.css("position","relative");t()},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(r.view.type!=="display"){if(t=r.getControlEl(),r.options.icon){r.getControlEl().wrap('
<\/div>');r.getControlEl().after('<\/span><\/span>');var t=r.getControlEl().parent()}if(n.fn.datetimepicker){t.datetimepicker(r.options.picker);r.picker=t.data("DateTimePicker");t.on("dp.change",function(n){setTimeout(function(){r.onChange.call(r,n);r.triggerWithPropagation("change",n)},250)});r.data&&r.picker.date(r.data)}}i()})},getDate:function(){var n=this,t=null;try{t=n.picker?n.picker.date()?n.picker.date()._d:null:new Date(this.getValue())}catch(i){console.error(i)}return t},date:function(){return this.getDate()},onChange:function(){this.base();this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var r=this.base(),n=this.validation,i=this._validateDateFormat();return n.invalidDate={message:i?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:i},r&&n.invalidDate.status},_validateDateFormat:function(){var n=this,r=!0,u,i,t;if(n.options.dateFormat&&(u=n.getValue(),u||n.isRequired())){if(i=[],i.push(n.options.dateFormat),n.options.picker&&n.options.picker.extraFormats)for(t=0;tBootstrap DateTime Picker<\/a>.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dateFormat:{type:"text"},picker:{type:"any"}}})}});t.registerMessages({invalidDate:"Invalid date for format {0}"});t.registerFieldClass("date",t.Fields.DateField);t.registerDefaultFormatFieldMapping("date","date")}(jQuery),function(n){var t=n.alpaca;t.Fields.MultiUploadField=t.Fields.ArrayField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.itemsCount=0},setup:function(){var t,n;if(this.base(),this.options.uploadfolder||(this.options.uploadfolder=""),this.urlfield="",this.options&&this.options.items&&(this.options.items.fields||this.options.items.type)&&this.options.items.type!="image"&&this.options.items.fields)for(t in this.options.items.fields)if(n=this.options.items.fields[t],n.type=="image"||n.type=="mlimage"||n.type=="imagecrop"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="file"||n.type=="mlfile"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="image2"||n.type=="mlimage2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}else if(n.type=="file2"||n.type=="mlfile2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}},afterRenderContainer:function(t,i){var r=this;this.base(t,function(){var t=r.getContainerEl(),f,u;r.isDisplayOnly()||(n('
<\/div>').prependTo(t),f=n('
<\/div><\/div>').prependTo(t),u=n('').prependTo(t),this.wrapper=n("<\/span>"),this.wrapper.text("Upload muliple files"),u.wrap(this.wrapper),r.sf&&u.fileupload({dataType:"json",url:r.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:r.options.uploadfolder},beforeSend:r.sf.setModuleHeaders,change:function(){r.itemsCount=r.children.length},add:function(n,t){t.submit()},progressall:function(t,i){var r=parseInt(i.loaded/i.total*100,10);n(".bar",f).css("width",r+"%").find("span").html(r+"%")},done:function(t,i){i.result&&n.each(i.result,function(n,t){r.handleActionBarAddItemClick(r.itemsCount-1,function(n){var i=n.getValue();r.urlfield==""?i=t.url:i[r.urlfield]=t.url;n.setValue(i)});r.itemsCount++})}}).data("loaded",!0));i()})},getTitle:function(){return"Multi Upload"},getDescription:function(){return"Multi Upload for images and files"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("multiupload",t.Fields.MultiUploadField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DocumentsField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Title:{title:"Title",type:"string"},File:{title:"File",type:"string"}}};t.merge(this.options.items,{fields:{File:{type:"file"}}});this.urlfield="File"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("documents",t.Fields.DocumentsField)}(jQuery),function(n){var t=n.alpaca;t.Fields.File2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"file2"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.options.showUrlUpload||(this.options.showUrlUpload=!1);this.options.showFileUpload||(this.options.showFileUpload=!1);this.options.showUrlUpload&&(this.options.buttons={downloadButton:{value:"Upload External File",click:function(){this.DownLoadFile()}}});n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FilesLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"*",d:n.options.folder,filter:n.options.filter,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(i=n(this.control).find("select").val(),typeof i=="undefined")i=this.data;else if(t.isArray(i))for(r=0;r0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n("select",u.getControlEl()).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.folder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){if(t&&t.files&&t.files.length>0)if(u.isFilter(t.files[0].name))t.submit();else{alert("file not in filter");return}},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){$select=n(u.control).find("select");u.options.lazyLoading?u.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):u.refresh(function(){$select=n(u.control).find("select");$select.val(i.id).change()})})}}).data("loaded",!0);r()})},getFileUrl:function(t,i){var r=this,u;r.sf&&(u={fileid:t,folder:r.options.folder},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error getFileUrl "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=u.val(),r;if(!i||!t.isURL(i)){alert("url not valid");return}if(!t.isFilter(i)){alert("url not in filter");return}r={url:i,uploadfolder:t.options.folder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):($select=n(t.control).find("select"),t.options.lazyLoading?t.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):t.refresh(function(){$select=n(t.control).find("select");$select.val(i.id).change()}));setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)},isFilter:function(n){if(this.options.filter){var t=new RegExp(this.options.filter,"i");return n.length<2083&&t.test(n)}return!0},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("file2",t.Fields.File2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.FileField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"file"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.downloadButton||(this.options.downloadButton=!1);this.options.downloadButton&&(this.options.buttons={downloadButton:{value:"Download",click:function(){this.DownLoadFile()}}});this.base()},getTitle:function(){return"File Field"},getDescription:function(){return"File Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):i.val(n));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl();i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Files?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=t.getValue(),f=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|(www‌​.)?){1}([0-9A-Za-z-‌​\\.@:%_+~#=]+)+((\\‌​.[a-zA-Z]{2,3})+)(/(‌​.)*)?(\\?(.)*)?"),r;if(!i||!t.isURL(i)){alert("url not valid");return}r={url:i,uploadfolder:t.options.uploadfolder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):(t.setValue(i.url),n(u).change());setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)}});t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Folder2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("folder2",t.Fields.Folder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.GalleryField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Image:{title:"Image",type:"string"}}};t.merge(this.options.items,{fields:{Image:{type:"image"}}});this.urlfield="Image"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("gallery",t.Fields.GalleryField)}(jQuery),function(n){var t=n.alpaca;t.Fields.GuidField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f)},setup:function(){var n=this;this.base()},setValue:function(n){t.isEmpty(n)&&(n=this.createGuid());this.base(n)},getValue:function(){var n=this.base();return(t.isEmpty(n)||n=="")&&(n=this.createGuid()),n},createGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})},getTitle:function(){return"Guid Field"},getDescription:function(){return"Guid field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("guid",t.Fields.GuidField)}(jQuery),function(n){var t=n.alpaca;t.Fields.IconField=t.Fields.TextField.extend({setup:function(){this.options.glyphicons===undefined&&(this.options.glyphicons=!1);this.options.bootstrap===undefined&&(this.options.bootstrap=!1);this.options.fontawesome===undefined&&(this.options.fontawesome=!0);this.base()},setValue:function(n){this.base(n);this.loadIcons()},getTitle:function(){return"Icon Field"},getDescription:function(){return"Font Icon Field."},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(n){var t=this,i=this.control;this.control.fontIconPicker({emptyIcon:!0,hasSearch:!0});this.loadIcons();n()},loadIcons:function(){var o=this,t=[],e;if(this.options.bootstrap&&n.each(i,function(n,i){t.push("glyphicon "+i)}),this.options.fontawesome)for(e in r)t.push("fa "+e);this.options.glyphicons&&(n.each(u,function(n,i){t.push("glyphicons "+i)}),n.each(f,function(n,i){t.push("social "+i)}));this.control.fontIconPicker().setIcons(t)}});t.registerFieldClass("icon",t.Fields.IconField);var i=["glyphicon-glass","glyphicon-music","glyphicon-search","glyphicon-envelope","glyphicon-heart","glyphicon-star","glyphicon-star-empty","glyphicon-user","glyphicon-film","glyphicon-th-large","glyphicon-th","glyphicon-th-list","glyphicon-ok","glyphicon-remove","glyphicon-zoom-in","glyphicon-zoom-out","glyphicon-off","glyphicon-signal","glyphicon-cog","glyphicon-trash","glyphicon-home","glyphicon-file","glyphicon-time","glyphicon-road","glyphicon-download-alt","glyphicon-download","glyphicon-upload","glyphicon-inbox","glyphicon-play-circle","glyphicon-repeat","glyphicon-refresh","glyphicon-list-alt","glyphicon-lock","glyphicon-flag","glyphicon-headphones","glyphicon-volume-off","glyphicon-volume-down","glyphicon-volume-up","glyphicon-qrcode","glyphicon-barcode","glyphicon-tag","glyphicon-tags","glyphicon-book","glyphicon-bookmark","glyphicon-print","glyphicon-camera","glyphicon-font","glyphicon-bold","glyphicon-italic","glyphicon-text-height","glyphicon-text-width","glyphicon-align-left","glyphicon-align-center","glyphicon-align-right","glyphicon-align-justify","glyphicon-list","glyphicon-indent-left","glyphicon-indent-right","glyphicon-facetime-video","glyphicon-picture","glyphicon-pencil","glyphicon-map-marker","glyphicon-adjust","glyphicon-tint","glyphicon-edit","glyphicon-share","glyphicon-check","glyphicon-move","glyphicon-step-backward","glyphicon-fast-backward","glyphicon-backward","glyphicon-play","glyphicon-pause","glyphicon-stop","glyphicon-forward","glyphicon-fast-forward","glyphicon-step-forward","glyphicon-eject","glyphicon-chevron-left","glyphicon-chevron-right","glyphicon-plus-sign","glyphicon-minus-sign","glyphicon-remove-sign","glyphicon-ok-sign","glyphicon-question-sign","glyphicon-info-sign","glyphicon-screenshot","glyphicon-remove-circle","glyphicon-ok-circle","glyphicon-ban-circle","glyphicon-arrow-left","glyphicon-arrow-right","glyphicon-arrow-up","glyphicon-arrow-down","glyphicon-share-alt","glyphicon-resize-full","glyphicon-resize-small","glyphicon-plus","glyphicon-minus","glyphicon-asterisk","glyphicon-exclamation-sign","glyphicon-gift","glyphicon-leaf","glyphicon-fire","glyphicon-eye-open","glyphicon-eye-close","glyphicon-warning-sign","glyphicon-plane","glyphicon-calendar","glyphicon-random","glyphicon-comment","glyphicon-magnet","glyphicon-chevron-up","glyphicon-chevron-down","glyphicon-retweet","glyphicon-shopping-cart","glyphicon-folder-close","glyphicon-folder-open","glyphicon-resize-vertical","glyphicon-resize-horizontal","glyphicon-hdd","glyphicon-bullhorn","glyphicon-bell","glyphicon-certificate","glyphicon-thumbs-up","glyphicon-thumbs-down","glyphicon-hand-right","glyphicon-hand-left","glyphicon-hand-up","glyphicon-hand-down","glyphicon-circle-arrow-right","glyphicon-circle-arrow-left","glyphicon-circle-arrow-up","glyphicon-circle-arrow-down","glyphicon-globe","glyphicon-wrench","glyphicon-tasks","glyphicon-filter","glyphicon-briefcase","glyphicon-fullscreen","glyphicon-dashboard","glyphicon-paperclip","glyphicon-heart-empty","glyphicon-link","glyphicon-phone","glyphicon-pushpin","glyphicon-euro","glyphicon-usd","glyphicon-gbp","glyphicon-sort","glyphicon-sort-by-alphabet","glyphicon-sort-by-alphabet-alt","glyphicon-sort-by-order","glyphicon-sort-by-order-alt","glyphicon-sort-by-attributes","glyphicon-sort-by-attributes-alt","glyphicon-unchecked","glyphicon-expand","glyphicon-collapse","glyphicon-collapse-top"],r={"fa-500px":{unicode:"\\f26e",name:"500px"},"fa-address-book":{unicode:"\\f2b9",name:"Address book"},"fa-address-book-o":{unicode:"\\f2ba",name:"Address book o"},"fa-address-card":{unicode:"\\f2bb",name:"Address card"},"fa-address-card-o":{unicode:"\\f2bc",name:"Address card o"},"fa-adjust":{unicode:"\\f042",name:"Adjust"},"fa-adn":{unicode:"\\f170",name:"Adn"},"fa-align-center":{unicode:"\\f037",name:"Align center"},"fa-align-justify":{unicode:"\\f039",name:"Align justify"},"fa-align-left":{unicode:"\\f036",name:"Align left"},"fa-align-right":{unicode:"\\f038",name:"Align right"},"fa-amazon":{unicode:"\\f270",name:"Amazon"},"fa-ambulance":{unicode:"\\f0f9",name:"Ambulance"},"fa-american-sign-language-interpreting":{unicode:"\\f2a3",name:"American sign language interpreting"},"fa-anchor":{unicode:"\\f13d",name:"Anchor"},"fa-android":{unicode:"\\f17b",name:"Android"},"fa-angellist":{unicode:"\\f209",name:"Angellist"},"fa-angle-double-down":{unicode:"\\f103",name:"Angle double down"},"fa-angle-double-left":{unicode:"\\f100",name:"Angle double left"},"fa-angle-double-right":{unicode:"\\f101",name:"Angle double right"},"fa-angle-double-up":{unicode:"\\f102",name:"Angle double up"},"fa-angle-down":{unicode:"\\f107",name:"Angle down"},"fa-angle-left":{unicode:"\\f104",name:"Angle left"},"fa-angle-right":{unicode:"\\f105",name:"Angle right"},"fa-angle-up":{unicode:"\\f106",name:"Angle up"},"fa-apple":{unicode:"\\f179",name:"Apple"},"fa-archive":{unicode:"\\f187",name:"Archive"},"fa-area-chart":{unicode:"\\f1fe",name:"Area chart"},"fa-arrow-circle-down":{unicode:"\\f0ab",name:"Arrow circle down"},"fa-arrow-circle-left":{unicode:"\\f0a8",name:"Arrow circle left"},"fa-arrow-circle-o-down":{unicode:"\\f01a",name:"Arrow circle o down"},"fa-arrow-circle-o-left":{unicode:"\\f190",name:"Arrow circle o left"},"fa-arrow-circle-o-right":{unicode:"\\f18e",name:"Arrow circle o right"},"fa-arrow-circle-o-up":{unicode:"\\f01b",name:"Arrow circle o up"},"fa-arrow-circle-right":{unicode:"\\f0a9",name:"Arrow circle right"},"fa-arrow-circle-up":{unicode:"\\f0aa",name:"Arrow circle up"},"fa-arrow-down":{unicode:"\\f063",name:"Arrow down"},"fa-arrow-left":{unicode:"\\f060",name:"Arrow left"},"fa-arrow-right":{unicode:"\\f061",name:"Arrow right"},"fa-arrow-up":{unicode:"\\f062",name:"Arrow up"},"fa-arrows":{unicode:"\\f047",name:"Arrows"},"fa-arrows-alt":{unicode:"\\f0b2",name:"Arrows alt"},"fa-arrows-h":{unicode:"\\f07e",name:"Arrows h"},"fa-arrows-v":{unicode:"\\f07d",name:"Arrows v"},"fa-assistive-listening-systems":{unicode:"\\f2a2",name:"Assistive listening systems"},"fa-asterisk":{unicode:"\\f069",name:"Asterisk"},"fa-at":{unicode:"\\f1fa",name:"At"},"fa-audio-description":{unicode:"\\f29e",name:"Audio description"},"fa-backward":{unicode:"\\f04a",name:"Backward"},"fa-balance-scale":{unicode:"\\f24e",name:"Balance scale"},"fa-ban":{unicode:"\\f05e",name:"Ban"},"fa-bandcamp":{unicode:"\\f2d5",name:"Bandcamp"},"fa-bar-chart":{unicode:"\\f080",name:"Bar chart"},"fa-barcode":{unicode:"\\f02a",name:"Barcode"},"fa-bars":{unicode:"\\f0c9",name:"Bars"},"fa-bath":{unicode:"\\f2cd",name:"Bath"},"fa-battery-empty":{unicode:"\\f244",name:"Battery empty"},"fa-battery-full":{unicode:"\\f240",name:"Battery full"},"fa-battery-half":{unicode:"\\f242",name:"Battery half"},"fa-battery-quarter":{unicode:"\\f243",name:"Battery quarter"},"fa-battery-three-quarters":{unicode:"\\f241",name:"Battery three quarters"},"fa-bed":{unicode:"\\f236",name:"Bed"},"fa-beer":{unicode:"\\f0fc",name:"Beer"},"fa-behance":{unicode:"\\f1b4",name:"Behance"},"fa-behance-square":{unicode:"\\f1b5",name:"Behance square"},"fa-bell":{unicode:"\\f0f3",name:"Bell"},"fa-bell-o":{unicode:"\\f0a2",name:"Bell o"},"fa-bell-slash":{unicode:"\\f1f6",name:"Bell slash"},"fa-bell-slash-o":{unicode:"\\f1f7",name:"Bell slash o"},"fa-bicycle":{unicode:"\\f206",name:"Bicycle"},"fa-binoculars":{unicode:"\\f1e5",name:"Binoculars"},"fa-birthday-cake":{unicode:"\\f1fd",name:"Birthday cake"},"fa-bitbucket":{unicode:"\\f171",name:"Bitbucket"},"fa-bitbucket-square":{unicode:"\\f172",name:"Bitbucket square"},"fa-black-tie":{unicode:"\\f27e",name:"Black tie"},"fa-blind":{unicode:"\\f29d",name:"Blind"},"fa-bluetooth":{unicode:"\\f293",name:"Bluetooth"},"fa-bluetooth-b":{unicode:"\\f294",name:"Bluetooth b"},"fa-bold":{unicode:"\\f032",name:"Bold"},"fa-bolt":{unicode:"\\f0e7",name:"Bolt"},"fa-bomb":{unicode:"\\f1e2",name:"Bomb"},"fa-book":{unicode:"\\f02d",name:"Book"},"fa-bookmark":{unicode:"\\f02e",name:"Bookmark"},"fa-bookmark-o":{unicode:"\\f097",name:"Bookmark o"},"fa-braille":{unicode:"\\f2a1",name:"Braille"},"fa-briefcase":{unicode:"\\f0b1",name:"Briefcase"},"fa-btc":{unicode:"\\f15a",name:"Btc"},"fa-bug":{unicode:"\\f188",name:"Bug"},"fa-building":{unicode:"\\f1ad",name:"Building"},"fa-building-o":{unicode:"\\f0f7",name:"Building o"},"fa-bullhorn":{unicode:"\\f0a1",name:"Bullhorn"},"fa-bullseye":{unicode:"\\f140",name:"Bullseye"},"fa-bus":{unicode:"\\f207",name:"Bus"},"fa-buysellads":{unicode:"\\f20d",name:"Buysellads"},"fa-calculator":{unicode:"\\f1ec",name:"Calculator"},"fa-calendar":{unicode:"\\f073",name:"Calendar"},"fa-calendar-check-o":{unicode:"\\f274",name:"Calendar check o"},"fa-calendar-minus-o":{unicode:"\\f272",name:"Calendar minus o"},"fa-calendar-o":{unicode:"\\f133",name:"Calendar o"},"fa-calendar-plus-o":{unicode:"\\f271",name:"Calendar plus o"},"fa-calendar-times-o":{unicode:"\\f273",name:"Calendar times o"},"fa-camera":{unicode:"\\f030",name:"Camera"},"fa-camera-retro":{unicode:"\\f083",name:"Camera retro"},"fa-car":{unicode:"\\f1b9",name:"Car"},"fa-caret-down":{unicode:"\\f0d7",name:"Caret down"},"fa-caret-left":{unicode:"\\f0d9",name:"Caret left"},"fa-caret-right":{unicode:"\\f0da",name:"Caret right"},"fa-caret-square-o-down":{unicode:"\\f150",name:"Caret square o down"},"fa-caret-square-o-left":{unicode:"\\f191",name:"Caret square o left"},"fa-caret-square-o-right":{unicode:"\\f152",name:"Caret square o right"},"fa-caret-square-o-up":{unicode:"\\f151",name:"Caret square o up"},"fa-caret-up":{unicode:"\\f0d8",name:"Caret up"},"fa-cart-arrow-down":{unicode:"\\f218",name:"Cart arrow down"},"fa-cart-plus":{unicode:"\\f217",name:"Cart plus"},"fa-cc":{unicode:"\\f20a",name:"Cc"},"fa-cc-amex":{unicode:"\\f1f3",name:"Cc amex"},"fa-cc-diners-club":{unicode:"\\f24c",name:"Cc diners club"},"fa-cc-discover":{unicode:"\\f1f2",name:"Cc discover"},"fa-cc-jcb":{unicode:"\\f24b",name:"Cc jcb"},"fa-cc-mastercard":{unicode:"\\f1f1",name:"Cc mastercard"},"fa-cc-paypal":{unicode:"\\f1f4",name:"Cc paypal"},"fa-cc-stripe":{unicode:"\\f1f5",name:"Cc stripe"},"fa-cc-visa":{unicode:"\\f1f0",name:"Cc visa"},"fa-certificate":{unicode:"\\f0a3",name:"Certificate"},"fa-chain-broken":{unicode:"\\f127",name:"Chain broken"},"fa-check":{unicode:"\\f00c",name:"Check"},"fa-check-circle":{unicode:"\\f058",name:"Check circle"},"fa-check-circle-o":{unicode:"\\f05d",name:"Check circle o"},"fa-check-square":{unicode:"\\f14a",name:"Check square"},"fa-check-square-o":{unicode:"\\f046",name:"Check square o"},"fa-chevron-circle-down":{unicode:"\\f13a",name:"Chevron circle down"},"fa-chevron-circle-left":{unicode:"\\f137",name:"Chevron circle left"},"fa-chevron-circle-right":{unicode:"\\f138",name:"Chevron circle right"},"fa-chevron-circle-up":{unicode:"\\f139",name:"Chevron circle up"},"fa-chevron-down":{unicode:"\\f078",name:"Chevron down"},"fa-chevron-left":{unicode:"\\f053",name:"Chevron left"},"fa-chevron-right":{unicode:"\\f054",name:"Chevron right"},"fa-chevron-up":{unicode:"\\f077",name:"Chevron up"},"fa-child":{unicode:"\\f1ae",name:"Child"},"fa-chrome":{unicode:"\\f268",name:"Chrome"},"fa-circle":{unicode:"\\f111",name:"Circle"},"fa-circle-o":{unicode:"\\f10c",name:"Circle o"},"fa-circle-o-notch":{unicode:"\\f1ce",name:"Circle o notch"},"fa-circle-thin":{unicode:"\\f1db",name:"Circle thin"},"fa-clipboard":{unicode:"\\f0ea",name:"Clipboard"},"fa-clock-o":{unicode:"\\f017",name:"Clock o"},"fa-clone":{unicode:"\\f24d",name:"Clone"},"fa-cloud":{unicode:"\\f0c2",name:"Cloud"},"fa-cloud-download":{unicode:"\\f0ed",name:"Cloud download"},"fa-cloud-upload":{unicode:"\\f0ee",name:"Cloud upload"},"fa-code":{unicode:"\\f121",name:"Code"},"fa-code-fork":{unicode:"\\f126",name:"Code fork"},"fa-codepen":{unicode:"\\f1cb",name:"Codepen"},"fa-codiepie":{unicode:"\\f284",name:"Codiepie"},"fa-coffee":{unicode:"\\f0f4",name:"Coffee"},"fa-cog":{unicode:"\\f013",name:"Cog"},"fa-cogs":{unicode:"\\f085",name:"Cogs"},"fa-columns":{unicode:"\\f0db",name:"Columns"},"fa-comment":{unicode:"\\f075",name:"Comment"},"fa-comment-o":{unicode:"\\f0e5",name:"Comment o"},"fa-commenting":{unicode:"\\f27a",name:"Commenting"},"fa-commenting-o":{unicode:"\\f27b",name:"Commenting o"},"fa-comments":{unicode:"\\f086",name:"Comments"},"fa-comments-o":{unicode:"\\f0e6",name:"Comments o"},"fa-compass":{unicode:"\\f14e",name:"Compass"},"fa-compress":{unicode:"\\f066",name:"Compress"},"fa-connectdevelop":{unicode:"\\f20e",name:"Connectdevelop"},"fa-contao":{unicode:"\\f26d",name:"Contao"},"fa-copyright":{unicode:"\\f1f9",name:"Copyright"},"fa-creative-commons":{unicode:"\\f25e",name:"Creative commons"},"fa-credit-card":{unicode:"\\f09d",name:"Credit card"},"fa-credit-card-alt":{unicode:"\\f283",name:"Credit card alt"},"fa-crop":{unicode:"\\f125",name:"Crop"},"fa-crosshairs":{unicode:"\\f05b",name:"Crosshairs"},"fa-css3":{unicode:"\\f13c",name:"Css3"},"fa-cube":{unicode:"\\f1b2",name:"Cube"},"fa-cubes":{unicode:"\\f1b3",name:"Cubes"},"fa-cutlery":{unicode:"\\f0f5",name:"Cutlery"},"fa-dashcube":{unicode:"\\f210",name:"Dashcube"},"fa-database":{unicode:"\\f1c0",name:"Database"},"fa-deaf":{unicode:"\\f2a4",name:"Deaf"},"fa-delicious":{unicode:"\\f1a5",name:"Delicious"},"fa-desktop":{unicode:"\\f108",name:"Desktop"},"fa-deviantart":{unicode:"\\f1bd",name:"Deviantart"},"fa-diamond":{unicode:"\\f219",name:"Diamond"},"fa-digg":{unicode:"\\f1a6",name:"Digg"},"fa-dot-circle-o":{unicode:"\\f192",name:"Dot circle o"},"fa-download":{unicode:"\\f019",name:"Download"},"fa-dribbble":{unicode:"\\f17d",name:"Dribbble"},"fa-dropbox":{unicode:"\\f16b",name:"Dropbox"},"fa-drupal":{unicode:"\\f1a9",name:"Drupal"},"fa-edge":{unicode:"\\f282",name:"Edge"},"fa-eercast":{unicode:"\\f2da",name:"Eercast"},"fa-eject":{unicode:"\\f052",name:"Eject"},"fa-ellipsis-h":{unicode:"\\f141",name:"Ellipsis h"},"fa-ellipsis-v":{unicode:"\\f142",name:"Ellipsis v"},"fa-empire":{unicode:"\\f1d1",name:"Empire"},"fa-envelope":{unicode:"\\f0e0",name:"Envelope"},"fa-envelope-o":{unicode:"\\f003",name:"Envelope o"},"fa-envelope-open":{unicode:"\\f2b6",name:"Envelope open"},"fa-envelope-open-o":{unicode:"\\f2b7",name:"Envelope open o"},"fa-envelope-square":{unicode:"\\f199",name:"Envelope square"},"fa-envira":{unicode:"\\f299",name:"Envira"},"fa-eraser":{unicode:"\\f12d",name:"Eraser"},"fa-etsy":{unicode:"\\f2d7",name:"Etsy"},"fa-eur":{unicode:"\\f153",name:"Eur"},"fa-exchange":{unicode:"\\f0ec",name:"Exchange"},"fa-exclamation":{unicode:"\\f12a",name:"Exclamation"},"fa-exclamation-circle":{unicode:"\\f06a",name:"Exclamation circle"},"fa-exclamation-triangle":{unicode:"\\f071",name:"Exclamation triangle"},"fa-expand":{unicode:"\\f065",name:"Expand"},"fa-expeditedssl":{unicode:"\\f23e",name:"Expeditedssl"},"fa-external-link":{unicode:"\\f08e",name:"External link"},"fa-external-link-square":{unicode:"\\f14c",name:"External link square"},"fa-eye":{unicode:"\\f06e",name:"Eye"},"fa-eye-slash":{unicode:"\\f070",name:"Eye slash"},"fa-eyedropper":{unicode:"\\f1fb",name:"Eyedropper"},"fa-facebook":{unicode:"\\f09a",name:"Facebook"},"fa-facebook-official":{unicode:"\\f230",name:"Facebook official"},"fa-facebook-square":{unicode:"\\f082",name:"Facebook square"},"fa-fast-backward":{unicode:"\\f049",name:"Fast backward"},"fa-fast-forward":{unicode:"\\f050",name:"Fast forward"},"fa-fax":{unicode:"\\f1ac",name:"Fax"},"fa-female":{unicode:"\\f182",name:"Female"},"fa-fighter-jet":{unicode:"\\f0fb",name:"Fighter jet"},"fa-file":{unicode:"\\f15b",name:"File"},"fa-file-archive-o":{unicode:"\\f1c6",name:"File archive o"},"fa-file-audio-o":{unicode:"\\f1c7",name:"File audio o"},"fa-file-code-o":{unicode:"\\f1c9",name:"File code o"},"fa-file-excel-o":{unicode:"\\f1c3",name:"File excel o"},"fa-file-image-o":{unicode:"\\f1c5",name:"File image o"},"fa-file-o":{unicode:"\\f016",name:"File o"},"fa-file-pdf-o":{unicode:"\\f1c1",name:"File pdf o"},"fa-file-powerpoint-o":{unicode:"\\f1c4",name:"File powerpoint o"},"fa-file-text":{unicode:"\\f15c",name:"File text"},"fa-file-text-o":{unicode:"\\f0f6",name:"File text o"},"fa-file-video-o":{unicode:"\\f1c8",name:"File video o"},"fa-file-word-o":{unicode:"\\f1c2",name:"File word o"},"fa-files-o":{unicode:"\\f0c5",name:"Files o"},"fa-film":{unicode:"\\f008",name:"Film"},"fa-filter":{unicode:"\\f0b0",name:"Filter"},"fa-fire":{unicode:"\\f06d",name:"Fire"},"fa-fire-extinguisher":{unicode:"\\f134",name:"Fire extinguisher"},"fa-firefox":{unicode:"\\f269",name:"Firefox"},"fa-first-order":{unicode:"\\f2b0",name:"First order"},"fa-flag":{unicode:"\\f024",name:"Flag"},"fa-flag-checkered":{unicode:"\\f11e",name:"Flag checkered"},"fa-flag-o":{unicode:"\\f11d",name:"Flag o"},"fa-flask":{unicode:"\\f0c3",name:"Flask"},"fa-flickr":{unicode:"\\f16e",name:"Flickr"},"fa-floppy-o":{unicode:"\\f0c7",name:"Floppy o"},"fa-folder":{unicode:"\\f07b",name:"Folder"},"fa-folder-o":{unicode:"\\f114",name:"Folder o"},"fa-folder-open":{unicode:"\\f07c",name:"Folder open"},"fa-folder-open-o":{unicode:"\\f115",name:"Folder open o"},"fa-font":{unicode:"\\f031",name:"Font"},"fa-font-awesome":{unicode:"\\f2b4",name:"Font awesome"},"fa-fonticons":{unicode:"\\f280",name:"Fonticons"},"fa-fort-awesome":{unicode:"\\f286",name:"Fort awesome"},"fa-forumbee":{unicode:"\\f211",name:"Forumbee"},"fa-forward":{unicode:"\\f04e",name:"Forward"},"fa-foursquare":{unicode:"\\f180",name:"Foursquare"},"fa-free-code-camp":{unicode:"\\f2c5",name:"Free code camp"},"fa-frown-o":{unicode:"\\f119",name:"Frown o"},"fa-futbol-o":{unicode:"\\f1e3",name:"Futbol o"},"fa-gamepad":{unicode:"\\f11b",name:"Gamepad"},"fa-gavel":{unicode:"\\f0e3",name:"Gavel"},"fa-gbp":{unicode:"\\f154",name:"Gbp"},"fa-genderless":{unicode:"\\f22d",name:"Genderless"},"fa-get-pocket":{unicode:"\\f265",name:"Get pocket"},"fa-gg":{unicode:"\\f260",name:"Gg"},"fa-gg-circle":{unicode:"\\f261",name:"Gg circle"},"fa-gift":{unicode:"\\f06b",name:"Gift"},"fa-git":{unicode:"\\f1d3",name:"Git"},"fa-git-square":{unicode:"\\f1d2",name:"Git square"},"fa-github":{unicode:"\\f09b",name:"Github"},"fa-github-alt":{unicode:"\\f113",name:"Github alt"},"fa-github-square":{unicode:"\\f092",name:"Github square"},"fa-gitlab":{unicode:"\\f296",name:"Gitlab"},"fa-glass":{unicode:"\\f000",name:"Glass"},"fa-glide":{unicode:"\\f2a5",name:"Glide"},"fa-glide-g":{unicode:"\\f2a6",name:"Glide g"},"fa-globe":{unicode:"\\f0ac",name:"Globe"},"fa-google":{unicode:"\\f1a0",name:"Google"},"fa-google-plus":{unicode:"\\f0d5",name:"Google plus"},"fa-google-plus-official":{unicode:"\\f2b3",name:"Google plus official"},"fa-google-plus-square":{unicode:"\\f0d4",name:"Google plus square"},"fa-google-wallet":{unicode:"\\f1ee",name:"Google wallet"},"fa-graduation-cap":{unicode:"\\f19d",name:"Graduation cap"},"fa-gratipay":{unicode:"\\f184",name:"Gratipay"},"fa-grav":{unicode:"\\f2d6",name:"Grav"},"fa-h-square":{unicode:"\\f0fd",name:"H square"},"fa-hacker-news":{unicode:"\\f1d4",name:"Hacker news"},"fa-hand-lizard-o":{unicode:"\\f258",name:"Hand lizard o"},"fa-hand-o-down":{unicode:"\\f0a7",name:"Hand o down"},"fa-hand-o-left":{unicode:"\\f0a5",name:"Hand o left"},"fa-hand-o-right":{unicode:"\\f0a4",name:"Hand o right"},"fa-hand-o-up":{unicode:"\\f0a6",name:"Hand o up"},"fa-hand-paper-o":{unicode:"\\f256",name:"Hand paper o"},"fa-hand-peace-o":{unicode:"\\f25b",name:"Hand peace o"},"fa-hand-pointer-o":{unicode:"\\f25a",name:"Hand pointer o"},"fa-hand-rock-o":{unicode:"\\f255",name:"Hand rock o"},"fa-hand-scissors-o":{unicode:"\\f257",name:"Hand scissors o"},"fa-hand-spock-o":{unicode:"\\f259",name:"Hand spock o"},"fa-handshake-o":{unicode:"\\f2b5",name:"Handshake o"},"fa-hashtag":{unicode:"\\f292",name:"Hashtag"},"fa-hdd-o":{unicode:"\\f0a0",name:"Hdd o"},"fa-header":{unicode:"\\f1dc",name:"Header"},"fa-headphones":{unicode:"\\f025",name:"Headphones"},"fa-heart":{unicode:"\\f004",name:"Heart"},"fa-heart-o":{unicode:"\\f08a",name:"Heart o"},"fa-heartbeat":{unicode:"\\f21e",name:"Heartbeat"},"fa-history":{unicode:"\\f1da",name:"History"},"fa-home":{unicode:"\\f015",name:"Home"},"fa-hospital-o":{unicode:"\\f0f8",name:"Hospital o"},"fa-hourglass":{unicode:"\\f254",name:"Hourglass"},"fa-hourglass-end":{unicode:"\\f253",name:"Hourglass end"},"fa-hourglass-half":{unicode:"\\f252",name:"Hourglass half"},"fa-hourglass-o":{unicode:"\\f250",name:"Hourglass o"},"fa-hourglass-start":{unicode:"\\f251",name:"Hourglass start"},"fa-houzz":{unicode:"\\f27c",name:"Houzz"},"fa-html5":{unicode:"\\f13b",name:"Html5"},"fa-i-cursor":{unicode:"\\f246",name:"I cursor"},"fa-id-badge":{unicode:"\\f2c1",name:"Id badge"},"fa-id-card":{unicode:"\\f2c2",name:"Id card"},"fa-id-card-o":{unicode:"\\f2c3",name:"Id card o"},"fa-ils":{unicode:"\\f20b",name:"Ils"},"fa-imdb":{unicode:"\\f2d8",name:"Imdb"},"fa-inbox":{unicode:"\\f01c",name:"Inbox"},"fa-indent":{unicode:"\\f03c",name:"Indent"},"fa-industry":{unicode:"\\f275",name:"Industry"},"fa-info":{unicode:"\\f129",name:"Info"},"fa-info-circle":{unicode:"\\f05a",name:"Info circle"},"fa-inr":{unicode:"\\f156",name:"Inr"},"fa-instagram":{unicode:"\\f16d",name:"Instagram"},"fa-internet-explorer":{unicode:"\\f26b",name:"Internet explorer"},"fa-ioxhost":{unicode:"\\f208",name:"Ioxhost"},"fa-italic":{unicode:"\\f033",name:"Italic"},"fa-joomla":{unicode:"\\f1aa",name:"Joomla"},"fa-jpy":{unicode:"\\f157",name:"Jpy"},"fa-jsfiddle":{unicode:"\\f1cc",name:"Jsfiddle"},"fa-key":{unicode:"\\f084",name:"Key"},"fa-keyboard-o":{unicode:"\\f11c",name:"Keyboard o"},"fa-krw":{unicode:"\\f159",name:"Krw"},"fa-language":{unicode:"\\f1ab",name:"Language"},"fa-laptop":{unicode:"\\f109",name:"Laptop"},"fa-lastfm":{unicode:"\\f202",name:"Lastfm"},"fa-lastfm-square":{unicode:"\\f203",name:"Lastfm square"},"fa-leaf":{unicode:"\\f06c",name:"Leaf"},"fa-leanpub":{unicode:"\\f212",name:"Leanpub"},"fa-lemon-o":{unicode:"\\f094",name:"Lemon o"},"fa-level-down":{unicode:"\\f149",name:"Level down"},"fa-level-up":{unicode:"\\f148",name:"Level up"},"fa-life-ring":{unicode:"\\f1cd",name:"Life ring"},"fa-lightbulb-o":{unicode:"\\f0eb",name:"Lightbulb o"},"fa-line-chart":{unicode:"\\f201",name:"Line chart"},"fa-link":{unicode:"\\f0c1",name:"Link"},"fa-linkedin":{unicode:"\\f0e1",name:"Linkedin"},"fa-linkedin-square":{unicode:"\\f08c",name:"Linkedin square"},"fa-linode":{unicode:"\\f2b8",name:"Linode"},"fa-linux":{unicode:"\\f17c",name:"Linux"},"fa-list":{unicode:"\\f03a",name:"List"},"fa-list-alt":{unicode:"\\f022",name:"List alt"},"fa-list-ol":{unicode:"\\f0cb",name:"List ol"},"fa-list-ul":{unicode:"\\f0ca",name:"List ul"},"fa-location-arrow":{unicode:"\\f124",name:"Location arrow"},"fa-lock":{unicode:"\\f023",name:"Lock"},"fa-long-arrow-down":{unicode:"\\f175",name:"Long arrow down"},"fa-long-arrow-left":{unicode:"\\f177",name:"Long arrow left"},"fa-long-arrow-right":{unicode:"\\f178",name:"Long arrow right"},"fa-long-arrow-up":{unicode:"\\f176",name:"Long arrow up"},"fa-low-vision":{unicode:"\\f2a8",name:"Low vision"},"fa-magic":{unicode:"\\f0d0",name:"Magic"},"fa-magnet":{unicode:"\\f076",name:"Magnet"},"fa-male":{unicode:"\\f183",name:"Male"},"fa-map":{unicode:"\\f279",name:"Map"},"fa-map-marker":{unicode:"\\f041",name:"Map marker"},"fa-map-o":{unicode:"\\f278",name:"Map o"},"fa-map-pin":{unicode:"\\f276",name:"Map pin"},"fa-map-signs":{unicode:"\\f277",name:"Map signs"},"fa-mars":{unicode:"\\f222",name:"Mars"},"fa-mars-double":{unicode:"\\f227",name:"Mars double"},"fa-mars-stroke":{unicode:"\\f229",name:"Mars stroke"},"fa-mars-stroke-h":{unicode:"\\f22b",name:"Mars stroke h"},"fa-mars-stroke-v":{unicode:"\\f22a",name:"Mars stroke v"},"fa-maxcdn":{unicode:"\\f136",name:"Maxcdn"},"fa-meanpath":{unicode:"\\f20c",name:"Meanpath"},"fa-medium":{unicode:"\\f23a",name:"Medium"},"fa-medkit":{unicode:"\\f0fa",name:"Medkit"},"fa-meetup":{unicode:"\\f2e0",name:"Meetup"},"fa-meh-o":{unicode:"\\f11a",name:"Meh o"},"fa-mercury":{unicode:"\\f223",name:"Mercury"},"fa-microchip":{unicode:"\\f2db",name:"Microchip"},"fa-microphone":{unicode:"\\f130",name:"Microphone"},"fa-microphone-slash":{unicode:"\\f131",name:"Microphone slash"},"fa-minus":{unicode:"\\f068",name:"Minus"},"fa-minus-circle":{unicode:"\\f056",name:"Minus circle"},"fa-minus-square":{unicode:"\\f146",name:"Minus square"},"fa-minus-square-o":{unicode:"\\f147",name:"Minus square o"},"fa-mixcloud":{unicode:"\\f289",name:"Mixcloud"},"fa-mobile":{unicode:"\\f10b",name:"Mobile"},"fa-modx":{unicode:"\\f285",name:"Modx"},"fa-money":{unicode:"\\f0d6",name:"Money"},"fa-moon-o":{unicode:"\\f186",name:"Moon o"},"fa-motorcycle":{unicode:"\\f21c",name:"Motorcycle"},"fa-mouse-pointer":{unicode:"\\f245",name:"Mouse pointer"},"fa-music":{unicode:"\\f001",name:"Music"},"fa-neuter":{unicode:"\\f22c",name:"Neuter"},"fa-newspaper-o":{unicode:"\\f1ea",name:"Newspaper o"},"fa-object-group":{unicode:"\\f247",name:"Object group"},"fa-object-ungroup":{unicode:"\\f248",name:"Object ungroup"},"fa-odnoklassniki":{unicode:"\\f263",name:"Odnoklassniki"},"fa-odnoklassniki-square":{unicode:"\\f264",name:"Odnoklassniki square"},"fa-opencart":{unicode:"\\f23d",name:"Opencart"},"fa-openid":{unicode:"\\f19b",name:"Openid"},"fa-opera":{unicode:"\\f26a",name:"Opera"},"fa-optin-monster":{unicode:"\\f23c",name:"Optin monster"},"fa-outdent":{unicode:"\\f03b",name:"Outdent"},"fa-pagelines":{unicode:"\\f18c",name:"Pagelines"},"fa-paint-brush":{unicode:"\\f1fc",name:"Paint brush"},"fa-paper-plane":{unicode:"\\f1d8",name:"Paper plane"},"fa-paper-plane-o":{unicode:"\\f1d9",name:"Paper plane o"},"fa-paperclip":{unicode:"\\f0c6",name:"Paperclip"},"fa-paragraph":{unicode:"\\f1dd",name:"Paragraph"},"fa-pause":{unicode:"\\f04c",name:"Pause"},"fa-pause-circle":{unicode:"\\f28b",name:"Pause circle"},"fa-pause-circle-o":{unicode:"\\f28c",name:"Pause circle o"},"fa-paw":{unicode:"\\f1b0",name:"Paw"},"fa-paypal":{unicode:"\\f1ed",name:"Paypal"},"fa-pencil":{unicode:"\\f040",name:"Pencil"},"fa-pencil-square":{unicode:"\\f14b",name:"Pencil square"},"fa-pencil-square-o":{unicode:"\\f044",name:"Pencil square o"},"fa-percent":{unicode:"\\f295",name:"Percent"},"fa-phone":{unicode:"\\f095",name:"Phone"},"fa-phone-square":{unicode:"\\f098",name:"Phone square"},"fa-picture-o":{unicode:"\\f03e",name:"Picture o"},"fa-pie-chart":{unicode:"\\f200",name:"Pie chart"},"fa-pied-piper":{unicode:"\\f2ae",name:"Pied piper"},"fa-pied-piper-alt":{unicode:"\\f1a8",name:"Pied piper alt"},"fa-pied-piper-pp":{unicode:"\\f1a7",name:"Pied piper pp"},"fa-pinterest":{unicode:"\\f0d2",name:"Pinterest"},"fa-pinterest-p":{unicode:"\\f231",name:"Pinterest p"},"fa-pinterest-square":{unicode:"\\f0d3",name:"Pinterest square"},"fa-plane":{unicode:"\\f072",name:"Plane"},"fa-play":{unicode:"\\f04b",name:"Play"},"fa-play-circle":{unicode:"\\f144",name:"Play circle"},"fa-play-circle-o":{unicode:"\\f01d",name:"Play circle o"},"fa-plug":{unicode:"\\f1e6",name:"Plug"},"fa-plus":{unicode:"\\f067",name:"Plus"},"fa-plus-circle":{unicode:"\\f055",name:"Plus circle"},"fa-plus-square":{unicode:"\\f0fe",name:"Plus square"},"fa-plus-square-o":{unicode:"\\f196",name:"Plus square o"},"fa-podcast":{unicode:"\\f2ce",name:"Podcast"},"fa-power-off":{unicode:"\\f011",name:"Power off"},"fa-print":{unicode:"\\f02f",name:"Print"},"fa-product-hunt":{unicode:"\\f288",name:"Product hunt"},"fa-puzzle-piece":{unicode:"\\f12e",name:"Puzzle piece"},"fa-qq":{unicode:"\\f1d6",name:"Qq"},"fa-qrcode":{unicode:"\\f029",name:"Qrcode"},"fa-question":{unicode:"\\f128",name:"Question"},"fa-question-circle":{unicode:"\\f059",name:"Question circle"},"fa-question-circle-o":{unicode:"\\f29c",name:"Question circle o"},"fa-quora":{unicode:"\\f2c4",name:"Quora"},"fa-quote-left":{unicode:"\\f10d",name:"Quote left"},"fa-quote-right":{unicode:"\\f10e",name:"Quote right"},"fa-random":{unicode:"\\f074",name:"Random"},"fa-ravelry":{unicode:"\\f2d9",name:"Ravelry"},"fa-rebel":{unicode:"\\f1d0",name:"Rebel"},"fa-recycle":{unicode:"\\f1b8",name:"Recycle"},"fa-reddit":{unicode:"\\f1a1",name:"Reddit"},"fa-reddit-alien":{unicode:"\\f281",name:"Reddit alien"},"fa-reddit-square":{unicode:"\\f1a2",name:"Reddit square"},"fa-refresh":{unicode:"\\f021",name:"Refresh"},"fa-registered":{unicode:"\\f25d",name:"Registered"},"fa-renren":{unicode:"\\f18b",name:"Renren"},"fa-repeat":{unicode:"\\f01e",name:"Repeat"},"fa-reply":{unicode:"\\f112",name:"Reply"},"fa-reply-all":{unicode:"\\f122",name:"Reply all"},"fa-retweet":{unicode:"\\f079",name:"Retweet"},"fa-road":{unicode:"\\f018",name:"Road"},"fa-rocket":{unicode:"\\f135",name:"Rocket"},"fa-rss":{unicode:"\\f09e",name:"Rss"},"fa-rss-square":{unicode:"\\f143",name:"Rss square"},"fa-rub":{unicode:"\\f158",name:"Rub"},"fa-safari":{unicode:"\\f267",name:"Safari"},"fa-scissors":{unicode:"\\f0c4",name:"Scissors"},"fa-scribd":{unicode:"\\f28a",name:"Scribd"},"fa-search":{unicode:"\\f002",name:"Search"},"fa-search-minus":{unicode:"\\f010",name:"Search minus"},"fa-search-plus":{unicode:"\\f00e",name:"Search plus"},"fa-sellsy":{unicode:"\\f213",name:"Sellsy"},"fa-server":{unicode:"\\f233",name:"Server"},"fa-share":{unicode:"\\f064",name:"Share"},"fa-share-alt":{unicode:"\\f1e0",name:"Share alt"},"fa-share-alt-square":{unicode:"\\f1e1",name:"Share alt square"},"fa-share-square":{unicode:"\\f14d",name:"Share square"},"fa-share-square-o":{unicode:"\\f045",name:"Share square o"},"fa-shield":{unicode:"\\f132",name:"Shield"},"fa-ship":{unicode:"\\f21a",name:"Ship"},"fa-shirtsinbulk":{unicode:"\\f214",name:"Shirtsinbulk"},"fa-shopping-bag":{unicode:"\\f290",name:"Shopping bag"},"fa-shopping-basket":{unicode:"\\f291",name:"Shopping basket"},"fa-shopping-cart":{unicode:"\\f07a",name:"Shopping cart"},"fa-shower":{unicode:"\\f2cc",name:"Shower"},"fa-sign-in":{unicode:"\\f090",name:"Sign in"},"fa-sign-language":{unicode:"\\f2a7",name:"Sign language"},"fa-sign-out":{unicode:"\\f08b",name:"Sign out"},"fa-signal":{unicode:"\\f012",name:"Signal"},"fa-simplybuilt":{unicode:"\\f215",name:"Simplybuilt"},"fa-sitemap":{unicode:"\\f0e8",name:"Sitemap"},"fa-skyatlas":{unicode:"\\f216",name:"Skyatlas"},"fa-skype":{unicode:"\\f17e",name:"Skype"},"fa-slack":{unicode:"\\f198",name:"Slack"},"fa-sliders":{unicode:"\\f1de",name:"Sliders"},"fa-slideshare":{unicode:"\\f1e7",name:"Slideshare"},"fa-smile-o":{unicode:"\\f118",name:"Smile o"},"fa-snapchat":{unicode:"\\f2ab",name:"Snapchat"},"fa-snapchat-ghost":{unicode:"\\f2ac",name:"Snapchat ghost"},"fa-snapchat-square":{unicode:"\\f2ad",name:"Snapchat square"},"fa-snowflake-o":{unicode:"\\f2dc",name:"Snowflake o"},"fa-sort":{unicode:"\\f0dc",name:"Sort"},"fa-sort-alpha-asc":{unicode:"\\f15d",name:"Sort alpha asc"},"fa-sort-alpha-desc":{unicode:"\\f15e",name:"Sort alpha desc"},"fa-sort-amount-asc":{unicode:"\\f160",name:"Sort amount asc"},"fa-sort-amount-desc":{unicode:"\\f161",name:"Sort amount desc"},"fa-sort-asc":{unicode:"\\f0de",name:"Sort asc"},"fa-sort-desc":{unicode:"\\f0dd",name:"Sort desc"},"fa-sort-numeric-asc":{unicode:"\\f162",name:"Sort numeric asc"},"fa-sort-numeric-desc":{unicode:"\\f163",name:"Sort numeric desc"},"fa-soundcloud":{unicode:"\\f1be",name:"Soundcloud"},"fa-space-shuttle":{unicode:"\\f197",name:"Space shuttle"},"fa-spinner":{unicode:"\\f110",name:"Spinner"},"fa-spoon":{unicode:"\\f1b1",name:"Spoon"},"fa-spotify":{unicode:"\\f1bc",name:"Spotify"},"fa-square":{unicode:"\\f0c8",name:"Square"},"fa-square-o":{unicode:"\\f096",name:"Square o"},"fa-stack-exchange":{unicode:"\\f18d",name:"Stack exchange"},"fa-stack-overflow":{unicode:"\\f16c",name:"Stack overflow"},"fa-star":{unicode:"\\f005",name:"Star"},"fa-star-half":{unicode:"\\f089",name:"Star half"},"fa-star-half-o":{unicode:"\\f123",name:"Star half o"},"fa-star-o":{unicode:"\\f006",name:"Star o"},"fa-steam":{unicode:"\\f1b6",name:"Steam"},"fa-steam-square":{unicode:"\\f1b7",name:"Steam square"},"fa-step-backward":{unicode:"\\f048",name:"Step backward"},"fa-step-forward":{unicode:"\\f051",name:"Step forward"},"fa-stethoscope":{unicode:"\\f0f1",name:"Stethoscope"},"fa-sticky-note":{unicode:"\\f249",name:"Sticky note"},"fa-sticky-note-o":{unicode:"\\f24a",name:"Sticky note o"},"fa-stop":{unicode:"\\f04d",name:"Stop"},"fa-stop-circle":{unicode:"\\f28d",name:"Stop circle"},"fa-stop-circle-o":{unicode:"\\f28e",name:"Stop circle o"},"fa-street-view":{unicode:"\\f21d",name:"Street view"},"fa-strikethrough":{unicode:"\\f0cc",name:"Strikethrough"},"fa-stumbleupon":{unicode:"\\f1a4",name:"Stumbleupon"},"fa-stumbleupon-circle":{unicode:"\\f1a3",name:"Stumbleupon circle"},"fa-subscript":{unicode:"\\f12c",name:"Subscript"},"fa-subway":{unicode:"\\f239",name:"Subway"},"fa-suitcase":{unicode:"\\f0f2",name:"Suitcase"},"fa-sun-o":{unicode:"\\f185",name:"Sun o"},"fa-superpowers":{unicode:"\\f2dd",name:"Superpowers"},"fa-superscript":{unicode:"\\f12b",name:"Superscript"},"fa-table":{unicode:"\\f0ce",name:"Table"},"fa-tablet":{unicode:"\\f10a",name:"Tablet"},"fa-tachometer":{unicode:"\\f0e4",name:"Tachometer"},"fa-tag":{unicode:"\\f02b",name:"Tag"},"fa-tags":{unicode:"\\f02c",name:"Tags"},"fa-tasks":{unicode:"\\f0ae",name:"Tasks"},"fa-taxi":{unicode:"\\f1ba",name:"Taxi"},"fa-telegram":{unicode:"\\f2c6",name:"Telegram"},"fa-television":{unicode:"\\f26c",name:"Television"},"fa-tencent-weibo":{unicode:"\\f1d5",name:"Tencent weibo"},"fa-terminal":{unicode:"\\f120",name:"Terminal"},"fa-text-height":{unicode:"\\f034",name:"Text height"},"fa-text-width":{unicode:"\\f035",name:"Text width"},"fa-th":{unicode:"\\f00a",name:"Th"},"fa-th-large":{unicode:"\\f009",name:"Th large"},"fa-th-list":{unicode:"\\f00b",name:"Th list"},"fa-themeisle":{unicode:"\\f2b2",name:"Themeisle"},"fa-thermometer-empty":{unicode:"\\f2cb",name:"Thermometer empty"},"fa-thermometer-full":{unicode:"\\f2c7",name:"Thermometer full"},"fa-thermometer-half":{unicode:"\\f2c9",name:"Thermometer half"},"fa-thermometer-quarter":{unicode:"\\f2ca",name:"Thermometer quarter"},"fa-thermometer-three-quarters":{unicode:"\\f2c8",name:"Thermometer three quarters"},"fa-thumb-tack":{unicode:"\\f08d",name:"Thumb tack"},"fa-thumbs-down":{unicode:"\\f165",name:"Thumbs down"},"fa-thumbs-o-down":{unicode:"\\f088",name:"Thumbs o down"},"fa-thumbs-o-up":{unicode:"\\f087",name:"Thumbs o up"},"fa-thumbs-up":{unicode:"\\f164",name:"Thumbs up"},"fa-ticket":{unicode:"\\f145",name:"Ticket"},"fa-times":{unicode:"\\f00d",name:"Times"},"fa-times-circle":{unicode:"\\f057",name:"Times circle"},"fa-times-circle-o":{unicode:"\\f05c",name:"Times circle o"},"fa-tint":{unicode:"\\f043",name:"Tint"},"fa-toggle-off":{unicode:"\\f204",name:"Toggle off"},"fa-toggle-on":{unicode:"\\f205",name:"Toggle on"},"fa-trademark":{unicode:"\\f25c",name:"Trademark"},"fa-train":{unicode:"\\f238",name:"Train"},"fa-transgender":{unicode:"\\f224",name:"Transgender"},"fa-transgender-alt":{unicode:"\\f225",name:"Transgender alt"},"fa-trash":{unicode:"\\f1f8",name:"Trash"},"fa-trash-o":{unicode:"\\f014",name:"Trash o"},"fa-tree":{unicode:"\\f1bb",name:"Tree"},"fa-trello":{unicode:"\\f181",name:"Trello"},"fa-tripadvisor":{unicode:"\\f262",name:"Tripadvisor"},"fa-trophy":{unicode:"\\f091",name:"Trophy"},"fa-truck":{unicode:"\\f0d1",name:"Truck"},"fa-try":{unicode:"\\f195",name:"Try"},"fa-tty":{unicode:"\\f1e4",name:"Tty"},"fa-tumblr":{unicode:"\\f173",name:"Tumblr"},"fa-tumblr-square":{unicode:"\\f174",name:"Tumblr square"},"fa-twitch":{unicode:"\\f1e8",name:"Twitch"},"fa-twitter":{unicode:"\\f099",name:"Twitter"},"fa-twitter-square":{unicode:"\\f081",name:"Twitter square"},"fa-umbrella":{unicode:"\\f0e9",name:"Umbrella"},"fa-underline":{unicode:"\\f0cd",name:"Underline"},"fa-undo":{unicode:"\\f0e2",name:"Undo"},"fa-universal-access":{unicode:"\\f29a",name:"Universal access"},"fa-university":{unicode:"\\f19c",name:"University"},"fa-unlock":{unicode:"\\f09c",name:"Unlock"},"fa-unlock-alt":{unicode:"\\f13e",name:"Unlock alt"},"fa-upload":{unicode:"\\f093",name:"Upload"},"fa-usb":{unicode:"\\f287",name:"Usb"},"fa-usd":{unicode:"\\f155",name:"Usd"},"fa-user":{unicode:"\\f007",name:"User"},"fa-user-circle":{unicode:"\\f2bd",name:"User circle"},"fa-user-circle-o":{unicode:"\\f2be",name:"User circle o"},"fa-user-md":{unicode:"\\f0f0",name:"User md"},"fa-user-o":{unicode:"\\f2c0",name:"User o"},"fa-user-plus":{unicode:"\\f234",name:"User plus"},"fa-user-secret":{unicode:"\\f21b",name:"User secret"},"fa-user-times":{unicode:"\\f235",name:"User times"},"fa-users":{unicode:"\\f0c0",name:"Users"},"fa-venus":{unicode:"\\f221",name:"Venus"},"fa-venus-double":{unicode:"\\f226",name:"Venus double"},"fa-venus-mars":{unicode:"\\f228",name:"Venus mars"},"fa-viacoin":{unicode:"\\f237",name:"Viacoin"},"fa-viadeo":{unicode:"\\f2a9",name:"Viadeo"},"fa-viadeo-square":{unicode:"\\f2aa",name:"Viadeo square"},"fa-video-camera":{unicode:"\\f03d",name:"Video camera"},"fa-vimeo":{unicode:"\\f27d",name:"Vimeo"},"fa-vimeo-square":{unicode:"\\f194",name:"Vimeo square"},"fa-vine":{unicode:"\\f1ca",name:"Vine"},"fa-vk":{unicode:"\\f189",name:"Vk"},"fa-volume-control-phone":{unicode:"\\f2a0",name:"Volume control phone"},"fa-volume-down":{unicode:"\\f027",name:"Volume down"},"fa-volume-off":{unicode:"\\f026",name:"Volume off"},"fa-volume-up":{unicode:"\\f028",name:"Volume up"},"fa-weibo":{unicode:"\\f18a",name:"Weibo"},"fa-weixin":{unicode:"\\f1d7",name:"Weixin"},"fa-whatsapp":{unicode:"\\f232",name:"Whatsapp"},"fa-wheelchair":{unicode:"\\f193",name:"Wheelchair"},"fa-wheelchair-alt":{unicode:"\\f29b",name:"Wheelchair alt"},"fa-wifi":{unicode:"\\f1eb",name:"Wifi"},"fa-wikipedia-w":{unicode:"\\f266",name:"Wikipedia w"},"fa-window-close":{unicode:"\\f2d3",name:"Window close"},"fa-window-close-o":{unicode:"\\f2d4",name:"Window close o"},"fa-window-maximize":{unicode:"\\f2d0",name:"Window maximize"},"fa-window-minimize":{unicode:"\\f2d1",name:"Window minimize"},"fa-window-restore":{unicode:"\\f2d2",name:"Window restore"},"fa-windows":{unicode:"\\f17a",name:"Windows"},"fa-wordpress":{unicode:"\\f19a",name:"Wordpress"},"fa-wpbeginner":{unicode:"\\f297",name:"Wpbeginner"},"fa-wpexplorer":{unicode:"\\f2de",name:"Wpexplorer"},"fa-wpforms":{unicode:"\\f298",name:"Wpforms"},"fa-wrench":{unicode:"\\f0ad",name:"Wrench"},"fa-xing":{unicode:"\\f168",name:"Xing"},"fa-xing-square":{unicode:"\\f169",name:"Xing square"},"fa-y-combinator":{unicode:"\\f23b",name:"Y combinator"},"fa-yahoo":{unicode:"\\f19e",name:"Yahoo"},"fa-yelp":{unicode:"\\f1e9",name:"Yelp"},"fa-yoast":{unicode:"\\f2b1",name:"Yoast"},"fa-youtube":{unicode:"\\f167",name:"Youtube"},"fa-youtube-play":{unicode:"\\f16a",name:"Youtube play"},"fa-youtube-square":{unicode:"\\f166",name:"Youtube square"}},u=["glyph-glass","glyph-leaf","glyph-dog","glyph-user","glyph-girl","glyph-car","glyph-user-add","glyph-user-remove","glyph-film","glyph-magic","glyph-envelope","glyph-camera","glyph-heart","glyph-beach-umbrella","glyph-train","glyph-print","glyph-bin","glyph-music","glyph-note","glyph-heart-empty","glyph-home","glyph-snowflake","glyph-fire","glyph-magnet","glyph-parents","glyph-binoculars","glyph-road","glyph-search","glyph-cars","glyph-notes-2","glyph-pencil","glyph-bus","glyph-wifi-alt","glyph-luggage","glyph-old-man","glyph-woman","glyph-file","glyph-coins","glyph-airplane","glyph-notes","glyph-stats","glyph-charts","glyph-pie-chart","glyph-group","glyph-keys","glyph-calendar","glyph-router","glyph-camera-small","glyph-dislikes","glyph-star","glyph-link","glyph-eye-open","glyph-eye-close","glyph-alarm","glyph-clock","glyph-stopwatch","glyph-projector","glyph-history","glyph-truck","glyph-cargo","glyph-compass","glyph-keynote","glyph-paperclip","glyph-power","glyph-lightbulb","glyph-tag","glyph-tags","glyph-cleaning","glyph-ruller","glyph-gift","glyph-umbrella","glyph-book","glyph-bookmark","glyph-wifi","glyph-cup","glyph-stroller","glyph-headphones","glyph-headset","glyph-warning-sign","glyph-signal","glyph-retweet","glyph-refresh","glyph-roundabout","glyph-random","glyph-heat","glyph-repeat","glyph-display","glyph-log-book","glyph-address-book","glyph-building","glyph-eyedropper","glyph-adjust","glyph-tint","glyph-crop","glyph-vector-path-square","glyph-vector-path-circle","glyph-vector-path-polygon","glyph-vector-path-line","glyph-vector-path-curve","glyph-vector-path-all","glyph-font","glyph-italic","glyph-bold","glyph-text-underline","glyph-text-strike","glyph-text-height","glyph-text-width","glyph-text-resize","glyph-left-indent","glyph-right-indent","glyph-align-left","glyph-align-center","glyph-align-right","glyph-justify","glyph-list","glyph-text-smaller","glyph-text-bigger","glyph-embed","glyph-embed-close","glyph-table","glyph-message-full","glyph-message-empty","glyph-message-in","glyph-message-out","glyph-message-plus","glyph-message-minus","glyph-message-ban","glyph-message-flag","glyph-message-lock","glyph-message-new","glyph-inbox","glyph-inbox-plus","glyph-inbox-minus","glyph-inbox-lock","glyph-inbox-in","glyph-inbox-out","glyph-cogwheel","glyph-cogwheels","glyph-picture","glyph-adjust-alt","glyph-database-lock","glyph-database-plus","glyph-database-minus","glyph-database-ban","glyph-folder-open","glyph-folder-plus","glyph-folder-minus","glyph-folder-lock","glyph-folder-flag","glyph-folder-new","glyph-edit","glyph-new-window","glyph-check","glyph-unchecked","glyph-more-windows","glyph-show-big-thumbnails","glyph-show-thumbnails","glyph-show-thumbnails-with-lines","glyph-show-lines","glyph-playlist","glyph-imac","glyph-macbook","glyph-ipad","glyph-iphone","glyph-iphone-transfer","glyph-iphone-exchange","glyph-ipod","glyph-ipod-shuffle","glyph-ear-plugs","glyph-record","glyph-step-backward","glyph-fast-backward","glyph-rewind","glyph-play","glyph-pause","glyph-stop","glyph-forward","glyph-fast-forward","glyph-step-forward","glyph-eject","glyph-facetime-video","glyph-download-alt","glyph-mute","glyph-volume-down","glyph-volume-up","glyph-screenshot","glyph-move","glyph-more","glyph-brightness-reduce","glyph-brightness-increase","glyph-circle-plus","glyph-circle-minus","glyph-circle-remove","glyph-circle-ok","glyph-circle-question-mark","glyph-circle-info","glyph-circle-exclamation-mark","glyph-remove","glyph-ok","glyph-ban","glyph-download","glyph-upload","glyph-shopping-cart","glyph-lock","glyph-unlock","glyph-electricity","glyph-ok-2","glyph-remove-2","glyph-cart-out","glyph-cart-in","glyph-left-arrow","glyph-right-arrow","glyph-down-arrow","glyph-up-arrow","glyph-resize-small","glyph-resize-full","glyph-circle-arrow-left","glyph-circle-arrow-right","glyph-circle-arrow-top","glyph-circle-arrow-down","glyph-play-button","glyph-unshare","glyph-share","glyph-chevron-right","glyph-chevron-left","glyph-bluetooth","glyph-euro","glyph-usd","glyph-gbp","glyph-retweet-2","glyph-moon","glyph-sun","glyph-cloud","glyph-direction","glyph-brush","glyph-pen","glyph-zoom-in","glyph-zoom-out","glyph-pin","glyph-albums","glyph-rotation-lock","glyph-flash","glyph-google-maps","glyph-anchor","glyph-conversation","glyph-chat","glyph-male","glyph-female","glyph-asterisk","glyph-divide","glyph-snorkel-diving","glyph-scuba-diving","glyph-oxygen-bottle","glyph-fins","glyph-fishes","glyph-boat","glyph-delete","glyph-sheriffs-star","glyph-qrcode","glyph-barcode","glyph-pool","glyph-buoy","glyph-spade","glyph-bank","glyph-vcard","glyph-electrical-plug","glyph-flag","glyph-credit-card","glyph-keyboard-wireless","glyph-keyboard-wired","glyph-shield","glyph-ring","glyph-cake","glyph-drink","glyph-beer","glyph-fast-food","glyph-cutlery","glyph-pizza","glyph-birthday-cake","glyph-tablet","glyph-settings","glyph-bullets","glyph-cardio","glyph-t-shirt","glyph-pants","glyph-sweater","glyph-fabric","glyph-leather","glyph-scissors","glyph-bomb","glyph-skull","glyph-celebration","glyph-tea-kettle","glyph-french-press","glyph-coffe-cup","glyph-pot","glyph-grater","glyph-kettle","glyph-hospital","glyph-hospital-h","glyph-microphone","glyph-webcam","glyph-temple-christianity-church","glyph-temple-islam","glyph-temple-hindu","glyph-temple-buddhist","glyph-bicycle","glyph-life-preserver","glyph-share-alt","glyph-comments","glyph-flower","glyph-baseball","glyph-rugby","glyph-ax","glyph-table-tennis","glyph-bowling","glyph-tree-conifer","glyph-tree-deciduous","glyph-more-items","glyph-sort","glyph-filter","glyph-gamepad","glyph-playing-dices","glyph-calculator","glyph-tie","glyph-wallet","glyph-piano","glyph-sampler","glyph-podium","glyph-soccer-ball","glyph-blog","glyph-dashboard","glyph-certificate","glyph-bell","glyph-candle","glyph-pushpin","glyph-iphone-shake","glyph-pin-flag","glyph-turtle","glyph-rabbit","glyph-globe","glyph-briefcase","glyph-hdd","glyph-thumbs-up","glyph-thumbs-down","glyph-hand-right","glyph-hand-left","glyph-hand-up","glyph-hand-down","glyph-fullscreen","glyph-shopping-bag","glyph-book-open","glyph-nameplate","glyph-nameplate-alt","glyph-vases","glyph-bullhorn","glyph-dumbbell","glyph-suitcase","glyph-file-import","glyph-file-export","glyph-bug","glyph-crown","glyph-smoking","glyph-cloud-upload","glyph-cloud-download","glyph-restart","glyph-security-camera","glyph-expand","glyph-collapse","glyph-collapse-top","glyph-globe-af","glyph-global","glyph-spray","glyph-nails","glyph-claw-hammer","glyph-classic-hammer","glyph-hand-saw","glyph-riflescope","glyph-electrical-socket-eu","glyph-electrical-socket-us","glyph-message-forward","glyph-coat-hanger","glyph-dress","glyph-bathrobe","glyph-shirt","glyph-underwear","glyph-log-in","glyph-log-out","glyph-exit","glyph-new-window-alt","glyph-video-sd","glyph-video-hd","glyph-subtitles","glyph-sound-stereo","glyph-sound-dolby","glyph-sound-5-1","glyph-sound-6-1","glyph-sound-7-1","glyph-copyright-mark","glyph-registration-mark","glyph-radar","glyph-skateboard","glyph-golf-course","glyph-sorting","glyph-sort-by-alphabet","glyph-sort-by-alphabet-alt","glyph-sort-by-order","glyph-sort-by-order-alt","glyph-sort-by-attributes","glyph-sort-by-attributes-alt","glyph-compressed","glyph-package","glyph-cloud-plus","glyph-cloud-minus","glyph-disk-save","glyph-disk-open","glyph-disk-saved","glyph-disk-remove","glyph-disk-import","glyph-disk-export","glyph-tower","glyph-send","glyph-git-branch","glyph-git-create","glyph-git-private","glyph-git-delete","glyph-git-merge","glyph-git-pull-request","glyph-git-compare","glyph-git-commit","glyph-construction-cone","glyph-shoe-steps","glyph-plus","glyph-minus","glyph-redo","glyph-undo","glyph-golf","glyph-hockey","glyph-pipe","glyph-wrench","glyph-folder-closed","glyph-phone-alt","glyph-earphone","glyph-floppy-disk","glyph-floppy-saved","glyph-floppy-remove","glyph-floppy-save","glyph-floppy-open","glyph-translate","glyph-fax","glyph-factory","glyph-shop-window","glyph-shop","glyph-kiosk","glyph-kiosk-wheels","glyph-kiosk-light","glyph-kiosk-food","glyph-transfer","glyph-money","glyph-header","glyph-blacksmith","glyph-saw-blade","glyph-basketball","glyph-server","glyph-server-plus","glyph-server-minus","glyph-server-ban","glyph-server-flag","glyph-server-lock","glyph-server-new"],f=["social-pinterest","social-dropbox","social-google-plus","social-jolicloud","social-yahoo","social-blogger","social-picasa","social-amazon","social-tumblr","social-wordpress","social-instapaper","social-evernote","social-xing","social-zootool","social-dribbble","social-deviantart","social-read-it-later","social-linked-in","social-forrst","social-pinboard","social-behance","social-github","social-youtube","social-skitch","social-foursquare","social-quora","social-badoo","social-spotify","social-stumbleupon","social-readability","social-facebook","social-twitter","social-instagram","social-posterous-spaces","social-vimeo","social-flickr","social-last-fm","social-rss","social-skype","social-e-mail","social-vine","social-myspace","social-goodreads","social-apple","social-windows","social-yelp","social-playstation","social-xbox","social-android","social-ios"]}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"image"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.base()},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(i){var u=this,r=this.getTextControlEl();r&&r.length>0&&(t.isEmpty(i)?r.val(""):(r.val(i),n(u.control).parent().find(".alpaca-image-display img").attr("src",i)));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);n(r).change(function(){var t=n(this).val();n(i.control).parent().find(".alpaca-image-display img").attr("src",t)});i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()));t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=r.options.typeahead.datasets,i||(i={}),i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Image2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){if(self.sf){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})}},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("image2",t.Fields.Image2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCrop2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"imagecrop2"},setup:function(){var n=this;this.options.uploadfolder||(this.options.uploadfolder="");this.options.cropfolder||(this.options.cropfolder=this.options.uploadfolder);this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.width&&this.options.height&&(this.options.cropper.aspectRatio=this.options.width/this.options.height);this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.options.cropButtonHidden||(this.options.cropButtonHidden=!1);this.options.cropButtonHidden||(this.options.buttons={check:{value:"Crop",click:function(){this.cropImage()}}});this.base()},getValue:function(){var i=this,t;if(this.control&&this.control.length>0)return t=null,$image=i.getImage(),t=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},t.url=n(this.control).find("select").val(),t.url&&(this.dataSource&&this.dataSource[t.url]&&(t.id=this.dataSource[t.url].id),t.cropUrl=n(i.getControlEl()).attr("data-cropurl")),t},setValue:function(i){var r=this,u;i!==this.getValue()&&this.control&&typeof i!="undefined"&&i!=null&&(t.isEmpty(i)?(r.cropper(""),n(this.control).find("select").val(""),n(r.getControlEl()).attr("data-cropurl","")):t.isObject(i)?(i.url&&(i.url=i.url.split("?")[0]),i.cropUrl&&(i.cropUrl=i.cropUrl.split("?")[0]),i.cropdata&&Object.keys(i.cropdata).length>0?(u=i.cropdata[Object.keys(i.cropdata)[0]],r.cropper(i.url,u.cropper),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",u.url)):(r.cropper(i.url,i),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",i.cropUrl))):(r.cropper(i),n(this.control).find("select").val(i),n(r.getControlEl()).attr("data-cropurl","")),n(this.control).find("select").trigger("change.select2"))},getEnum:function(){if(this.schema){if(this.schema["enum"])return this.schema["enum"];if(this.schema.type&&this.schema.type==="array"&&this.schema.items&&this.schema.items["enum"])return this.schema.items["enum"]}},initControlEvents:function(){var n=this,t;if(n.base(),n.options.multiple){t=this.control.parent().find(".select2-search__field");t.focus(function(t){n.suspendBlurFocus||(n.onFocus.call(n,t),n.trigger("focus",t))});t.blur(function(t){n.suspendBlurFocus||(n.onBlur.call(n,t),n.trigger("blur",t))});this.control.on("change",function(t){n.onChange.call(n,t);n.trigger("change",t)})}},beforeRenderControl:function(i,r){var u=this;this.base(i,function(){if(u.selectOptions=[],u.sf){var f=function(){u.schema.enum=[];u.options.optionLabels=[];for(var n=0;n0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl().find("select")).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.uploadfolder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(n,t){u.refresh(function(){u.setValue(t.url)})})}}).data("loaded",!0);r()})},cropImage:function(){var t=this,i=t.getValue(),r={url:i.url,cropfolder:t.options.cropfolder,crop:i,id:"crop"};t.options.width&&t.options.height&&(r.resize={width:t.options.width,height:t.options.height});n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){n(t.getControlEl()).attr("data-cropurl",i.url);setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},getFileUrl:function(t){var i=this,r;i.sf&&(r={fileid:t},n.ajax({url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:i.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:r,success:function(n){return n},error:function(){return""}}))},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?((t!=r.originalUrl||r.url&&t!=r.url)&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data?this.data.url:"",!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).find("select");i.focus();t&&t(this)}},getTitle:function(){return"Image Crop 2 Field"},getDescription:function(){return"Image Crop 2 Field"}});t.registerFieldClass("imagecrop2",t.Fields.ImageCrop2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecrop"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Crop Field"},getDescription:function(){return"Image Crop Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var r=this,i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?(i.val(""),r.cropper("")):t.isObject(n)?(i.val(n.url),r.cropper(n.url,n)):(i.val(n),r.cropper(n)));this.updateMaxLengthIndicator()},getValue:function(){var i=this,n=null,t=this.getTextControlEl();return $image=i.getImage(),t&&t.length>0&&(n=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},n.url=t.val()),n},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;$image=n(i.control).parent().find(".alpaca-image-display img");i.sf?(i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){n(r).val(i.url);n(r).change()})}}).data("loaded",!0),n(r).change(function(){var t=n(this).val();i.cropper(t)}),i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()))):$image.hide();t()},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?(t!=r.originalUrl&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)&&u.sf){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){n(r).val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){n(r).val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecrop",t.Fields.ImageCropField)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropperField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecropper"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Cropper Field"},getDescription:function(){return"Image Cropper Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):t.isString(n)?i.val(n):(i.val(n.url),this.setCroppedData(n.cropdata)));this.updateMaxLengthIndicator()},getValue:function(){var n=null,t=this.getTextControlEl();return t&&t.length>0&&(n={url:t.val()},n.cropdata=this.getCroppedData()),n},getCroppedData:function(){var f=this.getTextControlEl(),i={};for(var t in this.options.croppers){var e=this.options.croppers[t],r=this.id+"-"+t,u=n("#"+r);i[t]=u.data("cropdata")}return i},cropAllImages:function(t){var i=this;for(var r in this.options.croppers){var f=this.id+"-"+r,s=n("#"+f),u=this.options.croppers[r],e={x:-1,y:-1,width:u.width,height:u.height,rotate:0},o=JSON.stringify({url:t,id:r,crop:e,resize:u,cropfolder:this.options.cropfolder});n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",async:!1,data:o,beforeSend:i.sf.setModuleHeaders}).done(function(n){var t={url:n.url,cropper:{}};i.setCroppedDataForId(f,t)}).fail(function(n,t,i){alert("Uh-oh, something broke: "+i)})}},setCroppedData:function(i){var e=this.getTextControlEl(),h=this.getFieldEl(),u,r,f,o;if(e&&e.length>0&&!t.isEmpty(i))for(r in this.options.croppers){var o=this.options.croppers[r],c=this.id+"-"+r,s=n("#"+c);cropdata=i[r];cropdata&&s.data("cropdata",cropdata);u||(u=s,n(u).addClass("active"),cropdata&&(f=n(h).find(".alpaca-image-display img.image"),o=f.data("cropper"),o&&f.cropper("setData",cropdata.cropper)))}},setCroppedDataForId:function(t,i){var u=this.getTextControlEl(),r;i&&(r=n("#"+t),r.data("cropdata",i))},getCurrentCropData:function(){var t=this.getFieldEl(),i=n(t).parent().find(".alpaca-form-tab.active");return n(i).data("cropdata")},setCurrentCropData:function(t){var i=this.getFieldEl(),r=n(i).parent().find(".alpaca-form-tab.active");n(r).data("cropdata",t)},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},cropChange:function(t){var u=t.data,f=u.getCurrentCropData(),e;if(f){var r=f.cropper,o=this,i=n(this).cropper("getData",{rounded:!0});(i.x!=r.x||i.y!=r.y||i.width!=r.width||i.height!=r.height||i.rotate!=r.rotate)&&(e={url:"",cropper:i},u.setCurrentCropData(e))}},getCropppersData:function(){var n,t,i;for(n in self.options.croppers)t=self.options.croppers[n],i=self.id+"-"+n},handlePostRender:function(t){var i=this,f=this.getTextControlEl(),s=this.getFieldEl(),r=n('Crop<\/a>'),e,o,u,a;r.click(function(){var u=i.getCroppedData(),e=JSON.stringify({url:f.val(),cropfolder:i.options.cropfolder,cropdata:u,croppers:i.options.croppers}),t;return n(r).css("cursor","wait"),t="CropImages",n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/"+t,contentType:"application/json; charset=utf-8",dataType:"json",data:e,beforeSend:i.sf.setModuleHeaders}).done(function(t){var u,f;for(u in i.options.croppers){var s=i.options.croppers[u],e=i.id+"-"+u,o=n("#"+e);t.cropdata[u]&&(f={url:t.cropdata[u].url,cropper:t.cropdata[u].crop},f&&o.data("cropdata",f))}setTimeout(function(){n(r).css("cursor","initial")},500)}).fail(function(t,i,r){alert("Uh-oh, something broke: "+r);n(s).css("cursor","initial")}),!1});for(o in i.options.croppers){var c=i.options.croppers[o],l=i.id+"-"+o,h=n(''+o+"<\/a>").appendTo(n(f).parent());h.data("cropopt",c);h.click(function(){u.off("crop.cropper");var t=n(this).data("cropdata"),f=n(this).data("cropopt");u.cropper("setAspectRatio",f.width/f.height);t?u.cropper("setData",t.cropper):u.cropper("reset");r.data("cropperButtonId",this.id);r.data("cropperId",n(this).attr("data-id"));n(this).parent().find(".alpaca-form-tab").removeClass("active");n(this).addClass("active");u.on("crop.cropper",i,i.cropChange);return!1});e||(e=h,n(e).addClass("active"),r.data("cropperButtonId",n(e).attr("id")),r.data("cropperId",n(e).attr("data-id")))}u=n(s).find(".alpaca-image-display img.image");u.cropper(i.options.cropper).on("built.cropper",function(){var t=n(e).data("cropopt"),r,u;t&&n(this).cropper("setAspectRatio",t.width/t.height);r=n(e).data("cropdata");r&&n(this).cropper("setData",r.cropper);u=n(s).find(".alpaca-image-display img.image");u.on("crop.cropper",i,i.cropChange)});i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){f.val(i.url);n(f).change()})}}).data("loaded",!0);n(f).change(function(){var t=n(this).val();n(s).find(".alpaca-image-display img.image").attr("src",t);u.cropper("replace",t);t&&i.cropAllImages(t)});r.appendTo(n(f).parent());i.options.manageurl&&(a=n('Manage files<\/a>').appendTo(n(f).parent()));t()},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){r.val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){r.val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecropper",t.Fields.ImageCropperField)}(jQuery),function(n){var t=n.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.numberDecimalSeparator=f.numberDecimalSeparator},setup:function(){this.base()},getFieldType:function(){return"number"},getValue:function(){var n=this._getControlVal(!1);return typeof n=="undefined"||""==n?n:(this.numberDecimalSeparator!="."&&(n=(""+n).replace(this.numberDecimalSeparator,".")),parseFloat(n))},setValue:function(n){var i=n;this.numberDecimalSeparator!="."&&(i=t.isEmpty(n)?"":(""+n).replace(".",this.numberDecimalSeparator));this.base(i)},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateNumber();return i.stringNotANumber={message:n?"":this.view.getMessage("stringNotANumber"),status:n},n=this._validateDivisibleBy(),i.stringDivisibleBy={message:n?"":t.substituteTokens(this.view.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:n},n=this._validateMaximum(),i.stringValueTooLarge={message:"",status:n},n||(i.stringValueTooLarge.message=this.schema.exclusiveMaximum?t.substituteTokens(this.view.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):t.substituteTokens(this.view.getMessage("stringValueTooLarge"),[this.schema.maximum])),n=this._validateMinimum(),i.stringValueTooSmall={message:"",status:n},n||(i.stringValueTooSmall.message=this.schema.exclusiveMinimum?t.substituteTokens(this.view.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):t.substituteTokens(this.view.getMessage("stringValueTooSmall"),[this.schema.minimum])),n=this._validateMultipleOf(),i.stringValueNotMultipleOf={message:"",status:n},n||(i.stringValueNotMultipleOf.message=t.substituteTokens(this.view.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),r&&i.stringNotANumber.status&&i.stringDivisibleBy.status&&i.stringValueTooLarge.status&&i.stringValueTooSmall.status&&i.stringValueNotMultipleOf.status},_validateNumber:function(){var n=this._getControlVal(),i,r;return(this.numberDecimalSeparator!="."&&(n=n.replace(this.numberDecimalSeparator,".")),typeof n=="number"&&(n=""+n),t.isValEmpty(n))?!0:(i=t.testRegex(t.regexps.number,n),!i)?!1:(r=this.getValue(),isNaN(r))?!1:!0},_validateDivisibleBy:function(){var n=this.getValue();return!t.isEmpty(this.schema.divisibleBy)&&n%this.schema.divisibleBy!=0?!1:!0},_validateMaximum:function(){var n=this.getValue();return!t.isEmpty(this.schema.maximum)&&(n>this.schema.maximum||!t.isEmpty(this.schema.exclusiveMaximum)&&n==this.schema.maximum&&this.schema.exclusiveMaximum)?!1:!0},_validateMinimum:function(){var n=this.getValue();return!t.isEmpty(this.schema.minimum)&&(n0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("role2",t.Fields.Role2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.User2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.role||(this.options.role="");n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/UsersLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"",d:n.options.folder,role:n.options.role,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getUserName:function(t,i){var r=this,u;r.sf&&(u={userid:t},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/GetUserInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error GetUserInfo "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},getTitle:function(){return"Select User Field"},getDescription:function(){return"Select User Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("user2",t.Fields.User2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.Select2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("select2",t.Fields.Select2Field)}(jQuery),function(n){var t=n.alpaca;n.alpaca.Fields.DnnUrlField=n.alpaca.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.sf=f.servicesFramework},setup:function(){this.base()},applyTypeAhead:function(){var t=this,f,i,r,u,e,o,s,h;if(t.sf){if(f=f={},i=i={},i.name||(i.name=t.getId()),r=r={},u={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},u.remote={url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Tabs?q=%QUERY&l="+t.culture,ajax:{beforeSend:t.sf.setModuleHeaders}},i.filter&&(u.remote.filter=i.filter),i.replace&&(u.remote.replace=i.replace),e=new Bloodhound(u),e.initialize(),i.source=e.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(o in i.templates)s=i.templates[o],typeof s=="string"&&(i.templates[o]=Handlebars.compile(s));n(t.control).typeahead(f,i);n(t.control).on("typeahead:autocompleted",function(i,r){t.setValue(r.value);n(t.control).change()});n(t.control).on("typeahead:selected",function(i,r){t.setValue(r.value);n(t.control).change()});if(r){if(r.autocompleted)n(t.control).on("typeahead:autocompleted",function(n,t){r.autocompleted(n,t)});if(r.selected)n(t.control).on("typeahead:selected",function(n,t){r.selected(n,t)})}h=n(t.control);n(t.control).change(function(){var i=n(this).val(),t=n(h).typeahead("val");t!==i&&n(h).typeahead("val",t)});n(t.field).find("span.twitter-typeahead").first().css("display","block");n(t.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("url",t.Fields.DnnUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Url2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.culture=f.culture;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("url2",t.Fields.Url2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.wysihtmlField=t.Fields.TextAreaField.extend({getFieldType:function(){return"wysihtml"},setup:function(){this.data||(this.data="");this.base();typeof this.options.wysihtml=="undefined"&&(this.options.wysihtml={})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control){var t=r.control,u=n(t).find("#"+r.id)[0];r.editor=new wysihtml5.Editor(u,{toolbar:n(t).find("#"+r.id+"-toolbar")[0],parserRules:wysihtml5ParserRules});wysihtml5.commands.custom_class={exec:function(n,t,i){return wysihtml5.commands.formatBlock.exec(n,t,"p",i,new RegExp(i,"g"))},state:function(n,t,i){return wysihtml5.commands.formatBlock.state(n,t,"p",i,new RegExp(i,"g"))}}}i()})},getEditor:function(){return this.editor},setValue:function(n){var t=this;this.editor&&this.editor.setValue(n);this.base(n)},getValue:function(){var n=null;return this.editor&&(n=this.editor.currentView=="source"?this.editor.sourceView.textarea.value:this.editor.getValue()),n},getTitle:function(){return"wysihtml"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("wysihtml",t.Fields.wysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.SummernoteField=t.Fields.TextAreaField.extend({getFieldType:function(){return"summernote"},setup:function(){this.data||(this.data="");this.base();typeof this.options.summernote=="undefined"&&(this.options.summernote={height:null,minHeight:null,maxHeight:null,focus:!0});this.options.placeholder&&(this.options.summernote=this.options.placeholder)},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control&&n.fn.summernote)r.on("ready",function(){n(r.control).summernote(r.options.summernote)});n(r.control).bind("destroyed",function(){try{n(r.control).summernote("destroy")}catch(t){}});i()})},getTitle:function(){return"Summernote Editor"},getDescription:function(){return"Provides an instance of a Summernote Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{summernote:{title:"Summernote Editor options",description:"Use this entry to provide configuration options to the underlying Summernote plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{summernote:{type:"any"}}})}});t.registerFieldClass("summernote",t.Fields.SummernoteField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLSummernote=t.Fields.SummernoteField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlsummernote",t.Fields.MLSummernote)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLCKEditorField=t.Fields.CKEditorField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base();this.options.ckeditor||(this.options.ckeditor={});CKEDITOR.config.enableConfigHelper&&!this.options.ckeditor.extraPlugins&&(this.options.ckeditor.extraPlugins="dnnpages,confighelper")},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlckeditor",t.Fields.MLCKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFile2Field=t.Fields.File2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).after('')}});t.registerFieldClass("mlfile2",t.Fields.MLFile2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFileField=t.Fields.FileField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlfile",t.Fields.MLFileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFolder2Field=t.Fields.Folder2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlfolder2",t.Fields.MLFolder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImage2Field=t.Fields.Image2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlimage2",t.Fields.MLImage2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImageField=t.Fields.ImageField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlimage",t.Fields.MLImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextAreaField=t.Fields.TextAreaField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltextarea",t.Fields.MLTextAreaField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltext",t.Fields.MLTextField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrl2Field=t.Fields.Url2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlurl2",t.Fields.MLUrl2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrlField=t.Fields.DnnUrlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlurl",t.Fields.MLUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLwysihtmlField=t.Fields.wysihtmlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"ML wysihtml Field"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing MLHTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("mlwysihtml",t.Fields.MLwysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Accordion=t.Fields.ArrayField.extend({getFieldType:function(){return"accordion"},setup:function(){var n=this;this.base();n.options.titleField||n.schema.items&&n.schema.items.properties&&Object.keys(n.schema.items.properties).length&&(n.options.titleField=Object.keys(n.schema.items.properties)[0])},createItem:function(t,i,r,u,f){var e=this;this.base(t,i,r,u,function(t){var u="[no title]",r=t.childrenByPropertyId[e.options.titleField],i;if(r){i=r.getValue();i=i?i:u;t.getContainerEl().closest(".panel").find(".panel-title a").first().text(i);r.on("keyup",function(){var t=this.getValue();t=t?t:u;n(this.getControlEl()).closest(".panel").find(".panel-title a").first().text(t)})}f&&f(t)})},getType:function(){return"array"},getTitle:function(){return"accordion Field"},getDescription:function(){return"Renders array with title"}});t.registerFieldClass("accordion",t.Fields.Accordion)}(jQuery); \ No newline at end of file diff --git a/OpenContent/bundleconfig.json b/OpenContent/bundleconfig.json index 3f84fe03..a9009fb4 100644 --- a/OpenContent/bundleconfig.json +++ b/OpenContent/bundleconfig.json @@ -26,6 +26,7 @@ "alpaca/js/fields/dnn/Url2Field.js", "alpaca/js/fields/dnn/WysihtmlField.js", "alpaca/js/fields/dnn/SummernoteField.js", + "alpaca/js/fields/dnn/MLSummernoteField.js", "alpaca/js/fields/dnn/MLCKEditorField.js", "alpaca/js/fields/dnn/MLFile2Field.js", "alpaca/js/fields/dnn/MLFileField.js", From 1e6322a0399f7617e40f3e403c3f13ee972c7d24 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Mon, 6 Nov 2017 23:52:47 +0100 Subject: [PATCH 13/18] webapi for ordering by drag and drop --- .../Components/OpenContentAPIController.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/OpenContent/Components/OpenContentAPIController.cs b/OpenContent/Components/OpenContentAPIController.cs index ba49cfac..039d48f3 100644 --- a/OpenContent/Components/OpenContentAPIController.cs +++ b/OpenContent/Components/OpenContentAPIController.cs @@ -634,6 +634,45 @@ public HttpResponseMessage Update(JObject json) } } + + [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.Edit)] + [ValidateAntiForgeryToken] + [HttpPost] + public HttpResponseMessage ReOrder(List ids) + { + try + { + var module = new OpenContentModuleInfo(ActiveModule); + IDataSource ds = DataSourceManager.GetDataSource(module.Settings.Manifest.DataSource); + var dsContext = OpenContentUtils.CreateDataContext(module, UserInfo.UserID); + IDataItem dsItem = null; + if (module.IsListMode()) + { + if (ids != null) + { + int i = 1; + foreach (var id in ids) + { + dsItem = ds.Get(dsContext, id); + var json = dsItem.Data; + json["SortOrder"] = i; + ds.Update(dsContext, dsItem, json); + i++; + } + } + } + return Request.CreateResponse(HttpStatusCode.OK, new + { + isValid = true + }); + } + catch (Exception exc) + { + Log.Logger.Error(exc); + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exc); + } + } + private void AddNotifyInfo(DataSourceContext dsContext) { string jsonSettings = ActiveModule.ModuleSettings["notifications"] as string; From f59f68cff700a2ab01362cc20a94a08c43809cfc Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Tue, 7 Nov 2017 18:38:20 +0100 Subject: [PATCH 14/18] fix for using view.json --- OpenContent/js/alpacaengine.js | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenContent/js/alpacaengine.js b/OpenContent/js/alpacaengine.js index e508e177..de1a0a69 100644 --- a/OpenContent/js/alpacaengine.js +++ b/OpenContent/js/alpacaengine.js @@ -172,6 +172,7 @@ alpacaEngine.engine = function (config) { var view = self.view; if (config.view) { + view = config.view; view.parent = self.view; } var selfControl = null; From b159990188fd7f78ebfe7ad1147bb4064bee1ca5 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Wed, 8 Nov 2017 13:14:32 +0100 Subject: [PATCH 15/18] form submit : make the email adresses, and names templatable with access to oc Item add CC and Bcc --- .../Datasource/OpenContentDataSource.cs | 17 +- OpenContent/Components/Form/FormUtils.cs | 67 +++++-- .../Components/Form/NotificationDTO.cs | 2 + OpenContent/Submissions.ascx.cs | 1 + OpenContent/formsettings-options.json | 3 - OpenContent/formsettings-schema.json | 184 +++++++++--------- 6 files changed, 162 insertions(+), 112 deletions(-) diff --git a/OpenContent/Components/Datasource/OpenContentDataSource.cs b/OpenContent/Components/Datasource/OpenContentDataSource.cs index 12beef41..81b1a906 100644 --- a/OpenContent/Components/Datasource/OpenContentDataSource.cs +++ b/OpenContent/Components/Datasource/OpenContentDataSource.cs @@ -367,12 +367,12 @@ public virtual JToken Action(DataSourceContext context, string action, IDataItem if (action == "FormSubmit") { OpenContentController ctrl = new OpenContentController(); - var indexConfig = OpenContentUtils.GetIndexConfig(new FolderUri(context.TemplateFolder), "Submissions"); + //var indexConfig = OpenContentUtils.GetIndexConfig(new FolderUri(context.TemplateFolder), "Submissions"); var content = new OpenContentInfo() { ModuleId = GetModuleId(context), Collection = "Submissions", - Title = "Form", + Title = item.Data["Title"] == null ? "Form" : item.Data["Title"].ToString(), Json = data["form"].ToString(), CreatedByUserId = context.UserId, CreatedOnDate = DateTime.Now, @@ -382,13 +382,12 @@ public virtual JToken Action(DataSourceContext context, string action, IDataItem ctrl.AddContent(content); //Index the content item - if (context.Index) - { - LuceneController.Instance.Add(content, indexConfig); - LuceneController.Instance.Store.Commit(); - } - - return FormUtils.FormSubmit(data as JObject); + //if (context.Index) + //{ + // LuceneController.Instance.Add(content, indexConfig); + // LuceneController.Instance.Store.Commit(); + //} + return FormUtils.FormSubmit(data as JObject, item.Data.DeepClone() as JObject); } return null; } diff --git a/OpenContent/Components/Form/FormUtils.cs b/OpenContent/Components/Form/FormUtils.cs index b4e7312a..aa24007a 100644 --- a/OpenContent/Components/Form/FormUtils.cs +++ b/OpenContent/Components/Form/FormUtils.cs @@ -73,19 +73,17 @@ private static string GetProperty(JObject obj, string PropertyName) } return PropertyValue; } + public static string SendMail(string mailFrom, string mailTo, string replyTo, string subject, string body) + { + return SendMail(mailFrom, mailTo, replyTo, "", "", subject, body); + } + public static string SendMail(string mailFrom, string mailTo, string replyTo, string cc, string bcc, string subject, string body) { - //string mailFrom - //string mailTo, - string cc = ""; - string bcc = ""; - //string replyTo, DotNetNuke.Services.Mail.MailPriority priority = DotNetNuke.Services.Mail.MailPriority.Normal; - //string subject, MailFormat bodyFormat = MailFormat.Html; Encoding bodyEncoding = Encoding.UTF8; - //string body, List attachments = new List(); string smtpServer = Host.SMTPServer; string smtpAuthentication = Host.SMTPAuthentication; @@ -177,14 +175,14 @@ public static JObject InitFields(JObject sourceJson, UserInfo userInfo) return schemaJson; } - public static JObject FormSubmit(JObject formInfo) + public static JObject FormSubmit(JObject formInfo, JObject item = null) { SettingsDTO settings = null; if (formInfo["formSettings"] is JObject) { settings = (formInfo["formSettings"] as JObject).ToObject(); var form = formInfo["form"] as JObject; - return FormSubmit(form, settings); + return FormSubmit(form, settings, item); } else { @@ -193,7 +191,7 @@ public static JObject FormSubmit(JObject formInfo) return res; } } - public static JObject FormSubmit(JObject form, SettingsDTO settings) + public static JObject FormSubmit(JObject form, SettingsDTO settings, JObject item = null) { if (form != null) { @@ -215,6 +213,10 @@ public static JObject FormSubmit(JObject form, SettingsDTO settings) } */ data = FormUtils.GenerateFormData(form.ToString(), out formData); + if (item != null) + { + data.Item = JsonUtils.JsonToDynamic(item.ToString()); + } } // Send emails string Message = "Form submitted."; @@ -225,6 +227,7 @@ public static JObject FormSubmit(JObject form, SettingsDTO settings) { try { + ProcessTemplates(hbs, data, notification); MailAddress from = FormUtils.GenerateMailAddress(notification.From, notification.FromEmail, notification.FromName, notification.FromEmailField, notification.FromNameField, form); MailAddress to = FormUtils.GenerateMailAddress(notification.To, notification.ToEmail, notification.ToName, notification.ToEmailField, notification.ToNameField, form); MailAddress reply = null; @@ -237,8 +240,7 @@ public static JObject FormSubmit(JObject form, SettingsDTO settings) { body = hbs.Execute(notification.EmailBody, data); } - - string send = FormUtils.SendMail(from.ToString(), to.ToString(), (reply == null ? "" : reply.ToString()), notification.EmailSubject, body); + string send = FormUtils.SendMail(from.ToString(), to.ToString(), (reply == null ? "" : reply.ToString()),notification.CcEmails, notification.BccEmails, notification.EmailSubject, body); if (!string.IsNullOrEmpty(send)) { Errors.Add("From:" + from.ToString() + " - To:" + to.ToString() + " - " + send); @@ -273,5 +275,46 @@ public static JObject FormSubmit(JObject form, SettingsDTO settings) } return null; } + + private static void ProcessTemplates(HandlebarsEngine hbs, dynamic data, NotificationDTO notification) + { + if (notification.From == "custom") + { + if (!string.IsNullOrEmpty(notification.FromEmail) && notification.FromEmail.Contains("{{")) + { + notification.FromEmail = hbs.Execute(notification.FromEmail, data); + } + if (!string.IsNullOrEmpty(notification.FromName) && notification.FromName.Contains("{{")) + { + notification.FromName = hbs.Execute(notification.FromName, data); + } + } + if (notification.To == "custom") + { + if (!string.IsNullOrEmpty(notification.ToEmail) && notification.ToEmail.Contains("{{")) + { + notification.ToEmail = hbs.Execute(notification.ToEmail, data); + } + if (!string.IsNullOrEmpty(notification.ToName) && notification.ToName.Contains("{{")) + { + notification.ToName = hbs.Execute(notification.ToName, data); + } + } + if (notification.ReplyTo == "custom") + { + if (!string.IsNullOrEmpty(notification.ReplyToEmail) && notification.ReplyToEmail.Contains("{{")) + { + notification.ReplyToEmail = hbs.Execute(notification.ReplyToEmail, data); + } + if (!string.IsNullOrEmpty(notification.ReplyToName) && notification.ReplyToName.Contains("{{")) + { + notification.ReplyToName = hbs.Execute(notification.ReplyToName, data); + } + } + if (!string.IsNullOrEmpty(notification.EmailSubject) && notification.EmailSubject.Contains("{{")) + { + notification.EmailSubject = hbs.Execute(notification.EmailSubject, data); + } + } } } \ No newline at end of file diff --git a/OpenContent/Components/Form/NotificationDTO.cs b/OpenContent/Components/Form/NotificationDTO.cs index f1db99d2..9967c4b6 100644 --- a/OpenContent/Components/Form/NotificationDTO.cs +++ b/OpenContent/Components/Form/NotificationDTO.cs @@ -17,6 +17,8 @@ public class NotificationDTO public string ReplyToEmail { get; set; } public string ReplyToNameField { get; set; } public string ReplyToEmailField { get; set; } + public string CcEmails { get; set; } + public string BccEmails { get; set; } public string EmailSubject { get; set; } public string EmailBody { get; set; } } diff --git a/OpenContent/Submissions.ascx.cs b/OpenContent/Submissions.ascx.cs index 6f7c339b..832383c3 100644 --- a/OpenContent/Submissions.ascx.cs +++ b/OpenContent/Submissions.ascx.cs @@ -62,6 +62,7 @@ private List GetDataAsListOfDynamics() dynamic o = new ExpandoObject(); var dict = (IDictionary)o; o.CreatedOnDate = item.CreatedOnDate; + o.Title = item.Title; //o.Json = item.Json; dynamic d = JsonUtils.JsonToDynamic(item.Json); //o.Data = d; diff --git a/OpenContent/formsettings-options.json b/OpenContent/formsettings-options.json index 59c8d4f5..4a9601ef 100644 --- a/OpenContent/formsettings-options.json +++ b/OpenContent/formsettings-options.json @@ -17,7 +17,6 @@ "helper": "Name part of the email address" }, "FromEmail": { - "type": "email", "dependencies": { "From": "custom" } @@ -46,7 +45,6 @@ "helper": "Name part of the email address" }, "ToEmail": { - "type": "email", "dependencies": { "To": "custom" } @@ -74,7 +72,6 @@ "helper": "Name part of the email address" }, "ReplyToEmail": { - "type": "email", "dependencies": { "ReplyTo": "custom" } diff --git a/OpenContent/formsettings-schema.json b/OpenContent/formsettings-schema.json index 614d7809..7727503d 100644 --- a/OpenContent/formsettings-schema.json +++ b/OpenContent/formsettings-schema.json @@ -15,95 +15,103 @@ "ReplyToNameField": "Name", "ReplyToEmailField": "Email" }, - "properties": { - "From": { - "title": "From", - "type": "string", - "enum": [ "host", "admin", "form", "custom", "current" ] - }, - "FromName": { - "title": "From Name", - "type": "string", - "dependencies": "From" - }, - "FromEmail": { - "title": "From Email", - "type": "string", - "dependencies": "From" - }, - "FromNameField": { - "title": "From Name Field", - "type": "string", - "dependencies": "From" - }, - "FromEmailField": { - "title": "From Email Field", - "type": "string", - "dependencies": "From" - }, - "To": { - "title": "To", - "type": "string", - "enum": [ "host", "admin", "form", "custom", "current" ] - }, - "ToName": { - "title": "To Name", - "type": "string", - "dependencies": "To" - }, - "ToEmail": { - "title": "To Email", - "type": "string", - "required": true, - "dependencies": "To" - }, - "ToNameField": { - "title": "To Name Field", - "type": "string", - "dependencies": "To", - "default": "Name" - }, - "ToEmailField": { - "title": "To Email Field", - "type": "string", - "dependencies": "To", - "default": "Email" - }, - "ReplyTo": { - "title": "ReplyTo", - "type": "string", - "enum": [ "host", "admin", "form", "custom", "current" ] - }, - "ReplyToName": { - "title": "ReplyTo Name", - "type": "string", - "dependencies": "ReplyTo" - }, - "ReplyToEmail": { - "title": "ReplyTo Email", - "type": "string", - "dependencies": "ReplyTo" - }, - "ReplyToNameField": { - "title": "ReplyTo Name Field", - "type": "string", - "dependencies": "ReplyTo" - }, - "ReplyToEmailField": { - "title": "ReplyTo Email Field", - "type": "string", - "dependencies": "ReplyTo", - "default": "Email" - }, - "EmailSubject": { - "title": "Email subject", - "type": "string" - }, - "EmailBody": { - "title": "Email body", - "type": "string" - } + "properties": { + "From": { + "title": "From", + "type": "string", + "enum": [ "host", "admin", "form", "custom", "current" ] + }, + "FromName": { + "title": "From Name", + "type": "string", + "dependencies": "From" + }, + "FromEmail": { + "title": "From Email", + "type": "string", + "dependencies": "From" + }, + "FromNameField": { + "title": "From Name Field", + "type": "string", + "dependencies": "From" + }, + "FromEmailField": { + "title": "From Email Field", + "type": "string", + "dependencies": "From" + }, + "To": { + "title": "To", + "type": "string", + "enum": [ "host", "admin", "form", "custom", "current" ] + }, + "ToName": { + "title": "To Name", + "type": "string", + "dependencies": "To" + }, + "ToEmail": { + "title": "To Email", + "type": "string", + "required": true, + "dependencies": "To" + }, + "ToNameField": { + "title": "To Name Field", + "type": "string", + "dependencies": "To", + "default": "Name" + }, + "ToEmailField": { + "title": "To Email Field", + "type": "string", + "dependencies": "To", + "default": "Email" + }, + "ReplyTo": { + "title": "ReplyTo", + "type": "string", + "enum": [ "host", "admin", "form", "custom", "current" ] + }, + "ReplyToName": { + "title": "ReplyTo Name", + "type": "string", + "dependencies": "ReplyTo" + }, + "ReplyToEmail": { + "title": "ReplyTo Email", + "type": "string", + "dependencies": "ReplyTo" + }, + "ReplyToNameField": { + "title": "ReplyTo Name Field", + "type": "string", + "dependencies": "ReplyTo" + }, + "ReplyToEmailField": { + "title": "ReplyTo Email Field", + "type": "string", + "dependencies": "ReplyTo", + "default": "Email" + }, + "CcEmails": { + "title": "Cc Emails", + "type": "string" + }, + "BccEmails": { + "title": "Bcc Emails", + "type": "string" + }, + "EmailSubject": { + "title": "Email subject", + "type": "string" + }, + "EmailBody": { + "title": "Email body", + "type": "string" } + } } }, "Settings": { From 8790080a4ddf8b4220221475b6c5f860bba3d681 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Thu, 9 Nov 2017 18:25:46 +0100 Subject: [PATCH 16/18] fix for opencontentcontroller in scheduller --- .../Datasource/OpenContentDataSource.cs | 18 ++++---- OpenContent/Components/FeatureController.cs | 4 +- .../Components/Lucene/LuceneController.cs | 2 +- .../Components/OpenContentController.cs | 44 +++++++++++++------ OpenContent/EditGlobalSettings.ascx.cs | 2 +- OpenContent/Submissions.ascx.cs | 2 +- 6 files changed, 45 insertions(+), 27 deletions(-) diff --git a/OpenContent/Components/Datasource/OpenContentDataSource.cs b/OpenContent/Components/Datasource/OpenContentDataSource.cs index 81b1a906..6b5de4bd 100644 --- a/OpenContent/Components/Datasource/OpenContentDataSource.cs +++ b/OpenContent/Components/Datasource/OpenContentDataSource.cs @@ -20,7 +20,7 @@ public class OpenContentDataSource : IDataSource, IDataIndex #region Queries public virtual bool Any(DataSourceContext context) { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); return ctrl.GetFirstContent(GetModuleId(context)) != null; } public virtual JArray GetVersions(DataSourceContext context, IDataItem item) @@ -110,7 +110,7 @@ private DateTime getVersionDate(OpenContentVersion version) public virtual IDataItem Get(DataSourceContext context, string id) { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); OpenContentInfo content = null; if (!string.IsNullOrEmpty(id) && id != "-1") @@ -188,7 +188,7 @@ public virtual IDataItem GetData(DataSourceContext context, string scope, string public virtual IDataItems GetAll(DataSourceContext context) { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); var dataList = ctrl.GetContents(GetModuleId(context), context.Collection) .OrderBy(i => i.CreatedOnDate) @@ -217,7 +217,7 @@ public virtual IDataItems GetAll(DataSourceContext context, Select selectQuery) else { SelectQueryDefinition def = BuildQuery(context, selectQuery); - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); SearchResults docs = LuceneController.Instance.Search(OpenContentInfo.GetScope(GetModuleId(context), context.Collection), def.Filter, def.Query, def.Sort, def.PageSize, def.PageIndex); int total = docs.TotalResults; var dataList = new List(); @@ -283,7 +283,7 @@ public virtual JObject GetDataAlpaca(DataSourceContext context, bool schema, boo public virtual void Add(DataSourceContext context, JToken data) { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); var content = new OpenContentInfo() { ModuleId = GetModuleId(context), @@ -308,7 +308,7 @@ public virtual void Add(DataSourceContext context, JToken data) } public virtual void Update(DataSourceContext context, IDataItem item, JToken data) { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); var content = (OpenContentInfo)item.Item; content.Title = data["Title"]?.ToString() ?? ""; content.Json = data.ToString(); @@ -341,7 +341,7 @@ private static void Notify(DataSourceContext context, JToken data, string action public virtual void Delete(DataSourceContext context, IDataItem item) { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); var content = (OpenContentInfo)item.Item; ctrl.DeleteContent(content); if (context.Index) @@ -366,7 +366,7 @@ public virtual JToken Action(DataSourceContext context, string action, IDataItem { if (action == "FormSubmit") { - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(context.PortalId); //var indexConfig = OpenContentUtils.GetIndexConfig(new FolderUri(context.TemplateFolder), "Submissions"); var content = new OpenContentInfo() { @@ -439,7 +439,7 @@ public void Reindex(DataSourceContext context) { string scope = OpenContentInfo.GetScope(context.ModuleId, context.Collection); var indexConfig = OpenContentUtils.GetIndexConfig(new FolderUri(context.TemplateFolder), context.Collection); //todo index is being build from schema & options. But they should be provided by the provider, not directly from the files - OpenContentController occ = new OpenContentController(); + OpenContentController occ = new OpenContentController(context.PortalId); LuceneController.Instance.ReIndexModuleData(occ.GetContents(context.ModuleId, context.Collection), indexConfig, scope); } diff --git a/OpenContent/Components/FeatureController.cs b/OpenContent/Components/FeatureController.cs index e50e7fa4..4de7141f 100644 --- a/OpenContent/Components/FeatureController.cs +++ b/OpenContent/Components/FeatureController.cs @@ -41,7 +41,7 @@ public class FeatureController : ModuleSearchBase, IPortable, IUpgradeable, IMod public string ExportModule(int moduleId) { string xml = ""; - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(PortalSettings.Current.PortalId); var items = ctrl.GetContents(moduleId); xml += ""; foreach (var item in items) @@ -57,7 +57,7 @@ public string ExportModule(int moduleId) } public void ImportModule(int moduleId, string content, string version, int userId) { - var dataSource = new OpenContentDataSource(); + var dataSource = new OpenContentDataSource(PortalSettings.Current.PortalId); var dsContext = new DataSourceContext { ModuleId = moduleId, diff --git a/OpenContent/Components/Lucene/LuceneController.cs b/OpenContent/Components/Lucene/LuceneController.cs index f8a01e0f..a2f74b5e 100644 --- a/OpenContent/Components/Lucene/LuceneController.cs +++ b/OpenContent/Components/Lucene/LuceneController.cs @@ -179,7 +179,7 @@ private void IndexModuleData(LuceneController lc, int moduleId, OpenContentSetti moduleId = settings.ModuleId; } lc.Store.Delete(new TermQuery(new Term("$type", OpenContentInfo.GetScope(moduleId, settings.Template.Collection)))); - OpenContentController occ = new OpenContentController(); + OpenContentController occ = new OpenContentController(PortalSettings.Current.PortalId); foreach (var item in occ.GetContents(moduleId, settings.Template.Collection)) { lc.Add(item, indexConfig); diff --git a/OpenContent/Components/OpenContentController.cs b/OpenContent/Components/OpenContentController.cs index be47abd9..b1bd27f9 100644 --- a/OpenContent/Components/OpenContentController.cs +++ b/OpenContent/Components/OpenContentController.cs @@ -26,6 +26,21 @@ public class OpenContentController private const string CachePrefix = "Satrabel.OpenContent.Components.OpenContentController-"; private const int CacheTime = 60; + private int PortalId = -1; + + [Obsolete("Constructor is deprecated, please use OpenContentController(int portalId)")] + public OpenContentController() + { + if (PortalSettings.Current != null) + { + PortalId = PortalSettings.Current.PortalId; + } + } + public OpenContentController(int portalId) + { + PortalId = portalId; + } + #region Commands public void AddContent(OpenContentInfo content) @@ -89,7 +104,7 @@ public void UpdateContent(OpenContentInfo content) if (versions.Count == 0 || versions[0].Json.ToString() != content.Json) { versions.Insert(0, ver); - if (versions.Count > (PortalSettings.Current == null ? 5 : OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(PortalSettings.Current.PortalId).GetMaxVersions())) + if (versions.Count > (PortalId > 0 ? 5 : OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(PortalId).GetMaxVersions())) { versions.RemoveAt(versions.Count - 1); } @@ -115,24 +130,27 @@ public void UpdateXmlContent(OpenContentInfo content) } } - private static void SynchronizeXml(OpenContentInfo content) + private void SynchronizeXml(OpenContentInfo content) { - if (OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(PortalSettings.Current.PortalId).IsSaveXml() - && !string.IsNullOrEmpty(content.Json)) + if (PortalId > 0) { - try + if (OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(PortalId).IsSaveXml() + && !string.IsNullOrEmpty(content.Json)) { - content.Xml = Newtonsoft.Json.JsonConvert.DeserializeXNode(content.Json, "root").ToString(); + try + { + content.Xml = Newtonsoft.Json.JsonConvert.DeserializeXNode(content.Json, "root").ToString(); + } + catch (Exception ex) + { + Log.Logger.Error($"Error while Updating OpenContent Xml data for module {content.ModuleId}, ContentId {content.ContentId}", ex); + } + } - catch (Exception ex) + else { - Log.Logger.Error($"Error while Updating penContent Xml data for module {content.ModuleId}, ContentId {content.ContentId}", ex); + content.Xml = null; } - - } - else - { - content.Xml = null; } } diff --git a/OpenContent/EditGlobalSettings.ascx.cs b/OpenContent/EditGlobalSettings.ascx.cs index 65179ca1..c54e25bb 100644 --- a/OpenContent/EditGlobalSettings.ascx.cs +++ b/OpenContent/EditGlobalSettings.ascx.cs @@ -115,7 +115,7 @@ protected void cmdUpgradeXml_Click(object sender, EventArgs e) Log.Logger.Info("Updating all OpenContent Xml data for portal " + ModuleContext.PortalId); try { - var ctrl = new OpenContentController(); + var ctrl = new OpenContentController(ModuleContext.PortalId); var modules = DnnUtils.GetDnnOpenContentModules(ModuleContext.PortalId); foreach (var module in modules) { diff --git a/OpenContent/Submissions.ascx.cs b/OpenContent/Submissions.ascx.cs index 832383c3..95c6aeff 100644 --- a/OpenContent/Submissions.ascx.cs +++ b/OpenContent/Submissions.ascx.cs @@ -54,7 +54,7 @@ protected void ExcelDownload_Click(object sender, EventArgs e) private List GetDataAsListOfDynamics() { var module = new OpenContentModuleInfo(this.ModuleConfiguration); - OpenContentController ctrl = new OpenContentController(); + OpenContentController ctrl = new OpenContentController(ModuleContext.PortalId); var data = ctrl.GetContents(module.DataModule.ModuleID, "Submissions").OrderByDescending(c => c.CreatedOnDate); var dynData = new List(); foreach (var item in data) From 2ad27801ef7bcdf2b403b054d230eb9fab6eb042 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Fri, 10 Nov 2017 10:20:05 +0100 Subject: [PATCH 17/18] compile fix --- OpenContent/Components/FeatureController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenContent/Components/FeatureController.cs b/OpenContent/Components/FeatureController.cs index 4de7141f..0b1bb76f 100644 --- a/OpenContent/Components/FeatureController.cs +++ b/OpenContent/Components/FeatureController.cs @@ -57,7 +57,7 @@ public string ExportModule(int moduleId) } public void ImportModule(int moduleId, string content, string version, int userId) { - var dataSource = new OpenContentDataSource(PortalSettings.Current.PortalId); + var dataSource = new OpenContentDataSource(); var dsContext = new DataSourceContext { ModuleId = moduleId, From a54f1e99d38c88327956e72f37fc4e0d6869b597 Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Fri, 10 Nov 2017 16:27:09 +0100 Subject: [PATCH 18/18] rename SortOrder to SortIndex --- OpenContent/Components/OpenContentAPIController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenContent/Components/OpenContentAPIController.cs b/OpenContent/Components/OpenContentAPIController.cs index 039d48f3..b4446aef 100644 --- a/OpenContent/Components/OpenContentAPIController.cs +++ b/OpenContent/Components/OpenContentAPIController.cs @@ -655,7 +655,7 @@ public HttpResponseMessage ReOrder(List ids) { dsItem = ds.Get(dsContext, id); var json = dsItem.Data; - json["SortOrder"] = i; + json["SortIndex"] = i; ds.Update(dsContext, dsItem, json); i++; }