2023-12-04 13:14:00 +03:00
|
|
|
(function(D,P){typeof exports=="object"&&typeof module<"u"?P(exports):typeof define=="function"&&define.amd?define(["exports"],P):(D=typeof globalThis<"u"?globalThis:D||self,P(D.mdb={}))})(this,function(D){"use strict";var fh=Object.defineProperty;var ph=(D,P,V)=>P in D?fh(D,P,{enumerable:!0,configurable:!0,writable:!0,value:V}):D[P]=V;var Rn=(D,P,V)=>(ph(D,typeof P!="symbol"?P+"":P,V),V);/*!
|
2023-11-20 13:08:21 +03:00
|
|
|
* MDB5
|
2023-12-04 13:14:00 +03:00
|
|
|
* Version: FREE 7.1.0
|
2023-11-20 13:08:21 +03:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright: Material Design for Bootstrap
|
|
|
|
* https://mdbootstrap.com/
|
|
|
|
*
|
|
|
|
* Read the license: https://mdbootstrap.com/general/license/
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Documentation: https://mdbootstrap.com/docs/standard/
|
|
|
|
*
|
|
|
|
* Support: https://mdbootstrap.com/support/
|
|
|
|
*
|
|
|
|
* Contact: contact@mdbootstrap.com
|
|
|
|
*
|
2023-12-04 13:14:00 +03:00
|
|
|
*/const P=(()=>{const n={};let t=1;return{set(e,i,s){typeof e[i]>"u"&&(e[i]={key:i,id:t},t++),n[e[i].id]=s},get(e,i){if(!e||typeof e[i]>"u")return null;const s=e[i];return s.key===i?n[s.id]:null},delete(e,i){if(typeof e[i]>"u")return;const s=e[i];s.key===i&&(delete n[s.id],delete e[i])}}})(),V={setData(n,t,e){P.set(n,t,e)},getData(n,t){return P.get(n,t)},removeData(n,t){P.delete(n,t)}},Br=n=>n==null?`${n}`:{}.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),kn=n=>{let t=n.getAttribute("data-mdb-target");if(!t||t==="#"){const e=n.getAttribute("href");t=e&&e!=="#"?e.trim():null}return t},Re=n=>{const t=kn(n);return t&&document.querySelector(t)?t:null},xt=n=>{const t=kn(n);return t?document.querySelector(t):null},Hn=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),Vn=n=>Hn(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(n):null,Bn=(n,t,e)=>{Object.keys(e).forEach(i=>{const s=e[i],r=t[i],o=r&&Hn(r)?"element":Br(r);if(!new RegExp(s).test(o))throw new Error(`${n.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${s}".`)})},Wn=n=>{if(!n)return!1;if(n.style&&n.parentNode&&n.parentNode.style){const t=getComputedStyle(n),e=getComputedStyle(n.parentNode);return t.display!=="none"&&e.display!=="none"&&t.visibility!=="hidden"}return!1},jn=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",Kn=()=>{const{jQuery:n}=window;return n&&!document.body.hasAttribute("data-mdb-no-jquery")?n:null},Yn=n=>{document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n()};document.documentElement.dir;const mt=n=>document.createElement(n),Wr=n=>{Yn(()=>{const t=Kn();if(t){const e=n.NAME,i=t.fn[e];t.fn[e]=n.jQueryInterface,t.fn[e].Constructor=n,t.fn[e].noConflict=()=>(t.fn[e]=i,n.jQueryInterface)}})},Pe=Kn(),jr=/[^.]*(?=\..*)\.|.*/,Fn=/\..*/,Kr=/::\d+$/,xe={};let Un=1;const Yr={mouseenter:"mouseover",mouseleave:"mouseout"},zn=["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"];function Gn(n,t){return t&&`${t}::${Un++}`||n.uidEvent||Un++}function qn(n){const t=Gn(n);return n.uidEvent=t,xe[t]=xe[t]||{},xe[t]}function Fr(n,t){return function e(i){return i.delegateTarget=n,e.oneOff&&u.off(n,i.type,t),t.apply(n,[i])}}function Ur(n,t,e){return function i(s){const r=n.querySelectorAll(t);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(let a=r.length;a--;"")if(r[a]===o)return s.delegateTarget=o,i.oneOff&&u.off(n,s.type,e),e.apply(o,[s]);return null}}function Xn(n,t,e=null){const i=Object.keys(n);for(let s=0,r=i.length;s<r;s++){const o=n[i[s]];if(o.originalHandler===t&&o.delegationSelector===e)return o}return null}function Qn(n,t,e){const i=typeof t=="string",s=i?e:t;let r=n.replace(Fn,"");const o=Yr[r];return o&&(r=o),zn.indexOf(r)>-1||(r=n),[i,s,r]}function Zn(n,t,e,i,s){if(typeof t!="string"||!n)return;e||(e=i,i=null);const[r,o,a]=Qn(t,e,i),l=qn(n),d=l[a]||(l[a]={}),c=Xn(d,o,r?e:null);if(c){c.oneOff=c.oneOff&&s;return}const f=Gn(o,t.replace(jr,"")),g=r?Ur(n,e,i):Fr(n,e);g.delegationSelector=r?e:null,g.originalHandler=o,g.oneOff=s,g.uidEvent=f,d[f]=g,n.addEventListener(a,g,r)}function ke(n,t,e,i,s){const r=Xn(t[e],i,s);r&&(n.removeEventListener(e,r,!!s),delete t[e][r.uidEvent])}function zr(n,t,e,i){const s=t[e]||{};Object.keys(s).forEach(r=>{if(r.indexOf(i)>-1){const o=s[r];ke(n,t,e,o.originalHandler,o.delegationSelector)}})}const u={on(n,t,e,i){Zn(n,t,e,i,!1)},one(n,t,e,i){Zn(n,t,e,i,!0)},extend(n,t,e){t.forEach(i=>{u.on(n,`${i.name}.bs.${e}`,s=>{co
|
2023-11-20 13:08:21 +03:00
|
|
|
`)});function O(E,p,m,T){var A=m?"":T.media?"@media ".concat(T.media," {").concat(T.css,"}"):T.css;if(E.styleSheet)E.styleSheet.cssText=b(p,A);else{var S=document.createTextNode(A),C=E.childNodes;C[p]&&E.removeChild(C[p]),C.length?E.insertBefore(S,C[p]):E.appendChild(S)}}function N(E,p,m){var T=m.css,A=m.media,S=m.sourceMap;if(A?E.setAttribute("media",A):E.removeAttribute("media"),S&&typeof btoa<"u"&&(T+=`
|
|
|
|
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(S))))," */")),E.styleSheet)E.styleSheet.cssText=T;else{for(;E.firstChild;)E.removeChild(E.firstChild);E.appendChild(document.createTextNode(T))}}var w=null,L=0;function M(E,p){var m,T,A;if(p.singleton){var S=L++;m=w||(w=f(p)),T=O.bind(null,m,S,!1),A=O.bind(null,m,S,!0)}else m=f(p),T=N.bind(null,m,p),A=function(){(function(C){if(C.parentNode===null)return!1;C.parentNode.removeChild(C)})(m)};return T(E),function(C){if(C){if(C.css===E.css&&C.media===E.media&&C.sourceMap===E.sourceMap)return;T(E=C)}else A()}}i.exports=function(E,p){(p=p||{}).singleton||typeof p.singleton=="boolean"||(p.singleton=(o===void 0&&(o=!!(window&&document&&document.all&&!window.atob)),o));var m=c(E=E||[],p);return function(T){if(T=T||[],Object.prototype.toString.call(T)==="[object Array]"){for(var A=0;A<m.length;A++){var S=d(m[A]);l[S].references--}for(var C=c(T,p),$=0;$<m.length;$++){var I=d(m[$]);l[I].references===0&&(l[I].updater(),l.splice(I,1))}m=C}}}}},t={};function e(i){var s=t[i];if(s!==void 0)return s.exports;var r=t[i]={id:i,exports:{}};return n[i](r,r.exports,e),r.exports}e.n=i=>{var s=i&&i.__esModule?()=>i.default:()=>i;return e.d(s,{a:s}),s},e.d=(i,s)=>{for(var r in s)e.o(s,r)&&!e.o(i,r)&&Object.defineProperty(i,r,{enumerable:!0,get:s[r]})},e.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),(()=>{var i=e(379),s=e.n(i),r=e(454);function o(l){if(!l.hasAttribute("autocompleted")){l.setAttribute("autocompleted","");var d=new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!0,detail:null});l.dispatchEvent(d)||(l.value="")}}function a(l){l.hasAttribute("autocompleted")&&(l.removeAttribute("autocompleted"),l.dispatchEvent(new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!1,detail:null})))}s()(r.Z,{insert:"head",singleton:!1}),r.Z.locals,e(810),document.addEventListener("animationstart",function(l){l.animationName==="onautofillstart"?o(l.target):a(l.target)},!0),document.addEventListener("input",function(l){l.inputType!=="insertReplacementText"&&"data"in l?a(l.target):o(l.target)},!0)})()})();class An{constructor(t){t=Vn(t),t&&(this._element=t,V.setData(this._element,this.constructor.DATA_KEY,this))}dispose(){V.removeData(this._element,this.constructor.DATA_KEY),u.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}static getInstance(t){return V.getData(Vn(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`mdb.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const Mu="input",Ru="mdb.input",be="active",Js="form-notch",tr="form-notch-leading",er="form-notch-middle",Pu="form-notch-trailing",xu="placeholder-active",ku="form-helper",Hu="form-counter",nr=`.${Js}`,ir=`.${tr}`,Vu=`.${er}`,Bu=`.${ku}`;class ve extends An{constructor(t){super(t),this._label=null,this._labelWidth=0,this._labelMarginLeft=0,this._notchLeading=null,this._notchMiddle=null,this._notchTrailing=null,this._initiated=!1,this._helper=null,this._counter=!1,this._counterElement=null,this._maxLength=0,this._leadingIcon=null,this._element&&(this.init(),_.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),W(this.constructor))}static get NAME(){return Mu}get input(){return v.findOne("input",this._element)||v.findOne("textarea",this._element)}init(){this._initiated||(this._getLabelData(),this._applyDivs(),this._applyNotch(),this._activate(),this._getHelper(),this._getCounter(),this._initiated=!0)}update(){this._getLabelData(),this._getNotchData(),this._applyNotch(),this._activate(),this._getHelper(),this._getCounter()}forceActive(){_.addClass(this.input,be)}forceInactive(){_.removeClass(this.input,be)}dispose(){this._removeBorder(),_.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_getLabelData(){this._label=v.findOne("label",
|
|
|
|
//# sourceMappingURL=mdb.umd.min.js.map
|