WebFormDesigner/js/BootstrapMenu.min.js
(完整代码) 16KB!function(t){function o(e){if(n[e])return n[e].exports;var i=n[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}var n={};return o.m=t,o.c=n,o.p="",o(0)}([function(t,o,n){window.BootstrapMenu=n(1)},function(t,o,n){"use strict";function e(t){var o=c('<div class="dropdown bootstrapMenu" style="z-index:1000;position:absolute;" />'),n=c('<ul class="dropdown-menu" style="position:static;display:block;font-size:0.9em;" />'),e=[];e[0]=[],s.each(t.options.actionsGroups,function(t,o){e[o+1]=[]});var i=!1;s.each(t.options.actions,function(o,n){var r=!1;s.each(t.options.actionsGroups,function(t,o){s.contains(t,n)&&(e[o+1].push(n),r=!0)}),r===!1&&e[0].push(n),"undefined"!=typeof o.iconClass&&(i=!0)});var r=!0;return s.each(e,function(o){0!=o.length&&(r===!1&&n.append('<li class="divider"></li>'),r=!1,s.each(o,function(o){var e=t.options.actions[o];i===!0?n.append('<li role="presentation" data-action="'+o+'"><a href="#" role="menuitem"><i class="fa fa-fw fa-lg '+(e.iconClass||"")+'"></i> '+e.name+"</a></li>"):n.append('<li role="presentation" data-action="'+o+'"><a href="#" role="menuitem">'+e.name+"</a></li>")}))}),o.append(n)}function i(t){var o=null;switch(t.options.menuEvent){case"click":o="click";break;case"right-click":o="contextmenu";break;case"hover":o="mouseenter";break;default:throw new Error("Unknown BootstrapMenu 'menuEvent' option")}t.$context.on(o,t.selector,function(o){var n=c(this);return t.open(n,o),!1})}function r(t,o){switch(t.options.menuEvent){case"click":break;case"right-click":break;case"hover":var n=o.add(t.$menu);n.on("mouseleave.BootstrapMenuAction",function(n){var e=n.toElement||n.relatedTarget;o.is(e)||t.$menu.is(e)||t.close()});break;default:throw new Error("Unknown BootstrapMenu 'menuEvent' option")}t.$context.on("click.BootstrapMenuAction",function(){t.close()})}var s=n(2),c=n(46);n(47);var l={fetchElementData:s.noop,menuSource:"mouse",menuPosition:"belowLeft",menuEvent:"right-click",actionsGroups:[]},u=function(t,o){this.selector=t,this.options=s.extend({},l,o),this.init()},a=[];u.prototype.init=function(){this.$context=c("body"),this.$menu=e(this),this.$menuList=this.$menu.children(),this.$menu.hide().appendTo(this.$context),i(this),a.push(this)},u.prototype.updatePosition=function(t,o){var n=null,e=null,i=null;switch(this.options.menuSource){case"element":e=t;break;case"mouse":e=o;break;default:throw new Error("Unknown BootstrapMenu 'menuSource' option")}switch(this.options.menuPosition){case"belowRight":n="right top",i="right bottom";break;case"belowLeft":n="left top",i="left bottom";break;case"aboveRight":n="right bottom",i="right top";break;case"aboveLeft":n="left bottom",i="left top";break;default:throw new Error("Unknown BootstrapMenu 'menuPosition' option")}this.$menu.css({display:"block"}),this.$menu.css({height:this.$menuList.height(),width:this.$menuList.width()}),this.$menu.position({my:n,at:i,of:e})},u.prototype.open=function(t,o){var n=this;u.closeAll();var e=this.$menu.find("[data-action]");e.show().removeClass("disabled"),e.each(function(){var o=c(this),e=o.data("action"),i=n.options.actions[e],r=n.options.fetchElementData(t);return i.isShown&&i.isShown(r)===!1?void o.hide():void(i.isEnabled&&i.isEnabled(r)===!1&&o.addClass("disabled"))}),this.updatePosition(t,o),this.$menu.show(),this.$menu.off("click.BootstrapMenuAction"),this.$menu.on("click.BootstrapMenuAction",function(o){o.preventDefault();var e=c(o.target);n.$menu.off("click.BootstrapMenuAction");var i=e.is("[data-action]")?e:e.closest("[data-action]"),r=i.data("action");if(!i.is(".disabled")){var s=n.options.fetchElementData(t);n.options.actions[r].onClick(s)}}),r(this,t)},u.prototype.close=function(){this.$context.off(".BootstrapMenuAction"),this.$menu.hide()},u.closeAll=function(){s.each(a,function(t){t.close()})},t.exports=u},function(t,o,n){function e(){throw new Error("Custom lodash build for BootstrapMenu build. lodash chaining is not included")}e.noop=n(3),e.each=n(4),e.contains=n(31),e.extend=n(39),t.exports=e},function(t,o){function n(){}t.exports=n},function(t,o,n){t.exports=n(5)},function(t,o,n){var e=n(6),i=n(7),r=n(28),s=r(e,i);t.exports=s},function(t,o){function n(t,o){for(var n=-1,e=t.length;++n<e&&o(t[n],n,t)!==!1;);return t}t.exports=n},function(t,o,n){var e=n(8),i=n(27),r=i(e);t.exports=r},function(t,o,n){function e(t,o){return i(t,o,r)}var i=n(9),r=n(13);t.exports=e},function(t,o,n){var e=n(10),i=e();t.exports=i},function(t,o,n){function e(t){return function(o,n,e){for(var r=i(o),s=e(o),c=s.length,l=t?c:-1;t?l--:++l<c;){var u=s[l];if(n(r[u],u,r)===!1)break}return o}}var i=n(11);t.exports=e},function(t,o,n){function e(t){return i(t)?t:Object(t)}var i=n(12);t.exports=e},function(t,o){function n(t){var o=typeof t;return!!t&&("object"==o||"function"==o)}t.exports=n},function(t,o,n){var e=n(14),i=n(18),r=n(12),s=n(22),c=e(Object,"keys"),l=c?function(t){var o=null==t?void 0:t.constructor;return"function"==typeof o&&o.prototype===t||"function"!=typeof t&&i(t)?s(t):r(t)?c(t):[]}:s;t.exports=l},function(t,o,n){function e(t,o){var n=null==t?void 0:t[o];return i(n)?n:void 0}var i=n(15);t.exports=e},function(t,o,n){function e(t){return null==t?!1:i(t)?a.test(l.call(t)):r(t)&&s.test(t)}var i=n(16),r=n(17),s=/^\[object .+?Constructor\]$/,c=Object.prototype,l=Function.prototype.toString,u=c.hasOwnProperty,a=RegExp("^"+l.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=e},function(t,o,n){function e(t){return i(t)&&c.call(t)==r}var i=n(12),r="[object Function]",s=Object.prototype,c=s.toString;t.exports=e},function(t,o){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,o,n){function e(t){return null!=t&&r(i(t))}var i=n(19),r=n(21);t.exports=e},function(t,o,n){var e=n(20),i=e("length");t.exports=i},function(t,o){function n(t){return function(o){return null==o?void 0:o[t]}}t.exports=n},function(t,o){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&e>=t}var e=9007199254740991;t.exports=n},function(t,o,n){function e(t){for(var o=l(t),n=o.length,e=n&&t.length,u=!!e&&c(e)&&(r(t)||i(t)),f=-1,p=[];++f<n;){var h=o[f];(u&&s(h,e)||a.call(t,h))&&p.push(h)}return p}var i=n(23),r=n(24),s=n(25),c=n(21),l=n(26),u=Object.prototype,a=u.hasOwnProperty;t.exports=e},function(t,o,n){function e(t){return r(t)&&i(t)&&c.call(t,"callee")&&!l.call(t,"callee")}var i=n(18),r=n(17),s=Object.prototype,c=s.hasOwnProperty,l=s.propertyIsEnumerable;t.exports=e},function(t,o,n){var e=n(14),i=n(21),r=n(17),s="[object Array]",c=Object.prototype,l=c.toString,u=e(Array,"isArray"),a=u||function(t){return r(t)&&i(t.length)&&l.call(t)==s};t.exports=a},function(t,o){function n(t,o){return t="number"==typeof t||e.test(t)?+t:-1,o=null==o?i:o,t>-1&&t%1==0&&o>t}var e=/^\d+$/,i=9007199254740991;t.exports=n},function(t,o,n){function e(t){if(null==t)return[];l(t)||(t=Object(t));var o=t.length;o=o&&c(o)&&(r(t)||i(t))&&o||0;for(var n=t.constructor,e=-1,u="function"==typeof n&&n.prototype===t,f=Array(o),p=o>0;++e<o;)f[e]=e+"";for(var h in t)p&&s(h,o)||"constructor"==h&&(u||!a.call(t,h))||f.push(h);return f}var i=n(23),r=n(24),s=n(25),c=n(21),l=n(12),u=Object.prototype,a=u.hasOwnProperty;t.exports=e},function(t,o,n){function e(t,o){return function(n,e){var c=n?i(n):0;if(!r(c))return t(n,e);for(var l=o?c:-1,u=s(n);(o?l--:++l<c)&&e(u[l],l,u)!==!1;);return n}}var i=n(19),r=n(21),s=n(11);t.exports=e},function(t,o,n){function e(t,o){return function(n,e,s){return"function"==typeof e&&void 0===s&&r(n)?t(n,e):o(n,i(e,s,3))}}var i=n(29),r=n(24);t.exports=e},function(t,o,n){function e(t,o,n){if("function"!=typeof t)return i;if(void 0===o)return t;switch(n){case 1:return function(n){return t.call(o,n)};case 3:return function(n,e,i){return t.call(o,n,e,i)};case 4:return function(n,e,i,r){return t.call(o,n,e,i,r)};case 5:return function(n,e,i,r,s){return t.call(o,n,e,i,r,s)}}return function(){return t.apply(o,arguments)}}var i=n(30);t.exports=e},function(t,o){function n(t){return t}t.exports=n},function(t,o,n){t.exports=n(32)},function(t,o,n){function e(t,o,n,e){var p=t?r(t):0;return l(p)||(t=a(t),p=t.length),n="number"!=typeof n||e&&c(o,n,e)?0:0>n?f(p+n,0):n||0,"string"==typeof t||!s(t)&&u(t)?p>=n&&t.indexOf(o,n)>-1:!!p&&i(t,o,n)>-1}var i=n(33),r=n(19),s=n(24),c=n(35),l=n(21),u=n(36),a=n(37),f=Math.max;t.exports=e},function(t,o,n){function e(t,o,n){if(o!==o)return i(t,n);for(var e=n-1,r=t.length;++e<r;)if(t[e]===o)return e;return-1}var i=n(34);t.exports=e},function(t,o){function n(t,o,n){for(var e=t.length,i=o+(n?0:-1);n?i--:++i<e;){var r=t[i];if(r!==r)return i}return-1}t.exports=n},function(t,o,n){function e(t,o,n){if(!s(n))return!1;var e=typeof o;if("number"==e?i(n)&&r(o,n.length):"string"==e&&o in n){var c=n[o];return t===t?t===c:c!==c}return!1}var i=n(18),r=n(25),s=n(12);t.exports=e},function(t,o,n){function e(t){return"string"==typeof t||i(t)&&c.call(t)==r}var i=n(17),r="[object String]",s=Object.prototype,c=s.toString;t.exports=e},function(t,o,n){function e(t){return i(t,r(t))}var i=n(38),r=n(13);t.exports=e},function(t,o){function n(t,o){for(var n=-1,e=o.length,i=Array(e);++n<e;)i[n]=t[o[n]];return i}t.exports=n},function(t,o,n){t.exports=n(40)},function(t,o,n){var e=n(41),i=n(42),r=n(44),s=r(function(t,o,n){return n?e(t,o,n):i(t,o)});t.exports=s},function(t,o,n){function e(t,o,n){for(var e=-1,r=i(o),s=r.length;++e<s;){var c=r[e],l=t[c],u=n(l,o[c],c,t,o);(u===u?u===l:l!==l)&&(void 0!==l||c in t)||(t[c]=u)}return t}var i=n(13);t.exports=e},function(t,o,n){function e(t,o){return null==o?t:i(o,r(o),t)}var i=n(43),r=n(13);t.exports=e},function(t,o){function n(t,o,n){n||(n={});for(var e=-1,i=o.length;++e<i;){var r=o[e];n[r]=t[r]}return n}t.exports=n},function(t,o,n){function e(t){return s(function(o,n){var e=-1,s=null==o?0:n.length,c=s>2?n[s-2]:void 0,l=s>2?n[2]:void 0,u=s>1?n[s-1]:void 0;for("function"==typeof c?(c=i(c,u,5),s-=2):(c="function"==typeof u?u:void 0,s-=c?1:0),l&&r(n[0],n[1],l)&&(c=3>s?void 0:c,s=1);++e<s;){var a=n[e];a&&t(o,a,c)}return o})}var i=n(29),r=n(35),s=n(45);t.exports=e},function(t,o){function n(t,o){if("function"!=typeof t)throw new TypeError(e);return o=i(void 0===o?t.length-1:+o||0,0),function(){for(var n=arguments,e=-1,r=i(n.length-o,0),s=Array(r);++e<r;)s[e]=n[o+e];switch(o){case 0:return t.call(this,s);case 1:return t.call(this,n[0],s);case 2:return t.call(this,n[0],n[1],s)}var c=Array(o+1);for(e=-1;++e<o;)c[e]=n[e];return c[o]=s,t.apply(this,c)}}var e="Expected a function",i=Math.max;t.exports=n},function(t,o){t.exports=jQuery},function(t,o,n){var e=n(46);/*!
* jQuery UI Position 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/position/
*/
!function(t,o){function n(t,o,n){return[parseFloat(t[0])*(h.test(t[0])?o/100:1),parseFloat(t[1])*(h.test(t[1])?n/100:1)]}function e(o,n){return parseInt(t.css(o,n),10)||0}function i(o){var n=o[0];return 9===n.nodeType?{width:o.width(),height:o.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:o.width(),height:o.height(),offset:{top:o.scrollTop(),left:o.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:o.outerWidth(),height:o.outerHeight(),offset:o.offset()}}t.ui=t.ui||{};var r,s=Math.max,c=Math.abs,l=Math.round,u=/left|center|right/,a=/top|center|bottom/,f=/[\+\-]\d+(\.[\d]+)?%?/,p=/^\w+/,h=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(r!==o)return r;var n,e,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];return t("body").append(i),n=s.offsetWidth,i.css("overflow","scroll"),e=s.offsetWidth,n===e&&(e=i[0].clientWidth),i.remove(),r=n-e},getScrollInfo:function(o){var n=o.isWindow||o.isDocument?"":o.element.css("overflow-x"),e=o.isWindow||o.isDocument?"":o.element.css("overflow-y"),i="scroll"===n||"auto"===n&&o.width<o.element[0].scrollWidth,r="scroll"===e||"auto"===e&&o.height<o.element[0].scrollHeight;return{width:r?t.position.scrollbarWidth():0,height:i?t.position.scrollbarWidth():0}},getWithinInfo:function(o){var n=t(o||window),e=t.isWindow(n[0]),i=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:e,isDocument:i,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:e?n.width():n.outerWidth(),height:e?n.height():n.outerHeight()}}},t.fn.position=function(o){if(!o||!o.of)return d.apply(this,arguments);o=t.extend({},o);var r,h,v,m,g,y,w=t(o.of),x=t.position.getWithinInfo(o.within),b=t.position.getScrollInfo(x),W=(o.collision||"flip").split(" "),k={};return y=i(w),w[0].preventDefault&&(o.at="left top"),h=y.width,v=y.height,m=y.offset,g=t.extend({},m),t.each(["my","at"],function(){var t,n,e=(o[this]||"").split(" ");1===e.length&&(e=u.test(e[0])?e.concat(["center"]):a.test(e[0])?["center"].concat(e):["center","center"]),e[0]=u.test(e[0])?e[0]:"center",e[1]=a.test(e[1])?e[1]:"center",t=f.exec(e[0]),n=f.exec(e[1]),k[this]=[t?t[0]:0,n?n[0]:0],o[this]=[p.exec(e[0])[0],p.exec(e[1])[0]]}),1===W.length&&(W[1]=W[0]),"right"===o.at[0]?g.left+=h:"center"===o.at[0]&&(g.left+=h/2),"bottom"===o.at[1]?g.top+=v:"center"===o.at[1]&&(g.top+=v/2),r=n(k.at,h,v),g.left+=r[0],g.top+=r[1],this.each(function(){var i,u,a=t(this),f=a.outerWidth(),p=a.outerHeight(),d=e(this,"marginLeft"),y=e(this,"marginTop"),$=f+d+e(this,"marginRight")+b.width,E=p+y+e(this,"marginBottom")+b.height,H=t.extend({},g),M=n(k.my,a.outerWidth(),a.outerHeight());"right"===o.my[0]?H.left-=f:"center"===o.my[0]&&(H.left-=f/2),"bottom"===o.my[1]?H.top-=p:"center"===o.my[1]&&(H.top-=p/2),H.left+=M[0],H.top+=M[1],t.support.offsetFractions||(H.left=l(H.left),H.top=l(H.top)),i={marginLeft:d,marginTop:y},t.each(["left","top"],function(n,e){t.ui.position[W[n]]&&t.ui.position[W[n]][e](H,{targetWidth:h,targetHeight:v,elemWidth:f,elemHeight:p,collisionPosition:i,collisionWidth:$,collisionHeight:E,offset:[r[0]+M[0],r[1]+M[1]],my:o.my,at:o.at,within:x,elem:a})}),o.using&&(u=function(t){var n=m.left-H.left,e=n+h-f,i=m.top-H.top,r=i+v-p,l={target:{element:w,left:m.left,top:m.top,width:h,height:v},element:{element:a,left:H.left,top:H.top,width:f,height:p},horizontal:0>e?"left":n>0?"right":"center",vertical:0>r?"top":i>0?"bottom":"middle"};f>h&&c(n+e)<h&&(l.horizontal="center"),p>v&&c(i+r)<v&&(l.vertical="middle"),s(c(n),c(e))>s(c(i),c(r))?l.important="horizontal":l.important="vertical",o.using.call(this,t,l)}),a.offset(t.extend(H,{using:u}))})},t.ui.position={fit:{left:function(t,o){var n,e=o.within,i=e.isWindow?e.scrollLeft:e.offset.left,r=e.width,c=t.left-o.collisionPosition.marginLeft,l=i-c,u=c+o.collisionWidth-r-i;o.collisionWidth>r?l>0&&0>=u?(n=t.left+l+o.collisionWidth-r-i,t.left+=l-n):u>0&&0>=l?t.left=i:l>u?t.left=i+r-o.collisionWidth:t.left=i:l>0?t.left+=l:u>0?t.left-=u:t.left=s(t.left-c,t.left)},top:function(t,o){var n,e=o.within,i=e.isWindow?e.scrollTop:e.offset.top,r=o.within.height,c=t.top-o.collisionPosition.marginTop,l=i-c,u=c+o.collisionHeight-r-i;o.collisionHeight>r?l>0&&0>=u?(n=t.top+l+o.collisionHeight-r-i,t.top+=l-n):u>0&&0>=l?t.top=i:l>u?t.top=i+r-o.collisionHeight:t.top=i:l>0?t.top+=l:u>0?t.top-=u:t.top=s(t.top-c,t.top)}},flip:{left:function(t,o){var n,e,i=o.within,r=i.offset.left+i.scrollLeft,s=i.width,l=i.isWindow?i.scrollLeft:i.offset.left,u=t.left-o.collisionPosition.marginLeft,a=u-l,f=u+o.collisionWidth-s-l,p="left"===o.my[0]?-o.elemWidth:"right"===o.my[0]?o.elemWidth:0,h="left"===o.at[0]?o.targetWidth:"right"===o.at[0]?-o.targetWidth:0,d=-2*o.offset[0];0>a?(n=t.left+p+h+d+o.collisionWidth-s-r,(0>n||n<c(a))&&(t.left+=p+h+d)):f>0&&(e=t.left-o.collisionPosition.marginLeft+p+h+d-l,(e>0||c(e)<f)&&(t.left+=p+h+d))},top:function(t,o){var n,e,i=o.within,r=i.offset.top+i.scrollTop,s=i.height,l=i.isWindow?i.scrollTop:i.offset.top,u=t.top-o.collisionPosition.marginTop,a=u-l,f=u+o.collisionHeight-s-l,p="top"===o.my[1],h=p?-o.elemHeight:"bottom"===o.my[1]?o.elemHeight:0,d="top"===o.at[1]?o.targetHeight:"bottom"===o.at[1]?-o.targetHeight:0,v=-2*o.offset[1];0>a?(e=t.top+h+d+v+o.collisionHeight-s-r,t.top+h+d+v>a&&(0>e||e<c(a))&&(t.top+=h+d+v)):f>0&&(n=t.top-o.collisionPosition.marginTop+h+d+v-l,t.top+h+d+v>f&&(n>0||c(n)<f)&&(t.top+=h+d+v))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var o,n,e,i,r,s=document.getElementsByTagName("body")[0],c=document.createElement("div");o=document.createElement(s?"div":"body"),e={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&t.extend(e,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in e)o.style[r]=e[r];o.appendChild(c),n=s||document.documentElement,n.insertBefore(o,n.firstChild),c.style.cssText="position: absolute; left: 10.7432222px;",i=t(c).offset().left,t.support.offsetFractions=i>10&&11>i,o.innerHTML="",n.removeChild(o)}()}(e)}]);
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
