/* # ----------------------------------------------------------------------------- # ~/assets/themes/j1/modules/bmd/js/bmd.min.js # Based on BootstrapMateialDesion (BMD) version 4.1.3 (BS@4) # BS@5 implementation for J1 Template. # # Product/Info: # https://jekyll.one # https://github.com/mdbootstrap/bootstrap-material-design/tree/4.1.3 # # Copyright (C) 2021 Juergen Adams # Copyright (C) 2015 Federico Zivolo and contributors # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE # BootstrapMaterialDesign is licensed under the MIT License. # See: https://github.com/mdbootstrap/bootstrap-material-design/blob/4.1.3/LICENSE.md # ----------------------------------------------------------------------------- */ (function(a){typeof define==="function"&&define.amd?define(a):a()}((function(){function j(s,r){s.prototype=Object.create(r.prototype);s.prototype.constructor=s;s.__proto__=r}var n=function(){var v=false;var x="";var w={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};function s(){if(window.QUnit){return false}var D=document.createElement("bmd");for(var C in w){if(D.style[C]!==undefined){return w[C]}}return false}function B(){v=s();for(var C in w){x+=" "+w[C]}}var z={transitionEndSupported:function t(){return v},transitionEndSelector:function A(){return x},isChar:function y(C){if(typeof C.which==="undefined"){return true}else{if(typeof C.which==="number"&&C.which>0){return !C.ctrlKey&&!C.metaKey&&!C.altKey&&C.which!==8&&C.which!==9&&C.which!==13&&C.which!==16&&C.which!==17&&C.which!==20&&C.which!==27}}return false},assert:function r(C,E,D){if(E){if(!C===undefined){C.css("border","1px solid red")}console.error(D,C);throw D}},describe:function u(C){if(C===undefined){return"undefined"}else{if(C.length===0){return"(no matching elements)"}}return C[0].outerHTML.split(">")[0]+">"}};B();return z}(jQuery);var i=function(v){var u={BMD_FORM_GROUP:"bmd-form-group",IS_FILLED:"is-filled",IS_FOCUSED:"is-focused"};var s={BMD_FORM_GROUP:"."+u.BMD_FORM_GROUP};var r={};var t=function(){function A(E,F,H){if(H===void 0){H={}}this.$element=E;this.config=v.extend(true,{},r,F);for(var G in H){this[G]=H[G]}}var x=A.prototype;x.dispose=function D(E){this.$element.data(E,null);this.$element=null;this.config=null};x.addFormGroupFocus=function z(){if(!this.$element.prop("disabled")){this.$bmdFormGroup.addClass(u.IS_FOCUSED)}};x.removeFormGroupFocus=function C(){this.$bmdFormGroup.removeClass(u.IS_FOCUSED)};x.removeIsFilled=function y(){this.$bmdFormGroup.removeClass(u.IS_FILLED)};x.addIsFilled=function w(){this.$bmdFormGroup.addClass(u.IS_FILLED)};x.findMdbFormGroup=function B(E){if(E===void 0){E=true}var F=this.$element.closest(s.BMD_FORM_GROUP);if(F.length===0&&E){v.error("Failed to find "+s.BMD_FORM_GROUP+" for "+n.describe(this.$element))}return F};return A}();return t}(jQuery);var d=function(v){var u={FORM_GROUP:"form-group",BMD_FORM_GROUP:"bmd-form-group",BMD_LABEL:"bmd-label",BMD_LABEL_STATIC:"bmd-label-static",BMD_LABEL_PLACEHOLDER:"bmd-label-placeholder",BMD_LABEL_FLOATING:"bmd-label-floating",HAS_DANGER:"has-danger",IS_FILLED:"is-filled",IS_FOCUSED:"is-focused",INPUT_GROUP:"input-group"};var s={FORM_GROUP:"."+u.FORM_GROUP,BMD_FORM_GROUP:"."+u.BMD_FORM_GROUP,BMD_LABEL_WILDCARD:"label[class^='"+u.BMD_LABEL+"'], label[class*=' "+u.BMD_LABEL+"']"};var r={validate:false,formGroup:{required:false},bmdFormGroup:{template:"",create:true,required:true},label:{required:false,selectors:[".form-control-label","> label"],className:u.BMD_LABEL_STATIC},requiredClasses:[],invalidComponentMatches:[],convertInputSizeVariations:true};var t={"form-control-lg":"bmd-form-group-lg","form-control-sm":"bmd-form-group-sm"};var w=function(B){j(I,B);function I(P,Q,R){var S;if(R===void 0){R={}}S=B.call(this,P,v.extend(true,{},r,Q),R)||this;S._rejectInvalidComponentMatches();S.rejectWithoutRequiredStructure();S._rejectWithoutRequiredClasses();S.$formGroup=S.findFormGroup(S.config.formGroup.required);S.$bmdFormGroup=S.resolveMdbFormGroup();S.$bmdLabel=S.resolveMdbLabel();S.resolveMdbFormGroupSizing();S.addFocusListener();S.addChangeListener();if(S.$element.val()!=""){S.addIsFilled()}return S}var C=I.prototype;C.dispose=function M(P){B.prototype.dispose.call(this,P);this.$bmdFormGroup=null;this.$formGroup=null};C.rejectWithoutRequiredStructure=function D(){};C.addFocusListener=function y(){var P=this;this.$element.on("focus",function(){P.addFormGroupFocus()}).on("blur",function(){P.removeFormGroupFocus()})};C.addChangeListener=function N(){var P=this;this.$element.on("keydown paste",function(Q){if(n.isChar(Q)){P.addIsFilled()}}).on("keyup change",function(){if(P.isEmpty()){P.removeIsFilled()}else{P.addIsFilled()}if(P.config.validate){var Q=typeof P.$element[0].checkValidity==="undefined"||P.$element[0].checkValidity();if(Q){P.removeHasDanger()}else{P.addHasDanger()}}})};C.addHasDanger=function K(){this.$bmdFormGroup.addClass(u.HAS_DANGER)};C.removeHasDanger=function A(){this.$bmdFormGroup.removeClass(u.HAS_DANGER)};C.isEmpty=function F(){return this.$element.val()===null||this.$element.val()===undefined||this.$element.val()===""};C.resolveMdbFormGroup=function H(){var P=this.findMdbFormGroup(false);if(P===undefined||P.length===0){if(this.config.bmdFormGroup.create&&(this.$formGroup===undefined||this.$formGroup.length===0)){if(this.outerElement().parent().hasClass(u.INPUT_GROUP)){this.outerElement().parent().wrap(this.config.bmdFormGroup.template)}else{this.outerElement().wrap(this.config.bmdFormGroup.template)}}else{this.$formGroup.addClass(u.BMD_FORM_GROUP)}P=this.findMdbFormGroup(this.config.bmdFormGroup.required)}return P};C.outerElement=function z(){return this.$element};C.resolveMdbLabel=function O(){var P=this.$bmdFormGroup.find(s.BMD_LABEL_WILDCARD);if(P===undefined||P.length===0){P=this.findMdbLabel(this.config.label.required);if(P===undefined||P.length===0){}else{P.addClass(this.config.label.className)}}return P};C.findMdbLabel=function L(S){if(S===void 0){S=true}var R=null;for(var T=this.config.label.selectors,Q=Array.isArray(T),V=0,T=Q?T:T[Symbol.iterator]();;){var U;if(Q){if(V>=T.length){break}U=T[V++]}else{V=T.next();if(V.done){break}U=V.value}var P=U;if(v.isFunction(P)){R=P(this)}else{R=this.$bmdFormGroup.find(P)}if(R!==undefined&&R.length>0){break}}if(R.length===0&&S){v.error("Failed to find "+s.BMD_LABEL_WILDCARD+" within form-group for "+n.describe(this.$element))}return R};C.findFormGroup=function E(Q){if(Q===void 0){Q=true}var P=this.$element.closest(s.FORM_GROUP);if(P.length===0&&Q){v.error("Failed to find "+s.FORM_GROUP+" for "+n.describe(this.$element))}return P};C.resolveMdbFormGroupSizing=function J(){if(!this.config.convertInputSizeVariations){return}for(var P in t){if(this.$element.hasClass(P)){this.$bmdFormGroup.addClass(t[P])}}};C._rejectInvalidComponentMatches=function G(){for(var R=this.config.invalidComponentMatches,Q=Array.isArray(R),T=0,R=Q?R:R[Symbol.iterator]();;){var S;if(Q){if(T>=R.length){break}S=R[T++]}else{T=R.next();if(T.done){break}S=T.value}var P=S;P.rejectMatch(this.constructor.name,this.$element)}};C._rejectWithoutRequiredClasses=function x(){for(var Z=this.config.requiredClasses,T=Array.isArray(Z),X=0,Z=T?Z:Z[Symbol.iterator]();;){var Q;if(T){if(X>=Z.length){break}Q=Z[X++]}else{X=Z.next();if(X.done){break}Q=X.value}var W=Q;if(W.indexOf("||")!==-1){var U=W.split("||");for(var Y=U,S=Array.isArray(Y),V=0,Y=S?Y:Y[Symbol.iterator]();;){var P;if(S){if(V>=Y.length){break}P=Y[V++]}else{V=Y.next();if(V.done){break}P=V.value}var R=P;if(this.$element.hasClass(R)){break}}}else{if(this.$element.hasClass(W)){}}}};return I}(i);return w}(jQuery);var h=function(u){var s={label:{required:false}};var r={LABEL:"label"};var t=function(C){j(y,C);function y(D,E,F){var G;G=C.call(this,D,u.extend(true,{},s,E),F)||this;G.decorateMarkup();return G}var x=y.prototype;x.decorateMarkup=function A(){var D=u(this.config.template);this.$element.after(D);if(this.config.ripples!==false){D.bmdRipples()}};x.outerElement=function z(){return this.$element.parent().closest("."+this.outerClass)};x.rejectWithoutRequiredStructure=function w(){n.assert(this.$element,!this.$element.parent().prop("tagName")==="label",this.constructor.name+"'s "+n.describe(this.$element)+" parent element should be