define(["jquery"],function(__WEBPACK_EXTERNAL_MODULE_1__){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.i=function(value){return value},__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="/intranet/pages/build/js/",__webpack_require__(__webpack_require__.s=25)}({"./assets/js/edit_page_properties.js":function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(1)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function($){var EditPageProperties=function(existingPageUrls){this.existingUrls=[],this.isValidUrl=!0,this.invalidUrlDeleted=!1,this.init(existingPageUrls)};return EditPageProperties.prototype.checkUrl=function(url){this.isValidUrl=!0;var urls=[];for(var key in this.existingUrls)this.existingUrls.hasOwnProperty(key)&&urls.push({url:this.existingUrls[key].url.split("/").pop(),is_deleted:this.existingUrls[key].is_deleted});for(var i=0;i<urls.length;i++)urls[i].url===url&&(this.isValidUrl=!1,this.invalidUrlDeleted=urls[i].is_deleted);this.isValidUrl?($("#page_url").removeClass("is-invalid"),$("#url_in_use, #url_in_use_deleted").addClass("d-none"),$("#edit_page_submit").prop("disabled","")):($("#page_url").addClass("is-invalid"),this.invalidUrlDeleted?$("#url_in_use_deleted").removeClass("d-none"):$("#url_in_use").removeClass("d-none"),$("#edit_page_submit").prop("disabled","disabled"))},EditPageProperties.prototype.init=function(existing_page_urls){var self=this;self.existingUrls=existing_page_urls,$("#page_url").on("keyup",function(){self.checkUrl($(this).val())})},EditPageProperties}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},1:function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_1__},25:function(module,exports,__webpack_require__){module.exports=__webpack_require__("./assets/js/edit_page_properties.js")}})});
//# sourceMappingURL=edit_page_properties.js.map