core/api/flatui/scripts/flat-ui.min.js

1 line
310 KiB
JavaScript
Raw Normal View History

2022-12-11 13:55:49 +05:00
!function(t,e){var n,i,s=0,r=/^ui-id-\d+$/;function o(e,n){var i,s,r,o=e.nodeName.toLowerCase();return"area"===o?(s=(i=e.parentNode).name,!(!e.href||!s||"map"!==i.nodeName.toLowerCase())&&(!!(r=t("img[usemap=#"+s+"]")[0])&&a(r))):(/input|select|textarea|button|object/.test(o)?!e.disabled:"a"===o&&e.href||n)&&a(e)}function a(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:(n=t.fn.focus,function(e,i){return"number"==typeof e?this.each(function(){var n=this;setTimeout(function(){t(n).focus(),i&&i.call(n)},e)}):n.apply(this,arguments)}),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var n,i,s=t(this[0]);s.length&&s[0]!==document;){if(("absolute"===(n=s.css("position"))||"relative"===n||"fixed"===n)&&(i=parseInt(s.css("zIndex"),10),!isNaN(i)&&0!==i))return i;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(e){return o(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),i=isNaN(n);return(i||n>=0)&&o(e,!i)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,n){var i="Width"===n?["Left","Right"]:["Top","Bottom"],s=n.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};function o(e,n,s,r){return t.each(i,function(){n-=parseFloat(t.css(e,"padding"+this))||0,s&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}t.fn["inner"+n]=function(e){return void 0===e?r["inner"+n].call(this):this.each(function(){t(this).css(s,o(this,e)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?r["outer"+n].call(this,e):this.each(function(){t(this).css(s,o(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=(i=t.fn.removeData,function(e){return arguments.length?i.call(this,t.camelCase(e)):i.call(this)})),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,n,i){var s,r=t.ui[e].prototype;for(s in i)r.plugins[s]=r.plugins[s]||[],r.plugins[s].push([n,i[s]])},call:function(t,e,n){var i,s=t.plugins[e];if(s&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(i=0;i<s.length;i++)t.options[s[i][0]]&&s[i][1].apply(t.element,n)}},hasScroll:function(e,n){if("hidden"===t(e).css("overflow"))return!1;var i,s=n&&"left"===n?"scrollLeft":"scrollTop";return e[s]>0||(e[